/**
 * NoSpace Header Styles
 * Modern header layout with flexbox
 */

/* ========================================
   Header Main Layout
   ======================================== */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    gap: 2rem;
    position: relative;
}

.header-left {
    flex: 0 0 auto;
}

.header-right {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

/* ========================================
   Brand/Logo
   ======================================== */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.brand-logo:hover {
    opacity: 0.8;
}

.brand-logo img {
    height: 40px;
    width: auto;
}

.site-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}



/* ========================================
   Search
   ======================================== */
.container-search {
    display: flex;
    align-items: center;
}

.container-search .mod-finder-searchform,
.container-search .search {
    margin: 0;
}

.container-search input[type="search"],
.container-search input[type="text"] {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    min-width: 200px;
    transition: all 0.3s ease;
}

.container-search input[type="search"]:focus,
.container-search input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.container-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.container-search button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.container-search button:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   Menu (Always slide-in, hidden by default)
   ======================================== */
.header-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    margin: 0 !important;
    list-style: none;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.4);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close button in sidebar */
.header-menu::before {
    content: '×';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: end;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.header-menu::before:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Menu module container */
.header-menu ul {
    list-style: none;
    margin: 0;
    padding: 5rem 0 2rem;
}

/* Menu items */
.header-menu ul > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.header-menu ul > li:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Menu links */
.header-menu a {
    display: block;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 1.25rem 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.header-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

/* Hover state */
.header-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    padding-left: 2.5rem;
}

.header-menu a:hover::before {
    width: 20px;
    left: 1rem;
}

/* Active menu item */
.header-menu .current > a,
.header-menu .active > a {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    font-weight: 600;
}

.header-menu .current > a::before,
.header-menu .active > a::before {
    width: 4px;
    height: 100%;
    top: 0;
    transform: none;
    background: white;
}

.header-menu.menu-open {
    left: 0;
}

/* ========================================
   Menu Overlay (for all screen sizes)
   ======================================== */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 320px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    /* Header adjustments */
    .header-main {
        gap: 1rem;
    }
    
    .header-left {
        flex: 1 1 auto;
    }
    
    .header-right {
        flex: 0 0 auto;
    }
    
    .container-search input[type="search"],
    .container-search input[type="text"] {
        min-width: 150px;
    }
}

@media (max-width: 576px) {
    .header-main {
        padding: 1rem;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .container-search input[type="search"],
    .container-search input[type="text"] {
        min-width: 120px;
        font-size: 0.9rem;
    }
}
