/* ================================================================
   SAYOH WAY — MOBILE.CSS
   Полная мобильная оптимизация. Мировой уровень. App-like UX.
   Не ломает веб-версию. Все стили строго в @media max-width.
   ================================================================ */

/* ── ГЛОБАЛЬНЫЕ ОСНОВЫ ── */
@media (max-width: 768px) {

    /* Базовые улучшения для app-like feel */
    * {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
    }

    html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
    }

    body {
        overscroll-behavior-y: contain;
    }

    /* Убираем все горизонтальные скроллы */
    #app,
    .home-container,
    .tours-page-premium,
    .cine-page,
    .fit-page,
    .gp,
    .reviews-page-container,
    .profile-page {
        overflow-x: hidden;
        max-width: 100vw;
    }
}


/* ================================================================
   HEADER — ШАПКА
   ================================================================ */
@media (max-width: 768px) {

    .main-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999 !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
    }

    .header-container {
        height: 58px !important;
        padding: 0 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Лого */
    .header-video-logo {
        width: 32px !important;
        height: 32px !important;
    }

    .logo-text-sayoh {
        font-size: 14px !important;
    }

    .logo-text-way {
        font-size: 9px !important;
    }

    /* Скрываем десктопный auth блок */
    .auth-block {
        display: none !important;
    }

    /* Онлайн статус — компактно */
    .online-status-block {
        order: 1;
        margin-left: 0 !important;
        padding: 3px 8px !important;
        font-size: 7px !important;
    }

    /* Бургер кнопка — больше зона касания */
    .mobile-burger-btn {
        display: flex !important;
        order: 2;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
        margin-right: -10px;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .mobile-burger-btn span {
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
        display: block;
    }

    /* Анимация бургера → крест */
    .mobile-burger-btn.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-burger-btn.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .mobile-burger-btn.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Навигационное меню — как drawer */
    .nav-menu {
        display: none !important;
        position: fixed !important;
        top: 58px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(5, 5, 5, 0.98) !important;
        backdrop-filter: blur(30px) !important;
        -webkit-backdrop-filter: blur(30px) !important;
        flex-direction: column !important;
        padding: 30px 24px 40px !important;
        gap: 0 !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
        border-top: 1px solid rgba(212, 175, 55, 0.12) !important;
        animation: menuSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu.active {
        display: flex !important;
    }

    @keyframes menuSlideIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .nav-menu a {
        font-family: 'Michroma', monospace !important;
        font-size: 13px !important;
        letter-spacing: 3px !important;
        color: rgba(255, 255, 255, 0.75) !important;
        padding: 18px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        text-decoration: none !important;
        display: block !important;
        transition: color 0.2s ease, padding-left 0.2s ease !important;
        min-height: 56px !important;
        display: flex !important;
        align-items: center !important;
    }

    .nav-menu a:active {
        color: #d4af37 !important;
        padding-left: 8px !important;
    }

    .mobile-auth-inside {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        border-top: 1px solid rgba(212, 175, 55, 0.15) !important;
        padding-top: 24px !important;
        margin-top: 10px !important;
    }

    .mobile-auth-inside button {
        background: none !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        color: #d4af37 !important;
        text-align: center !important;
        font-family: 'Michroma', monospace !important;
        font-size: 11px !important;
        letter-spacing: 2px !important;
        padding: 14px 20px !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        min-height: 48px !important;
        transition: background 0.2s !important;
    }

    .mobile-auth-inside button:active {
        background: rgba(212, 175, 55, 0.1) !important;
    }

    .mobile-user-row {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        color: #d4af37 !important;
        font-size: 13px !important;
        font-weight: 900 !important;
        padding: 8px 0 !important;
    }

    .mobile-user-row img {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        border: 2px solid #d4af37 !important;
    }
}


/* ================================================================
   HOME — ГЛАВНАЯ СТРАНИЦА
   ================================================================ */
@media (max-width: 768px) {

    .home-container {
        padding-top: 58px; /* высота шапки */
    }

    /* Hero сетка сервисов */
    .hero-hub {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 1fr 1fr !important;
        height: calc(100svh - 58px) !important;
        gap: 2px !important;
    }

    .service-card {
        min-height: unset !important;
    }

    .card-content {
        transform: translateY(0) !important;
        opacity: 1 !important;
        padding: 16px !important;
    }

    .card-title {
        font-size: clamp(1rem, 4vw, 1.4rem) !important;
        letter-spacing: 1px !important;
    }

    .card-desc {
        font-size: 9px !important;
        letter-spacing: 1px !important;
    }

    /* Секция рейтинга */
    #rating-section {
        padding: 50px 16px 40px !important;
    }

    .rating-header {
        margin-bottom: 32px !important;
    }

    .rating-title {
        font-size: 1.3rem !important;
        letter-spacing: 2px !important;
    }

    .rating-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .rating-card {
        padding: 24px 20px !important;
    }

    .stars-container {
        gap: 8px !important;
    }

    .stars-container .star {
        width: 32px !important;
        height: 32px !important;
    }

    /* Стена отзывов */
    #reviews-display-wall {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    /* Блок ввода отзыва */
    #review-input-container {
        margin: 40px 0 0 !important;
    }

    #review-input-container > div > div {
        padding: 28px 20px 24px !important;
    }

    /* KVN секция */
    #kvn-section {
        padding: 40px 16px !important;
    }

    /* Фильтры отзывов */
    #review-filters {
        gap: 8px !important;
        padding: 0 4px !important;
    }

    #review-filters button {
        padding: 8px 14px !important;
        font-size: 7px !important;
    }
}


/* ================================================================
   GALLERY — ГАЛЕРЕЯ
   ================================================================ */
@media (max-width: 768px) {

    .gp {
        padding-top: 58px;
    }

    .gp-header {
        position: relative !important;
        padding: 20px 16px 20px !important;
        top: unset !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    .gp-eyebrow {
        font-size: 7px !important;
        letter-spacing: 3px !important;
        margin-bottom: 6px !important;
    }

    .gp-title {
        font-size: 1.9rem !important;
        line-height: 1 !important;
    }

    .gp-count {
        font-size: 3rem !important;
        margin-left: auto !important;
        align-self: flex-end !important;
    }

    /* Карточки направлений — 2×2 */
    .gp-dest {
        grid-template-columns: 1fr 1fr !important;
        height: auto !important;
    }

    .gp-dest-card {
        height: 180px !important;
    }

    .gp-dest-card:nth-child(odd) {
        border-left: none !important;
    }

    .gp-dest-card:nth-child(n+3) {
        border-top: 1px solid rgba(197, 160, 89, 0.18) !important;
    }

    .gp-dest-card:hover img {
        transform: none !important;
    }

    .gp-dest-info {
        padding: 16px 14px !important;
    }

    .gp-dest-num {
        font-size: 7px !important;
        letter-spacing: 2px !important;
        margin-bottom: 6px !important;
    }

    .gp-dest-name {
        font-size: 1.1rem !important;
        letter-spacing: 1px !important;
        margin-bottom: 6px !important;
    }

    .gp-dest-cnt {
        font-size: 7px !important;
    }

    /* Лента фото — 2 колонки */
    .gp-feed-hdr {
        padding: 24px 16px 16px !important;
    }

    .gp-feed-title {
        font-size: 0.75rem !important;
        letter-spacing: 2px !important;
    }

    .gp-grid {
        columns: 2 !important;
        column-gap: 3px !important;
        padding: 0 3px 3px !important;
    }

    .gp-item {
        margin-bottom: 3px !important;
        border-radius: 3px !important;
    }

    /* Overlay только при tap */
    .gp-overlay {
        opacity: 0 !important;
    }

    /* Пагинация */
    .gp-pag {
        padding: 32px 12px !important;
        gap: 5px !important;
    }

    .gp-pag-num {
        width: 32px !important;
        height: 32px !important;
        font-size: 9px !important;
    }

    .gp-pag-arrow {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 8px !important;
    }

    /* Лайтбокс */
    #lightbox {
        background: rgba(0, 0, 0, 0.99) !important;
    }

    #lightboxImg {
        max-width: 100vw !important;
        max-height: 80vh !important;
    }

    .lightbox-close-btn {
        top: 12px !important;
        right: 12px !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }

    .lightbox-nav-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }

    .lightbox-nav-btn.prev { left: 6px !important; }
    .lightbox-nav-btn.next { right: 6px !important; }

    .lightbox-counter {
        bottom: 16px !important;
        font-size: 9px !important;
        padding: 6px 14px !important;
    }
}

@media (max-width: 480px) {
    .gp-dest {
        grid-template-columns: 1fr 1fr !important;
    }

    .gp-dest-card {
        height: 150px !important;
    }

    .gp-dest-name {
        font-size: 0.95rem !important;
    }
}


/* ================================================================
   TOURS — ТУРЫ
   ================================================================ */
@media (max-width: 768px) {

    .tours-page-premium {
        padding-top: 58px !important;
        padding-bottom: 60px !important;
    }

    .tours-hero {
        margin-top: 0 !important;
        height: auto !important;
        min-height: calc(100svh - 58px) !important;
        padding: 50px 20px 50px !important;
    }

    .tours-hero h1 {
        font-size: clamp(2rem, 9vw, 3rem) !important;
        margin-bottom: 16px !important;
    }

    .tours-hero p {
        font-size: 9px !important;
        letter-spacing: 2px !important;
        margin-bottom: 24px !important;
    }

    /* Кнопки валют */
    #btn-TJS, #btn-USD, #btn-RUB {
        padding: 10px 16px !important;
        font-size: 9px !important;
        min-height: 42px !important;
    }

    /* Цена */
    #tour-price-display {
        font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
        margin-bottom: 20px !important;
    }

    /* Маршрут */
    .tours-route {
        padding: 40px 16px !important;
    }

    .tours-route h2 {
        font-size: clamp(1.6rem, 6vw, 2.5rem) !important;
    }

    .route-map-container {
        padding: 10px 8px !important;
        margin-bottom: 40px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Карточки дней */
    .tours-days {
        padding: 0 16px !important;
    }

    .tour-day-card {
        padding: 24px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 10px !important;
    }

    .day-content-layout {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .day-number {
        font-size: 26px !important;
        min-width: auto !important;
    }

    .tour-day-card h3 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }

    .tour-day-card ul {
        font-size: 13px !important;
        line-height: 1.9 !important;
        padding-left: 0 !important;
    }

    /* CTA секция */
    .book-tour-btn {
        padding: 16px 32px !important;
        font-size: 11px !important;
        min-height: 52px !important;
        width: 100% !important;
        max-width: 320px !important;
    }
}


/* ================================================================
   CINEMA — КИНОТЕАТР
   ================================================================ */
@media (max-width: 768px) {

    .cine-page {
        padding-top: 58px;
    }

    .cine-hero {
        padding: 40px 18px 50px !important;
        min-height: calc(100svh - 58px) !important;
        text-align: center !important;
    }

    .cine-eyebrow {
        justify-content: center !important;
    }

    .cine-eyebrow-line {
        width: 30px !important;
    }

    .cine-eyebrow span {
        font-size: 8px !important;
        letter-spacing: 3px !important;
    }

    .cine-title {
        font-size: clamp(2.4rem, 10vw, 3.5rem) !important;
        letter-spacing: 0 !important;
    }

    .cine-subtitle {
        font-size: 8px !important;
        letter-spacing: 3px !important;
        margin-bottom: 32px !important;
    }

    /* Видео плеер */
    .cine-video-frame {
        max-width: 100% !important;
    }

    .cine-play-btn {
        width: 64px !important;
        height: 64px !important;
    }

    /* Секции с контентом */
    .cine-section {
        padding: 40px 16px !important;
    }

    /* Слайдер фото */
    .cine-slider-track {
        gap: 10px !important;
    }

    .cine-slide {
        min-width: 75vw !important;
        height: 220px !important;
    }

    .cine-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }

    .cine-nav-btn.prev { left: 8px !important; }
    .cine-nav-btn.next { right: 8px !important; }

    /* Инфо блоки */
    .cine-info-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        padding: 0 16px 40px !important;
    }

    .cine-info-item {
        padding: 20px 14px !important;
    }

    .cine-info-value {
        font-size: clamp(1.6rem, 6vw, 2rem) !important;
    }

    .cine-info-label {
        font-size: 7px !important;
    }
}


/* ================================================================
   FITNESS — ФИТНЕС
   ================================================================ */
@media (max-width: 768px) {

    .fit-page {
        padding-top: 58px;
    }

    .fit-hero {
        padding: 40px 18px 50px !important;
        min-height: calc(100svh - 58px) !important;
        justify-content: flex-end !important;
    }

    .fit-bg-number {
        font-size: 180px !important;
        right: -5% !important;
    }

    .fit-eyebrow {
        margin-bottom: 16px !important;
    }

    .fit-eyebrow-dot {
        width: 5px !important;
        height: 5px !important;
    }

    .fit-hero-title {
        font-size: clamp(2.8rem, 12vw, 5rem) !important;
        line-height: 0.9 !important;
        margin-bottom: 16px !important;
    }

    .fit-hero-sub {
        font-size: 10px !important;
        letter-spacing: 2px !important;
        margin-bottom: 28px !important;
    }

    .fit-hero-btns {
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .fit-cta-btn,
    .fit-outline-btn {
        padding: 14px 24px !important;
        font-size: 9px !important;
        min-height: 48px !important;
        flex: 1 !important;
        min-width: 130px !important;
        text-align: center !important;
    }

    /* Карточки программ */
    .fit-programs-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 16px 40px !important;
    }

    .fit-program-card {
        padding: 24px 20px !important;
    }

    /* Слайдер фото */
    .fit-slide {
        min-width: 78vw !important;
        height: 240px !important;
    }

    /* Расписание */
    .fit-schedule-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 0 16px !important;
    }

    .fit-schedule-item {
        padding: 18px 16px !important;
    }

    /* Секции */
    .fit-section {
        padding: 40px 16px !important;
    }

    .fit-section-title {
        font-size: clamp(1.8rem, 7vw, 2.8rem) !important;
    }
}


/* ================================================================
   VIDEO — ВИДЕО
   ================================================================ */
@media (max-width: 768px) {

    .video-page {
        padding-top: 58px !important;
    }

    /* Hero */
    .video-hero {
        padding: 40px 18px 40px !important;
        min-height: auto !important;
    }

    .video-hero-title {
        font-size: clamp(2rem, 9vw, 3rem) !important;
    }

    /* Сетка видео */
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 16px 40px !important;
    }

    .video-item {
        border-radius: 10px !important;
    }

    .video-thumb {
        height: 200px !important;
    }

    .video-info {
        padding: 14px 14px !important;
    }

    .video-title {
        font-size: 15px !important;
    }

    /* Плеер */
    .video-player-wrap {
        padding: 0 16px 40px !important;
    }

    .video-iframe-wrap {
        border-radius: 8px !important;
    }

    /* Фильтры */
    .video-filters {
        padding: 0 16px !important;
        gap: 8px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex-wrap: nowrap !important;
        scrollbar-width: none !important;
        padding-bottom: 4px !important;
    }

    .video-filters::-webkit-scrollbar {
        display: none !important;
    }

    .video-filter-btn {
        flex-shrink: 0 !important;
        padding: 8px 14px !important;
        font-size: 8px !important;
        min-height: 36px !important;
    }
}


/* ================================================================
   REVIEWS — ЧАК ЧАК
   ================================================================ */
@media (max-width: 768px) {

    .reviews-page-container {
        padding-top: 58px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Форма ввода */
    .reviews-input-section {
        padding: 24px 16px !important;
        margin: 0 !important;
    }

    .reviews-textarea {
        font-size: 15px !important; /* iOS не зумит при 16px+ */
        min-height: 100px !important;
        padding: 14px !important;
    }

    .reviews-submit-btn {
        width: 100% !important;
        min-height: 52px !important;
        font-size: 11px !important;
    }

    /* Лента */
    .reviews-feed {
        padding: 0 12px !important;
    }

    .review-card {
        padding: 20px 16px !important;
        margin-bottom: 12px !important;
        border-radius: 12px !important;
    }

    .review-card-header {
        gap: 10px !important;
    }

    .review-avatar {
        width: 38px !important;
        height: 38px !important;
        flex-shrink: 0 !important;
    }

    .review-username {
        font-size: 12px !important;
    }

    .review-text {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    /* Кнопки лайк/ответ */
    .like-review-btn,
    .toggle-reply-btn,
    .share-review-btn {
        min-height: 40px !important;
        padding: 8px 12px !important;
        font-size: 9px !important;
    }

    /* Секция ответов */
    .reply-section {
        padding: 14px 12px !important;
        margin-top: 10px !important;
    }

    .reply-input {
        font-size: 15px !important; /* no iOS zoom */
    }

    /* Тема кнопки */
    .theme-switcher {
        gap: 8px !important;
        padding: 0 16px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .simple-btn {
        flex: 1 !important;
        min-height: 44px !important;
        font-size: 9px !important;
    }
}


/* ================================================================
   PROFILE — ПРОФИЛЬ
   ================================================================ */
@media (max-width: 768px) {

    .profile-page {
        padding-top: 58px !important;
    }

    /* Шапка профиля */
    .profile-hero {
        padding: 30px 16px 24px !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
    }

    .profile-avatar {
        width: 80px !important;
        height: 80px !important;
    }

    .profile-name {
        font-size: clamp(1.3rem, 5vw, 1.8rem) !important;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        padding: 0 16px !important;
        margin-bottom: 24px !important;
    }

    .profile-stat-card {
        padding: 16px 10px !important;
    }

    .profile-stat-value {
        font-size: 1.4rem !important;
    }

    .profile-stat-label {
        font-size: 7px !important;
    }

    /* Контент профиля */
    .profile-content {
        padding: 0 16px 40px !important;
    }

    .profile-section-title {
        font-size: 1.1rem !important;
        margin-bottom: 16px !important;
    }

    /* Форма редактирования */
    .profile-edit-form input {
        font-size: 16px !important; /* no iOS zoom */
        padding: 14px 14px !important;
        min-height: 50px !important;
    }

    .profile-save-btn {
        width: 100% !important;
        min-height: 50px !important;
    }
}


/* ================================================================
   FOOTER — ПОДВАЛ
   ================================================================ */
@media (max-width: 768px) {

    .main-footer {
        padding: 40px 0 24px !important;
    }

    .footer-container {
        flex-direction: column !important;
        gap: 28px !important;
        text-align: center !important;
        padding: 0 20px !important;
        align-items: center !important;
    }

    .brand-column {
        align-items: center !important;
    }

    .logo-text-asri {
        font-size: 14px !important;
        letter-spacing: 3px !important;
    }

    .slogan-ticker {
        margin: 10px auto !important;
        width: 100% !important;
        max-width: 300px !important;
    }

    .footer-title {
        font-size: 9px !important;
        letter-spacing: 2px !important;
        margin-bottom: 12px !important;
    }

    .footer-contacts p {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }

    .footer-contacts .highlight {
        font-size: 14px !important;
    }

    .footer-socials {
        justify-content: center !important;
        gap: 18px !important;
    }

    .social-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .social-btn img {
        width: 22px !important;
        height: 22px !important;
    }

    .map-btn {
        display: inline-flex !important;
        align-items: center !important;
        min-height: 44px !important;
        padding: 10px 18px !important;
        font-size: 9px !important;
        margin-top: 6px !important;
    }

    .footer-copyright {
        margin-top: 28px !important;
        padding-top: 20px !important;
        font-size: 9px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        text-align: center !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}


/* ================================================================
   AUTH МОДАЛКА
   ================================================================ */
@media (max-width: 768px) {

    .auth-modal-overlay {
        align-items: flex-end !important; /* sheet снизу */
        padding: 0 !important;
    }

    .auth-modal-overlay > div {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 32px 24px 40px !important;
        max-height: 90svh !important;
        overflow-y: auto !important;
        animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    @keyframes sheetSlideUp {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0);   opacity: 1; }
    }

    .auth-modal-overlay h2 {
        font-size: 18px !important;
        margin-bottom: 24px !important;
    }

    .auth-modal-overlay input {
        font-size: 16px !important; /* no iOS zoom */
        padding: 14px !important;
        min-height: 50px !important;
        margin-bottom: 12px !important;
    }

    .auth-modal-overlay button[type="submit"],
    .auth-modal-overlay button:not([style*="position"]) {
        min-height: 50px !important;
        font-size: 11px !important;
    }
}


/* ================================================================
   TOAST УВЕДОМЛЕНИЯ
   ================================================================ */
@media (max-width: 768px) {

    #toast-container {
        top: auto !important;
        bottom: 20px !important;
        right: 12px !important;
        left: 12px !important;
        align-items: stretch !important;
    }

    #toast-container > div {
        min-width: unset !important;
        width: 100% !important;
        font-size: 10px !important;
        padding: 14px 18px !important;
        border-radius: 10px !important;
    }
}


/* ================================================================
   КАСТОМНЫЕ АЛЕРТ/КОНФЁРМ МОДАЛКИ
   ================================================================ */
@media (max-width: 768px) {

    /* Модалки customAlert / customConfirm */
    div[style*="position: fixed"][style*="inset: 0"] > div {
        max-width: calc(100vw - 32px) !important;
        padding: 28px 20px !important;
        border-radius: 16px !important;
    }
}


/* ================================================================
   ОБЩИЕ УЛУЧШЕНИЯ TOUCH UX
   ================================================================ */
@media (max-width: 768px) {

    /* Все кликабельные элементы — минимум 44px */
    button,
    a,
    [onclick],
    .gp-pag-num,
    .gp-pag-arrow,
    .star,
    .like-review-btn,
    .tour-curr-btn {
        min-height: 44px;
        cursor: pointer;
    }

    /* Плавный momentum-скролл везде */
    .route-map-container,
    .video-filters,
    .reviews-feed,
    .nav-menu {
        -webkit-overflow-scrolling: touch;
    }

    /* Отступ под фиксированную шапку для всех страниц */
    .main-header + * {
        padding-top: 0;
    }

    /* Инпуты — никакого зума на iOS */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Убираем outline на touch устройствах */
    :focus-visible {
        outline: 2px solid rgba(212, 175, 55, 0.5);
        outline-offset: 2px;
    }

    /* Анимации — облегчаем на мобиле */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }
}


/* ================================================================
   МАЛЕНЬКИЕ ТЕЛЕФОНЫ (320–480px)
   ================================================================ */
@media (max-width: 480px) {

    .hero-hub {
        height: calc(100svh - 58px) !important;
    }

    .card-title {
        font-size: 0.95rem !important;
    }

    .card-desc {
        font-size: 8px !important;
        display: none !important; /* скрыть на очень маленьких */
    }

    /* Галерея — 2 колонки */
    .gp-grid {
        columns: 2 !important;
    }

    /* Gallery dest — 2x2 */
    .gp-dest {
        grid-template-columns: 1fr 1fr !important;
    }

    .gp-dest-card {
        height: 140px !important;
    }

    .gp-dest-name {
        font-size: 0.85rem !important;
    }

    /* Tours */
    .tours-hero h1 {
        font-size: clamp(1.7rem, 8vw, 2.4rem) !important;
    }

    /* Fitness */
    .fit-hero-title {
        font-size: clamp(2.2rem, 11vw, 3.5rem) !important;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .rating-card {
        padding: 20px 14px !important;
    }
}


/* ================================================================
   SAFE AREA (iPhone notch / Dynamic Island)
   ================================================================ */
@supports (padding: env(safe-area-inset-top)) {
    @media (max-width: 768px) {

        .main-header {
            padding-top: env(safe-area-inset-top) !important;
            height: calc(58px + env(safe-area-inset-top)) !important;
        }

        .nav-menu {
            top: calc(58px + env(safe-area-inset-top)) !important;
            padding-bottom: calc(40px + env(safe-area-inset-bottom)) !important;
        }

        .home-container,
        .tours-page-premium,
        .cine-page,
        .fit-page,
        .gp,
        .reviews-page-container,
        .profile-page {
            padding-top: calc(58px + env(safe-area-inset-top));
        }

        .main-footer {
            padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
        }

        #toast-container {
            bottom: calc(20px + env(safe-area-inset-bottom)) !important;
        }

        .lightbox-counter {
            bottom: calc(16px + env(safe-area-inset-bottom)) !important;
        }

        .auth-modal-overlay > div {
            padding-bottom: calc(40px + env(safe-area-inset-bottom)) !important;
        }
    }
}