/* ============================================
   Krasnobaeva — Studios Block Mobile Fix
   ============================================
   Точечный фикс для блока "Фотостудії, локації та образи"
   (#partst_filtered) — на мобильных версии блоки
   накладывались друг на друга из-за абсолютного
   позиционирования с фиксированными calc() значениями.

   Решение: сбросить абсолютное позиционирование и
   использовать flex-компоновку на мобильных.
   ============================================ */

@media screen and (max-width: 991px) {

    /* Главный контейнер блока — убрать фиксированную высоту */
    #partst_filtered.com22_stbox .partst_filtered_box {
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Табы (Фотостудії/Локації/Образи) — статичные */
    #partst_filtered .tabbler {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        margin-bottom: 16px !important;
    }

    /* Список студий (карточки) — статичный, не absolute */
    #partst_filtered.com22_stbox .st_filtered_items {
        position: relative !important;
        top: auto !important;
        margin-top: 0 !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        height: auto !important;
    }

    #partst_filtered.com22_stbox .st_filtered_items .st_filtered_items_wrap0 {
        position: relative !important;
        left: auto !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        height: auto !important;
        width: 100% !important;
        padding: 0 0 10px 0 !important;
    }

    #partst_filtered.com22_stbox .st_filtered_items .st_filtered_items_wrap {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        height: auto !important;
    }

    #partst_filtered.com22_stbox .st_filtered_items .st_filtered_items_wrap > div {
        flex: 0 0 200px !important;
        width: 200px !important;
        height: 64px !important;
        padding-left: calc(64px + 8px + 16px) !important;
        position: relative !important;
    }

    /* Кнопка "Детальніше" — статичная */
    #partst_filtered.com22_stbox .studioDetails {
        position: relative !important;
        top: auto !important;
        display: block !important;
        width: 100% !important;
        margin: 0 0 16px 0 !important;
    }

    /* Описание студии — статичное */
    #partst_filtered.com22_stbox .st_filtered_descriptions {
        position: relative !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 290px !important;
        padding: 0 15px !important;
        margin-bottom: 16px !important;
    }

    #partst_filtered.com22_stbox .st_filtered_descriptions .st_filtered_description_item {
        position: relative !important;
    }

    #partst_filtered.com22_stbox .st_filtered_descriptions .st_filtered_description_item .text {
        height: auto !important;
        min-height: 100px !important;
        max-height: 200px !important;
        overflow-y: auto !important;
    }

    /* Блок информации — статичный */
    #partst_filtered .info {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        opacity: 1 !important;
        transform: none !important;
        margin-top: 12px !important;
        padding: 10px 0 !important;
    }

    /* Блок галереи — статичный */
    #partst_filtered.com22_stbox .st_filtered_gallery {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        height: 282px !important;
        margin-bottom: 16px !important;
    }

    /* Информационный блок (внизу) — статичный */
    #partst_filtered.com22_stbox .st_filtered_inform {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100% !important;
        left: auto !important;
    }

    /* Counter (1/1) — скрыть на мобильных, потому что он absolute */
    #partst_filtered.com22_stbox .st_filtered_commit {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        display: inline-block !important;
        margin: 0 0 8px 8px !important;
    }

    /* mobRTitle и mobRAddr — скрыть (они и так скрыты в main.css) */
    #partst_filtered.com22_stbox .mobRTitle,
    #partst_filtered.com22_stbox .mobRAddr {
        display: none !important;
    }
}
