/* =========================================
   MODERN HEADER & FOOTER — COMPONENTS CSS
   ========================================= */

/* =========================================
   HEADER
   ========================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.35s ease,
                box-shadow 0.35s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.07);
}
.site-header.menu-open {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Hide duplicate logo when drawer is open — drawer has its own brand */
.site-header.menu-open .header-logo {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
/* Restore logo smoothly when drawer closes */
.site-header .header-logo {
    transition: opacity 0.25s ease;
}
body.menu-lock { overflow: hidden; }

/* Header Inner Layout */
.header-inner {
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 24px;
}
.site-header.scrolled .header-inner {
    height: 66px;
}

/* Logo */
.header-logo {
    display: flex; align-items: center;
    text-decoration: none; flex-shrink: 0;
}
.header-logo img {
    height: 44px; width: auto;
    transition: height 0.3s ease;
}
.site-header.scrolled .header-logo img {
    height: 38px;
}
.logo-fallback {
    display: flex; align-items: center; gap: 8px;
    font-size: 18px; font-weight: 800; color: var(--primary);
    line-height: 1.1;
}
.logo-fallback i { font-size: 28px; }

/* Desktop Nav */
.header-nav {
    display: flex; align-items: center; gap: 6px;
}
.header-nav a {
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    letter-spacing: 0.2px;
}
.header-nav a:hover {
    color: var(--primary);
    background: rgba(29, 79, 159, 0.06);
}
.header-nav a.active {
    color: var(--primary);
    background: rgba(29, 79, 159, 0.08);
}
.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex; align-items: center; gap: 16px; flex-shrink: 0;
}
.header-phone {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
    font-size: 14px; font-weight: 700;
    color: var(--dark-secondary);
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.25s ease;
}
.header-phone i {
    font-size: 14px; color: var(--primary);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(29, 79, 159, 0.08);
    border-radius: 8px;
    transition: all 0.25s ease;
}
.header-phone:hover {
    color: var(--primary);
}
.header-phone:hover i {
    background: var(--primary); color: #fff;
}

/* CTA Button */
.header-cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 24px;
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    text-decoration: none;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(29, 79, 159, 0.25);
}
.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(29, 79, 159, 0.35);
    background: #2a6fd6;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; z-index: 10000;
    width: 36px;
    position: relative;
}
.hamburger span {
    display: block; width: 100%; height: 2.5px;
    background: var(--dark-secondary);
    border-radius: 3px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0; transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hide hamburger when menu is open — close X is inside the drawer */
.hamburger.open {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Backdrop — glassmorphism: blurred homepage visible behind drawer */
.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 18, 48, 0.18);
    backdrop-filter: blur(10px) saturate(0.85);
    -webkit-backdrop-filter: blur(10px) saturate(0.85);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu — Right Drawer */
.mobile-menu {
    position: fixed;
    top: 0; right: 0;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -12px 0 50px rgba(0, 0, 0, 0.18);
}
.mobile-menu.open {
    transform: translateX(0);
}

/* Drawer Top — Brand + Close */
.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 16px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}
.mobile-brand-icon {
    width: 42px; height: 42px;
    border-radius: 11px;
    background: #ffffff;
    border: 1px solid rgba(29, 79, 159, 0.12);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 17px;
    flex-shrink: 0;
    overflow: hidden;
}
.mobile-brand-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.mobile-brand-info span {
    display: block;
    font-size: 10.5px;
    color: #9ca3af;
    margin-top: 1px;
}
.mobile-close {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    color: #374151;
    transition: all 0.2s;
    flex-shrink: 0;
}
.mobile-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Nav Links */
.mobile-nav {
    display: flex; flex-direction: column; gap: 1px;
    padding: 10px 10px 0 10px;
    flex: 0 0 auto;
}
.mobile-nav a {
    text-decoration: none;
    font-size: 14px; font-weight: 600;
    color: #111827;
    padding: 11px 13px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 11px;
    border: none;
}
.mobile-nav a i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.2s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--primary);
    background: rgba(29, 79, 159, 0.07);
}
.mobile-nav a:hover i,
.mobile-nav a.active i {
    color: var(--primary);
}

/* Footer — sticky at bottom so always visible on all screen sizes */
.mobile-menu-footer {
    display: flex; flex-direction: column; gap: 10px;
    padding: 32px 14px 24px;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    z-index: 2;
}
.mobile-phone {
    text-decoration: none; font-size: 14px; font-weight: 700;
    color: var(--primary); text-align: center;
    padding: 11px; border-radius: 10px;
    background: rgba(29,79,159,0.06);
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
}
.mobile-phone i { margin-right: 0; }

/* Body offset for fixed header */
body { padding-top: 76px; }

/* =========================================
   HEADER DROPDOWNS
   ========================================= */
.nav-dropdown-wrapper {
    position: relative;
}
.nav-has-dropdown {
    display: flex; align-items: center; gap: 5px;
}
.nav-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}
.nav-dropdown-wrapper:hover .nav-arrow {
    transform: rotate(180deg);
}
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    pointer-events: none;
}
.nav-dropdown-wide {
    min-width: 270px;
    left: 0;
    transform: translateX(0) translateY(6px);
}
.nav-dropdown-wrapper:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}
.nav-dropdown-wrapper:hover .nav-dropdown-wide {
    transform: translateX(0) translateY(0);
}
.nav-dropdown a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-decoration: none;
    transition: all 0.2s ease !important;
    background: transparent !important;
}
.nav-dropdown a:hover {
    background: rgba(29, 79, 159, 0.06) !important;
    color: var(--primary) !important;
    transform: translateX(3px) !important;
}
.nav-dropdown a i {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(29, 79, 159, 0.08);
    border-radius: 7px;
    font-size: 13px;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.nav-dropdown a:hover i {
    background: var(--primary);
    color: #fff;
}
.nav-dropdown a::after { display: none !important; }

/* Services Accordion Toggle — split: text link + chevron button */
.mobile-nav-toggle-row {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    overflow: hidden;
}
.mobile-nav-link-svc {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    font-size: 14px; font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: all 0.2s ease;
}
.mobile-nav-link-svc i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: color 0.2s;
}
.mobile-nav-link-svc:hover,
.mobile-nav-toggle-row.open .mobile-nav-link-svc {
    background: rgba(29, 79, 159, 0.07);
    color: var(--primary);
}
.mobile-nav-link-svc:hover i,
.mobile-nav-toggle-row.open .mobile-nav-link-svc i {
    color: var(--primary);
}
.mobile-services-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 15px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.mobile-services-chevron:hover,
.mobile-nav-toggle-row.open .mobile-services-chevron {
    background: rgba(29, 79, 159, 0.07);
}
.mobile-toggle-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.3s ease, color 0.2s;
    flex-shrink: 0;
}
.mobile-nav-toggle-row.open .mobile-toggle-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Collapsible Sub-group */
.mobile-sub-group {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-sub-group.open {
    max-height: 360px;
}

/* Sub-links */
.mobile-sub {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    padding: 9px 13px !important;
}
.mobile-sub i {
    font-size: 12px !important;
    color: #c4c9d4 !important;
}
.mobile-sub:hover i {
    color: var(--primary) !important;
}

/* =========================================
   RESPONSIVE HEADER
   ========================================= */
@media (max-width: 1024px) {
    .header-nav { display: none; }
    .header-actions { display: none; }
    .hamburger { display: flex; }
}
@media (max-width: 768px) {
    .header-inner { height: 66px; padding: 0 20px; }
    .header-logo img { height: 36px; }
    body { padding-top: 66px; }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    position: relative;
}

/* Gradient accent line at top */
.footer-accent-line {
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-cyan) 40%, var(--primary) 100%);
}

/* Footer body */
.footer-body {
    background: #111827;
    padding: 70px 0 50px;
}

/* 4-Column Grid */
.footer-grid-modern {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.8fr 1.4fr;
    gap: 48px;
}

/* Brand Column */
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-logo-link { display: inline-flex; }
.footer-logo-link img {
    height: 42px; filter: brightness(0) invert(1);
}
.logo-fallback-footer {
    display: flex; align-items: center; gap: 8px;
    font-size: 20px; font-weight: 800; color: #fff;
}
.logo-fallback-footer i { font-size: 28px; }
.footer-tagline {
    font-size: 14px; color: rgba(255, 255, 255, 0.5);
    line-height: 1.7; max-width: 300px;
}

/* Social Icons */
.footer-socials {
    display: flex; gap: 10px;
}
.footer-socials a {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.footer-socials a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(29, 79, 159, 0.3);
}

/* Footer Columns */
.footer-col h4 {
    font-size: 15px; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 22px;
    position: relative; padding-bottom: 12px;
}
.footer-col h4::after {
    content: ''; position: absolute;
    bottom: 0; left: 0;
    width: 28px; height: 2px;
    background: var(--accent-cyan);
    border-radius: 2px;
}
.footer-col ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 12px;
}
.footer-col ul li a {
    text-decoration: none;
    font-size: 14px; font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.25s ease;
    display: inline-flex; align-items: center; gap: 6px;
}
.footer-col ul li a::before {
    content: '';
    width: 0; height: 1.5px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
    display: inline-block;
}
.footer-col ul li a:hover {
    color: #fff;
    transform: translateX(4px);
}
.footer-col ul li a:hover::before {
    width: 14px;
}

/* Contact Items */
.footer-contact-items {
    display: flex; flex-direction: column; gap: 14px;
    margin-bottom: 24px;
}
.footer-contact-row {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; color: rgba(255, 255, 255, 0.5);
}
.footer-contact-row i {
    width: 32px; height: 32px; min-width: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--accent-cyan);
    font-size: 13px;
}
.footer-contact-row a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.25s ease;
}
.footer-contact-row a:hover { color: #fff; }

/* Newsletter */
.footer-newsletter-box {
    padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06);
}
.newsletter-label {
    display: block; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}
.newsletter-form {
    display: flex; gap: 0;
    border-radius: 10px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s;
}
.newsletter-form:focus-within {
    border-color: var(--accent-cyan);
}
.newsletter-form input {
    flex: 1; padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: none; outline: none;
    font-family: inherit; font-size: 13px;
    color: #fff;
}
.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.newsletter-form button {
    padding: 12px 16px;
    background: var(--primary);
    border: none; cursor: pointer;
    color: #fff; font-size: 14px;
    transition: background 0.3s;
}
.newsletter-form button:hover {
    background: var(--accent-cyan);
    color: #0d2255;
}

/* Bottom Bar */
.footer-bottom {
    background: #0a0f1a;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.footer-bottom-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-bottom p {
    font-size: 13px; font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}
.footer-credit a {
    color: var(--accent-cyan);
    text-decoration: none; font-weight: 600;
    transition: color 0.25s;
}
.footer-credit a:hover { color: #fff; }
.footer-bottom p a {
    color: var(--accent-cyan);
    text-decoration: none; font-weight: 600;
    transition: color 0.25s;
}
.footer-bottom p a:hover { color: #fff; }

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--primary);
    border: none; cursor: pointer;
    color: #fff; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(29, 79, 159, 0.3);
    opacity: 0; transform: translateY(20px);
    transition: all 0.35s ease;
    pointer-events: none;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1; transform: translateY(0);
    pointer-events: all;
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(29, 79, 159, 0.4);
}

/* =========================================
   RESPONSIVE FOOTER
   ========================================= */
@media (max-width: 1024px) {
    .footer-grid-modern {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}
@media (max-width: 768px) {
    .footer-body { padding: 50px 0 40px; }
    .footer-grid-modern {
        grid-template-columns: 1fr 1fr;
        gap: 32px 20px;
        text-align: left;
    }
    /* Brand and Contact span full width */
    .footer-brand { grid-column: 1 / -1; align-items: flex-start; }
    .footer-contact-col { grid-column: 1 / -1; text-align: left; }
    /* Quick Links + Services sit side by side */
    .footer-col:not(.footer-contact-col) { grid-column: auto; text-align: left; }

    .footer-tagline { max-width: 100%; }
    .footer-socials { justify-content: flex-start; }
    .footer-col h4::after { left: 0; transform: none; }
    .footer-col ul { align-items: flex-start; }
    .footer-contact-items { align-items: flex-start; }
    .footer-bottom-inner {
        flex-direction: column; gap: 8px; text-align: center;
    }
    .footer-logo-link { justify-content: center; }
    .back-to-top { bottom: 20px; right: 20px; }
}
