/* === TOP BAR (Верхня панель контактів) === */
.header-top-bar {
    background-color: #1a1a1a; /* Трохи світліший за чорний */
    border-bottom: 1px solid #333;
    padding: 8px 30px !important; /* Повертаємо старий padding */
    font-size: 0.85rem;
    z-index: 1001;
    position: relative;
}

.top-bar-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #cccccc;
}

.top-bar-link {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-link:hover {
    color: var(--wp--preset--color--accent);
}

.top-bar-link i,
.working-hours i {
    color: var(--wp--preset--color--accent) !important; /* Примусово золотий */
    font-size: 0.9em;
}

.separator {
    color: #444;
    font-size: 0.8em;
}

.working-hours {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === MAIN HEADER (Основний хедер) === */
body header.site-header.wp-block-group,
.site-header.wp-block-group,
header.site-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 30px !important;
    background-color: #000000 !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    /* Sticky Header логіка */
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 95px !important; /* Висота під логотип 85px */
    min-height: 95px !important;
    max-height: 95px !important;
}

/* Прибираємо зайві flex-wrap від WordPress */
.site-header.wp-block-group > .wp-block-group__inner-container,
.site-header > .wp-block-group__inner-container {
    display: contents !important;
}

/* ЧАСТИНА 1: Логотип + Назва */
.header-branding,
.site-header .header-branding,
.wp-block-group.header-branding {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    height: 80px !important;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
}

.header-logo {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

.header-logo a {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
    line-height: 1;
}

.header-logo img {
    max-height: 85px !important; /* Збільшено логотип */
    height: 85px !important;
    width: auto !important;
    display: block;
    transition: all 0.3s ease;
    object-fit: contain;
}

.header-title {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

.header-title h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 80px !important;
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

.header-title a {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: var(--wp--preset--color--accent) !important;
    text-decoration: none !important;
    letter-spacing: -0.5px;
    display: flex !important;
    align-items: center !important;
    line-height: 80px !important;
    height: 80px !important;
}

.header-title a:hover {
    color: #ffffff !important;
}

/* ЧАСТИНА 2: Меню і пошук */
.header-navigation,
.site-header .header-navigation,
.wp-block-group.header-navigation {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 30px !important;
    height: 80px !important;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
}

/* Стилізація меню */
.main-navigation,
.site-header .main-navigation {
    font-size: 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

/* Вирівнювання пунктів меню */
.main-navigation .wp-block-navigation__container,
.site-header .wp-block-navigation__container {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
    gap: 25px !important; /* Збільшено відстань між пунктами */
}

.main-navigation .wp-block-navigation-item,
.site-header .wp-block-navigation-item {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
    margin: 0 !important;
    padding: 0 5px !important;
}

.main-navigation .wp-block-navigation-item__content,
.site-header .wp-block-navigation-item__content {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
    line-height: 80px !important;
}

/* Пошук вирівнювання */
.header-search,
.site-header .header-search {
    display: flex !important;
    align-items: center !important;
    height: 80px !important;
}

/* Адаптивність */
@media (max-width: 768px) {
    /* Top Bar на мобільних */
    .header-top-bar {
        justify-content: center !important;
        padding: 5px 15px !important;
    }
    
    .top-bar-wrapper {
        align-items: center; /* Центруємо на мобільних */
    }
    
    .top-bar-contacts-row {
        font-size: 0.75rem;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .top-bar-hours-row {
        display: none; /* Ховаємо години на мобільному */
    }
    
    .separator {
        display: none; /* Ховаємо роздільник */
    }

    /* Header на мобільних */
    body header.site-header.wp-block-group,
    .site-header.wp-block-group,
    header.site-header {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .header-branding,
    .header-navigation,
    .header-logo,
    .header-title,
    .header-title h1,
    .header-title a,
    .main-navigation,
    .main-navigation .wp-block-navigation__container,
    .main-navigation .wp-block-navigation-item,
    .main-navigation .wp-block-navigation-item__content {
        height: auto !important;
        line-height: normal !important;
    }
    
    .header-navigation {
        width: 100%;
        justify-content: space-between !important;
    }
    
    .header-logo img {
        max-height: 50px !important;
        height: 50px !important;
    }
    
    .header-title a {
        font-size: 1.5rem !important;
    }
}
