/* =========================================
   1. VARIABLES & RESET (NAVY THEME)
   ========================================= */
:root {
    /* BRAND COLORS */
    --brand-navy: #013567;       /* The Logo Color */
    --brand-navy-dark: #002244;  /* Darker shade for gradients */
    
    /* ACCENT COLORS */
    --primary: #ffb700;          
    --primary-hover: #ffca28;
    
    /* BACKGROUNDS */
    --bg-dark: #ffffff;          
    --bg-alt: #f0f4f8;           /* Slightly cooler grey for better contrast */
    --bg-card: #ffffff;          
    
    /* TEXT COLORS */
    --text-main: #1e293b;        
    --text-muted: #64748b;       
    --text-light: #f1f5f9;       /* New: For text on dark backgrounds */
    
    /* BORDERS & ACCENTS */
    --border-color: #e2e8f0;
    --accent-green: #10b981;
    
    /* DIMENSIONS */
    --container-width: 1200px;
    --header-height: 90px;
    --border-radius: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px -5px rgba(1, 53, 103, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-navy);
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding { padding: 100px 0; } 

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: var(--brand-navy);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 10px;
}

/* OBFUSCATION CLASS */
.obfuscate {
    unicode-bidi: bidi-override;
    direction: rtl;
    display: inline-block; 
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary);
    color: var(--brand-navy-dark);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    font-family: 'Oswald', sans-serif;
    border: 2px solid var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background-color: var(--brand-navy);
    color: var(--primary);
    border-color: var(--brand-navy);
}

.btn-outline {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    font-family: 'Oswald', sans-serif;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #fff;
    color: var(--brand-navy);
    border-color: #fff;
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--brand-navy);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
}
.logo span { color: var(--primary); }

.logo-image img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}
.logo-image:hover img { transform: scale(1.05); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links > li { position: relative; }

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    padding: 10px 0;
}

.nav-links a:hover, .nav-links a.active { color: #fff; border-bottom: 2px solid var(--primary); }

.mobile-menu-btn { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s ease;
    padding: 10px 0;
    z-index: 1100;
}

.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child a { border-bottom: none; }

.dropdown-menu li a:hover {
    background: var(--bg-alt);
    color: var(--brand-navy);
    border-bottom-color: var(--border-color);
    padding-left: 25px;
}

/* =========================================
   4. HOME HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(1, 53, 103, 0.85), rgba(0, 34, 68, 0.3)), 
                url('images/sm.jpg');
    background-size: cover;
    background-position: center;
    /* Fixed creates parallax on PC, but we reset this for mobile below */
    background-attachment: fixed; 
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.hero-content { max-width: 800px; }

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
}

/* =========================================
   5. SERVICE CARDS & GRID
   ========================================= */
#services {
    background: linear-gradient(to bottom, #ffffff, var(--bg-alt));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card-link { display: block; height: 100%; }

.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary); 
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-navy); 
}

.service-icon {
    font-size: 2.5rem;
    color: var(--brand-navy);
    margin-bottom: 20px;
    transition: 0.3s;
}

.service-card:hover .service-icon {
    color: var(--primary);
}

.service-card h3 { 
    margin-bottom: 15px; 
    font-size: 1.4rem; 
    color: var(--brand-navy); 
}

.service-card p { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
}

/* =========================================
   6. ABOUT SECTION (DARK THEME)
   ========================================= */
#about { 
    background-color: var(--brand-navy) !important; 
    color: #fff;
}

#about .section-title { color: #fff; }

#about p { color: rgba(255,255,255,1.0); }

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.split-image img {
    border-radius: var(--border-radius);
    width: 100%;
    height: 500px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
    border: 4px solid rgba(255,255,255,0.1); 
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: #fff; 
}

.feature-list i {
    color: var(--primary); 
    margin-right: 15px;
    font-size: 1.2rem;
}

/* =========================================
   7. FAQ ACCORDION
   ========================================= */
#faq { background-color: #fff; }

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px;
    text-align: left;
    color: var(--brand-navy);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Manrope', sans-serif;
    transition: color 0.3s, background-color 0.3s;
}

.faq-question:hover { color: var(--primary); background-color: var(--bg-alt); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-muted);
}

.faq-icon { transition: transform 0.3s; color: var(--text-muted); }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--primary); }

/* =========================================
   8. INNER PAGE LAYOUT
   ========================================= */
.page-header {
    height: 70vh; 
    min-height: 600px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    position: relative;
    background-size: cover;
    background-attachment: fixed; /* Parallax default for PC */
    background-position: center;
    margin-top: var(--header-height);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    padding-bottom: 160px; 
}

.page-header .container { position: relative; z-index: 2; }

.page-header h1 { 
    color: #fff; 
    font-size: 3.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}

.breadcrumb { 
    color: rgba(255,255,255,0.8); 
    font-size: 0.95rem; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb a { color: var(--primary); }

.page-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding-bottom: 100px;
    margin-top: -80px; 
    position: relative; 
    z-index: 10;
}

.content-area {
    background: #fff;
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1); 
    border-top: 5px solid var(--primary); 
}

/* FIX: List Item Alignment for Inner Pages */
.content-area li {
    margin-bottom: 12px; 
    display: flex; 
    align-items: flex-start; /* Aligns icon to top of multiline text */
    color: var(--text-main); 
    font-weight: 600;
}

.content-area li i { 
    color: var(--brand-navy);
    background: var(--primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 5px; /* Offset to align with text line */
}

.content-area li span {
    display: block;
}

.content-area h2 { 
    color: var(--brand-navy); 
    font-size: 2rem; 
    margin: 0 0 25px; 
    position: relative;
    padding-bottom: 15px;
}

.content-area h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
}

.content-area p { margin-bottom: 25px; color: var(--text-muted); font-size: 1.05rem; }
.content-area ul { margin-bottom: 30px; }

.featured-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin: 40px 0;
    border: 10px solid #fff;
    box-shadow: var(--shadow-lg);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
    margin-top: 80px; 
}

.sidebar-widget {
    background: #fff;
    padding: 0;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color); 
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    background: var(--brand-navy);
    color: #fff;
    padding: 20px 25px;
    margin: 0;
}

.service-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid var(--bg-alt);
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.service-list a:hover, .service-list a.active {
    background: var(--bg-alt);
    color: var(--brand-navy);
    padding-left: 35px;
}

.service-list a:hover::before, .service-list a.active::before { transform: scaleY(1); }
.service-list a:last-child { border-bottom: none; }

/* "GET A QUOTE" HIGHLIGHT WIDGET */
.sidebar-widget.quote-widget {
    background: var(--brand-navy);
    color: #fff;
    text-align: center;
    padding: 30px 25px;
    border: none;
}

.sidebar-widget.quote-widget h3 {
    background: transparent;
    padding: 0 0 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 1.4rem;
}

.sidebar-widget.quote-widget p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.sidebar-widget.quote-widget a {
    color: var(--primary); 
    font-weight: 700;
    font-size: 1.3rem;
    display: block;
    margin-bottom: 15px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
}

.sidebar-widget.quote-widget a:hover {
    color: #fff; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar-widget.quote-widget .btn {
    width: 100%;
    background: var(--primary);
    color: var(--brand-navy-dark);
    border: none;
}

.sidebar-widget.quote-widget .btn:hover {
    background: #fff;
    color: var(--brand-navy);
}

/* =========================================
   9. CONTACT SECTION
   ========================================= */
#contact {
    background-color: var(--bg-alt);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(1, 53, 103, 0.1); 
    border: 1px solid var(--border-color);
}

.contact-form-wrapper { padding: 40px; }

.map-wrapper { width: 100%; min-height: 100%; }
.map-wrapper iframe { display: block; width: 100%; height: 100%; border: 1px solid #ccc;}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--brand-navy); font-weight: 600; }

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 3px rgba(1, 53, 103, 0.1);
}

textarea.form-control { resize: vertical; min-height: 120px; }

.captcha-group { display: flex; align-items: center; gap: 15px; }
.captcha-label { white-space: nowrap; font-weight: bold; color: var(--brand-navy); }

/* =========================================
   10. FOOTER
   ========================================= */
footer {
    background: var(--brand-navy);
    padding: 60px 0 30px;
    border-top: 4px solid var(--primary);
    margin-top: 0; 
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h4 { color: #fff; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }

footer .logo-image img { height: 80px; margin: 0 auto; display: block; }

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
}

/* =========================================
   11. MOBILE MEDIA QUERIES (FULL FIXES)
   ========================================= */

/* 1. TABLET & SMALL LAPTOPS (Max Width 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px; /* Ensure edge padding */
    }
    
    /* Contact form adjustment for tablet */
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        height: 350px !important; 
        min-height: auto;
    }

    /* FIX FOR IPAD / IOS PARALLAX ISSUE */
    /* Forces image to scroll normally on tablets, creating a static background */
    .hero, .page-header {
        background-attachment: scroll !important;
        background-position: center center !important;
    }
}

/* 2. MOBILE DEVICES (Max Width 900px) */
@media (max-width: 900px) {
    
    /* INNER PAGE LAYOUT FIXES (Stacking) */
    .page-layout { 
        grid-template-columns: 1fr; 
        margin-top: 0; 
        gap: 40px;
    }
    
    .sidebar { position: static; margin-top: 0; }
    
    .page-header {
        height: auto;
        min-height: 400px;
        padding-bottom: 60px; 
    }
    
    /* Ensure content area padding is reasonable on tablet */
    .content-area {
        padding: 40px 30px;
    }

    /* MOBILE MENU STYLING */
    .nav-links.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--brand-navy);
        padding: 20px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
        animation: slideDown 0.3s ease forwards;
        z-index: 999;
    }

    .nav-links.active li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* 3. PHONES (Max Width 768px) */
@media (max-width: 768px) {
    
    /* --- HEADER BUTTON FIX (REMOVE ON MOBILE) --- */
    header .btn {
        display: none !important;
    }

    /* --- NAVIGATION FIX --- */
    .mobile-menu-btn {
        display: block !important; 
        font-size: 1.8rem;
        cursor: pointer;
        color: #fff;
    }

    .nav-links {
        display: none; 
    }

    /* --- HERO SECTION FIX --- */
    .hero {
        height: auto; 
        min-height: 600px; 
        padding: 120px 0 60px 0; 
        background-position: center; 
    }

    .hero-content {
        text-align: center; 
    }
    
    /* HERO BUTTONS - STACKED */
    .hero-content .btn,
    .hero-content .btn-outline {
        display: block;
        width: 100%;
        margin: 0 0 15px 0 !important; 
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }
    
    /* Inner Page Hero Title */
    .page-header h1 {
        font-size: 2.2rem;
    }

    /* --- LAYOUT STACKING FIX --- */
    .split-section, 
    .services-grid, 
    .footer-grid {
        display: flex !important;
        flex-direction: column;
        gap: 30px;
    }

    /* --- CONTACT SECTION FIX --- */
    .contact-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow: hidden; 
    }

    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .content-area {
        padding: 30px 20px; /* Reduce padding on small screens */
    }

    .map-wrapper {
        width: 100%;
        height: 300px !important;
    }

    .map-wrapper iframe {
        width: 100% !important;
    }

    /* --- TYPOGRAPHY & SPACING FIXES --- */
    .section-title {
        font-size: 2rem !important;
    }

    .section-padding {
        padding: 60px 0 !important;
    }

    .split-image {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .split-image img {
        height: auto;
        max-height: 300px;
    }

    /* Adjust clip path */
    .hero, .page-header { 
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); 
    }
}