/* ===================================
   MAGAZINE HEADER - Minimalist Design
   =================================== */

/* Top Ribbon */
.top-ribbon {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
    font-size: 0.813rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1032;
    transition: all 0.3s ease;
}

html[data-bs-theme="dark"] .top-ribbon {
    background: #1a1d24;
    border-bottom: 1px solid #2d3139;
}

.ribbon-date {
    font-weight: 500;
    color: #6c757d;
}

html[data-bs-theme="dark"] .ribbon-date {
    color: #9ca3af;
}

.ribbon-right {
    gap: 0.75rem;
}

.ribbon-icon {
    color: #6c757d;
    font-size: 0.938rem;
    transition: color 0.2s ease;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ribbon-icon:hover {
    color: #304395;
}

html[data-bs-theme="dark"] .ribbon-icon {
    color: #9ca3af;
}

html[data-bs-theme="dark"] .ribbon-icon:hover {
    color: #6b8dd6;
}

.ribbon-divider {
    color: #d1d5db;
    font-weight: 300;
}

.ribbon-language {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.ribbon-language button {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.813rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.ribbon-language button.active {
    color: #304395;
    font-weight: 600;
}

html[data-bs-theme="dark"] .ribbon-language button {
    color: #9ca3af;
}

html[data-bs-theme="dark"] .ribbon-language button.active {
    color: #6b8dd6;
}

/* Main Magazine Header */
.magazine-header {
    background: #ffffff;
    padding: 1rem 0;
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 1031;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-bs-theme="dark"] .magazine-header {
    background: #1a1d24;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Sticky Header Animation */
.magazine-header.sticky {
    top: 0;
    padding: 0.5rem 0;
}

.magazine-header.sticky .site-name {
    font-size: 1.5rem;
}

.magazine-header.sticky .site-tagline {
    font-size: 0.688rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo Section */
.header-logo {
    flex-shrink: 0;
}

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

.logo-link:hover {
    opacity: 0.85;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.site-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1;
    transition: font-size 0.3s ease;
}

html[data-bs-theme="dark"] .site-name {
    color: #ffffff;
}

.site-tagline {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #6c757d;
    letter-spacing: 0.02em;
    line-height: 1;
}

html[data-bs-theme="dark"] .site-tagline {
    color: #9ca3af;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-grow: 1;
    justify-content: center;
}

.nav-link {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.938rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #304395;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-accent {
    color: #304395;
    font-weight: 600;
}

html[data-bs-theme="dark"] .nav-link {
    color: #d1d5db;
}

html[data-bs-theme="dark"] .nav-link:hover {
    color: #ffffff;
}

html[data-bs-theme="dark"] .nav-link-accent {
    color: #6b8dd6;
}

/* Utilities */
.header-utils {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.util-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.util-btn:hover {
    background: #f3f4f6;
    color: #304395;
}

html[data-bs-theme="dark"] .util-btn {
    color: #9ca3af;
}

html[data-bs-theme="dark"] .util-btn:hover {
    background: #2d3139;
    color: #6b8dd6;
}

.btn-subscribe {
    background: #304395;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-subscribe:hover {
    background: #253675;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(48, 67, 149, 0.25);
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #4b5563;
    transition: all 0.3s ease;
}

html[data-bs-theme="dark"] .hamburger span {
    background: #d1d5db;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Expandable Search Bar */
.search-bar-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.search-bar-expanded.active {
    max-height: 200px;
    margin-top: 1rem;
}

.search-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

html[data-bs-theme="dark"] .search-bar-container {
    background: #2d3139;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1a1a1a;
}

html[data-bs-theme="dark"] .search-input {
    color: #ffffff;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.search-close:hover {
    color: #1a1a1a;
}

html[data-bs-theme="dark"] .search-close:hover {
    color: #ffffff;
}

.search-suggestions {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

html[data-bs-theme="dark"] .search-suggestions {
    background: #2d3139;
}

/* Mobile Menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #ffffff;
}

html[data-bs-theme="dark"] .mobile-menu {
    background: #1a1d24;
}

.mobile-menu.active {
    max-height: 600px;
}

.mobile-menu-content {
    padding: 1rem 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #f3f4f6;
    color: #304395;
    border-left-color: #304395;
}

html[data-bs-theme="dark"] .mobile-nav-link {
    color: #d1d5db;
}

html[data-bs-theme="dark"] .mobile-nav-link:hover,
html[data-bs-theme="dark"] .mobile-nav-link.active {
    background: #2d3139;
    color: #6b8dd6;
    border-left-color: #6b8dd6;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .magazine-header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        gap: 1rem;
    }
    
    .site-name {
        font-size: 1.5rem;
    }
    
    .site-tagline {
        font-size: 0.688rem;
    }
}

@media (max-width: 576px) {
    .top-ribbon {
        font-size: 0.75rem;
        padding: 0.375rem 0;
    }
    
    .ribbon-right {
        gap: 0.5rem;
    }
    
    .ribbon-icon {
        font-size: 0.875rem;
    }
    
    .site-name {
        font-size: 1.25rem;
    }
    
    .site-tagline {
        font-size: 0.625rem;
    }
}
