/* ============================================================================
    1. THEME VARIABLES (LIGHT & DARK)
    ============================================================================ */
:root {
    --font-family: 'Inter', sans-serif;
    --accent-orange: #F56527;
    
    /* Light Mode Defaults */
    --bg-color: #F2F4F7;
    --nav-glass: rgba(255, 255, 255, 0.75);
    --nav-border: transparent;
    --text-primary: #13131A;
    --text-secondary: #5A5A72;
    
    --dropdown-bg: #FFFFFF;
    --dropdown-border: rgba(0, 0, 0, 0.05);
    --dropdown-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --hover-bg: rgba(0, 0, 0, 0.04);
    --hover-bg-light: rgba(0, 0, 0, 0.03);
    
    --btn-primary-bg: #F56527;
    --btn-primary-text: #FFFFFF;
    
    --mobile-menu-bg: rgba(255, 255, 255, 0.9);
    --mobile-menu-border: rgba(0, 0, 0, 0.12);
    
    --mega-col-title: #F56527;
}

@media (prefers-color-scheme: dark) {
    :root {
    /* Dark Mode Overrides */
    --bg-color: #000212;
    --nav-glass: rgba(0, 2, 18, 0.75);
    --text-primary: #FFFFFF;
    --text-secondary: #8A8F98;
    
    --dropdown-bg: #13131A;
    --dropdown-border: rgba(255, 255, 255, 0.1);
    --dropdown-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --hover-bg-light: rgba(255, 255, 255, 0.05);
    
    --btn-primary-bg: #FFFFFF;
    --btn-primary-text: #000000;
    
    --mobile-menu-bg: rgba(0, 2, 18, 0.9);
    --mobile-menu-border: rgba(255, 255, 255, 0.1);
    }
}

/* Global Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    height: 200vh; /* Just to allow scrolling for demo */
}

a { text-decoration: none; }
button { background: none; border: none; cursor: pointer; font-family: var(--font-family); }

/* ============================================================================
    2. TOP NAVIGATION BAR
    ============================================================================ */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: background-color 0.2s, backdrop-filter 0.2s, border-bottom 0.2s;
}

/* Glass Effect States */
.top-nav.scrolled, 
.top-nav.hovered, 
.top-nav.mobile-open {
    background-color: var(--nav-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.top-nav.mobile-open {
    border-bottom: 1px solid var(--mobile-menu-border);
}

@media (max-width: 1000px) {
    .top-nav { padding: 0 20px; }
}

/* Logo Area */
.nav-left { flex: 1; display: flex; align-items: center; }
.nav-logo-img {
    width: auto;           
    max-width: 400px;      /* INCREASED: Allows the logo to grow wider */
    height: 90px;          /* INCREASED: Makes the logo taller and larger overall */
    object-fit: contain;   
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-logo-img:hover {
    opacity: 0.8;          /* Add a slight hover effect since it's clickable */
}

/* Right Area */
.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* Desktop/Mobile Display Utility */
.desktop-only { display: flex; }
.mobile-only { display: none; }
@media (max-width: 1000px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex; }
}

/* Desktop Center Links */
.nav-center {
    display: flex;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nav-item .material-icons-round { font-size: 16px; }

/* Buttons */
.btn-login {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-get-started {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-weight: 700;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 20px;
    transition: opacity 0.2s;
}
.btn-get-started:hover { opacity: 0.9; }

/* ============================================================================
    3. DROPDOWNS (MEGA & STANDARD)
    ============================================================================ */
.dropdown-container {
    position: absolute;
    top: 45px;
    padding-top: 10px; /* Invisible hover bridge */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    pointer-events: none;
}

.nav-item.active .dropdown-container {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.dropdown-content {
    background-color: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 20px;
    box-shadow: var(--dropdown-shadow);
}

/* Mega Menu Specific */
.mega-menu {
    left: -200px; /* Replicates Offset(-200, 45) */
    width: 850px;
}

.mega-menu .dropdown-content {
    padding: 32px;
    display: flex;
    gap: 16px;
}

.mega-col { flex: 1; display: flex; flex-direction: column; }

.mega-col-title {
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
    color: var(--mega-col-title);
    letter-spacing: 1.5px;
    line-height: 1.2;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mega-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.mega-item .material-icons-round {
    font-size: 18px;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.mega-item-text {
    margin-left: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.87;
    transition: color 0.15s;
}

.mega-item:hover { background-color: var(--hover-bg); }
.mega-item:hover .material-icons-round,
.mega-item:hover .mega-item-text {
    color: var(--accent-orange);
    opacity: 1;
}

/* Standard Dropdown Specific */
.standard-dropdown {
    left: -20px; /* Replicates Offset(-20, 45) */
    width: 320px;
}

.standard-dropdown .dropdown-content {
    padding: 12px 8px;
    border-radius: 16px;
}

.std-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.std-item:hover { background-color: var(--hover-bg-light); }

.std-item > .material-icons-round {
    font-size: 20px;
    color: var(--accent-orange);
    margin-right: 16px;
}

.std-item-content { flex: 1; display: flex; flex-direction: column; }

.std-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color 0.15s;
}

.std-item:hover .std-item-title { color: var(--accent-orange); }

.std-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================================================
    4. MOBILE MENU OVERLAY
    ============================================================================ */
.mobile-menu-btn {
    color: var(--text-secondary);
    border: none !important; 
    background: transparent !important;
    
    /* 1. Remove standard outlines and shadows */
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important; /* Safari/Chrome specific */
    
    /* 2. Remove tap highlight colors entirely */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    
    /* 3. Prevent text selection which sometimes triggers highlights */
    user-select: none;
    -webkit-user-select: none;
}

/* 4. Target all interaction states aggressively */
.mobile-menu-btn:focus,
.mobile-menu-btn:active,
.mobile-menu-btn:focus-visible,
.mobile-menu-btn:hover {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 5. Apply the same stripping to the icon inside */
.mobile-menu-btn .material-icons-round { 
    font-size: 28px;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.mobile-menu-btn .material-icons-round:focus,
.mobile-menu-btn .material-icons-round:active {
    outline: none !important;
}

.mobile-overlay {
    position: fixed;
    top: 70px;
    left: 0; right: 0; bottom: 0;
    background-color: var(--mobile-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: none;
    overflow-y: auto;
}

.mobile-overlay.active { display: block; }

.mobile-content { padding: 32px 24px; }

/* Mobile Accordion (ExpansionTile) */
details.mobile-expansion { margin-bottom: 16px; }

details.mobile-expansion summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 12px 0;
    cursor: pointer;
}

details.mobile-expansion summary::-webkit-details-marker { display: none; }
details.mobile-expansion summary .material-icons-round { transition: transform 0.2s; }
details.mobile-expansion[open] summary .material-icons-round {
    transform: rotate(180deg);
    color: var(--accent-orange);
}

.mobile-expansion-list { padding-bottom: 16px; }

.mobile-expansion-item {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Mobile Simple Link */
.mobile-simple-link {
    display: block;
    padding: 12px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    cursor: pointer;
}

/* Mobile Buttons */
.mobile-btn-outline {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px;
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    color: var(--accent-orange);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.mobile-btn-solid {
    display: block;
    width: 100%;
    text-align: center;
    padding: 16px;
    background-color: var(--accent-orange);
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
}

/* Mobile Sub Menu View */
.mobile-submenu-view { display: none; }

.mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
    font-size: 16px;
    padding: 16px;
    cursor: pointer;
}
.mobile-back-btn .material-icons-round { font-size: 16px; }

.mobile-submenu-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--accent-orange);
    letter-spacing: 1.5px;
    padding: 16px 32px;
}

.mobile-submenu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-submenu-item .material-icons-round {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.5;
}