/* ============================================================
   UNICEF Header (extrahováno z vcreate-header.php)
   ============================================================ */

/* Úprava paddingu na stránce s UNICEF headerem (aplikuje se jen na front page díky body class) */
body.has-unicef-header {
    padding-top: 0 !important;
}
body.has-unicef-header .custom-slider-wrapper {
    height: 100vh;
    position: relative;
    z-index: 1;
}

    /* Header Styles - VÝCHOZÍ STAV: bílé pozadí, černé texty */
    .unicef-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999999 !important;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        isolation: isolate;
    }

    /* Posun headeru pod WP admin toolbar, když je uživatel přihlášený */
    body.admin-bar .unicef-header {
        top: 32px;
    }
    @media screen and (max-width: 782px) {
        body.admin-bar .unicef-header {
            top: 46px;
        }
    }

    /* Divi sekce občas vytvářejí vlastní stacking context - zajistíme, že nikdy nepřekryjí header */
    .et_pb_section,
    .et_pb_row,
    .et_pb_module {
        z-index: auto;
    }
    
    /* POUZE NA HOMEPAGE - transparentní pozadí, bílé texty */
    body.home .unicef-header:not(.scrolled),
    body.page-template-homepage .unicef-header:not(.scrolled),
    body.page-id-2 .unicef-header:not(.scrolled),
    body.front-page .unicef-header:not(.scrolled) {
        background: rgba(0, 0, 0, 0.01);
        box-shadow: none;
    }
    
    /* Scrolled state - vždy bílé pozadí */
    .unicef-header.scrolled {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .header-container {
        max-width: 1440px;
        margin: 0 auto;
        padding: 0 20px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        height: 80px;
        position: relative;
    }
    
    /* Logo Section */
    .header-logo {
        display: flex;
        align-items: center;
        position: relative;
        z-index: 10;
    }
    
    .logo-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        background: #00AEEF;
        padding: 20px 25px 30px 25px;
        height: 130px;
        margin-left: -20px;
        transition: background 0.3s ease;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        position: relative;
        top: 0;
    }
    
    .logo-link:hover {
        background: #0099d4;
    }
    
    .logo-main {
        height: 60px;
        width: auto;
        position: relative;
        top: 0px;
    }
    
    /* Navigation Menu */
    .header-navigation {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 40px;
        height: 80px;
    }
    
    .nav-menu {
        display: flex !important;
        list-style: none !important;
        list-style-type: none !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 5px !important;
        position: relative;
    }
    
    .nav-menu li {
        list-style: none !important;
        list-style-type: none !important;
    }
    
    .nav-menu li::before {
        display: none !important;
    }
    
    .nav-item {
        margin: 0;
        position: relative;
    }
    
    /* Položky s podmenu */
    .nav-item.has-submenu > .nav-link {
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .submenu-arrow {
        transition: transform 0.3s ease;
    }
    
    .nav-item.has-submenu:hover > .nav-link .submenu-arrow {
        transform: rotate(180deg);
    }
    
    /* VÝCHOZÍ: černé texty na všech stránkách */
    .nav-link {
        color: #000;
        text-decoration: none;
        padding: 10px 16px;
        font-size: 17px;
        font-weight: 500;
        transition: all 0.3s ease;
        display: block;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* HOMEPAGE: bílé texty když není scrolled */
    body.home .unicef-header:not(.scrolled) .nav-link,
    body.page-template-homepage .unicef-header:not(.scrolled) .nav-link,
    body.page-id-2 .unicef-header:not(.scrolled) .nav-link,
    body.front-page .unicef-header:not(.scrolled) .nav-link {
        color: white;
    }
    
    .nav-link:hover {
        color: #00AEEF;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: #00AEEF;
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }
    
    .nav-item:not(.has-submenu) .nav-link:hover::after {
        width: 80%;
    }
    
    /* Submenu Styles */
    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background: white;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        padding: 10px 0 !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 100;
        list-style: none !important;
        list-style-type: none !important;
        margin: 0 !important;
    }
    
    .sub-menu li {
        list-style: none !important;
        list-style-type: none !important;
    }
    
    .sub-menu li::before {
        display: none !important;
    }
    
    .nav-item.has-submenu:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .sub-menu .nav-item {
        margin: 0;
    }
    
    .sub-menu .nav-link {
        padding: 10px 20px !important;
        font-size: 15px !important;
        color: #333 !important;
        text-transform: uppercase;
        border: none;
    }
    
    .sub-menu .nav-link:hover {
        color: #00AEEF !important;
        background: #f8f9fa;
    }
    
    .sub-menu .nav-link::after {
        display: none;
    }
    
    /* Header Actions */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
        height: 80px;
    }
    
    /* VÝCHOZÍ: černé ikony */
    .header-search-btn,
    .header-user-btn,
    .header-cart-btn {
        background: none;
        border: none;
        color: #000;
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        position: relative;
    }
    
    /* HOMEPAGE: bílé ikony když není scrolled */
    body.home .unicef-header:not(.scrolled) .header-search-btn,
    body.home .unicef-header:not(.scrolled) .header-user-btn,
    body.home .unicef-header:not(.scrolled) .header-cart-btn,
    body.page-template-homepage .unicef-header:not(.scrolled) .header-search-btn,
    body.page-template-homepage .unicef-header:not(.scrolled) .header-user-btn,
    body.page-template-homepage .unicef-header:not(.scrolled) .header-cart-btn,
    body.page-id-2 .unicef-header:not(.scrolled) .header-search-btn,
    body.page-id-2 .unicef-header:not(.scrolled) .header-user-btn,
    body.page-id-2 .unicef-header:not(.scrolled) .header-cart-btn,
    body.front-page .unicef-header:not(.scrolled) .header-search-btn,
    body.front-page .unicef-header:not(.scrolled) .header-user-btn,
    body.front-page .unicef-header:not(.scrolled) .header-cart-btn {
        color: white;
    }
    
    .header-search-btn:hover,
    .header-user-btn:hover,
    .header-cart-btn:hover {
        color: #00AEEF;
    }
    
    .cart-count {
        position: absolute;
        top: 0;
        right: 0;
        background: #FFFF00;
        color: #000;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 5px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }
    
    .header-donate-btn {
        background: #FFFF00;
        color: #000;
        padding: 12px 24px;
        text-decoration: none;
        font-weight: bold;
        font-size: 14px;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border: 2px solid #FFFF00;
    }

    /* Výchozí hover - na bílém pozadí (scrolled, ostatní stránky) */
    .header-donate-btn:hover {
        background: #000;
        color: #FFFF00;
        border-color: #000;
        transform: translateY(-2px);
    }

    /* Hover na homepage před scrollem - průhledné pozadí, žlutý text */
    body.home .unicef-header:not(.scrolled) .header-donate-btn:hover,
    body.page-template-homepage .unicef-header:not(.scrolled) .header-donate-btn:hover,
    body.page-id-2 .unicef-header:not(.scrolled) .header-donate-btn:hover,
    body.front-page .unicef-header:not(.scrolled) .header-donate-btn:hover {
        background: transparent;
        color: #FFFF00;
        border-color: #FFFF00;
        transform: translateY(-2px);
    }

    /* Mobile Menu Toggle - UPRAVENO s textem MENU */
    .mobile-menu-toggle {
        display: none;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px 12px;
        transition: all 0.3s ease;
    }
    
    .menu-text {
        font-size: 14px;
        font-weight: 600;
        color: #000;
        letter-spacing: 1px;
        text-transform: uppercase;
    }
    
    /* HOMEPAGE: bílý text MENU když není scrolled */
    body.home .unicef-header:not(.scrolled) .menu-text,
    body.page-template-homepage .unicef-header:not(.scrolled) .menu-text,
    body.page-id-2 .unicef-header:not(.scrolled) .menu-text,
    body.front-page .unicef-header:not(.scrolled) .menu-text {
        color: white;
    }
    
    .hamburger-lines {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    /* VÝCHOZÍ: černé čárky */
    .hamburger-lines span {
        width: 25px;
        height: 2px;
        background: #000;
        transition: all 0.3s ease;
        display: block;
    }
    
    /* HOMEPAGE: bílé čárky když není scrolled */
    body.home .unicef-header:not(.scrolled) .hamburger-lines span,
    body.page-template-homepage .unicef-header:not(.scrolled) .hamburger-lines span,
    body.page-id-2 .unicef-header:not(.scrolled) .hamburger-lines span,
    body.front-page .unicef-header:not(.scrolled) .hamburger-lines span {
        background: white;
    }
    
    .mobile-menu-toggle.active .hamburger-lines span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .hamburger-lines span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .hamburger-lines span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Search Overlay */
    .search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.95);
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .search-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .search-overlay-content {
        width: 100%;
        max-width: 600px;
        padding: 20px;
    }
    
    .search-close {
        position: absolute;
        top: 30px;
        right: 30px;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 10px;
        transition: transform 0.3s ease;
    }
    
    .search-close:hover {
        transform: rotate(90deg);
    }
    
    .search-form {
        display: flex;
        gap: 10px;
    }
    
    .search-input {
        flex: 1;
        padding: 15px 20px;
        font-size: 18px;
        border: 2px solid #00AEEF;
        background: transparent;
        color: white;
        outline: none;
        transition: all 0.3s ease;
    }
    
    .search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .search-input:focus {
        border-color: #FFFF00;
    }
    
    .search-submit {
        background: #00AEEF;
        border: none;
        color: white;
        padding: 15px 30px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .search-submit:hover {
        background: #0099d4;
    }

    /* Live Search Results - Modern Design */
    .vv-search-input-wrapper {
        display: flex;
        gap: 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        overflow: hidden;
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
    }

    .vv-search-input-wrapper:focus-within {
        border-color: #00AEEF;
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 20px rgba(0, 174, 239, 0.3);
    }

    .vv-search-form .vv-search-input {
        border: none !important;
        background: transparent !important;
        padding: 16px 24px !important;
        font-size: 16px !important;
        flex: 1;
        color: white !important;
    }

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

    .vv-search-form .vv-search-submit {
        background: #00AEEF;
        border: none;
        color: white;
        padding: 16px 24px;
        border-radius: 0 50px 50px 0;
        margin: -2px -2px -2px 0;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .vv-search-form .vv-search-submit:hover {
        background: #00c3ff;
    }

    .vv-live-search-results {
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        background: white;
        border-radius: 16px;
        max-height: 450px;
        overflow: hidden;
        display: none;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
        animation: vvSlideDown 0.25s ease-out;
    }

    @keyframes vvSlideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .vv-live-search-results.active {
        display: block;
    }

    .vv-live-search-results-inner {
        max-height: 380px;
        overflow-y: auto;
    }

    .vv-live-search-results .vv-search-result-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px 20px;
        text-decoration: none;
        color: #1a1a1a;
        transition: all 0.2s ease;
        border-bottom: 1px solid #f0f0f0;
    }

    .vv-live-search-results .vv-search-result-item:hover {
        background: linear-gradient(90deg, rgba(0, 174, 239, 0.08) 0%, rgba(0, 174, 239, 0.02) 100%);
        padding-left: 24px;
    }

    .vv-live-search-results .vv-search-result-item:last-child {
        border-bottom: none;
    }

    .vv-live-search-results .vv-result-image {
        width: 56px;
        height: 56px;
        object-fit: cover;
        border-radius: 10px;
        background: #f5f5f5;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .vv-live-search-results .vv-result-info {
        flex: 1;
        min-width: 0;
    }

    .vv-live-search-results .vv-result-title {
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 5px 0;
        color: #1a1a1a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    .vv-live-search-results .vv-result-price {
        font-size: 14px;
        color: #00AEEF;
        font-weight: 700;
    }

    .vv-live-search-results .vv-result-price del {
        color: #999;
        font-weight: 400;
        margin-right: 8px;
    }

    .vv-live-search-results .vv-result-price ins {
        text-decoration: none;
        color: #00AEEF;
    }

    .vv-live-search-results .vv-result-excerpt {
        font-size: 13px;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
    }

    .vv-live-search-results .vv-search-loading {
        padding: 40px 20px;
        text-align: center;
        color: #666;
    }

    .vv-live-search-results .vv-search-loading::before {
        content: '';
        display: block;
        width: 32px;
        height: 32px;
        border: 3px solid #f0f0f0;
        border-top-color: #00AEEF;
        border-radius: 50%;
        margin: 0 auto 12px;
        animation: vvSpin 0.8s linear infinite;
    }

    @keyframes vvSpin {
        to { transform: rotate(360deg); }
    }

    .vv-live-search-results .vv-search-no-results {
        padding: 40px 20px;
        text-align: center;
        color: #666;
    }

    .vv-live-search-results .vv-search-no-results::before {
        content: '🔍';
        display: block;
        font-size: 32px;
        margin-bottom: 12px;
        opacity: 0.5;
    }

    .vv-live-search-results .vv-search-view-all {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 16px 20px;
        text-align: center;
        background: linear-gradient(135deg, #00AEEF 0%, #0099d4 100%);
        color: white;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.2s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .vv-live-search-results .vv-search-view-all:hover {
        background: linear-gradient(135deg, #00c3ff 0%, #00AEEF 100%);
        gap: 12px;
    }

    .vv-live-search-results .vv-search-view-all::after {
        content: '→';
        font-size: 16px;
        transition: transform 0.2s ease;
    }

    .vv-live-search-results .vv-search-view-all:hover::after {
        transform: translateX(4px);
    }

    .vv-search-form {
        position: relative;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Search overlay improvements */
    .search-overlay {
        align-items: flex-start;
        padding-top: 120px;
    }

    .search-overlay-content {
        width: 100%;
        max-width: 700px;
        padding: 20px;
    }

    /* Mobile Menu - UPRAVENO pro správné zobrazení */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0;
        width: 80%;
        max-width: 400px;
        background: #00AEEF;
        z-index: 100000;
        transition: right 0.3s ease;
        overflow-y: auto;
        height: 100vh;
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .mobile-menu-content {
        padding: 20px;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-logo {
        height: 30px;
    }
    
    .mobile-menu-close {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 5px;
    }
    
    /* Mobile menu styles - UPRAVENO: odebrány tečky a přidán toggle */
    .mobile-nav-menu {
        list-style: none !important;
        list-style-type: none !important;
        padding: 0;
        margin: 0;
    }
    
    .mobile-nav-menu li {
        margin: 0;
        list-style: none !important;
        list-style-type: none !important;
        position: relative;
    }
    
    .mobile-nav-menu li::before,
    .mobile-nav-menu li::after {
        display: none !important;
        content: none !important;
    }
    
    .mobile-menu-item-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-menu > li:last-child .mobile-menu-item-wrapper {
        border-bottom: none;
    }
    
    .mobile-nav-menu a {
        color: white;
        text-decoration: none;
        padding: 15px 0;
        display: block;
        font-size: 16px;
        font-weight: 500;
        transition: padding-left 0.3s ease;
        flex: 1;
    }
    
    .mobile-nav-menu .nav-link {
        border-bottom: none;
    }
    
    .mobile-nav-menu a:hover {
        padding-left: 10px;
    }
    
    /* Toggle button pro podmenu */
    .mobile-submenu-toggle {
        background: none;
        border: none;
        color: white;
        padding: 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }
    
    .mobile-submenu-toggle:hover {
        opacity: 0.8;
    }
    
    .mobile-submenu-toggle svg {
        width: 20px;
        height: 20px;
        transition: transform 0.3s ease;
    }
    
    .mobile-submenu-toggle.active svg {
        transform: rotate(180deg);
    }
    
    /* Mobile submenu */
    .mobile-nav-menu .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        border-radius: 0;
        padding: 0 !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        list-style: none !important;
        list-style-type: none !important;
    }
    
    .mobile-nav-menu .sub-menu.active {
        max-height: 500px;
    }
    
    .mobile-nav-menu .sub-menu li {
        list-style: none !important;
        list-style-type: none !important;
    }
    
    .mobile-nav-menu .sub-menu li::before,
    .mobile-nav-menu .sub-menu li::after {
        display: none !important;
        content: none !important;
    }
    
    .mobile-nav-menu .sub-menu a {
        font-size: 14px;
        padding: 10px 0;
        color: rgba(255, 255, 255, 0.9) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu-footer {
        margin-top: 20px;
        margin-bottom: 30px;
    }
    
    .mobile-donate-btn {
        display: block;
        width: 100%;
        background: #FFFF00;
        color: #000;
        padding: 15px;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        font-size: 16px;
        text-transform: uppercase;
        transition: all 0.3s ease;
    }
    
    .mobile-donate-btn:hover {
        background: #fff;
    }
    
    /* Responsive */
    @media (max-width: 1200px) {
        .nav-link {
            padding: 10px 12px;
            font-size: 13px;
        }
    }
    
    @media (max-width: 1024px) {
        .header-navigation {
            display: none;
        }
        
        .mobile-menu-toggle {
            display: flex;
        }
        
        .header-donate-btn {
            display: none;
        }
        
        .header-container {
            height: 60px;
        }
        
        .header-actions {
            height: 60px;
        }
        
        .logo-link {
            height: 100px;
            padding: 15px 20px 25px 20px;
        }
        
        .logo-main {
            height: 30px;
            top: -3px;
        }
    }
    
    @media (max-width: 480px) {
        .header-user-btn {
            display: none;
        }
        
        .mobile-menu {
            width: 90%;
            max-width: none;
        }
        
        .menu-text {
            font-size: 12px;
        }
        
        .hamburger-lines span {
            width: 20px;
        }
    }
