/* ============================================
   Shared CSS: Variables, Base, Header, Footer
   ============================================ */
:root {
    --primary-blue: #0066FF;
    --secondary-blue: #003D99;
    --accent-blue: #4D94FF;
    --light-blue: #E6F2FF;
    --ultra-light-blue: #F5F9FF;
    --dark: #1E3A5F;
    --gray-900: #1E3A5F;
    --gray-800: #2C3E50;
    --gray-700: #374151;
    --gray-600: #4B5563;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgb(30 58 95 / 0.05);
    --shadow: 0 1px 3px 0 rgb(30 58 95 / 0.1), 0 1px 2px -1px rgb(30 58 95 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(30 58 95 / 0.1), 0 2px 4px -2px rgb(30 58 95 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(30 58 95 / 0.1), 0 4px 6px -4px rgb(30 58 95 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(30 58 95 / 0.1), 0 8px 10px -6px rgb(30 58 95 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(30 58 95 / 0.25);
    --blur-backdrop: blur(20px);
    --transition-fast: all .15s ease;
    --transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all .5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 6px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-2xl: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--gray-800);
    background: #fff;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==========================================
   HEADER — Premium Floating Glassmorphism
   ========================================== */
.header {
    position: fixed;
    top: 16px;
    left: 24px;
    right: 24px;
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 20px;
    z-index: 1000;
    padding: 14px 28px;
    transition: var(--transition);
    box-shadow:
        0 4px 24px rgba(0, 102, 255, .06),
        0 1px 3px rgba(0, 0, 0, .04),
        inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* Animated gradient bottom accent */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-blue),
        var(--primary-blue),
        var(--accent-blue),
        transparent);
    border-radius: 2px;
    opacity: 0;
    transition: var(--transition);
}

.header.scrolled {
    top: 10px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, .92);
    border-color: rgba(0, 102, 255, .08);
    box-shadow:
        0 8px 32px rgba(0, 102, 255, .1),
        0 2px 8px rgba(0, 0, 0, .06),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    border-radius: 16px;
}

.header.scrolled::after {
    opacity: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -- Logo -- */
.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo-img {
    height: 22px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.logo-link:hover .logo-img {
    transform: scale(1.08);
}

.logo-link:hover {
    filter: drop-shadow(0 2px 12px rgba(0, 102, 255, .25));
}

/* -- Nav Pill Group -- */
.header nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 6px;
    align-items: center;
    background: rgba(0, 102, 255, .04);
    border: 1px solid rgba(0, 102, 255, .06);
    border-radius: 14px;
    padding: 4px;
}

.nav-item a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
    padding: 8px 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-item a:hover {
    color: var(--primary-blue);
    background: rgba(0, 102, 255, .06);
}

/* Active page indicator — pill highlight */
.nav-item a[style*="color:var(--primary-blue)"],
.nav-item a[style*="color: var(--primary-blue)"] {
    color: var(--primary-blue) !important;
    background: rgba(0, 102, 255, .08);
    font-weight: 700;
}

/* -- CTA Button — Glowing Gradient -- */
.cta-button {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow:
        0 4px 14px rgba(0, 102, 255, .25),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

/* Shimmer effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, .25),
        transparent);
    transition: none;
    animation: ctaShimmer 3s ease-in-out infinite;
}

@keyframes ctaShimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 8px 24px rgba(0, 102, 255, .35),
        inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* -- Mobile Menu Toggle -- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(0, 102, 255, .06);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hamburger-line:nth-child(1) { top: 10px; }
.hamburger-line:nth-child(2) { top: 17px; }
.hamburger-line:nth-child(3) { top: 24px; }

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 17px;
    transform: translateX(-50%) rotate(45deg);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
}
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    top: 17px;
    transform: translateX(-50%) rotate(-45deg);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: linear-gradient(135deg, var(--dark), var(--gray-800));
    color: #fff;
    padding: 80px 0 20px;
    position: relative;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}
.footer-section h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: var(--accent-blue); }
.footer-section h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--accent-blue); }
.footer-section p, .footer-section a { color: var(--gray-300); text-decoration: none; line-height: 1.6; transition: var(--transition); }
.footer-section a:hover { color: var(--accent-blue); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.social-links { display: flex; gap: 16px; margin-top: 20px; }
.social-link {
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, .1);
    border-radius: var(--border-radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-300);
    transition: var(--transition);
}
.social-link:hover { background: var(--primary-blue); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 30px; padding-bottom: 30px; }
.footer-bottom-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-bottom-content p { color: var(--gray-400); font-size: 14px; margin: 0; }
.legal-links { display: flex; gap: 24px; align-items: center; }
.legal-links a { color: var(--gray-400); font-size: 14px; text-decoration: none; transition: var(--transition); position: relative; }
.legal-links a:hover { color: var(--gray-300); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    .header {
        top: 10px;
        left: 12px;
        right: 12px;
        padding: 10px 16px;
        border-radius: 16px;
    }

    .header.scrolled {
        top: 6px;
        padding: 8px 14px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .header nav.mobile-open {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        gap: 8px;
        background: none;
        border: none;
        padding: 0;
        text-align: center;
    }

    .nav-item a {
        font-size: 20px;
        padding: 14px 32px;
        border-radius: 14px;
        width: 100%;
        justify-content: center;
    }

    .logo-img { height: 18px; }

    .cta-button {
        padding: 8px 18px;
        font-size: 13px;
    }

    .footer-bottom-content { flex-direction: column; text-align: center; }
    .legal-links { flex-wrap: wrap; justify-content: center; }
    .legal-links a { font-size: 12px; }
}
