/* ================================================================
   ZODIAXON HEADER STYLES
   Desktop: Logo Left + Search Right in top bar
            Centered nav below with mega menus
   Mobile:  Hamburger Left + Logo Center + Search Right in one row
            Slide-in menu from left
   ================================================================ */

/* ===== HEADER TOP ROW ===== */
.zodiaxon-header {
    background: rgba(10,10,26,0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 10000;
}
.header-top-row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ===== HAMBURGER (mobile only) ===== */
.hamburger-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 10001;
    flex-shrink: 0;
    width: 36px;
    height: 30px;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    transition: background 0.3s ease;
}
.hamburger-toggle:hover { background: rgba(139,92,246,0.12); }
.hamburger-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 3px; transition: all 0.35s cubic-bezier(0.4,0,0.2,1); transform-origin: center; }
.hamburger-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== LOGO ===== */
.header-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.header-logo-img { height: 38px; width: auto; display: block; transition: opacity 0.3s; }
.header-logo:hover .header-logo-img { opacity: 0.85; }

/* ===== SEARCH BAR ===== */
.header-search-wrapper { position: relative; flex: 1; min-width: 0; }
.header-search-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(139,92,246,0.08) !important;
    background-color: rgba(139,92,246,0.08) !important;
    border: 1px solid var(--brand-primary-light) !important;
    border-radius: 50px !important;
    padding: 0.55rem 1.2rem;
    transition: all 0.35s ease;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(139,92,246,0.25), 0 0 4px rgba(139,92,246,0.15);
}
.header-search-inner:focus-within {
    border-color: #a78bfa !important;
    background: rgba(139,92,246,0.15) !important;
    background-color: rgba(139,92,246,0.15) !important;
    box-shadow: 0 0 35px rgba(139,92,246,0.5), 0 0 12px rgba(139,92,246,0.35), 0 0 4px rgba(168,123,250,0.6);
}
.search-icon {
    color: var(--brand-primary-light);
    flex-shrink: 0;
    transition: color 0.3s;
}
.header-search-inner:focus-within .search-icon {
    color: #c4b5fd;
}
.header-search-input {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-size: 0.9rem;
    font-family: inherit;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    line-height: 1.4;
    text-align: center;
}
.header-search-input::placeholder {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.85rem;
    opacity: 1 !important;
    text-align: center;
}
.header-search-input:focus {
    text-align: left;
}
.header-search-input:focus::placeholder {
    text-align: left;
}
.header-search-input::-webkit-search-decoration,
.header-search-input::-webkit-search-cancel-button,
.header-search-input::-webkit-search-results-button,
.header-search-input::-webkit-search-results-decoration {
    display: none !important;
    -webkit-appearance: none !important;
}
.search-clear {
    display: none;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.search-clear:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.15);
}

/* ===== SEARCH DROPDOWN ===== */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(16,16,36,0.99);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    z-index: 10003;
    max-height: 420px;
    overflow-y: auto;
}
.search-results-dropdown.active { display: block; }
.search-results-inner { padding: 0.5rem; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.search-result-item:hover { background: rgba(139,92,246,0.15); }
.search-result-icon { font-size: 1.3rem; flex-shrink: 0; width: 32px; text-align: center; }
.search-result-info { display: flex; flex-direction: column; gap: 0.15rem; }
.search-result-name { color: var(--text-primary); font-size: 0.9rem; font-weight: 500; }
.search-result-category { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.search-no-results { display: none; padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ===== OVERRIDE ANY WORDPRESS/GENERATEPRESS INPUT STYLES ===== */
.header-search-wrapper input[type="text"],
.header-search-wrapper input[type="search"],
.zodiaxon-header input[type="text"],
.zodiaxon-header input[type="search"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ===== DESKTOP NAVIGATION (centered) ===== */
.zodiaxon-desktop-nav {
    background: rgba(10,10,26,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
}
.desktop-nav-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.desktop-nav-menu {
    list-style: none; margin: 0; padding: 0;
    display: flex; align-items: center; justify-content: center; gap: 0;
}
.desktop-nav-menu > li { position: relative; }
.desktop-nav-menu > li > a {
    display: flex; align-items: center; gap: 0.3rem;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.88rem; font-weight: 500; padding: 0.7rem 1rem;
    border-radius: 8px; transition: all 0.2s ease;
}
.desktop-nav-menu > li > a:hover { color: var(--text-primary); background: rgba(139,92,246,0.1); }
.desktop-nav-arrow { font-size: 0.6rem; opacity: 0.5; transition: transform 0.3s; }

/* ===== DESKTOP MEGA MENU ===== */
.desktop-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: 95vw;
    background: rgba(16,16,36,0.99);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    z-index: 10002;
    padding: 1.5rem;
}
.desktop-mega-menu.active { display: block; }
.desktop-mega-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 1rem;
}
.desktop-mega-col { min-width: 0; }
.desktop-mega-col h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-primary-light);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(139,92,246,0.15);
}
.desktop-mega-col ul { list-style: none; padding: 0; margin: 0 0 0.3rem 0; }
.desktop-mega-col ul li { margin: 0; }
.desktop-mega-col ul li a {
    display: block; padding: 0.35rem 0.5rem;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.8rem; border-radius: 6px; transition: all 0.15s ease;
}
.desktop-mega-col ul li a:hover { color: var(--text-primary); background: rgba(139,92,246,0.1); padding-left: 0.7rem; }

/* ===== SIDE MENU OVERLAY (mobile) ===== */
.side-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 10001; opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
}
.side-menu-overlay.active { opacity: 1; pointer-events: all; }

/* ===== SIDE MENU PANEL (mobile) ===== */
.side-menu-panel {
    position: fixed; top: 0; left: -100%; width: 75%; max-width: 360px;
    height: 100vh; height: 100dvh;
    background: rgba(10,10,30,0.99); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border-right: 1px solid rgba(139,92,246,0.2); z-index: 10002;
    transition: left 0.4s cubic-bezier(0.4,0,0.2,1); overflow-y: auto;
    padding: 1.5rem; display: flex; flex-direction: column;
}
.side-menu-panel.active { left: 0; }
.side-menu-close {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.3);
    color: var(--text-primary); font-size: 1.4rem; width: 36px; height: 36px;
    border-radius: 50%; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.side-menu-close:hover { background: rgba(139,92,246,0.3); color: white; transform: rotate(90deg); }
.side-menu-logo { text-align: center; padding: 0.25rem 0 1.5rem; margin-bottom: 0.5rem; }
.side-menu-logo-img { height: 32px; width: auto; display: inline-block; }
.side-nav-menu { list-style: none; padding: 0; margin: 0; flex: 1; }
.side-nav-menu > li { margin-bottom: 0.15rem; position: relative; }
.side-nav-menu > li > a,
.side-menu-parent-link {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.95rem; font-weight: 500; padding: 0.7rem 0.75rem;
    border-radius: 10px; transition: all 0.2s ease;
}
.side-nav-menu > li > a:hover,
.side-menu-parent-link:hover { color: var(--text-primary); background: rgba(139,92,246,0.1); }
.side-menu-arrow { font-size: 0.6rem; opacity: 0.5; margin-left: auto; transition: transform 0.3s; }
.side-submenu-toggle {
    position: absolute; right: 0.5rem; top: 0.5rem;
    background: rgba(139,92,246,0.12); border: none; color: var(--text-secondary);
    width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
    font-size: 0.7rem; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; z-index: 5;
}
.side-submenu-toggle:hover { background: rgba(139,92,246,0.25); color: var(--text-primary); }
.side-submenu {
    list-style: none; padding: 0; margin: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.side-menu-has-children.submenu-open .side-submenu { max-height: 2500px; padding: 0.25rem 0 0.25rem 1.25rem; }
.side-menu-has-children.submenu-open .side-menu-arrow { transform: rotate(180deg); }
.side-submenu-heading {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--brand-primary-light); font-weight: 700;
    padding: 0.5rem 0.5rem 0.3rem; margin: 0;
}
.side-submenu li a {
    display: block; padding: 0.4rem 0.5rem;
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.82rem; border-radius: 6px; transition: all 0.15s ease;
}
.side-submenu li a:hover { color: var(--text-primary); background: rgba(139,92,246,0.08); padding-left: 0.7rem; }
.side-menu-cta { padding: 1.5rem 0 0.5rem; margin-top: auto; }
.side-menu-cta-btn {
    display: block; text-align: center;
    background: var(--gradient-primary); color: white;
    text-decoration: none; padding: 0.75rem 1.5rem;
    border-radius: 50px; font-size: 0.9rem; font-weight: 600;
    box-shadow: var(--glow-primary); transition: all 0.3s ease;
}
.side-menu-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(139,92,246,0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .zodiaxon-desktop-nav { display: none !important; }
    .hamburger-toggle { display: flex; }
    .header-top-row { gap: 0.8rem; }
}
@media (max-width: 768px) {
    .header-top-row { padding: 0.6rem 1rem; }
    .header-logo-img { height: 30px; }
    .header-search-input { font-size: 0.82rem; }
    .header-search-input::placeholder { font-size: 0.75rem; }
    .side-menu-panel { width: 78%; max-width: 78%; }
}
@media (max-width: 480px) {
    .header-top-row { padding: 0.5rem 0.8rem; gap: 0.5rem; }
    .header-logo-img { height: 24px; }
    .hamburger-toggle span { width: 20px; }
    .hamburger-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .hamburger-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .header-search-inner { padding: 0.45rem 0.9rem; }
    .header-search-input::placeholder { font-size: 0.68rem; }
    .side-menu-panel { width: 85%; max-width: 85%; }
}