/* ==================== VARIABLES ==================== */
:root {
    /* Colors - US Executive Palette */
    --primary: #0a2540;
    --primary-bright: #635bff;
    --accent: #ef4444;
    --text-main: #1a1f36;
    --text-muted: #4f566b;
    --text-white: #ffffff;
    --bg-white: #ffffff;
    --bg-alt: #f7fafc;
    --border: #e3e8ee;

    /* Dark Mode Defaults */
    --bg-dark: #0a0a18;
    --bg-dark-alt: #16162a;
    --border-dark: #2d2d44;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3.5rem;
    --spacing-2xl: 6rem;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* Glassmorphism & Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-shadow: 0 0 20px rgba(99, 91, 255, 0.4);
    --bg-main: var(--bg-white);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-white: var(--bg-dark);
    --bg-alt: var(--bg-dark-alt);
    --text-main: #f9f9ff;
    --text-muted: #a0aec0;
    --border: var(--border-dark);
}

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== HEADER & NAVBAR ==================== */
.header {
    background: rgba(var(--bg-white), 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar {
    padding: 1.25rem 0;
}

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

.logo a {
    font-size: 1.7rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(to right, var(--primary-bright), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-bright);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 2px;
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: var(--spacing-2xl) 0;
    text-align: center;
    background: radial-gradient(circle at top left, rgba(99, 91, 255, 0.05), transparent),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.05), transparent);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto var(--spacing-xl);
}

.hero-btns {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.cta-button {
    padding: 1.2rem 2.8rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:not(.secondary) {
    background: linear-gradient(135deg, var(--primary-bright), #8b5cf6);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 91, 255, 0.3), var(--glow-shadow);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 91, 255, 0.5), var(--glow-shadow);
}

/* ==================== SERVICES ==================== */
.services {
    padding: var(--spacing-2xl) 0;
    background-color: var(--bg-alt);
}

.section-title {
    display: block !important;
    margin: 0 auto 3rem auto !important;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    max-width: 800px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: 24px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-bright);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
}

/* ==================== STRATEGY ==================== */
.strategy {
    padding: var(--spacing-2xl) 0;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.strategy-card {
    padding: var(--spacing-lg);
    border-left: 4px solid var(--accent);
}

.strategy-card h3 {
    margin-bottom: var(--spacing-sm);
}

.strategy-card p {
    color: var(--text-muted);
}

/* ==================== AEO HUB ==================== */
.aeo-hub {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-alt);
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
}

.hub-card {
    background: var(--bg-white);
    padding: var(--spacing-2xl);
    border-radius: 30px;
    text-align: center;
    border: 1px solid var(--border);
}

.hub-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
}

.hub-button {
    margin-top: var(--spacing-lg);
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.hub-button:hover {
    background: var(--primary-bright);
}

/* ==================== FAQ ==================== */
.faq {
    padding: var(--spacing-2xl) 0;
}

.search-box {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.search-input {
    width: 100%;
    max-width: 650px;
    padding: 1.2rem 2.5rem;
    border-radius: 100px;
    border: 2px solid var(--border);
    font-size: 1.1rem;
    outline: none;
    background: var(--bg-white);
    color: var(--text-main);
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.1);
}

.faq-list {
    max-width: 850px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.2rem;
    transition: var(--transition);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 2rem;
    transition: var(--transition);
    color: var(--text-muted);
    background: var(--bg-alt);
}

.faq-answer.open {
    max-height: 500px;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--primary);
    color: white;
    padding: 6rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-bright), transparent);
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-main);
    padding: 2.5rem 3.5rem;
    border-radius: 24px;
    margin-bottom: 5rem;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.footer-bar h3 {
    color: var(--text-main);
    margin: 0;
    font-size: 1.8rem;
    font-family: var(--font-heading);
}

.footer-bar .cta-button {
    margin: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: var(--primary-bright);
    border-color: var(--primary-bright);
    box-shadow: var(--glow-shadow);
}

.resources-grid-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.resources-grid-list li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resources-grid-list li a:hover {
    color: var(--primary-bright);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-bright);
    text-decoration: none;
    font-weight: 600;
}

/* Dropdown Support */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--bg-alt);
    color: var(--primary-bright);
}

.dropdown-item.featured {
    font-weight: 800;
    color: var(--primary-bright);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.modal-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.modal-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .footer-bar {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 50%;
    transform: translateX(50%) translateY(10px);
}

[dir="rtl"] .nav-item.dropdown:hover .dropdown-menu {
    transform: translateX(50%) translateY(0);
}

[dir="rtl"] .fa-chevron-right {
    transform: rotate(180deg);
}


/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hub-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.8rem;
    }
}