/* ui-effects.css — P1-эффекты интерфейса bizneszal.ru
   sticky-шапка, кнопка «Наверх», focus-visible, аккордеон, карточки, lazy-fade.
   Без внешних библиотек. Уважает prefers-reduced-motion. */

/* ── Липкая шапка: при прокрутке тень и компактнее ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    transition: box-shadow .25s ease;
}
.site-header-inner {
    transition: padding .25s ease, min-height .25s ease;
}
.site-header.bz-scrolled {
    box-shadow: 0 4px 20px rgba(15, 23, 42, .10);
}
.site-header.bz-scrolled .site-header-inner {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* ── Кнопка «Наверх» ── */
.bz-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #1a56db;
    color: #fff;
    cursor: pointer;
    z-index: 950;
    box-shadow: 0 6px 20px rgba(26, 86, 219, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .2s ease;
}
.bz-to-top.bz-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.bz-to-top:hover { background: #1e40af; }
.bz-to-top:active { transform: translateY(0) scale(.94); }
@media (max-width: 600px) {
    .bz-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* ── Видимый фокус с клавиатуры ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.bz-hicon:focus-visible,
.bz-hbtn-book:focus-visible,
.bz-to-top:focus-visible {
    outline: 2px solid #1a56db;
    outline-offset: 2px;
    border-radius: 6px;
}
.bz-to-top:focus-visible { outline-offset: 3px; }

/* ── Аккордеон FAQ: плавное раскрытие и поворот знака ── */
.bz-faq-item summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 28px;
    transition: color .2s ease;
}
.bz-faq-item summary::-webkit-details-marker { display: none; }
.bz-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25em;
    font-weight: 400;
    line-height: 1;
    color: #1a56db;
    transition: transform .25s ease;
}
.bz-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.bz-faq-item[open] summary { color: #1a56db; }
.bz-faq-item > *:not(summary) {
    animation: bz-fade-in .28s ease both;
}
@keyframes bz-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

/* ── Карточки залов: подъём, тень, увеличение фото ── */
@media (hover: hover) {
    .bz-lounge-card {
        transition: transform .25s ease, box-shadow .25s ease;
    }
    .bz-lounge-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    }
}
.bz-lounge-card__image,
.bz-lounge-card__img {
    overflow: hidden;
}
.bz-lounge-card__image img,
.bz-lounge-card__img img {
    transition: transform .4s ease;
}
@media (hover: hover) {
    .bz-lounge-card:hover .bz-lounge-card__image img,
    .bz-lounge-card:hover .bz-lounge-card__img img {
        transform: scale(1.06);
    }
}

/* ── Плавное появление ленивых изображений ──
   Класс html.bz-lazyload-ready ставит JS; без JS картинки видны сразу. */
html.bz-lazyload-ready img[loading="lazy"] {
    opacity: 0;
    transition: opacity .4s ease;
}
html.bz-lazyload-ready img[loading="lazy"].bz-loaded {
    opacity: 1;
}

/* ── Плавная прокрутка по якорям ── */
html { scroll-behavior: smooth; }

/* ── Уважение к настройке «меньше движения» ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .site-header,
    .site-header-inner,
    .bz-lounge-card,
    .bz-to-top {
        transition: none !important;
    }
    html.bz-lazyload-ready img[loading="lazy"] { opacity: 1; }
}

/* ── Отзывы (тестовый блок, виден только админу на тестовых страницах) ── */
.bz-reviews-section { margin: 40px 0; }
.bz-reviews-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bz-reviews-head h2 { margin: 0; }
.bz-reviews-rating { display: flex; align-items: center; gap: 10px; }
.bz-reviews-rating__num { font-size: 1.6rem; font-weight: 800; color: #1e293b; line-height: 1; }
.bz-reviews-rating__stars { color: #f59e0b; letter-spacing: 2px; }
.bz-reviews-rating__count { color: #64748b; font-size: .9rem; }
.bz-reviews-rating__src {
    background: #1a56db; color: #fff; font-size: .72rem; font-weight: 700;
    padding: 2px 8px; border-radius: 6px;
}

/* контролы: поиск, сортировка, теги */
.bz-reviews-controls { margin-bottom: 18px; }
.bz-reviews-controls__row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bz-reviews-search {
    flex: 1 1 220px; min-width: 180px; padding: 9px 14px;
    border: 1px solid #e2e8f0; border-radius: 10px; font-size: .9rem;
    background: #f8fafc; color: #1e293b;
}
.bz-reviews-search:focus { border-color: #1a56db; background: #fff; outline: none; }
.bz-reviews-sort {
    padding: 9px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; color: #1e293b; font-size: .9rem; cursor: pointer;
}
.bz-reviews-tags-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-tag-chip {
    border: 1px solid #e2e8f0; background: #fff; color: #475569;
    border-radius: 20px; padding: 5px 12px; font-size: .82rem; cursor: pointer;
    transition: all .15s ease;
}
.bz-tag-chip i { font-style: normal; color: #94a3b8; font-size: .78rem; }
.bz-tag-chip:hover { border-color: #1a56db; color: #1a56db; }
.bz-tag-chip.is-active { background: #1a56db; color: #fff; border-color: #1a56db; }
.bz-tag-chip.is-active i { color: #c7d2fe; }

/* сетка карточек */
.bz-reviews-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .bz-reviews-list { grid-template-columns: 1fr; } }

.bz-review {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 16px 18px; display: flex; flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.bz-review.is-hidden { display: none; }
.bz-review:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
/* ── Сводка отзывов: рекомендуют + хвалят/жалуются ── */
.bz-reviews-summary {
    background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px;
    padding: 16px 18px; margin: 0 0 18px;
}
.bz-reviews-summary__rec { margin: 0 0 12px; font-size: 15px; color: #334155; }
.bz-reviews-summary__rec b { color: #16a34a; font-size: 17px; }
.bz-reviews-summary__cols { display: flex; gap: 28px; flex-wrap: wrap; }
.bz-reviews-summary__col { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bz-reviews-summary__label { font-size: 13px; font-weight: 700; color: #475569; }
.bz-sum-chip {
    display: inline-block; font-size: 12.5px; border-radius: 20px;
    padding: 4px 12px; border: 1px solid;
}
.bz-sum-chip--plus { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.bz-sum-chip--minus { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.bz-reviews-stars-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bz-star-chip {
    font-size: 13px; padding: 5px 14px; border-radius: 20px; cursor: pointer;
    background: #fff; border: 1px solid #e2e8f0; color: #475569;
}
.bz-star-chip:hover { border-color: #93c5fd; }
.bz-star-chip.is-active { background: #1a56db; border-color: #1a56db; color: #fff; }

.bz-review__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bz-review__ava { position: relative; flex: none; width: 38px; height: 38px; }
.bz-review__avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #1a56db, #3b82f6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    object-fit: cover;
}
.bz-review__avatar--img { border: 1px solid #e2e8f0; }
.bz-review__ava .bz-review__src {
    position: absolute; left: -4px; top: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 1px #fff; overflow: hidden;
}
.bz-review__ava .bz-review__src .bz-src-logo,
.bz-review__ava .bz-review__src .bz-src-logo svg { width: 18px; height: 18px; }
.bz-review__who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bz-review__who b { color: #1e293b; }
.bz-review__date { color: #94a3b8; font-size: .82rem; }
.bz-review__stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.bz-src-logo { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
.bz-src-logo svg, .bz-src-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bz-reviews-rating .bz-src-logo { width: 26px; height: 26px; }
/* знак Яндекса: красный круг с белой «Я» */
.bz-ya {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fc3f1d; color: #fff;
    font-weight: 800; font-size: 12px; line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
    flex-shrink: 0;
}
.bz-reviews-rating .bz-ya { width: 26px; height: 26px; font-size: 15px; }
/* подвал карточки: логотип источника внизу, под тегами */
.bz-review__foot {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.bz-review__text {
    margin: 0 0 10px; color: #1e293b; line-height: 1.55; font-size: .93rem;
    white-space: pre-line;
}
.bz-review:not(.is-open) .bz-review__text {
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical;
    overflow: hidden;
}
.bz-review__more {
    align-self: flex-start; border: none; background: none; color: #1a56db;
    font-size: .85rem; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 10px;
}
.bz-review__more:hover { text-decoration: underline; }
.bz-review.is-short .bz-review__more { display: none; }
.bz-review__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.bz-review__tag {
    border: 1px solid #bfdbfe; background: #eff6ff; color: #1a56db;
    border-radius: 20px; padding: 3px 10px; font-size: .74rem; cursor: pointer;
}
.bz-review__tag:hover { background: #dbeafe; }

/* низ блока */
.bz-reviews-foot { text-align: center; margin-top: 20px; }
.bz-reviews-more {
    background: #1a56db; color: #fff; border: none; border-radius: 10px;
    padding: 11px 26px; font-size: .92rem; font-weight: 600; cursor: pointer;
    transition: background .2s ease;
}
.bz-reviews-more:hover { background: #1e40af; }
.bz-reviews-more[hidden] { display: none; }
.bz-reviews-empty { color: #64748b; margin: 0; }
.bz-reviews-empty[hidden] { display: none; }

/* ──Заголовок аэропорта с оценкой ── */
.bz-airport-header__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bz-airport-header__top h1 { margin: 0; }
.bz-airport-header .bz-rating-large { flex-shrink: 0; }

/* ──Аккуратные заголовки секций ── */
.bz-lounges-section > h2, .bz-airports-section > h2, .bz-cities-section > h2,
.bz-amenities-section > h2, .bz-access-section > h2, .bz-platforms-section > h2,
.bz-faq-section > h2, .bz-howtoget-section > h2, .bz-airport-info > h2 {
    position: relative; padding-left: 14px; margin-bottom: 18px;
    font-size: 1.35rem; line-height: 1.25;
}
.bz-lounges-section > h2::before, .bz-airports-section > h2::before, .bz-cities-section > h2::before,
.bz-amenities-section > h2::before, .bz-access-section > h2::before, .bz-platforms-section > h2::before,
.bz-faq-section > h2::before, .bz-howtoget-section > h2::before, .bz-airport-info > h2::before {
    content: ""; position: absolute; left: 0; top: .15em; bottom: .15em;
    width: 4px; border-radius: 3px; background: linear-gradient(180deg, #1a56db, #3b82f6);
}

/* ── Блок «Где забронировать»: выделенный VIP-ZAL + список сервисов ── */
.bz-platform-primary {
    display: flex; align-items: center; justify-content: space-between; gap: 22px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #eff5ff 0%, #e6f0ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 18px;
}
.bz-platform-primary__main { flex: 1 1 420px; min-width: 260px; }
.bz-platform-primary__tag {
    display: inline-block; background: #1a56db; color: #fff;
    font-size: .74rem; font-weight: 700; border-radius: 6px;
    padding: 3px 10px; margin-bottom: 10px;
}
.bz-platform-primary__title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.3rem; }
.bz-platform-primary__logo { border-radius: 8px; }
.bz-platform-primary__desc { margin: 0 0 12px; color: #475569; line-height: 1.5; }
.bz-platform-primary__action { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.bz-btn--lg { padding: 12px 22px; font-size: .95rem; }
@media (max-width: 700px) {
    .bz-platform-primary__action { width: 100%; }
    .bz-platform-primary__action .bz-btn { width: 100%; text-align: center; }
}

/* ── Блок «Где забронировать»: список сервисов ── */
.bz-platforms-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.bz-platform-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 16px 18px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.bz-platform-card:hover { box-shadow: 0 10px 26px rgba(15, 23, 42, .09); transform: translateY(-2px); }
.bz-platform-card.is-featured { border-color: #bfdbfe; box-shadow: 0 6px 20px rgba(26, 86, 219, .08); }
.bz-platform-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bz-platform-card__logo { border-radius: 8px; flex-shrink: 0; }
.bz-platform-card__title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bz-platform-card__title a { font-weight: 700; color: #1e293b; text-decoration: none; font-size: 1rem; }
.bz-platform-card__title a:hover { color: #1a56db; }
.bz-platform-card__rec { font-size: .72rem; color: #1a56db; font-weight: 600; }
.bz-platform-card__specs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bz-platform-card__specs li {
    font-size: .78rem; color: #475569; background: #f1f5f9;
    border-radius: 8px; padding: 3px 9px;
}
.bz-platform-card__specs li b { color: #1e293b; }
.bz-platform-card__specs li.ok { background: #ecfdf5; color: #047857; }
.bz-platform-card__specs li.no { background: #fef2f2; color: #b91c1c; }
.bz-platform-card__note { margin: 0 0 12px; font-size: .82rem; color: #64748b; line-height: 1.45; }
.bz-platform-card__action { display: flex; gap: 8px; margin-top: auto; }
.bz-platform-card__action .bz-btn { flex: 1; text-align: center; }

/* ── Логотипы сервисов: картинка или буквенный бейдж ── */
.bz-platform-logo {
    width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
    object-fit: contain; background: #fff; border: 1px solid #e2e8f0;
    padding: 3px; box-sizing: border-box;
}
.bz-platform-primary__title .bz-platform-logo { width: 44px; height: 44px; }
.bz-platform-logo--letter {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.05rem; color: #fff;
    background: linear-gradient(135deg, #1a56db, #3b82f6);
    border: none; text-transform: uppercase;
}
/* Мягкий пульс приоритетной кнопки (уважает reduced-motion) */
@keyframes bz-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 86, 219, .35); }
    50%      { box-shadow: 0 0 0 8px rgba(26, 86, 219, 0); }
}
.bz-go--featured { animation: bz-pulse 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .bz-go--featured { animation: none; }
}

/* ── Заглушка карточек залов без фото ── */
.bz-lounge-card__no-img {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8eefb 0%, #dbeafe 55%, #c7ddfb 100%);
    min-height: 160px;
}
.bz-lounge-card__no-img img { display: none; }
.bz-lounge-card__no-img::after {
    content: "";
    width: 54px; height: 54px;
    background: center/contain no-repeat
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a9d0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/></svg>");
    opacity: .85;
}

/* ──Хиро-навигация с якорями ── */
.bz-hero-nav {
    display: flex; flex-wrap: wrap; gap: 22px;
    flex: 0 0 100%; order: 99;
    width: 100%;
    margin: 14px 0 22px;
    border-bottom: 1px solid #e8edf3;
}
.bz-hero-nav a {
    position: relative;
    padding: 8px 0 12px;
    color: #64748b;
    font-size: .9rem; font-weight: 500; text-decoration: none;
    transition: color .15s ease;
}
.bz-hero-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px; border-radius: 2px; background: #1a56db;
    transform: scaleX(0); transform-origin: center;
    transition: transform .18s ease;
}
.bz-hero-nav a:hover { color: #1a56db; }
.bz-hero-nav a.bz-active { color: #1a56db; font-weight: 600; }
.bz-hero-nav a.bz-active::after { transform: scaleX(1); }
@media (max-width: 600px) {
    .bz-hero-nav { gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bz-hero-nav a { white-space: nowrap; font-size: .85rem; }
}
/* отступ при переходе по якорю, чтобы заголовок не ушёл под липкую шапку */
:target { scroll-margin-top: 90px; }
h2[id^="bz-"] { scroll-margin-top: 90px; }
