/* =========================================================
   MEGA MENU - Full Categories & Models
========================================================= */

/* Category Groups - Display handled by mega-menu.css */

.mega-menu__category-group {
    margin-bottom: 24px;
}

.mega-menu__category-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu__category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.mega-menu__category {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
}

.mega-menu__category:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Models */
.mega-menu__model-group {
    margin-bottom: 24px;
}

.mega-menu__model-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu__model-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.mega-menu__model {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.mega-menu__model:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.mega-menu__model--soon {
    opacity: 0.55;
    cursor: default;
}

.mega-menu__model--soon:hover {
    opacity: 1;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.mega-menu__soon-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.mega-menu__brand--soon {
    position: relative;
}

.mega-menu__brand--soon::after {
    content: '•';
    display: inline-block;
    margin-left: 4px;
    color: #f59e0b;
    font-size: 10px;
    vertical-align: middle;
}

.mega-menu__empty {
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

/* Step visibility */
.mega-menu__step {
    display: none;
}

.mega-menu__step.active,
.mega-menu__step.mm-step--active {
    display: block;
}

/* Hide non-active model groups */
.mega-menu__model-group {
    display: none;
}

.mega-menu__model-group.active {
    display: block;
}

/* Hide non-active category groups */
.mega-menu__category-group {
    display: none;
}

.mega-menu__category-group.active {
    display: block;
}

/* =========================================================
   HEADER TOOLS - Buttons, Search, Country/Language Selectors
   Core styles unified in home-global.css — only search/specific styles here
========================================================= */

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 160px;
    transition: border-color var(--transition);
}

.header-search:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.header-search span {
    font-size: 14px;
    opacity: 0.7;
}

.header-search input {
    width: 120px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

/* tool-btn, #darkbtn — unified in home-global.css */

/* Glass effect for header elements */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobile responsive for header tools */
@media (max-width: 768px) {
    .header-search {
        min-width: 0;
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .header-search {
        display: none;
    }

    /* Language selector keeps text visible on small screens */
    .tool-btn-lang {
        display: inline-flex;
        padding: 6px 8px;
        width: auto;
        min-width: 44px;
    }
    .tool-btn-lang .btn-text {
        display: inline;
    }
}

/* =========================================================
   MODERN DROPDOWN BUTTONS - Pill Shape, Light Blue
========================================================= */

/* Modern pill-shaped toggle buttons — always visible blue accent */
.tool-btn-country,
.tool-btn-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    height: 36px;
    min-width: 70px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 2px solid rgba(59, 130, 246, 0.6);
    border-radius: var(--radius-md); /* Match dark button shape */
    color: #ffffff; /* White text */
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Hover effect - lighter blue */
.tool-btn-country:hover,
.tool-btn-lang:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93bbfc; /* Lighter blue */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Active/Expanded state */
.tool-btn-country[aria-expanded="true"],
.tool-btn-lang[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* Button content layout */
.tool-btn-country .btn-icon,
.tool-btn-lang .btn-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    flex-shrink: 0;
}

.tool-btn-country .btn-text,
.tool-btn-lang .btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Add chevron indicator */
.tool-btn-country::after,
.tool-btn-lang::after {
    content: '▼';
    font-size: 8px;
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.tool-btn-country[aria-expanded="true"]::after,
.tool-btn-lang[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* =========================================================
   NAV DROPDOWNS - Country & Language Selectors
========================================================= */

/* Container for nav dropdowns to display side by side - desktop only */
@media (min-width: 901px) {
    .site-nav {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .site-nav > a,
    .site-nav > .nav-dropdown > a {
        position: relative;
        padding: 8px 14px;
        color: #cbd5e1;
        font-weight: 500;
        font-size: 15px;
        transition: color 0.3s ease;
        text-decoration: none;
    }

    .site-nav > a::after,
    .site-nav > .nav-dropdown > a::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #3b82f6, #60a5fa);
        border-radius: 2px;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .site-nav > a:hover::after,
    .site-nav > .nav-dropdown > a:hover::after {
        width: 100%;
        left: 0;
    }

    .site-nav > a:hover,
    .site-nav > .nav-dropdown > a:hover {
        color: #60a5fa;
    }
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    min-height: 36px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 180px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 8px 0;
    display: none !important;
    z-index: 9999 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.dropdown-menu button:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.dropdown-menu button.active {
    color: var(--accent-light);
    background: rgba(59, 130, 246, 0.15);
}

/* Mobile responsive for dropdowns */
@media (max-width: 768px) {
    .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        margin-top: 4px !important;
        bottom: auto !important;
        transform: none !important;
        min-width: 200px !important;
        max-width: calc(100vw - 32px) !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        background: rgba(15, 23, 42, 0.98) !important;
        border: 2px solid rgba(59, 130, 246, 0.6) !important;
        border-radius: 12px !important;
        padding: 8px 0 !important;
        z-index: 99999 !important;
    }
    .dropdown-menu button {
        color: #fff !important;
        font-size: 15px !important;
        padding: 14px 18px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 48px;
    }
    .dropdown-menu button:last-child {
        border-bottom: none;
    }
}
