/* ===========================================
   Хедер — премиальный стиль
   =========================================== */

/* ---------- Верхняя инфо-полоса ---------- */
.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child {
    font-size: 13px;
    background: linear-gradient(135deg, #0f1b3d 0%, #1a2f5c 100%);
}

.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child p {
    margin: 0;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85) !important;
}

.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.2s ease;
}

.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child a:hover {
    color: #ffffff !important;
}

.rv-header-topbar__inner {
    gap: 8px 28px;
}

.rv-header-addresses {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 2px 20px !important;
    min-width: 0;
}

.rv-header-address {
    white-space: nowrap;
}

.rv-header-contact {
    flex: 0 0 auto;
    gap: 16px !important;
    margin-left: auto;
}

/* «Заказать звонок» — светло-голубой акцент на тёмной полосе */
.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child .has-accent-1-color a {
    color: var(--rv-accent-soft) !important;
    font-weight: 600;
}

.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:first-child .has-accent-1-color a:hover {
    color: var(--rv-accent-pale) !important;
}

/* ---------- Текстовый логотип ---------- */
.brand-group {
    animation: site-title-shimmer 2.5s ease-out 0.3s 1 both;
}

.wp-block-site-title a {
    text-decoration: none !important;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    letter-spacing: 0.12em;

    background: linear-gradient(90deg,
            #0f2557 0%,
            #1a3a7a 25%,
            #3b82f6 50%,
            #1a3a7a 75%,
            #0f2557 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    animation: site-title-shimmer 2.5s ease-out 0.3s 1 both;
    transition: filter 0.3s ease;
}

.wp-block-site-title a:hover {
    filter: brightness(1.3);
}

/* Подпись позиционирует «Весы-Пром» как направление, а не юридическое лицо. */
.site-subtitle {
    background: linear-gradient(90deg,
            #64748b 0%,
            #94a3b8 25%,
            #3b82f6 50%,
            #94a3b8 75%,
            #64748b 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: site-title-shimmer 2.5s ease-out 0.5s 1 both;
    margin-top: -2px !important;
}

@keyframes site-title-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* ---------- Средний ряд (лого, поиск, иконки) ---------- */
.wp-block-group.alignfull.has-base-background-color>.wp-block-group.alignfull:nth-child(2) {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

/* ---------- Поиск — стилизация ---------- */
.rv-header-search .wp-block-search__inside-wrapper {
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.rv-header-search .wp-block-search__inside-wrapper:focus-within {
    border-color: var(--wp--preset--color--accent-1) !important;
    box-shadow: 0 0 0 4px rgba(30, 84, 200, 0.10);
}

.rv-header-search .wp-block-search__input {
    border: none !important;
    background: transparent !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    color: #334155;
}

.rv-header-search .wp-block-search__input::placeholder {
    color: #94a3b8;
}

.rv-header-search .wp-block-search__button {
    background: linear-gradient(135deg, #1e54c8 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 18px !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.rv-header-search .wp-block-search__button:hover {
    background: linear-gradient(135deg, #1945a8 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 8px rgba(30, 84, 200, 0.3);
}

/* ---------- Навигационная полоса ---------- */
.wp-block-group.alignfull.has-accent-5-background-color {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 10;
}

/* Тонкая градиентная линия сверху навбара */
.wp-block-group.alignfull.has-accent-5-background-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e54c8 0%, #3b82f6 50%, #1e54c8 100%);
}

/* ---------- WooCommerce иконки ---------- */
.has-base-background-color .wc-block-mini-cart__button,
.has-base-background-color .wc-block-customer-account__account-icon {
    color: var(--wp--preset--color--contrast);
    transition: color 0.2s ease, transform 0.2s ease;
}

.has-base-background-color .wc-block-mini-cart__button:hover,
.has-base-background-color .wc-block-customer-account__account-icon:hover {
    color: var(--wp--preset--color--accent-1);
    transform: scale(1.1);
}

/* Иконки в навбаре */
.has-accent-5-background-color .wc-block-customer-account__account-icon {
    color: #334155;
    transition: color 0.2s ease;
}

.has-accent-5-background-color .wc-block-customer-account__account-icon:hover {
    color: #1e54c8;
}

/* ---------- Весь хедер — тень и sticky ---------- */
.wp-block-group.alignfull.has-base-background-color {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

@media (max-width: 1023px) {
    .rv-header-topbar__inner {
        align-items: flex-start !important;
        column-gap: 16px;
    }

    .rv-header-addresses {
        align-items: flex-start !important;
        flex: 1 1 360px;
        flex-direction: column;
        gap: 2px !important;
    }

    .rv-header-address {
        font-size: 11px !important;
    }
}

@media (max-width: 679px) {
    .rv-header-topbar__inner {
        align-items: stretch !important;
        flex-direction: column;
        gap: 6px !important;
    }

    .rv-header-addresses {
        flex-basis: auto;
        width: 100%;
    }

    .rv-header-contact {
        justify-content: space-between !important;
        margin-left: 0;
        width: 100%;
    }
}
