/* ============================================================================
 * Стили страницы ресторана (шаблон single-tang_lounge_restart.php).
 * Подключается только на страницах ресторанов, ПОСЛЕ styles/adaptive.css
 * (tangiers_lounge_scripts в functions.php), поэтому при равной специфичности
 * правила отсюда перекрывают общие стили темы.
 *
 * Внутри: лента сторисов, галерея под адресом, метка у адреса, форма
 * бронирования, просмотрщик сторисов и стрелки слайдеров.
 * ==========================================================================*/

/* отступ под фиксированную шапку (66–67.5px) — у первого блока страницы, есть сторисы или нет */
.container-rubber.restaurant-page-body { margin-top: 68px; }
.restaurant-stories-first.slider-section { overflow: clip; -webkit-mask-image: linear-gradient(transparent, #000 calc(var(--card) * 40 / 336)); mask-image: linear-gradient(transparent, #000 calc(var(--card) * 40 / 336)); }
.restaurant-stories-first.slider-section {
    --card: clamp(130px, 17.5vw, 336px);
    flex-direction: column;
    align-items: stretch;
    padding-top: calc(var(--card) * 76 / 336) !important;
    padding-bottom: calc(var(--card) * 64 / 336) !important;
}
@media (max-width: 700px) {
    .restaurant-stories-first.slider-section {
        padding-top: 22px !important;
        padding-bottom: 10px !important;
    }
}
.restaurant-stories-first .swiper-container { height: auto; }
.restaurant-stories-first .slider-swiper__container-stories { transition-timing-function: ease-in-out; }
.restaurant-stories-first .swiper-slide-main {
    width: var(--card);
    height: auto !important;
    align-items: flex-start; /* подпись в две строки не сдвигает карточку вверх */
    transition: none;
    transform-style: flat;
}
/* карточки без своих слоёв (preserve-3d у слайда, will-change у .lift-card): свечение уходит под все карточки ленты, а не только под свою */
.restaurant-stories-first .demo-stories { will-change: auto; }
.restaurant-stories-first .demo-stories,
.restaurant-stories-first .demo-stories > a,
.restaurant-stories-first .demo-stories-avatar {
    width: 100%;
}
.restaurant-stories-first .demo-stories { cursor: pointer; }
.restaurant-stories-first .demo-stories-avatar { display: block; position: relative; }
.restaurant-stories-first .restaurant-page__swiper-slide-img img {
    display: block;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.restaurant-stories-first .demo-stories-name {
    margin: calc(var(--card) * 30 / 336) 0 0;
    width: 100%;
    white-space: normal;
    text-align: center;
    font: 450 clamp(12px, 1.04vw, 20px)/1.3 "FuturaPTM", sans-serif;
    letter-spacing: 0.03em;
}
.restaurant-hero-gallery { width: min(100%, 615px); min-width: 0; }
.restaurant-hero-gallery__slider { width: 100%; overflow: hidden; }
.restaurant-hero-gallery .swiper-slide { height: auto; }
.restaurant-hero-gallery .swiper-slide a { display: block; }
.restaurant-hero-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.restaurant-hero-gallery__controls { display: flex; justify-content: space-around; align-items: center; margin-top: 32px; }
.restaurant-hero-gallery__controls button { width: 60px; height: 60px; padding: 0; border: 1px solid #454545; border-radius: 50%; background: rgba(196, 196, 196, 0.01) center / contain no-repeat; cursor: pointer; transition: opacity 0.6s ease; }
.restaurant-hero-gallery__controls button:hover { opacity: 0.7; }
.restaurant-hero-gallery__controls .restaurant-hero-gallery__prev { background-image: url("../img/arr-l-icon.svg"); }
.restaurant-hero-gallery__controls .restaurant-hero-gallery__zoom { background-image: url("../img/search-icon.svg"); }
.restaurant-hero-gallery__controls .restaurant-hero-gallery__next { background-image: url("../img/arr-r-icon.svg"); }
@media (max-width: 640px) {
    .restaurant-hero-gallery__controls button { width: 40px; height: 40px; }
}
.glow-title {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: text-shadow 0.3s ease, text-decoration-color 0.3s ease;
}
.glow-row:hover .glow-title {
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.38), 0 0 44px rgba(255, 255, 255, 0.22);
    text-decoration-color: currentColor;
}
.restaurant-hero-gallery { position: relative; }
.restaurant-hero-gallery__hint { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; padding: 16px; background: linear-gradient(to bottom, rgba(13, 13, 13, 0), rgba(13, 13, 13, 0.6)); pointer-events: none; }
.restaurant-hero-gallery__zoom-icon { width: 40px; height: 40px; margin-left: auto; border: 1px solid rgba(223, 223, 223, 0.4); border-radius: 50%; background: rgba(13, 13, 13, 0.45) url("../img/search-icon.svg") center / contain no-repeat; }
.restaurant-hero-gallery__arrow { display: none; position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; padding: 0; border: 1px solid rgba(223, 223, 223, 0.4); border-radius: 50%; background: rgba(13, 13, 13, 0.45) center / contain no-repeat; backdrop-filter: blur(8px); cursor: pointer; opacity: 0; transition: opacity 0.3s ease; }
.restaurant-hero-gallery__arrow--prev { left: 16px; background-image: url("../img/arr-l-icon.svg"); }
.restaurant-hero-gallery__arrow--next { right: 16px; background-image: url("../img/arr-r-icon.svg"); }
@media (hover: hover) and (pointer: fine) {
    .restaurant-hero-gallery__arrow { display: block; }
    .restaurant-hero-gallery:hover .restaurant-hero-gallery__arrow, .restaurant-hero-gallery__arrow:focus-visible { opacity: 1; }
    .restaurant-hero-gallery .swiper-slide a { cursor: zoom-in; }
}
.restaurant-hero-gallery.is-nudging .swiper-slide { animation: restaurant-hero-gallery-nudge 900ms ease-in-out; }
@keyframes restaurant-hero-gallery-nudge {
    0%, 100% { transform: translateX(0); }
    45% { transform: translateX(-56px); }
}
@media (prefers-reduced-motion: reduce) {
    .restaurant-hero-gallery.is-nudging .swiper-slide { animation: none; }
}
.section7-container__restoran.restaurant-page__form { padding-top: 68px !important; padding-bottom: 80px !important; }
.section7-container__restoran.restaurant-page__form h5 { padding-bottom: 64px; }
.restaurant-page__form .section7-inputs__secret-assistants { margin-top: 0; padding-bottom: 0 !important; }
@media (max-width: 800px) {
    .section7-container__restoran.restaurant-page__form { padding-top: 44px !important; padding-bottom: 48px !important; }
    .section7-container__restoran.restaurant-page__form h5 { padding-bottom: 40px; }
}
.btn-stories-img {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 135px;
    height: 34px;
    bottom: 5%;

    color: #000000;
    font-family: "FuturaPTM", sans-serif;
    font-size: 16px;
    z-index: 999999999;
    font-style: normal;
    margin: 0 auto;
    margin-top: 20px;
    height: 40px;
    border-radius: 32px;
    background: #dfdfdf;

    font-weight: 450;
    line-height: 20px;
    letter-spacing: 0.48px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #000000;
    padding: 0 10px 0 10px;
}

.btn-stories-img:hover {
    border: 1px solid #dfdfdf !important;
    background: #0d0d0d !important;
    color: #dfdfdf !important;
    transition: 0.5s !important;
}

.swiper-slide {
    transform-style: preserve-3d;
}

.story__slider {
    will-change: transform;
}

.story__slider {
    width: 450px;
    height: 800px;
    border-radius: 6px;
    overflow: hidden;
}

.story__slide {
    position: relative;
}

.story__slide video,
.story__slide img {
    -webkit-touch-callout: none;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.story__pagination {
    bottom: unset !important;
    top: 8px !important;
    display: flex;
    padding: 0 4px;
}

.swiper-pagination-bullet:only-child {
    display: flex !important;
}

.story__pagination .swiper-pagination-bullet {
    flex-grow: 1;
    border-radius: 100vh;
    height: 3px;
    margin: 0 2px !important;
    background-color: rgba(255, 255, 255, .35);
    opacity: 1;
}

.story__pagination .swiper-pagination-bullet .swiper-pagination-progress {
    height: 100%;
    width: 0%;
    border-radius: 100vh;
    background-color: rgba(255, 255, 255, .35);
}

/* подпись сверху, как ник в инсте; база — .stories-slider-user в assets/index.*.css, pointer-events — чтобы не перекрывать кнопку «назад» */
.stories-slider-user {
    pointer-events: none;
}

.stories-slider-user-name {
    font-family: "FuturaPTM", sans-serif;
    font-size: 20px;
    font-weight: 450;
    letter-spacing: 0.48px;
    text-transform: lowercase; /* названия в админке капсом, показываем как предложение */
}

.stories-slider-user-name::first-letter {
    text-transform: uppercase;
}

/* иконки сторис тёмные на прозрачном фоне — на чёрной подложке не сливаются с кадром */
.stories-slider-user-avatar img { background: #0d0d0d; }



.cube-animate-in {
    animation: cubeIn 0.5s forwards;
}

.cube-animate-out {
    animation: cubeOut 0.5s forwards;
}

@keyframes cubeIn {
    from {
        transform: rotateY(90deg);
        opacity: 0;
    }

    to {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes cubeOut {
    to {
        transform: rotateY(-90deg);
        opacity: 0;
    }
}

/* свечение центрального сториса перетекает вместе с лентой (speed карусели); visibility — чтобы скрытые не рисовались */
.swiper-slide-active .background-blur-img { opacity: 1; visibility: visible; transition-delay: 0s; }
.background-blur-img {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease-in-out, visibility 0s 0.9s;
    position: absolute;
    top: calc(var(--card) * -20 / 336);
    right: calc(var(--card) * -20 / 336);
    bottom: calc(var(--card) * -20 / 336);
    left: calc(var(--card) * -20 / 336);
    filter: blur(calc(var(--card) * 100 / 336));
    -webkit-filter: blur(calc(var(--card) * 100 / 336));
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    z-index: -1;
}

@media (max-width: 700px) {
    .story__slide img {
        height: 100%;
        width: 100%;
        object-fit: cover !important;
        object-position: center;
    }
}

.swiper-button-prev {
    background-image: url("../img/arr-l.svg");
}

.swiper-button-next {
    background-image: url("../img/arr-r.svg");
}

/* центральная линия первого экрана — под часами, адресом и фото, а не поверх */
.section2__restoran { isolation: isolate; }
.section2__restoran::after { z-index: -1; }

.restaurant-stories-first__title { position: relative; z-index: 2; margin: 0 20px calc(var(--card) * 48 / 336); color: #dfdfdf; font: 400 clamp(28px, 2.08vw, 40px)/1.2 "Panama Regular", serif; letter-spacing: -0.01em; text-align: center; text-transform: uppercase; }
/* мобильный первый экран по макету Figma: «Актуальные» кружками с подписями, часы, адрес, фото со свечением */
@media (max-width: 700px) {
    .restaurant-stories-first__title { margin: 0 15px 16px; font: 450 12px/16px "FuturaPTM", sans-serif; letter-spacing: 0.36px; text-align: left; }
    /* сверху запас под подъём кружка (.lift-card, 6px): overflow-x: auto режет и по вертикали */
    .restaurant-stories-first .slider-swiper__container-stories { box-sizing: border-box; height: auto; margin-top: -4px; padding: 8px 5px 4px; overflow-x: auto; scrollbar-width: none; }
    .restaurant-stories-first .slider-swiper__container-stories::-webkit-scrollbar { display: none; }
    .restaurant-stories-first .swiper-slide-main { width: 108px; min-height: 128px; }
    .restaurant-stories-first .is-repeat { display: none; }
    .restaurant-stories-first .background-blur-img { display: none !important; } /* свечение от карусели, если экран повернули с ПК */
    .restaurant-stories-first .demo-stories > a { display: block; }
    .restaurant-stories-first .demo-stories-avatar { width: 88px; margin: 0 auto; }
    .restaurant-stories-first .restaurant-page__swiper-slide-img img { width: 88px !important; height: 88px !important; aspect-ratio: 1; border-radius: 50%; }
    .restaurant-stories-first .demo-stories-name { margin-top: 8px; font: 12px/16px "FuturaPT", sans-serif; letter-spacing: 0; text-transform: lowercase; }
    .restaurant-stories-first .demo-stories-name::first-letter { text-transform: uppercase; }
    .restaurant-stories-first ~ .section2__restoran { border-top: 0; } /* линия уже есть снизу у ленты */
    .section2-container__restoran { gap: 4px; padding-bottom: 80px; }
    .section2-container-text__restoran { gap: 12px; }
    .section2-title__restoran { font-size: 12px !important; letter-spacing: 0.36px; }
    .restaurant-page__caption { gap: 8px; }
    .restaurant-page__caption > h1 { line-height: 32px !important; letter-spacing: 0.56px; }
    .restaurant-hero-gallery__hint { display: none; }
    .restaurant-hero-gallery { width: 255px; width: min(68vw, 50svh); isolation: isolate; }
    .restaurant-hero-gallery img { aspect-ratio: 255 / 330; }
    .restaurant-hero-gallery::before { content: ""; position: absolute; inset: -8px; z-index: -1; background: var(--glow) center / cover; filter: blur(100px); }
}
