/* ========================================
   Header Styles
   ======================================== */

/* --- Top Toolbar --- */
.topbar {
    background: #1a1a2e;
    color: #ccc;
    font-size: 0.8125rem;
    padding: 0.375rem 0;
}
.topbar .pure-g {
    align-items: center;
}
.topbar p {
    margin: 0;
    color: #aaa;
}
.topbar a {
    color: #e94560;
}
.topbar a:hover {
    color: #fff;
    text-decoration: none;
}
.topbar .topbar-right {
    text-align: right;
    font-size: 0.8125rem;
}
.topbar .topbar-right span {
    margin-left: 1rem;
    color: #aaa;
}
.topbar .topbar-right i {
    margin-right: 0.25rem;
}

/* --- Main Header / Nav --- */
.main-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-header .pure-g {
    align-items: center;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
}
.site-logo img {
    max-height: 40px;
    width: auto;
    display: block;
}
.site-logo .site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    line-height: 1;
}
.site-logo .site-name:hover {
    text-decoration: none;
}

/* Navigation */
.main-nav {
    display: flex;
    width: 100%;
}
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}
.main-nav ul li {
    position: relative;
    margin: 0;
    text-align: center;
}
.main-nav ul li a {
    display: block;
    padding: 1rem;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
    color: #e94560;
    text-decoration: none;
}

/* Dropdown */
.main-nav ul li.menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.75rem;
}
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 200px;
    z-index: 200;
    flex-direction: column;
    padding: 0.5rem 0;
}
.main-nav ul ul li {
    width: 100%;
}
.main-nav ul ul li a {
    padding: 0.5rem 1.25rem;
    font-weight: 400;
    font-size: 0.8125rem;
}
.main-nav ul ul li a:hover {
    background: #f8f9fa;
    color: #e94560;
}
.main-nav ul li:hover > ul {
    display: flex;
}

/* 三级菜单向右展开 */
.main-nav ul ul ul {
    top: 0;
    left: 100%;
}

/* --- CTA Button --- */
.header-cta {
    text-align: right;
}
.header-cta .btn-header {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #e94560;
    color: #fff;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background 0.2s;
}
.header-cta .btn-header:hover {
    background: #d63851;
    text-decoration: none;
    color: #fff;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #333;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        z-index: 99;
    }
    .main-nav.open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav ul li a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }
    .main-nav ul ul {
        position: static;
        box-shadow: none;
        border: none;
        min-width: auto;
        padding-left: 1rem;
    }
    .main-nav ul ul ul {
        left: 0;
    }
    .header-cta {
        display: none;
    }
    .mobile-toggle {
        display: block;
        text-align: right;
    }
}
