/* Jobysthan - Refined Three-Tier Header CSS */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    width: 100%;
}

/* 1. Header Top Bar */
.header-topbar {
    background-color: #1e2e4f; /* Navy blue background matching screenshot */
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.topbar-left i, .topbar-right i {
    color: #cbd5e1;
}

.flag-icon {
    width: 16px;
    height: 11px;
    object-fit: cover;
    border-radius: 1px;
}

.topbar-right .apply-link {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.topbar-right .apply-link:hover {
    color: var(--secondary);
}

/* 2. Header Middle Bar */
.header-middlebar {
    background-color: #ffffff;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
}

.middlebar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 1.5rem;
}

/* Search Box inside header */
.header-mid-search {
    display: flex;
    align-items: center;
    background-color: #f1f5f9;
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    width: 100%;
    max-width: 380px;
    border: 1px solid #e2e8f0;
    margin-right: auto;
}

.header-mid-search i {
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.header-mid-search-input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* Middle links menu and navigation */
.header-mid-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
}

.header-nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    padding: 0.4rem 0.25rem;
    transition: var(--transition);
    white-space: nowrap;
}

.header-nav-link:hover {
    color: #1d4ed8;
}

/* Social work blue highlight badge from screenshot */
.header-nav-badge {
    font-size: 0.9rem;
    font-weight: 600;
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    white-space: nowrap;
}

.header-nav-badge:hover {
    background-color: #dbeafe;
}

/* Portal Action buttons on right */
.btn-student-portal {
    background-color: #1d4ed8; /* Solid dark blue button */
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-student-portal:hover {
    background-color: #1e40af;
}

.btn-login-outline {
    border: 1.5px solid #1d4ed8;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.4rem 1.1rem;
    border-radius: 6px;
    background-color: #ffffff;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-login-outline:hover {
    background-color: #eff6ff;
}

/* 3. Header Bottom Bar navigation strip */
.header-bottombar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.45rem 0;
}

.bottombar-container {
    display: flex;
    justify-content: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-bottom-menu {
    display: flex;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.header-bottom-item {
    display: flex;
    align-items: center;
}

.header-bottom-item:not(:last-child)::after {
    content: '|';
    color: #cbd5e1;
    margin: 0 1.25rem;
    font-weight: 300;
}

.header-bottom-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    transition: var(--transition);
}

.header-bottom-link:hover, .header-bottom-item.active .header-bottom-link {
    color: #1d4ed8; /* blue text active color */
}

/* Burger Button for Mobile positioning */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    cursor: pointer;
    z-index: 1100;
}

.burger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

/* Mobile Drawer & Overlay Styles */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 1050;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
    right: 0;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-menu-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-link:hover {
    color: #1d4ed8;
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.mobile-actions .btn {
    width: 100%;
    padding: 0.75rem;
}

/* Desktop override to ensure mobile nav is completely hidden */
@media (min-width: 1025px) {
    .mobile-overlay, .mobile-nav {
        display: none !important;
    }
}

/* Responsive configurations */
@media (max-width: 1024px) {
    .header-topbar {
        display: none; /* Hide topbar on tablet/mobile */
    }
    
    .header-mid-search {
        display: none;
    }
    
    .header-mid-nav-actions {
        display: none;
    }
    
    .header-bottombar {
        display: none;
    }
    
    .burger-btn {
        display: flex;
    }
    
    .middlebar-container {
        height: 60px;
        padding: 0 1.25rem;
    }
}
