@media screen and (max-width: 1350px) {
    .header {
        padding-left: 30px;
        padding-right: 30px;
    }

    .description-container {
        padding-left: 30px;
        padding-right: 30px;
    }

    .container {
        padding-left: 30px;
        padding-right: 30px;
    }

    .footer-inner {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 1116px) {
    .header {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .links ul li {
        margin: 0 20px;
    }

    .link {
        font-size: 18px;
    }

    .main-title {
        font-size: 20px;
    }

    .guests h2 {
        font-size: 25px;
    }

    .place-title {
        font-size: 35px;
    }
}

/* Mobile */
@media (max-width: 900px) {
    .ticket-overlay {
        padding-top: 24px;
        padding-bottom: 24px;
        align-items: flex-start;
    }

    .ticket-modal {
        max-height: calc(100vh - 48px);
        overflow: auto;
    }

    .hall-svg {
        height: 70vh;
        min-height: 420px;
    }

    /* footer stack */
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 22px;
    }

    .footer-col-left,
    .footer-col-center,
    .footer-col-right {
        justify-content: center;
    }
    .footer-col-right {
        justify-self: center;
    }

    .footer-social {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .footer-social img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 898px) {
    .main-title {
        font-size: 15px;
    }

    .place-title {
        font-size: 30px;
    }

    .description-txt {
        font-size: 20px;
    }

    .guests {
        padding-bottom: 100px;
    }

    .place {
        padding-top: 100px;
    }

    .place-time {
        font-size: 25px;
    }
}

@media (max-width: 895px) {
    .links ul li {
        margin: 0 10px;
    }

    .link {
        font-size: 16px;
    }

    .guests h2 {
        font-size: 20px;
    }
}

@media (max-width: 781px) {
    .place-title {
        font-size: 25px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 25px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .logo {
        width: 100px;
        height: 100px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logo img {
        width: 100px;
        height: auto;
    }

    .links ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }

    .links ul li {
        margin: 0;
    }

    .link {
        font-size: 16px;
    }

    .socials ul {
        gap: 15px;
    }

    .social-item {
        margin-right: 0;
    }
}

@media (max-width: 699px) {
    #guestsSwiper {
        overflow: hidden;
        width: 100%;
    }

    /* ВАЖНО: это и есть причина “уезжает” — gap от grid остаётся.
       Поэтому: отключаем grid, и обязательно gap=0 */
    #guestsSwiper .guest-items,
    #guestsSwiper .swiper-wrapper {
        display: flex !important;
        gap: 0 !important;
        grid-template-columns: none !important;
        transform: none; /* Swiper сам ставит transform inline, мы не мешаем */
    }

    /* Swiper сам задаёт ширины слайдов inline — НЕ трогаем width/flex! */
    #guestsSwiper .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        box-sizing: border-box;
    }

    #guestsSwiper .guest-item {
        width: 100%;
        margin: 0 auto;
        padding: 0 12px;
        box-sizing: border-box;
    }

    #guestsSwiper .guest-item-img {
        width: 260px;
        height: 260px;
        border-radius: 50%;
        overflow: hidden;
        margin: 0 auto 18px auto;
    }

    #guestsSwiper .guest-item-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 0 !important;
        display: block !important;
    }

    #guestsSwiper .guest-item-text {
        text-align: center;
        max-width: 320px;
        margin: 0 auto;
    }

    #guestsSwiper .guests-pagination {
        margin-top: 24px;
    }

    #guestsSwiper .swiper-pagination {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 18px;
        padding-bottom: 6px;
    }

    /* на всякий — если тема Swiper добавляет bottom/left */
    #guestsSwiper .swiper-horizontal > .swiper-pagination-bullets,
    #guestsSwiper .swiper-pagination-bullets.swiper-pagination-horizontal {
        bottom: auto !important;
        left: auto !important;
    }
}

@media (max-width: 682px) {
    .main-title {
        font-size: 10px;
    }

    .guests {
        padding-top: 100px;
    }

    .guests h2 {
        font-size: 15px;
    }

    .place-title {
        font-size: 20px;
    }

    .place-address {
        font-size: 15px;
    }

    .place-time {
        font-size: 20px;
    }
}

@media (max-width: 539px) {
    .description-txt {
        font-size: 16px;
    }

    .guests {
        padding-bottom: 50px;
    }

    .guests h2 {
        font-size: 12px;
    }

    .place {
        padding-top: 50px;
    }

    .place-title {
        font-size: 15px;
    }

    .place-address {
        font-size: 10px;
    }

    .place-time {
        font-size: 15px;
        margin-bottom: 50px;
    }

    .btn {
        padding: 12px 21px;
        font-size: 12px;
    }
}

/* Совсем маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .ticket-overlay { padding: 16px 12px; }
    .ticket-body { padding: 12px 12px 14px 12px; }

    .ticket-hall {
        padding: 10px;
    }

    .hall-svg {
        height: 44vh;
        min-height: 280px;
    }

    .footer {
        padding: 44px 0;
    }

    .footer-title {
        font-size: 16px;
    }

    .footer-text,
    .footer-link {
        font-size: 14px;
    }
}
