/**
 * Header Styles
 * BBC-Style Header Layout
 *
 * @package TBC_News
 */

/* ===================================
   TOP BAR (Black bar at very top)
   =================================== */
.top-bar {
    background-color: var(--tbc-text);
    color: #ffffff;
    font-size: 13px;
    border-bottom: 1px solid #1a1a1a;
}

.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.top-bar-menu li {
    margin: 0;
}

.top-bar-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    transition: opacity 0.3s ease;
}

.top-bar-menu a:hover {
    opacity: 0.8;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.top-bar-social a {
    color: #ffffff;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.top-bar-social a:hover {
    opacity: 0.8;
}

.top-bar-signin {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-signin a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.top-bar-signin svg {
    width: 16px;
    height: 16px;
}

/* ===================================
   MAIN HEADER
   =================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===================================
   LOGO / BRANDING
   =================================== */
.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    font-size: 0;
}

.site-logo a {
    display: inline-block;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--tbc-text);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    padding: 8px 16px;
    color: #ffffff;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}


.site-logo a:hover {
    background-color: #1a1a1a;
}
.site-logo-image img{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    max-width: 180px;
    max-height: 50px;
    background: none !important;
    padding: 0 !important;
}
.site-logo-image a{
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* ===================================
   HEADER ACTIONS (Search & Menu)
   =================================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tbc-text);
    font-size: 20px;
    transition: opacity 0.3s ease;
}

.search-toggle:hover {
    opacity: 0.7;
}

.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    min-width: 320px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    margin-top: 10px;
}

.search-form-container.active {
    display: block;
}

.search-form-container form {
    display: flex;
    gap: 8px;
}

.search-form-container input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-form-container button[type="submit"] {
    padding: 10px 20px;
    background-color: var(--tbc-text);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-form-container button[type="submit"]:hover {
    background-color: #333333;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 24px;
    color: var(--tbc-text);
}

/* ===================================
   PRIMARY NAVIGATION
   =================================== */
.primary-navigation {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

.primary-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.primary-menu::-webkit-scrollbar {
    display: none;
}

.primary-menu > li {
    margin: 0;
    white-space: nowrap;
}

.primary-menu > li > a {
    display: block;
    padding: 14px 18px;
    color: var(--tbc-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: capitalize;
    transition: background-color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    background-color: var(--tbc-body-bg);
    border-bottom-color: var(--tbc-text);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .top-bar-menu {
        gap: 15px;
    }
    
    .primary-menu > li > a {
        padding: 14px 14px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Adjust header layout */
    .header-main {
        padding: 10px 15px;
    }
    
    .site-logo a {
        font-size: 24px;
        letter-spacing: 2px;
        padding: 6px 12px;
    }
    
    .header-search {
        display: none; /* We'll add mobile search separately */
    }
    
    /* Mobile Navigation */
    .primary-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 9999;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    }
    
    .primary-navigation.active {
        left: 0;
    }
    
    .primary-nav-inner {
        padding: 0;
    }
    
    .primary-menu {
        flex-direction: column;
    }
    
    .primary-menu > li {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .primary-menu > li > a {
        padding: 16px 20px;
        font-size: 15px;
        border-bottom: none;
    }
    
    /* Mobile menu close button */
    .mobile-menu-close {
        display: flex;
        justify-content: flex-end;
        padding: 15px 20px;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .mobile-menu-close button {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        color: var(--tbc-text);
    }
    
    /* Mobile overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .site-logo a {
        font-size: 20px;
        padding: 5px 10px;
    }
}