/* ====================================
   АДАПТИВНЫЕ ИСПРАВЛЕНИЯ ВЕРСТКИ
   Все устройства: Десктоп → Планшет → Мобильный
   ==================================== */

/* ====================================
   ГЛОБАЛЬНЫЕ ПРАВИЛА (все разрешения)
   ==================================== */

/* Скрыть калькулятор стоимости тура */
.calc-form.booking {
    display: none !important;
}

/* Предотвращение горизонтального скролла */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Контейнер - базовые правила */
.cont {
    margin-left: auto;
    margin-right: auto;
}

/* ====================================
   БАЗОВЫЕ СТИЛИ ДЛЯ АДАПТИВНОСТИ
   ==================================== */

/* Блок страницы тура - 100% ширины */
.short_tour_ex_inner {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.short_tour_ex_inner .content_block {
    width: 100% !important;
    position: relative !important;
}

/* Блок "Купили X человек" */
.short_tour_ex .tour-purchases {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    justify-content: center;
}

.short_tour_ex .tour-purchases svg {
    flex-shrink: 0;
    color: #2d6a4f;
}

/* Блок с датами */
.short_tour_ex .tour-dates {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    justify-content: center;
}

.short_tour_ex .tour-dates .dates-info {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

/* Категория тура */
.short_tour_ex .kat_name_in_cart {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2d6a4f;
    border-radius: 4px;
    font-size: 13px;
    margin: 8px 0;
    text-align: center;
}

/* Футер карточки - базовые правила */
.short_tour_ex .tour-item-footer {
    width: 100%;
    border-top: 2px solid #e8f5e9;
    margin-top: auto;
}

/* Блок цены - базовое выравнивание */
.short_tour_ex .price-icon {
    flex-shrink: 0 !important;
    color: #2d6a4f !important;
}

.short_tour_ex .price {
    font-weight: 600 !important;
    color: #2d6a4f !important;
    white-space: nowrap !important;
}

/* ====================================
   ДЕСКТОП (> 1024px)
   ==================================== */
@media screen and (min-width: 1025px) {
    
    /* Контейнер */
    .cont {
        max-width: 1366px;
        padding: 0 20px;
    }
    
    /* Список туров */
    .tours_block {
        max-width: 1280px;
        padding: 0 20px;
    }
    
    /* Карточки туров */
    .short_tour_ex {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        margin-bottom: 24px;
        min-height: 220px;
    }
    
    .short_tour_ex .image_block {
        width: 300px;
        min-width: 300px;
        flex-shrink: 0;
    }
    
    .short_tour_ex .content_block {
        flex: 1;
        padding: 25px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    /* Размеры текста для десктопа */
    .short_tour_ex .tour-cities {
        font-size: 16px !important;
    }
    
    /* Футер карточки - цена и кнопка */
    .short_tour_ex .tour-item-footer {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: auto;
        padding-top: 18px;
        gap: 15px;
        width: 100%;
        border-top: 2px solid #e8f5e9;
    }
    
    .short_tour_ex .tour-item-price-block {
        flex: 0 0 auto;
        max-width: 60%;
    }
    
    .short_tour_ex .tour-item-price-from {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: nowrap;
    }
    
    .short_tour_ex .price-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .short_tour_ex .more {
        flex-shrink: 0;
        margin-left: auto;
        margin-right: 0;
        white-space: nowrap;
    }
    
    /* Страница тура */
    .tour-page-wrapper {
        max-width: 1400px;
        padding: 20px;
    }
    
    .tour-hero-section {
        display: grid;
        grid-template-columns: 450px 1fr;
        gap: 40px;
    }
}

/* ====================================
   СРЕДНИЕ УСТРОЙСТВА (769px - 1000px)
   ==================================== */
@media screen and (min-width: 769px) and (max-width: 1000px) {
    
    /* Контейнер */
    .cont {
        max-width: 100%;
        padding: 0 15px;
        overflow-x: hidden;
    }
    
    .tours_block {
        padding: 0 10px;
        width: 100%;
    }
    
    /* Карточки туров - КОЛОНКА для избежания налезания */
    .short_tour_ex,
    .short_tour_ex.horizon {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 20px;
        width: 100% !important;
        min-height: auto !important;
    }
    
    .short_tour_ex .image_block {
        width: 100% !important;
        min-width: 100% !important;
        height: 250px;
        flex-shrink: 0;
    }
    
    .short_tour_ex .content_block {
        width: 100% !important;
        flex: 1;
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
    }
    
    /* Заголовки - адаптивные размеры */
    .short_tour_ex .header_for_tours_main_page {
        font-size: 17px !important;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    /* Размер текста */
    .short_tour_ex .tour-cities {
        font-size: 15px !important;
    }
    
    /* Футер карточки */
    .short_tour_ex .tour-item-footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding-top: 15px !important;
        width: 100% !important;
        border-top: 2px solid #e8f5e9 !important;
        margin-top: auto !important;
    }
    
    .short_tour_ex .tour-item-price-block {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .short_tour_ex .tour-item-price-from {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .short_tour_ex .price {
        font-size: 20px !important;
    }
    
    .short_tour_ex .more {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 24px !important;
        margin: 0 !important;
        left: auto !important;
        right: auto !important;
        position: relative !important;
    }
    
    /* Кнопка для horizon класса */
    .short_tour_ex.horizon .more {
        left: auto !important;
        position: relative !important;
    }
    
    /* Блоки дат и покупок */
    .short_tour_ex .tour-dates {
        padding: 12px !important;
        justify-content: center;
        text-align: center;
    }
    
    .short_tour_ex .tour-purchases {
        justify-content: center;
        font-size: 13px;
    }
    
    /* Предотвращение наложения текста */
    .short_tour_ex .content_block * {
        position: relative !important;
        z-index: auto !important;
    }
    
    /* Все текстовые элементы */
    .short_tour_ex h1,
    .short_tour_ex h2,
    .short_tour_ex h3,
    .short_tour_ex p,
    .short_tour_ex div,
    .short_tour_ex span {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Категория тура */
    .short_tour_ex .kat_name_in_cart {
        margin: 10px auto;
        display: inline-block;
    }
    
    /* Страница тура внутри */
    .short_tour_ex_inner {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .short_tour_ex_inner .content_block {
        width: 100% !important;
        padding: 20px !important;
    }
}

/* ====================================
   ПЛАНШЕТ (769px - 1024px) - только для > 1000px
   ==================================== */
@media screen and (min-width: 1001px) and (max-width: 1024px) {
    
    /* Контейнер */
    .cont {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .tours_block {
        padding: 0 15px;
    }
    
    /* Карточки туров */
    .short_tour_ex {
        display: flex;
        flex-direction: row;
        margin-bottom: 20px;
    }
    
    .short_tour_ex .image_block {
        width: 280px;
        min-width: 280px;
    }
    
    .short_tour_ex .content_block {
        flex: 1;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    
    /* Размер текста */
    .short_tour_ex .tour-cities {
        font-size: 15px !important;
    }
    
    /* Футер - адаптивный */
    .short_tour_ex .tour-item-footer {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        margin-top: auto;
        padding-top: 15px;
        width: 100%;
        border-top: 2px solid #e8f5e9;
    }
    
    .short_tour_ex .tour-item-price-block {
        flex: 1 1 auto;
        min-width: 200px;
    }
    
    .short_tour_ex .more {
        flex-shrink: 0;
    }
    
    /* Страница тура */
    .tour-page-wrapper {
        max-width: 100%;
        padding: 15px;
    }
    
    .tour-hero-section {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }
    
    .tour-image-wrapper {
        width: 100%;
        min-height: 300px;
    }
    
    .tour-main-title {
        font-size: 2rem;
    }
    
    .tour-price-section {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Вкладки */
    #tabs ul.tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    #tabs .ui-tabs-panel {
        padding: 20px;
    }
}

/* ====================================
   СРЕДНИЕ МОБИЛЬНЫЕ (601px - 768px)
   ==================================== */
@media screen and (min-width: 601px) and (max-width: 768px) {
    
    /* Карточки туров - ОБЯЗАТЕЛЬНО в колонку */
    .short_tour_ex,
    .short_tour_ex.horizon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-bottom: 20px;
    }
    
    .short_tour_ex .image_block {
        width: 100% !important;
        min-width: 100% !important;
        height: 220px;
    }
    
    .short_tour_ex .content_block {
        width: 100% !important;
        padding: 18px !important;
        position: relative !important;
    }
    
    /* Предотвращение наложения */
    .short_tour_ex .content_block * {
        position: relative !important;
    }
    
    .short_tour_ex .tour-item-footer {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .short_tour_ex .more,
    .short_tour_ex.horizon .more {
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        position: relative !important;
        justify-content: center !important;
    }
}

/* ====================================
   МОБИЛЬНЫЙ (≤ 768px)
   ==================================== */
@media screen and (max-width: 768px) {
    
    /* Контейнер */
    .cont {
        max-width: 100%;
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    .tours_block {
        padding: 0 10px;
        margin-top: 40px;
    }
    
    /* ОБЯЗАТЕЛЬНО: Блок страницы тура на 100% */
    .short_tour_ex_inner {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    .short_tour_ex_inner .content_block {
        width: 100% !important;
        padding: 15px !important;
        position: relative !important;
    }
    
    /* Кнопка на мобильных */
    .short_tour_ex .more {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    
    /* Все блоки внутри контейнера */
    .cont > * {
        max-width: 100%;
    }
    
    /* Карточки туров */
    .short_tour_ex {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin-bottom: 18px;
        overflow: hidden;
    }
    
    .short_tour_ex .image_block {
        width: 100%;
        height: 200px;
        min-width: 100%;
    }
    
    .short_tour_ex .content_block {
        width: 100%;
        padding: 15px;
    }
    
    /* Заголовки */
    .short_tour_ex .header_for_tours_main_page {
        font-size: 16px !important;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    /* Размер текста */
    .short_tour_ex .tour-cities {
        font-size: 14px !important;
        word-wrap: break-word;
    }
    
    .short_tour_ex .tour-days {
        text-align: center;
        margin-bottom: 8px !important;
    }
    
    /* Блок дат */
    .short_tour_ex .tour-dates {
        padding: 12px;
    }
    
    .short_tour_ex .tour-dates .dates-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Футер карточки */
    .short_tour_ex .tour-item-footer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 15px;
        width: 100%;
        border-top: 2px solid #e8f5e9;
        margin-top: auto;
    }
    
    .short_tour_ex .tour-item-price-block {
        width: 100%;
        max-width: 100%;
    }
    
    .short_tour_ex .tour-item-price-from {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .short_tour_ex .price-icon {
        width: 20px !important;
        height: 20px !important;
    }
    
    .short_tour_ex .price {
        font-size: 20px !important;
    }
    
    /* Иконка и цена */
    .short_tour_ex .price-icon {
        flex-shrink: 0;
    }
    
    .short_tour_ex .price-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .short_tour_ex .price-label {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .short_tour_ex .price-tour-item-1 {
        font-size: 24px;
        white-space: nowrap;
        word-break: keep-all;
    }
    
    /* Кнопка подробнее */
    .short_tour_ex .more {
        width: 100% !important;
        justify-content: center !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        left: 0;
        padding: 12px 20px !important;
        font-size: 15px !important;
        text-align: center !important;
    }
    
    /* Блок дат туров - центрирование */
    .short_tour_ex .tour-dates {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    /* Блок с количеством купивших */
    .short_tour_ex .tour-purchases {
        font-size: 13px !important;
        padding: 6px 0 !important;
    }
    
    /* Страница тура */
    .tour-page-wrapper {
        max-width: 100%;
        padding: 10px;
    }
    
    .tour-hero-section {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 15px;
        overflow: hidden;
    }
    
    .tour-image-wrapper {
        width: 100%;
        min-height: 200px;
    }
    
    .tour-info-wrapper {
        width: 100%;
    }
    
    .tour-main-title {
        font-size: 1.6rem;
        word-wrap: break-word;
    }
    
    .tour-meta-info {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Блок цены */
    .tour-price-section {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .tour-price-value {
        font-size: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tour-price-value svg {
        width: 30px;
        height: 30px;
    }
    
    /* Расписание и даты */
    .tour-schedule-section,
    .dates_tour {
        padding: 0 !important;
    }
    
    .tour-schedule-section .h2,
    .dates_tour .h2 {
        font-size: 1.4rem;
        word-wrap: break-word;
    }
    
    .dates_tour ul {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Вкладки */
    #tabs ul.tabs {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    #tabs ul.tabs li {
        width: 100%;
    }
    
    #tabs ul.tabs li a {
        width: 100%;
        padding: 12px 20px;
        text-align: center;
    }
    
    #tabs .ui-tabs-panel {
        padding: 15px;
    }
    
    /* Контент расписания */
    .html-code {
        font-size: 15px;
    }
    
    .html-code h3,
    .html-code h4 {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .html-code p {
        padding: 12px;
        font-size: 14px;
    }
    
    .html-code [class^='description'] {
        padding: 5px;
        font-size: 10px;
    }
    
    /* Связанные туры */
    .generalDiv {
        padding: 0;
    }
    
    .flex_RTcont,
    .flex_RTcontId {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 100%;
        margin: 0 0 15px 0;
    }
    
    .AllRelatedTours {
        font-size: 1.4rem;
        padding: 0 10px;
    }
    
    /* Изображения */
    .cont img {
        max-width: 100%;
        height: auto;
    }
    
    .images__tour-container,
    .images__tour-old-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .images__pic-item {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    /* Таблицы */
    .cont table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
    
    /* Длинные слова */
    .cont h1,
    .cont h2,
    .cont h3,
    .cont p,
    .cont div,
    .cont span {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* ====================================
   СРЕДНИЙ ДИАПАЗОН (400px - 580px) - КРИТИЧНО!
   ==================================== */
@media screen and (min-width: 400px) and (max-width: 580px) {
    
    /* Контейнеры - строго 100% */
    .cont {
        padding: 0 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .tours_block {
        padding: 0 10px !important;
        width: 100% !important;
    }
    
    /* Карточки - СТРОГО вертикально */
    .short_tour_ex,
    .short_tour_ex.horizon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        min-height: auto !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .short_tour_ex .image_block {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 200px !important;
        flex-shrink: 0 !important;
    }
    
    .short_tour_ex .content_block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Все элементы - с отступами */
    .short_tour_ex .content_block > * {
        position: relative !important;
        margin-bottom: 10px !important;
        max-width: 100% !important;
    }
    
    /* Футер - вертикально */
    .short_tour_ex .tour-item-footer {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    
    .short_tour_ex .more {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* ====================================
   МАЛЕНЬКИЕ МОБИЛЬНЫЕ (≤ 600px)
   ==================================== */
@media screen and (max-width: 600px) {
    
    /* Контейнеры */
    .cont {
        padding: 0 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .tours_block {
        padding: 0 8px !important;
        width: 100% !important;
    }
    
    /* Карточки туров - СТРОГО вертикально */
    .short_tour_ex,
    .short_tour_ex.horizon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 18px 0 !important;
        min-height: auto !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .short_tour_ex .image_block {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 180px !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .short_tour_ex .content_block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Предотвращение наложения ВСЕХ элементов */
    .short_tour_ex .content_block > * {
        position: relative !important;
        z-index: 1 !important;
        margin-bottom: 8px !important;
    }
    
    .short_tour_ex .content_block > *:last-child {
        margin-bottom: 0 !important;
    }
    
    .short_tour_ex .header_for_tours_main_page {
        font-size: 15px;
    }
    
    .short_tour_ex .price-tour-item-1 {
        font-size: 22px;
    }
    
    /* Размеры */
    .short_tour_ex_inner .content_block {
        padding: 12px !important;
    }
    
    .short_tour_ex .tour-cities {
        font-size: 13px !important;
    }
    
    /* Футер карточки - СТРОГО вертикально */
    .short_tour_ex .tour-item-footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 12px !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        border-top: 2px solid #e8f5e9 !important;
        margin-top: 12px !important;
        position: relative !important;
    }
    
    .short_tour_ex .tour-item-price-block {
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
    }
    
    .short_tour_ex .tour-item-price-from {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .short_tour_ex .price-icon {
        flex-shrink: 0 !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    .short_tour_ex .price-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
    }
    
    .short_tour_ex .price {
        font-size: 20px !important;
        line-height: 1.2 !important;
    }
    
    .short_tour_ex .more {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
    }
    
    /* Блоки дат и покупок - предотвращение наложения */
    .short_tour_ex .tour-dates {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 10px !important;
        gap: 8px !important;
        font-size: 13px !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 100%) !important;
        border-radius: 8px !important;
        margin: 10px 0 !important;
        text-align: center !important;
    }
    
    .short_tour_ex .tour-dates .dates-info {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .short_tour_ex .tour-dates a {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-top: 4px !important;
    }
    
    .short_tour_ex .tour-purchases {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        font-size: 12px !important;
        padding: 6px 12px !important;
        margin: 8px auto !important;
        width: fit-content !important;
        max-width: 100% !important;
        position: relative !important;
    }
    
    /* Заголовки и текст - предотвращение наложения */
    .short_tour_ex .header_for_tours_main_page {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        position: relative !important;
        margin-bottom: 10px !important;
    }
    
    .short_tour_ex .tour-cities,
    .short_tour_ex .tour-days,
    .short_tour_ex .block_tourList {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        position: relative !important;
        text-align: center !important;
    }
    
    .short_tour_ex .kat_name_in_cart {
        display: inline-block !important;
        margin: 8px auto !important;
        max-width: 100% !important;
        position: relative !important;
    }
    
    /* Страница тура */
    .tour-hero-section {
        padding: 12px;
        border-radius: 12px;
    }
    
    /* Изображение тура - правильное отображение */
    .tour-image-wrapper {
        width: 100% !important;
        height: 200px !important;
        overflow: hidden !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .image_tour {
        width: 100% !important;
        height: 100% !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-color: #f5f5f5 !important;
    }
    
    .tour-main-title {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    /* Блок цены - компактный */
    .tour-price-section {
        padding: 12px !important;
        margin: 10px 0 !important;
        border-radius: 10px !important;
    }
    
    .tour-price-value {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
    }
    
    .tour-price-value svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .tour-schedule-section,
    .dates_tour {
        padding: 12px;
        border-radius: 12px;
    }
    
    /* Даты - компактные */
    .dates_tour li {
        padding: 8px 10px 8px 25px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        margin-bottom: 5px !important;
    }
    
    /* Расписание тура - красиво на мобильных */
    .time_left {
        font-size: 14px !important;
        padding: 6px 10px !important;
        min-width: 60px !important;
        text-align: center !important;
        background: #2d6a4f !important;
        color: white !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        margin-right: 10px !important;
        flex-shrink: 0 !important;
    }
    
    .description2 {
        font-size: 13px !important;
        padding: 10px 12px !important;
        line-height: 1.5 !important;
        border-radius: 8px !important;
        margin: 8px 0 !important;
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
    }
    
    .description2 .sprite-form {
        flex-shrink: 0 !important;
        margin-top: 2px !important;
    }
    
    .description2 .sprite-ico {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Контейнер времени и описания */
    .tour-schedule-section > div {
        padding: 5px !important;
        display: flex !important;
        align-items: flex-start !important;
        margin-bottom: 12px !important;
        width: 100% !important;
    }
    
    /* Табы - красиво на мобильных */
    #tabs {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    #tabs ul.tabs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: flex-start !important;
        padding: 6px 0 6px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        /* предотвращаем наложение: разрыв длинного текста, перенос */
        row-gap: 10px !important;
    }
    #tabs ul.tabs li {
        flex: 1 1 auto !important;
        min-width: 120px !important;
        max-width: 48% !important;
    }
    
    #tabs ul.tabs li a {
        padding: 10px 12px !important;
        font-size: 13px !important;
        text-align: center !important;
        display: block !important;
        word-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    #tabs .ui-tabs-panel {
        padding: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Текст в табах */
    .html-code {
        font-size: 13px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        word-wrap: break-word !important;
    }
    
    .html-code * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .html-code h3,
    .html-code h4 {
        font-size: 1rem !important;
        padding: 10px 5px !important;
        line-height: 1.4 !important;
    }
    
    .html-code p {
        padding: 8px 5px !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    .html-code ul,
    .html-code ol {
        padding-left: 20px !important;
        margin: 8px 0 !important;
    }
    
    .html-code li {
        margin-bottom: 5px !important;
        line-height: 1.5 !important;
    }
}

/* ====================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (≤ 480px)
   ==================================== */
@media screen and (max-width: 480px) {
    
    /* Контейнеры - максимально компактно */
    .cont {
        padding: 0 5px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .tours_block {
        padding: 0 5px !important;
        margin-top: 30px !important;
        width: 100% !important;
    }
    
    /* Карточки - абсолютно вертикально */
    .short_tour_ex,
    .short_tour_ex.horizon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 15px 0 !important;
        min-height: auto !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .short_tour_ex .image_block {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 160px !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }
    
    .short_tour_ex .content_block {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Строгое предотвращение наложения */
    .short_tour_ex .content_block > * {
        position: relative !important;
        z-index: 1 !important;
        margin-bottom: 6px !important;
        max-width: 100% !important;
    }
    
    .short_tour_ex .content_block > *:last-child {
        margin-bottom: 0 !important;
    }
    
    .short_tour_ex .header_for_tours_main_page {
        font-size: 14px !important;
        line-height: 1.3 !important;
    }
    
    /* Размеры */
    .short_tour_ex_inner .content_block {
        padding: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .short_tour_ex .tour-cities {
        font-size: 12px !important;
        margin: 5px 0 !important;
    }
    
    .short_tour_ex .tour-days {
        font-size: 11px !important;
        margin-bottom: 6px !important;
    }
    
    /* Футер - абсолютно вертикально */
    .short_tour_ex .tour-item-footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding-top: 10px !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        border-top: 2px solid #e8f5e9 !important;
        margin-top: 10px !important;
        position: relative !important;
    }
    
    .short_tour_ex .tour-item-price-block {
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
    }
    
    .short_tour_ex .tour-item-price-from {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .short_tour_ex .price-tour-item-1 {
        font-size: 18px !important;
    }
    
    .short_tour_ex .price {
        font-size: 18px !important;
        line-height: 1.2 !important;
    }
    
    .short_tour_ex .price-icon {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0 !important;
    }
    
    .short_tour_ex .price-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
    }
    
    .short_tour_ex .more {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
    }
    
    /* Блоки дат и покупок */
    .short_tour_ex .tour-dates {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 8px !important;
        font-size: 12px !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 100%) !important;
        border-radius: 6px !important;
        margin: 8px 0 !important;
        text-align: center !important;
    }
    
    .short_tour_ex .tour-purchases {
        font-size: 11px !important;
        padding: 5px 10px !important;
        margin: 6px auto !important;
        display: inline-flex !important;
        width: fit-content !important;
        max-width: 100% !important;
    }
    
    /* Все текстовые блоки */
    .short_tour_ex .header_for_tours_main_page,
    .short_tour_ex .tour-cities,
    .short_tour_ex .tour-days,
    .short_tour_ex .block_tourList,
    .short_tour_ex .kat_name_in_cart {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        text-align: center !important;
    }
    
    /* Страница тура */
    .tour-page-wrapper {
        padding: 5px;
    }
    
    .tour-hero-section {
        padding: 10px;
    }
    
    /* Изображение тура - компактное */
    .tour-image-wrapper {
        width: 100% !important;
        height: 150px !important;
        overflow: hidden !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
    }
    
    .image_tour {
        width: 100% !important;
        height: 100% !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-color: #f5f5f5 !important;
    }
    
    .tour-main-title {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }
    
    .tour-meta-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tour-days-badge {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    
    .tour-description {
        padding: 8px !important;
        font-size: 12px !important;
    }
    
    /* Блок цены - еще компактнее */
    .tour-price-section {
        padding: 10px !important;
        margin: 8px 0 !important;
        border-radius: 8px !important;
    }
    
    .tour-price-value {
        font-size: 1.3rem !important;
    }
    
    .tour-price-value svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .price_inner {
        display: inline-block;
        word-break: keep-all;
    }
    
    /* Даты - очень компактные */
    .dates_tour li {
        padding: 6px 8px 6px 20px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
    }
    
    /* Расписание - компактное */
    .time_left {
        font-size: 12px !important;
        padding: 5px 8px !important;
        min-width: 55px !important;
        border-radius: 6px !important;
    }
    
    .description2 {
        font-size: 14px !important;
        padding: 8px 10px !important;
        line-height: 1.4 !important;
        border-radius: 6px !important;
        margin: 6px 0 !important;
        gap: 8px !important;
    }
    
    .description2 .sprite-ico {
        width: 18px !important;
        height: 18px !important;
    }
    
    .tour-schedule-section > div {
        margin-bottom: 10px !important;
    }
    
    /* Табы на очень маленьких экранах */
    #tabs {
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    #tabs ul.tabs {
        padding: 4px !important;
        gap: 4px !important;
    }
    
    #tabs ul.tabs li {
        min-width: 100px !important;
        max-width: 48% !important;
    }
    
    #tabs ul.tabs li a {
        padding: 8px 10px !important;
        font-size: 14px !important;
    }
    
    #tabs .ui-tabs-panel {
        padding: 10px !important;
    }
    
    .html-code {
        font-size: 14px !important;
    }
    
    .html-code h3,
    .html-code h4 {
        font-size: 0.95rem !important;
        padding: 8px 4px !important;
    }
    
    .html-code p {
        padding: 6px 4px !important;
        font-size: 14px !important;
    }
    
    .html-code ul,
    .html-code ol {
        padding-left: 18px !important;
        margin: 6px 0 !important;
    }
}

/* ====================================
   ИСПРАВЛЕНИЯ ДЛЯ СПЕЦИФИЧНЫХ ЭЛЕМЕНТОВ
   ==================================== */

/* Фикс для горизонтальной кнопки "Подробнее" на десктопе */
@media screen and (min-width: 1025px) {
    .horizon .more {
        left: auto;
        position: relative;
    }
}

/* Блок покупок - адаптивный */
@media screen and (max-width: 768px) {
    .short_tour_ex .tour-purchases {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ====================================
   КНОПКА "НАВЕРХ" - АДАПТИВНЫЕ ИСПРАВЛЕНИЯ
   ==================================== */

/* На мобильных - меньше, ниже и полупрозрачная */
@media screen and (max-width: 768px) {
    .up {
        right: 12px !important;
        bottom: 20px !important;
        width: 44px !important;
        height: 44px !important;
        opacity: 0.85 !important;
        box-shadow: 0 4px 16px rgba(45, 106, 79, 0.25) !important;
    }
    
    .up.show {
        opacity: 0.85 !important;
    }
    
    .up:hover {
        opacity: 1 !important;
    }
    
    .up::before {
        font-size: 20px !important;
    }
}

@media screen and (max-width: 600px) {
    .up {
        right: 10px !important;
        bottom: 15px !important;
        width: 40px !important;
        height: 40px !important;
        opacity: 0.75 !important;
    }
    
    .up.show {
        opacity: 0.75 !important;
    }
    
    .up:hover {
        opacity: 1 !important;
    }
    
    .up::before {
        font-size: 18px !important;
    }
}

/* На очень маленьких экранах - еще меньше */
@media screen and (max-width: 480px) {
    .up {
        right: 8px !important;
        bottom: 12px !important;
        width: 36px !important;
        height: 36px !important;
        opacity: 0.7 !important;
        box-shadow: 0 2px 12px rgba(45, 106, 79, 0.2) !important;
    }
    
    .up.show {
        opacity: 0.7 !important;
        animation: none !important; /* Убираем пульсацию на очень маленьких экранах */
    }
    
    .up:hover {
        opacity: 0.95 !important;
    }
    
    .up::before {
        font-size: 16px !important;
    }
}
