/* ==========================================================================
   Header - Black + Red Style, Centered Menu
   NEWS24 Theme - Complete Header Styles
   ========================================================================== */

/* ==========================================================================
   Header Container
   ========================================================================== */
.n24-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: #1a1a1a !important;
}

/* Add padding to body to compensate for fixed header */
body {
    padding-top: 70px !important;
}

.n24-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 90px;
    background: #1a1a1a !important;
}

/* ==========================================================================
   Logo - Left Side
   ========================================================================== */
.n24-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-top: 15px;
}

.n24-logo img,
.n24-logo .custom-logo,
.n24-logo .custom-logo-link img,
.custom-logo-link img {
    height: 100px;
    width: auto;
    max-width: 180px;
    margin-top: 50px;
}

.n24-logo-fallback {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

.n24-logo-fallback span {
    color: #cc0000;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   Navigation - Centered
   ========================================================================== */
.n24-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Hide mobile search on desktop */
.n24-mobile-search {
    display: none !important;
}

.n24-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.n24-menu > .menu-item {
    position: relative;
}

.n24-menu > .menu-item > a {
    display: flex;
    align-items: center;
    padding: 20px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.n24-menu > .menu-item > a:hover,
.n24-menu > .menu-item.current-menu-item > a,
.n24-menu > .menu-item.current-menu-parent > a {
    color: #cc0000 !important;
}

/* "Mai mult" - Red color */
.n24-menu > .menu-item-more > a,
.n24-menu > .menu-item:last-child.menu-item-has-children > a {
    color: #cc0000 !important;
}

.n24-menu > .menu-item-more > a:hover,
.n24-menu > .menu-item:last-child.menu-item-has-children > a:hover {
    color: #ff3333 !important;
}

/* Dropdown Arrow */
.n24-menu > .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.n24-menu > .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* ==========================================================================
   Dropdown / Submenu - Desktop
   ========================================================================== */
.n24-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    min-width: 200px;
    background: #ffffff !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    border-top: 3px solid #cc0000;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.n24-menu > .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.n24-menu .sub-menu .menu-item {
    margin: 0;
}

.n24-menu .sub-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #333333 !important;
    text-decoration: none;
    text-transform: none;
    transition: all 0.15s ease;
}

.n24-menu .sub-menu a:hover {
    background: #f8f8f8;
    color: #cc0000 !important;
    padding-left: 25px;
}

/* ==========================================================================
   Header Right - Search Icon
   ========================================================================== */
.n24-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.n24-search-toggle {
    background: none;
    border: none;
    color: #ffffff !important;
    padding: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.n24-search-toggle:hover {
    color: #cc0000 !important;
}

.n24-search-toggle svg {
    stroke: #ffffff !important;
}

.n24-search-toggle:hover svg {
    stroke: #cc0000 !important;
}

/* ==========================================================================
   Search Dropdown
   ========================================================================== */
.n24-search-dropdown {
    display: none;
    background: #2a2a2a !important;
    padding: 15px 20px;
}

.n24-search-dropdown.active {
    display: block;
}

.n24-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.n24-search-form input {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    background: #ffffff;
    color: #333333;
}

.n24-search-form button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: #cc0000;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.n24-search-form button:hover {
    background: #aa0000;
}

/* ==========================================================================
   Mobile Menu Toggle (Hamburger)
   ========================================================================== */
.n24-menu-toggle {
    display: none;
    flex-direction: column !important;
    gap: 3px !important;
    background: none !important;
    border: none !important;
    padding: 10px;
    cursor: pointer;
}

.n24-menu-toggle span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: #ffffff !important;
    transition: all 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.n24-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
    background: #ffffff !important;
}

.n24-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.n24-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    background: #ffffff !important;
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */
@media (max-width: 1200px) {
    .n24-menu > .menu-item > a {
        padding: 20px 14px;
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .n24-menu > .menu-item > a {
        padding: 20px 10px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Responsive - Mobile (max 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Fix horizontal scroll on mobile ONLY */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    body {
        padding-top: 60px !important;
    }
    
    /* Header bar mobile */
    .n24-header-bar {
        height: 60px;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: #1a1a1a !important;
        padding: 0 15px;
    }
    
    /* Logo - Left side on mobile */
    .n24-logo {
        order: 1;
        margin-right: auto;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .n24-logo,
    .n24-logo img,
    .n24-logo .custom-logo,
    .n24-logo .custom-logo-link,
    .n24-logo .custom-logo-link img,
    .custom-logo-link img {
        height: 80px !important;
        max-height: 80px !important;
        width: auto !important;
        margin-top: 30 !important;
    }
    
    /* Header right - hamburger on right */
    .n24-header-right {
        order: 2;
        margin-left: auto;
    }
    
    /* Hide search icon on mobile */
    .n24-search-toggle {
        display: none !important;
    }
    
    /* Show hamburger on mobile */
    .n24-menu-toggle {
        display: flex !important;
        background: none !important;
        border: none !important;
    }
    
    .n24-menu-toggle span {
        background: #ffffff !important;
    }
    
    /* Mobile navigation panel */
    .n24-nav {
        position: fixed !important;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #1a1a1a !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        flex-direction: column;
        justify-content: flex-start;
        z-index: 9999;
    }
    
    .n24-nav.active {
        transform: translateX(0);
    }
    
    /* Mobile search in menu */
    .n24-mobile-search {
        display: block !important;
        padding: 0 0 15px 0;
        margin-bottom: 15px;
        border-bottom: 1px solid #333;
    }
    
    .n24-mobile-search form {
        display: flex;
    }
    
    .n24-mobile-search input {
        flex: 1;
        padding: 12px 15px;
        font-size: 15px;
        border: none;
        border-radius: 4px 0 0 4px;
        outline: none;
        background: #ffffff;
        color: #333333;
    }
    
    .n24-mobile-search button {
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 600;
        color: #ffffff;
        background: #cc0000;
        border: none;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
    }
    
    /* Mobile menu items */
    .n24-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .n24-menu > .menu-item {
        border-bottom: 1px solid #333;
    }
    
    .n24-menu > .menu-item > a {
        padding: 16px 0;
        font-size: 15px;
        justify-content: space-between;
        color: #ffffff !important;
    }
    
    .n24-menu > .menu-item > a:hover {
        color: #cc0000 !important;
    }
    
    /* Mobile Submenu */
    .n24-menu .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: #2a2a2a !important;
        box-shadow: none;
        border-top: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
        display: block !important;
    }
    
    .n24-menu .menu-item-has-children.submenu-open .sub-menu,
    .n24-menu .menu-item-has-children.submenu-open > .sub-menu,
    .menu-item-has-children.submenu-open .sub-menu {
        max-height: 500px !important;
        padding: 10px 0 !important;
        overflow: visible !important;
    }
    
    .n24-menu .sub-menu a {
        color: #cccccc !important;
        padding: 12px 20px;
    }
    
    .n24-menu .sub-menu a:hover {
        background: #333;
        color: #cc0000 !important;
    }
    
    /* Fix sidebar overflow on mobile */
    .sidebar,
    #sidebar,
    .widget-area,
    aside,
    .n24-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .sidebar *,
    #sidebar *,
    .widget-area *,
    aside *,
    .n24-sidebar * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    iframe,
    embed,
    object,
    video {
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Body scroll lock when menu open
   ========================================================================== */
body.menu-open {
    overflow: hidden !important;
}
