/* =============================================
   HEADER V2 — APOCALYPTIC THEME
   =============================================
   Font variables inherited from home-v2.css
   --font-accent: 'Cartella NF W00 Regular'
   --font-main: 'Rajdhani'
   --dc-red: #C80004
   --dc-bg-dark: #0a0c08
   ============================================= */

.hv2 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 40px;
    height: 60px;
    background: rgba(10, 12, 8, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(200, 0, 4, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hv2.scrolled {
    height: 54px;
    background: rgba(10, 12, 8, 0.95);
    border-bottom-color: rgba(200, 0, 4, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(200, 0, 4, 0.1);
}

/* ---- LOGO ---- */
.hv2__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    margin-right: auto;
}

.hv2__logo img {
    height: 36px;
    filter: drop-shadow(0 0 6px rgba(200, 0, 4, 0.15));
    transition: all 0.3s ease;
}

.hv2__logo:hover img {
    filter: drop-shadow(0 0 14px rgba(200, 0, 4, 0.4));
    transform: scale(1.04);
}

/* ---- NAV ---- */
.hv2__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
}

.hv2__nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    position: relative;
    transition: all 0.25s ease;
}

.hv2__nav-link i {
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.25s ease;
}

.hv2__nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.04);
}

.hv2__nav-link:hover i {
    color: #C80004;
    opacity: 1;
}

/* Active link — red underline */
.hv2__nav-link--active {
    color: #fff;
}

.hv2__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #C80004;
    box-shadow: 0 0 8px rgba(200, 0, 4, 0.4);
}

.hv2__nav-link--active i {
    color: #C80004;
    opacity: 1;
}

/* ---- SEARCH ---- */
.hv2__search {
    flex: 0 1 220px;
    position: relative;
    display: flex;
    align-items: center;
}

.hv2__search-icon {
    position: absolute;
    left: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    transition: color 0.25s;
}

.hv2__search input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
}

.hv2__search input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.hv2__search input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(200, 0, 4, 0.3);
    box-shadow: 0 0 0 3px rgba(200, 0, 4, 0.08);
}

.hv2__search input:focus ~ .hv2__search-icon,
.hv2__search input:focus + .hv2__search-icon {
    color: #C80004;
}

/* Search dropdown — inherit from search.css */
.hv2__search .search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1001;
}

/* ---- ACTIONS (right side) ---- */
.hv2__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Generic icon button */
.hv2__icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.hv2__icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Mobile-only buttons */
.hv2__mobile-search,
.hv2__hamburger {
    display: none;
}

/* Panel Button */
.hv2__panel-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: rgba(200, 0, 4, 0.08);
    border: 1px solid rgba(200, 0, 4, 0.2);
    border-radius: 5px;
    color: #C80004;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: all 0.25s ease;
}

.hv2__panel-btn:hover {
    background: rgba(200, 0, 4, 0.15);
    border-color: rgba(200, 0, 4, 0.4);
    box-shadow: 0 0 15px rgba(200, 0, 4, 0.15);
    transform: translateY(-1px);
}

/* Notification */
.hv2__notif-btn {
    position: relative;
}

.hv2__notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #C80004;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a0c08;
    animation: hv2BounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes hv2BounceIn {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ---- USER MENU ---- */
.hv2__user-menu {
    position: relative;
}

.hv2__user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.hv2__user-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.hv2__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #C80004;
}

.hv2__user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hv2__username {
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
}

.hv2__role {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    color: #888;
    margin-top: 1px;
    letter-spacing: 0.5px;
}

.hv2__chevron {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    transition: transform 0.2s;
}

/* Dropdown */
.hv2__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 200px;
    background: #141612;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1001;
}

.hv2__dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.hv2__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.2s;
}

.hv2__dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.2s;
}

.hv2__dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(3px);
}

.hv2__dropdown-item:hover i {
    color: #C80004;
}

.hv2__dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.hv2__dropdown-item--logout:hover {
    background: rgba(200, 0, 4, 0.08);
    color: #e74c3c;
}

.hv2__dropdown-item--logout:hover i {
    color: #e74c3c;
}

/* ---- AUTH BUTTONS ---- */
.hv2__auth-btn {
    padding: 7px 18px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.hv2__auth-btn--login {
    background: #C80004;
    color: #fff;
    border-color: #C80004;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hv2__auth-btn--login:hover {
    background: #e8000a;
    box-shadow: 0 0 20px rgba(200, 0, 4, 0.3);
    transform: translateY(-1px);
}

.hv2__auth-btn--register {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
}

.hv2__auth-btn--register:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet & Laptop (Aggressive Breakpoint due to content width) */
@media (max-width: 1800px) {
    .hv2 {
        padding: 0 20px;
        height: 60px;
        gap: 15px;
        justify-content: space-between;
    }

    .hv2__logo img { height: 32px; }

    /* Hide desktop nav & search */
    .hv2__nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 12, 8, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(200, 0, 4, 0.2);
        flex-direction: column;
        padding: 10px;
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        transform: none; /* Fix: Override desktop centering */
    }

    .hv2__nav.mobile-open {
        display: flex;
        animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .hv2__nav-link {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 8px;
        width: 100%;
        border: 1px solid transparent;
    }

    .hv2__nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .hv2__nav-link--active::after { display: none; }

    .hv2__nav-link--active {
        background: rgba(200, 0, 4, 0.15);
        color: #fff;
        border-color: rgba(200, 0, 4, 0.3);
    }

    /* Mobile Search Overlay */
    .hv2__search {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        padding: 15px 20px;
        background: rgba(10, 12, 8, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(200, 0, 4, 0.2);
        z-index: 998;
        flex: unset;
        margin-left: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .hv2__search.mobile-active {
        display: flex;
        animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .hv2__search input {
        height: 44px;
        font-size: 15px;
    }

    /* Enable Mobile Controls */
    .hv2__mobile-search,
    .hv2__hamburger {
        display: flex;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hv2__mobile-search:hover,
    .hv2__hamburger:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* Panel Button Compact */
    .hv2__panel-btn { 
        padding: 0;
        width: 40px;
        height: 40px;
        justify-content: center;
        border-radius: 8px;
    }
    .hv2__panel-btn span { display: none; }
    .hv2__panel-btn i { font-size: 16px; }

    /* User Info Compact */
    .hv2__user-info { display: none; }
    .hv2__chevron { display: none; }
    .hv2__user-btn {
        padding: 0;
        border: none;
        background: none;
        gap: 0;
    }
    .hv2__avatar { width: 36px; height: 36px; }

    .hv2__auth-btn { padding: 8px 16px; font-size: 12px; }
    .hv2__auth-btn--login i { display: none; }
}

/* Phones */
@media (max-width: 480px) {
    .hv2 { padding: 0 15px; height: 56px; }
    .hv2__auth-btn--register { display: none; }
    .hv2__nav, .hv2__search { top: 56px; }
}
