/* =========================================
   EXPERTPULSE HEADER STYLES
   Styles 1-7 + Mobile + Search + Dropdowns
   ========================================= */

/* --- 1. CORE HEADER LAYOUT --- */
header.site-header {
    height: var(--header-height);
    background: var(--bg-body);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    transition: background 0.3s ease, border-color 0.3s ease;
    width: 100%;
    z-index: 1000;
}

.header-inner { display: flex; align-items: center; width: 100%; height: 100%; position: relative; }

/* --- COMPONENTS --- */
.logo { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.5px; display: flex; align-items: center; gap: 6px; color: var(--text-main); flex-shrink: 0; }
.logo i, .logo span { color: var(--accent); }

.header-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.icon-btn {
    background: transparent; border: 1px solid transparent; width: 42px; height: 42px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--desk-icon-color); transition: 0.2s; font-size: 1.2rem;
}
.icon-btn:hover { background: var(--bg-section-alt); color: var(--accent); }

.header-socials-group { display: flex; gap: 8px; margin-right: 10px; padding-right: 22px; border-right: 1px solid var(--border); }
@media (max-width: 992px) { .header-socials-group { display: none !important; } }

/* =========================================
   2. DESKTOP NAVIGATION
   ========================================= */
.nav-menu { display: flex; align-items: center; margin: 0 auto; height: 100%; }
.ep-main-menu { display: flex; gap: 32px; align-items: center; margin: 0; padding: 0; height: 100%; }
.ep-main-menu li { position: relative; list-style: none; height: 100%; display: flex; align-items: center; }

.ep-main-menu > li > a {
    font-weight: 700; font-size: var(--desk-menu-size); color: var(--menu-text);
    display: flex; align-items: center; gap: 6px; transition: color 0.2s;
    padding: var(--nav-padding, 15px) 0; position: relative;
}
.ep-main-menu a:hover { color: var(--accent); }
.dropdown-icon { font-size: 1.1em; transition: transform 0.3s ease; }
.ep-main-menu li:hover > a .dropdown-icon { transform: rotate(180deg); }

/* --- HOVER EFFECTS --- */
[data-nav-hover="underline"] .ep-main-menu > li > a .ep-menu-title { position: relative; }
[data-nav-hover="underline"] .ep-main-menu > li > a .ep-menu-title::after {
    content: ''; position: absolute; bottom: -6px; left: 0; width: 0; height: 2px;
    background-color: var(--accent); transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
[data-nav-hover="underline"] .ep-main-menu > li:hover > a .ep-menu-title::after { width: 100%; }

[data-nav-hover="dot"] .ep-main-menu > li > a .ep-menu-title { position: relative; }
[data-nav-hover="dot"] .ep-main-menu > li > a .ep-menu-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%) scale(0);
    width: 6px; height: 6px; border-radius: 50%; background-color: var(--accent);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
[data-nav-hover="dot"] .ep-main-menu > li:hover > a .ep-menu-title::after { transform: translateX(-50%) scale(1); }

[data-nav-hover="background"] .ep-main-menu > li > a::before {
    content: ''; position: absolute; top: 50%; left: -14px; right: -14px; height: 42px;
    transform: translateY(-50%) scale(0.9); background-color: var(--bg-section-alt);
    border-radius: 50px; opacity: 0; transition: all 0.25s ease; z-index: 0;
}
[data-nav-hover="background"] .ep-main-menu > li:hover > a::before { opacity: 1; transform: translateY(-50%) scale(1); }
[data-nav-hover="background"] .ep-main-menu > li > a .ep-menu-title, 
[data-nav-hover="background"] .ep-main-menu > li > a i { position: relative; z-index: 1; }

/* =========================================
   3. DROPDOWN MENUS
   ========================================= */
.ep-main-menu .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 250px;
    opacity: 0; visibility: hidden;
    transform: translateY(15px) scale(0.97); transform-origin: top left;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    z-index: 999; display: flex; flex-direction: column;
}
.ep-main-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.ep-main-menu .sub-menu li { width: 100%; display: block; height: auto; position: relative; }
.ep-main-menu .sub-menu a {
    font-size: 0.95rem; color: var(--text-main); width: 100%;
    display: flex; align-items: center; gap: 12px; font-weight: 600;
    padding: 10px 15px; transition: all 0.25s ease;
}
.ep-main-menu .sub-menu .sub-menu { top: 0; left: 100%; margin-left: 5px; }

[data-submenu="modern"] .ep-main-menu .sub-menu {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.06); padding: 12px;
}
[data-submenu="modern"] .ep-main-menu .sub-menu a { border-radius: 8px; }
[data-submenu="modern"] .ep-main-menu .sub-menu a:hover { background: var(--bg-section-alt); color: var(--accent); padding-left: 20px; }

[data-submenu="minimal"] .ep-main-menu .sub-menu {
    background: var(--bg-card); border: none; border-radius: 0 0 4px 4px;
    border-top: 3px solid var(--accent); box-shadow: 0 15px 35px rgba(0,0,0,0.08); padding: 0;
}
[data-submenu="minimal"] .ep-main-menu .sub-menu a { border-radius: 0; border-bottom: 1px solid rgba(0,0,0,0.04); padding: 14px 25px; }
[data-submenu="minimal"] .ep-main-menu .sub-menu a:hover { background: transparent; color: var(--accent); }

[data-submenu="glass"] .ep-main-menu .sub-menu {
    background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 20px; padding: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}
[data-theme="dark"][data-submenu="glass"] .ep-main-menu .sub-menu { background: rgba(20, 20, 25, 0.7); border-color: rgba(255, 255, 255, 0.05); }
[data-submenu="glass"] .ep-main-menu .sub-menu a:hover { background: rgba(255, 255, 255, 0.4); color: var(--accent); }

/* =========================================
   4. HEADER LAYOUTS 1-7 (Standard)
   ========================================= */
.header-style-1 .header-inner { justify-content: space-between; }
.header-style-1 .nav-menu { margin-left: auto; margin-right: 40px; }

.header-style-2 .header-inner { justify-content: space-between; }
.header-style-2 .logo { position: absolute; left: 50%; transform: translateX(-50%); }
.header-style-2 .nav-menu { margin-right: auto; margin-left: 0; }
.header-style-2 .header-actions { margin-left: auto; }

.header-style-3 {
    position: absolute !important; top: 0; left: 0; right: 0; width: 100%;
    background: transparent !important; border-bottom: none !important; z-index: 2000;
}
.header-style-3 .header-inner { justify-content: space-between; }
.header-style-3 .nav-menu { margin-left: auto; margin-right: 40px; }

.header-style-4 .header-inner { justify-content: space-between; }
.header-style-4 .nav-menu { margin-left: 40px; margin-right: auto; }

.header-style-5 .header-inner { justify-content: space-between; }
.header-style-5 .logo { flex: 1; justify-content: flex-start; }
.header-style-5 .nav-menu { flex: 2; display: flex; justify-content: center; }
.header-style-5 .header-actions { flex: 1; justify-content: flex-end; }

/* Stacked Headers with fix for Spacing */
/* --- Style 6: Stacked (Center Logo, Inline Date & Actions) --- */
.header-style-6 { 
    height: auto !important; 
    padding-top: 20px; 
    padding-bottom: 0; 
    background-color: var(--bg-body) !important; 
}

/* Ensure the inner container uses flex wrap so the nav menu can drop down */
.header-style-6 .header-inner { 
    display: flex !important;
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center; 
    min-height: auto; 
}

/* 1. Left Wrap (Socials & Date) - Fixed width basis to balance the right side */
.header-style-6 .header-left-wrap { 
    position: static !important; /* Remove absolute positioning */
    flex: 1 1 0%; /* Allow it to grow and shrink equally */
    display: flex; 
    align-items: center; 
    justify-content: flex-start; /* Flush left */
}

/* 2. Center Wrap (Logo) */
.header-style-6 .logo { 
    position: static !important; 
    transform: none !important; 
    flex: 0 0 auto; /* Keep exact size of logo */
    display: flex; 
    justify-content: center; 
    margin: 0 20px !important; /* Add slight breathing room */
    padding-bottom: 0 !important; 
    order: unset !important;
}

/* 3. Right Wrap (Search/User/Theme) */
.header-style-6 .header-actions { 
    position: static !important; 
    flex: 1 1 0%; /* Match the flex basis of the left wrap to perfectly center the logo */
    display: flex; 
    justify-content: flex-end; /* Flush right */
    order: unset !important;
}

/* 4. Bottom Wrap (Nav Menu) */
.header-style-6 .nav-menu { 
    width: 100%; /* Force it to take up the entire second row */
    display: flex; 
    justify-content: center; 
    border-top: 1px solid var(--border); 
    padding: 5px 0; 
    margin-top: 15px !important; 
    order: 4 !important; /* Ensure it stays at the bottom */
}

.header-style-7 { height: auto !important; padding-top: 25px; background-color: var(--bg-body) !important; }
.header-style-7 .header-inner { flex-wrap: wrap; justify-content: space-between; align-items: center; }
.header-style-7 .logo { order: 1; position: relative; }
.header-style-7 .header-actions { order: 2; margin-left: auto; }
.header-style-7 .nav-menu { 
    order: 3; width: 100%; display: flex; justify-content: flex-start; 
    border-top: 1px solid var(--border); padding: 5px 0; margin-top: 15px; 
}

/* Push content down for stacked headers */
body:has(header.header-style-6) .site-main > section:first-child,
body:has(header.header-style-7) .site-main > section:first-child {
    padding-top: 40px !important;
}

/* =========================================
   WP ADMIN BAR FIXES (CRITICAL UPDATE)
   ========================================= */

/* 1. Standard Headers */
body.admin-bar header.site-header { margin-top: 32px; }

/* 2. Transparent Header (Style 3) - Uses top instead of margin-top since it's absolute */
body.admin-bar header.site-header.header-style-3 { 
    margin-top: 0 !important;
    top: 32px !important; 
}

/* 3. Adjust for mobile admin bar thickness */
@media screen and (max-width: 782px) {
    body.admin-bar header.site-header { margin-top: 46px; }
    body.admin-bar header.site-header.header-style-3 { top: 46px !important; }
}

/* 4. Fix Shortcut Nav Sticky Position with Admin Bar */
body.admin-bar .shortcut-nav-container {
    top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .shortcut-nav-container {
        top: calc(var(--header-height) + 46px);
    }
}

/* =========================================
   5. SMART TICKER
   ========================================= */
.ticker-wrap { 
    background: #0B1120; 
    color: white; 
    padding: 0.6rem 0; 
    font-size: 0.85rem; 
    width: 100%; 
    display: block; 
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative; /* Ensure it stays above other content */
    z-index: 100;
}

/* --- PREMIUM FIX: Transparent Header Conflict --- */
/* Push the ticker down ONLY on desktop screens where the transparent header overlaps */
@media (min-width: 993px) {
    body:has(header.header-style-3) .ticker-wrap {
        margin-top: var(--header-height);
    }
}

/* Remove margin on mobile as the header layout structure naturally separates them */
@media (max-width: 992px) {
    body:has(header.header-style-3) .ticker-wrap {
        margin-top: 0;
    }
    
    /* Ensure the mobile shortcut nav (News style) doesn't push down unnecessarily either */
    .shortcut-nav-container {
        margin-top: 0 !important;
    }
}

.ticker-content { display: flex; align-items: center; overflow: hidden; width: 100%; }
.ticker-label { 
    font-weight: 800; color: var(--accent); text-transform: uppercase; 
    margin-right: 1.5rem; white-space: nowrap; z-index: 10; 
    background: #0B1120; padding-right: 1.5rem; position: relative; 
}

/* Fades the text as it goes behind the label */
.ticker-label::before { 
    content: ''; 
    position: absolute; 
    top: -50px; 
    bottom: -50px; 
    right: 100%; 
    width: 100vw; 
    background: #0B1120; 
    z-index: 10; 
}
.ticker-text { white-space: nowrap; animation: ticker 35s linear infinite; position: relative; z-index: 1; display: flex; align-items: center;}
.ticker-text a { color: white; text-decoration: none; transition: 0.3s; }
.ticker-text a:hover { color: var(--accent); }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* =========================================
   6. MOBILE, SHORTCUTS & SEARCH
   ========================================= */
.mobile-menu-trigger {
    display: none; background: var(--text-main); border: none; color: var(--bg-body);
    width: 42px; height: 42px; border-radius: 12px; font-size: 1.4rem; cursor: pointer;
    align-items: center; justify-content: center;
}
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-card); padding: 80px 20px 30px; transform: translateY(-100%);
    transition: transform 0.3s; z-index: 2000; overflow-y: auto;
}
.mobile-nav-overlay.active { transform: translateY(0); }
.mobile-nav-close { position: absolute; top: 25px; right: 25px; background: var(--bg-section-alt); width: 42px; height: 42px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* =========================================
   MOBILE SUBMENUS
   ========================================= */
.mobile-nav-links { width: 100%; }
.ep-mobile-menu { display: flex; flex-direction: column; text-align: left; padding: 0; margin: 0; }
.ep-mobile-menu li { list-style: none; }
.ep-mobile-menu > li > a { 
    font-size: 1.15rem; font-weight: 700; color: var(--text-main); 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
[data-theme="dark"] .ep-mobile-menu > li > a { border-bottom-color: rgba(255,255,255,0.05); }

/* The fix: Keeps icon and text together */
.ep-menu-title { display: flex; align-items: center; gap: 12px; }
.ep-main-menu .ep-menu-title { gap: 6px; }

/* Enhanced Submenu Spacing for better Mobile UX */
.ep-mobile-menu .sub-menu { 
    display: none; 
    padding: 15px 0 15px 20px; 
    flex-direction: column; 
    gap: 8px; 
    border-left: 2px solid var(--border); 
    margin-left: 10px; 
    margin-top: 5px; 
    margin-bottom: 10px;
}
.ep-mobile-menu li.mobile-dropdown-active > .sub-menu { display: flex; animation: slideDown 0.3s ease; }
.ep-mobile-menu li.mobile-dropdown-active > a .dropdown-icon { transform: rotate(180deg); color: var(--accent); }

/* Increased padding on the links for easier tapping */
.ep-mobile-menu .sub-menu a { 
    font-size: 1rem; 
    color: var(--text-muted); 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 10px 0; 
}
.ep-mobile-menu .sub-menu a:hover { color: var(--accent); }

/* STANDARD SHORTCUT NAV */
.shortcut-nav-container { position: sticky; top: var(--header-height); z-index: 800; background: var(--bg-body); border-bottom: 1px solid var(--border); padding: 12px 0; width: 100%; overflow-x: auto; }

.shortcut-nav-list { display: flex; gap: 12px; margin: 0; padding: 0; white-space: nowrap; }
.shortcut-nav-list a { padding: 8px 16px; background: var(--bg-section-alt); border-radius: 50px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.shortcut-nav-list a:hover { background: var(--accent); color: #fff; }

/* NEWS-STYLE SHORTCUT NAV */
.shortcut-nav-container.style-news {
    border-top: 1px solid var(--border-light, #E2E8F0);
    border-bottom: 2px solid var(--border-heavy, #0F172A);
    padding: 0.75rem 0;
    background: var(--bg-body);
}
.shortcut-nav-container.style-news .shortcut-nav-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.shortcut-nav-container.style-news .shortcut-nav-list a {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
}
.shortcut-nav-container.style-news .shortcut-nav-list a:hover {
    color: var(--accent);
    background: transparent;
    box-shadow: none;
    transform: none;
}
@media (max-width: 900px) {
    .shortcut-nav-container.style-news .shortcut-nav-list {
        justify-content: flex-start;
        padding: 0 1rem;
    }
}


/* VISIBILITY UTILITY */
@media (min-width: 993px) {
    .ep-hide-desktop { display: none !important; }
}

/* SEARCH OVERLAY */
.search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.98); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.search-overlay.active { opacity: 1; visibility: visible; }
.search-input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--border); font-size: 3rem; font-weight: 800; color: var(--text-main); padding: 20px 0; text-align: center; outline: none; }
.search-close { position: absolute; top: 30px; right: 30px; font-size: 2.5rem; cursor: pointer; background: transparent; border: none; }

/* =========================================
   7. RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 992px) {
    .site-header { 
        height: var(--header-height) !important; 
        padding-top: 0 !important; 
    }
    .nav-menu { 
        display: none !important; 
    }
    .mobile-menu-trigger { 
        display: flex; 
        flex-shrink: 0; 
    }
    
    /* --- Universal Mobile Header Inner --- */
    .site-header .header-inner {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
    }

    /* --- Universal Logo Constraint (Prevents Overlap) --- */
    .site-header .logo {
        position: static !important;
        transform: none !important;
        flex: 1 1 0% !important; /* Crucial for allowing flex shrink */
        min-width: 0 !important; /* Crucial for text-overflow to work */
        justify-content: flex-start !important;
        margin: 0 !important;
        padding-left: 0 !important;
    }

    /* --- Premium Fix: Keep Style 2 Centered on Mobile safely --- */
    .site-header.header-style-2 .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-70%) !important;
        justify-content: center !important;
        /* Reserves safe space for left/right icons to prevent overlapping */
        max-width: calc(100vw - 210px) !important; 
    }

    /* --- Text Logo Truncation & Scaling --- */
    .site-header .ep-logo-link {
        width: 100% !important;
        display: flex;
        align-items: center;
        min-width: 0;
    }
    
    .site-header.header-style-2 .ep-logo-link {
        justify-content: center;
    }

    /* PREMIUM FIX: Target ONLY the text logo div by explicitly excluding the SVG wrappers */
    .site-header .ep-logo-link > div:not(.ep-logo-light):not(.ep-logo-dark) {
        font-size: 1.25rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        display: block !important; /* Required for ellipsis, now safely isolated */
        width: 100%;
    }
    
    .site-header.header-style-2 .ep-logo-link > div:not(.ep-logo-light):not(.ep-logo-dark) {
        text-align: center;
    }
    
    .site-header .ep-logo-link > div span {
        display: inline !important;
    }
    
    .site-header .ep-logo-link > div span {
        display: inline !important;
    }

    /* SVG/Image Logo Mobile Scaling */
    .site-header .ep-logo-link svg,
    .site-header .ep-logo-link img {
        max-width: 100% !important;
        height: auto !important;
        max-height: calc(var(--header-height) - 20px);
    }

    /* --- Header Actions Space Optimization --- */
    .site-header .header-actions {
        flex: 0 0 auto !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        position: static !important;
        gap: 6px !important; /* Reduced from 12px to save horizontal space */
    }

    .site-header .header-actions .icon-btn {
        width: 36px !important; /* Reduced from 42px */
        height: 36px !important;
        font-size: 1.15rem !important;
    }

    /* Stacked Headers Mobile Fixes */
    .header-style-6 .left-socials,
    .header-style-6 .header-date,
    .header-style-7 .header-date { 
        display: none !important; 
    }
    
    body:has(header.header-style-6) .site-main > section:first-child,
    body:has(header.header-style-7) .site-main > section:first-child {
        padding-top: 40px !important;
    }
}

/* Fix spacing between left-aligned mobile menu and logo */
@media (max-width: 992px) {
    .header-inner > .mobile-menu-trigger {
        margin-right: 5px !important; /* Reduced from 20px to save space */
    }
    .header-style-6 .header-left-wrap { display: none !important; }
}

/* Fix spacing between left-aligned mobile menu and logo */
@media (max-width: 992px) {
    .header-inner > .mobile-menu-trigger {
        margin-right: 20px !important;
    }
    .site-header .logo {
        padding-left: 5px !important;
    }
}

/* =========================================
   MOBILE MENU SOCIAL ICONS
   ========================================= */
.mobile-menu-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .mobile-menu-socials {
    border-top-color: rgba(255,255,255,0.05);
}

.mobile-menu-socials a {
    font-size: 1.4rem;
    color: var(--text-main);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-section-alt);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
}

.mobile-menu-socials a:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Hide dropdown arrows in the horizontal shortcut nav */
.shortcut-nav-list .dropdown-icon {
    display: none !important;
}

/* =========================================
   AJAX DROPDOWN SEARCH
   ========================================= */
.header-search-wrap { position: relative; display: flex; align-items: center; }

.ep-search-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: -10px;
    width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    padding: 15px;
}

.ep-search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ep-dropdown-search-form {
    display: flex;
    align-items: center;
    background: var(--bg-section-alt);
    border-radius: 50px;
    padding: 10px 15px;
    border: 1px solid var(--border);
    transition: border-color 0.3s;
}
.ep-dropdown-search-form:focus-within { border-color: var(--accent); }
.ep-dropdown-search-form i.ri-search-line { color: var(--text-muted); margin-right: 10px; font-size: 1.1rem; }

.ep-ajax-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
    font-size: 0.95rem;
}
.ep-ajax-search-input::placeholder { color: var(--text-muted); opacity: 0.7; }

.ep-ajax-search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin; 
    scrollbar-color: var(--border) transparent;
}
.ep-ajax-search-results::-webkit-scrollbar { width: 4px; }
.ep-ajax-search-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.ep-ajax-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    transition: 0.2s ease;
    padding-top: 15px;
}
.ep-ajax-result-item:first-child { margin-top: 5px; }
.ep-ajax-result-item:hover .ep-ajax-result-title { color: var(--accent); }

.ep-ajax-result-thumb { 
    width: 60px; height: 60px; 
    border-radius: 8px; 
    object-fit: cover; 
    flex-shrink: 0; 
    background: var(--bg-section-alt);
}
.ep-ajax-result-info { display: flex; flex-direction: column; }
.ep-ajax-result-title { 
    font-size: 0.9rem; 
    font-family: var(--font-heading);
    font-weight: 700; 
    color: var(--text-main); 
    margin-bottom: 4px; 
    line-height: 1.3; 
    transition: color 0.2s;
}
.ep-ajax-result-meta { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.ep-search-view-all {
    display: block; text-align: center; margin-top: 15px; padding-top: 15px;
    border-top: 1px solid var(--border); font-size: 0.85rem; font-weight: 700; 
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.ep-search-view-all:hover { color: var(--accent); }

@media (max-width: 768px) {
    .ep-search-dropdown {
        position: fixed;
        top: var(--header-height);
        left: 20px;
        right: 20px;
        width: auto;
        transform: translateY(-10px);
    }
}

@media (max-width: 992px) {
    .ep-search-dropdown {
        position: fixed; /* Attaches to viewport so it overlaps everything perfectly */
        top: calc(var(--header-height) + 10px);
        left: 15px;
        right: 15px;
        width: auto;
        transform: translateY(-10px);
    }
}