/* ============================================
   СТРАНИЦА "О НАС"
   Стили созданы точно по макету Figma
   ============================================ */

/* Hero секция с фоном и виджетом бронирования */
.about-hero {
    position: relative;
    width: 100%;
    max-width: 1728px;
    margin: 0 auto;
    padding: 0;
    margin-bottom: 0; /* УБРАЛИ GAP */
    overflow: visible !important; /* НЕ обрезаем виджет */
    /* УБРАЛИ transition чтобы не было "сползания" */
}

/* Расширенное состояние hero при открытии виджета */
.about-hero.expanded {
    margin-bottom: 40px; /* Небольшой отступ только при открытом виджете */
    min-height: 900px !important; /* Достаточная высота */
}

.about-hero__wrapper {
    position: relative;
    width: 1668px;
    min-height: 290px;
    margin: 0 auto;
    overflow: visible !important; /* НЕ обрезаем выпадающие меню */
    /* УБРАЛИ transition чтобы не было "сползания" */
}

/* Расширенная высота wrapper при открытии виджета */
.about-hero.expanded .about-hero__wrapper {
    min-height: 900px !important; /* Достаточная высота */
    padding-bottom: 100px !important; /* Место для кнопки "Скрыть" */
    overflow: visible !important;
}

/* Фоновое изображение - изначально обрезано до 230px */
.about-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 1668px;
    height: 230px;
    border-radius: 24px;
    overflow: hidden; /* Только для изображения, НЕ для виджета */
    z-index: 1;
    /* УБРАЛИ transition чтобы не было "сползания" */
}

/* Расширенная высота background при открытии виджета */
.about-hero.expanded .about-hero__background {
    height: 870px; /* Увеличиваем до кнопки "Скрыть" (900px wrapper - 30px bottom) */
    overflow: hidden; /* Обрезаем только изображение */
}

.about-hero__background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 50%; /* Смещаем фото на 50% вниз */
    display: block;
}

/* Кнопка бронирования - привязана к TOP background */
.about-hero__booking-btn {
    position: absolute;
    top: 202px; /* От верха = нижняя граница background 230px - половина кнопки 28px */
    left: 50%;
    transform: translateX(-50%); /* Только горизонтальное центрирование */
    z-index: 10;
    width: 262px;
    height: 56px;
    background: #958AD1;
    border: none;
    border-radius: 8px;
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(149, 138, 209, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    pointer-events: all;
}

.about-hero__booking-btn:hover {
    background: #7F6FC8;
    box-shadow: 0 6px 25px rgba(149, 138, 209, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

.about-hero__booking-btn:active {
    transform: translateX(-50%) translateY(0);
}

/* Меняем кнопку когда виджет открыт - уменьшаем и делаем черной */
.about-hero.expanded .about-hero__booking-btn {
    width: 180px;
    height: 48px;
    background: #242742;
    font-size: 16px;
    top: 846px; /* На нижней грани расширенного background (870px - 24px/2) */
    bottom: auto;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(36, 39, 66, 0.3);
    z-index: 10 !important; /* ВЫШЕ всего, чтобы кнопка кликалась */
    pointer-events: auto !important; /* Гарантируем что кликается */
}

.about-hero.expanded .about-hero__booking-btn:hover {
    background: #1a1d33;
    transform: translateX(-50%) translateY(-2px);
}

/* Wrapper для вертикального виджета (только десктоп) */
.about-hero__widget-wrapper {
    position: absolute;
    top: 235px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-height: 0;
    opacity: 0;
    overflow: visible !important; /* КРИТИЧНО! Не обрезаем выпадающие меню */
    z-index: 5;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Показываем виджет когда hero расширен */
.about-hero.expanded .about-hero__widget-wrapper {
    max-height: none !important; /* УБИРАЕМ ограничение! */
    min-height: 650px; /* Минимальная высота для виджета + выпадающие меню */
    opacity: 1;
    padding-top: 5px;
    padding-bottom: 150px; /* Место для выпадающих меню (они открываются вниз) */
    overflow: visible !important;
}

/* Десктопный виджет внутри wrapper */
.about-hero .booking-widget-container.desktop-widget {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 650px !important; /* Увеличиваем высоту */
    max-height: none !important; /* УБИРАЕМ ограничение */
    margin: 0 !important;
    padding-bottom: 150px !important; /* Место для выпадающих меню */
    overflow: visible !important; /* НЕ обрезаем выпадающие меню */
    z-index: 1 !important;
}

/* Убеждаемся что iframe виджета тоже не обрезает */
.about-hero .booking-widget-container.desktop-widget iframe {
    height: auto !important;
    min-height: 650px !important;
    max-height: none !important;
    overflow: visible !important;
    clip-path: none !important;
}

/* Виджет Bnovo - НЕ обрезаем выпадающие меню */
#_bn_widget_desktop {
    overflow: visible !important;
    min-height: 650px !important;
}

#_bn_widget_desktop iframe {
    overflow: visible !important;
    min-height: 650px !important;
}

/* Мобильный виджет - СКРЫТ на десктопе */
.about-hero .booking-widget-container.mobile-widget {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Стилизация iframe вертикального виджета для десктопа */
.about-hero .booking-widget-container.desktop-widget iframe {
    height: auto !important;
    min-height: 450px !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Адаптивность для десктопа при сужении экрана */
@media (max-width: 1728px) and (min-width: 1025px) {
    .about-hero__wrapper {
        width: calc(100% - 60px);
        max-width: 1668px;
    }
    
    .about-hero__background {
        width: 100%;
    }
    
    /* Кнопка остается на той же относительной позиции */
    /* Высота background не меняется, остается 230px */
}

/* Основная секция "О нас" */
.about-main {
    position: relative;
    width: 100%;
    max-width: 1728px;
    margin: 0 auto;
    padding: 0 30px 100px;
    overflow: visible;
}

.about-main__container {
    position: relative;
    width: 1668px;
    height: 800px;
    margin: 0 auto;
    padding: 0;
}

/* Декоративный текст "О НАС" - ТОЧНЫЕ КООРДИНАТЫ ИЗ FIGMA */
/* Figma: x=-5293, y=3578, 804×357px */
.about-main__decorative-text {
    position: absolute;
    top: 0px;
    left: -36px;
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 700;
    font-size: 297.14361572265625px;
    line-height: 356.5723571777344px;
    color: #E0DCF2;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
    margin: 0;
    letter-spacing: 0;
}

/* Заголовок "О нас" - ТОЧНЫЕ КООРДИНАТЫ ИЗ FIGMA */
/* Figma: x=-5227, y=3665, 136×68px */
.about-main__title {
    position: absolute;
    top: 87px;
    left: 0px;
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 700;
    font-size: 56.51962661743164px;
    line-height: 67.82355499267578px;
    color: #000000;
    z-index: 2;
    margin: 0;
    letter-spacing: 0;
    width: 136px;
    height: 68px;
}

/* Изображение слева - ТОЧНЫЕ КООРДИНАТЫ ИЗ FIGMA */
/* Figma: x=-5227, y=3765, 720×631px */
.about-main__image {
    position: absolute;
    top: 187px;
    left: 0px;
    width: 720px;
    height: 631px;
    border-radius: 25px;
    overflow: hidden;
    z-index: 1;
}

.about-main__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.19) saturate(1.15);
}

/* Текстовый блок справа - ТОЧНЫЕ КООРДИНАТЫ ИЗ FIGMA */
/* Figma: x=-4401, y=3758, 795×467px */
.about-main__content {
    position: absolute;
    top: 180px;
    left: 826px;
    width: 795px;
    min-height: 467px;
    padding-bottom: 90px; /* Отступ для кнопки */
    z-index: 2;
}

.about-main__text {
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 36.23040008544922px;
    color: #000000;
    text-align: justify;
    margin: 0;
    letter-spacing: 0;
}

/* Кнопка "Забронировать" - ТОЧНЫЕ КООРДИНАТЫ ИЗ FIGMA */
/* Figma: x=-4401, y=4282, 236×56px */
.about-main__cta {
    position: absolute;
    top: 704px;
    left: 826px;
    width: 236px;
    height: 56px;
    background: #2F2F2F;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 400;
    font-size: 16.173913955688477px;
    line-height: 19.4086971282959px;
    color: #FFFFFF;
    transition: all 0.3s ease;
    z-index: 2;
    letter-spacing: 0;
}

.about-main__cta:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 47, 47, 0.3);
}

.about-main__cta:active {
    transform: translateY(0);
}

/* Секция "Условия проживания" */
.about-terms {
    padding: 140px 0 100px;
}

.about-terms__container {
    max-width: 1668px;
    margin: 0 auto;
    padding: 0 30px;
}

.about-terms__title {
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 700;
    font-size: 56.52px;
    line-height: 67.82px;
    color: #000000;
    margin: 0 0 70px 0;
}

/* Таблица условий */
.about-terms__table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-terms__row {
    display: grid;
    grid-template-columns: 537px 1fr;
    gap: 168px;
    padding: 28px 0;
    border-top: 1px solid #000000;
}

.about-terms__row:last-child {
    border-bottom: 1px solid #000000;
}

.about-terms__label {
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 300;
    font-size: 56.52px;
    line-height: 67.82px;
    color: #000000;
}

.about-terms__value {
    font-family: 'Coolvetica', 'Yanone Kaffeesatz', sans-serif;
    font-weight: 300;
    font-size: 56.52px;
    line-height: 67.82px;
    color: #000000;
    text-align: justify;
}

/* Адаптивность */
@media (max-width: 1728px) {
    .about-hero {
        padding: 0 20px;
        margin-bottom: 0; /* БЕЗ GAP */
    }
    
    .about-hero__wrapper {
        width: 100%;
        max-width: 1668px;
    }
    
    .about-hero__background {
        width: 100%;
        max-width: 1668px;
    }
    
    /* Кнопка остается на той же относительной позиции */
    /* Высота background не меняется, остается 230px */
    
    .booking-widget-container {
        left: 39px !important;
        transform: none !important;
        width: calc(100% - 78px) !important;
        max-width: 1591px !important;
        bottom: auto !important;
        margin: 0 !important;
    }
    
    .about-main__container {
        width: 100%;
        max-width: 1668px;
        padding: 0 20px;
    }
    
    .about-main__image {
        width: 600px;
        height: 500px;
    }
    
    .about-main__content {
        width: 650px;
        left: 650px;
        min-height: 467px;
        padding-bottom: 90px; /* Отступ для кнопки */
    }
    
    .about-main__text {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .about-main__cta {
        left: 650px;
        top: auto;
        bottom: 0;
        margin-top: 0;
    }
}

@media (max-width: 1440px) {
    .about-hero__wrapper {
        min-height: 230px; /* Минимальная высота wrapper */
    }
    
    .about-hero__background {
        height: 200px;
    }
    
    /* Адаптивная позиция кнопки для высоты 200px */
    .about-hero__booking-btn {
        top: 172px; /* 200px - 28px (половина высоты кнопки) */
    }
    
    /* Адаптивная позиция для расширенного состояния */
    .about-hero.expanded .about-hero__wrapper {
        min-height: 800px !important;
    }
    
    .about-hero.expanded .about-hero__background {
        height: 750px; /* Пропорционально для меньшего экрана */
    }
    
    .about-hero.expanded .about-hero__booking-btn {
        top: 726px; /* 750px - 24px */
    }
    
    .booking-widget-container {
        top: 100px !important;
        left: 39px !important;
        transform: none !important;
        width: calc(100% - 78px) !important;
        max-width: 1400px !important;
        bottom: auto !important;
        margin: 0 !important;
    }
    
    .about-main__decorative-text {
        font-size: 220px;
        line-height: 260px;
    }
    
    .about-main__title {
        font-size: 48px;
        line-height: 56px;
    }
    
    .about-main__image {
        width: 500px;
        height: 450px;
    }
    
    .about-main__content {
        width: 550px;
        min-height: 467px;
        padding-bottom: 90px; /* Отступ для кнопки */
    }
    
    .about-main__text {
        font-size: 20px;
        line-height: 30px;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .about-main__cta {
        left: 826px; /* Выравнивание с контентом */
        top: auto;
        bottom: 0;
        margin-top: 0;
    }
    
    .about-terms__title {
        font-size: 48px;
        line-height: 56px;
    }
    
    .about-terms__row {
        grid-template-columns: 400px 1fr;
        gap: 100px;
    }
    
    .about-terms__label,
    .about-terms__value {
        font-size: 40px;
        line-height: 48px;
    }
}

@media (max-width: 1024px) {
    .about-hero {
        margin-bottom: 0 !important; /* УБИРАЕМ gap полностью */
        position: relative;
        overflow: visible !important; /* НЕ обрезаем выпадающие меню */
    }
    
    .about-hero__wrapper {
        position: relative;
        height: auto !important; /* Автоматическая высота */
        min-height: 100px !important; /* МИНИМУМ - пусть контент определяет высоту */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible !important; /* КРИТИЧНО для выпадающих меню */
        padding-bottom: 0px !important; /* БЕЗ отступа - убрали gap */
        transition: none !important;
    }
    
    /* Скрываем кнопку на мобильных */
    .about-hero__booking-btn {
        display: none !important;
    }
    
    /* Скрываем wrapper вертикального виджета десктопа */
    .about-hero__widget-wrapper {
        display: none !important;
    }
    
    /* Фон - АБСОЛЮТНОЕ позиционирование */
    .about-hero__background {
        position: absolute !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0; /* ПРОДЛЕВАЕМ фон до самого низа */
        width: 100%;
        height: 100% !important; /* РАСТЯГИВАЕМ фон на всю высоту */
        min-height: 100%;
        border-radius: 20px;
        z-index: 1;
        overflow: hidden !important; /* Обрезаем ТОЛЬКО изображение */
        transition: none !important;
    }
    
    .about-hero__background-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Скрываем десктопный виджет на мобильных */
    .about-hero .booking-widget-container.desktop-widget {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Показываем мобильный виджет - ОТНОСИТЕЛЬНОЕ позиционирование */
    .about-hero .booking-widget-container.mobile-widget {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: all !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 380px !important; /* Немного увеличиваем */
        height: auto !important;
        min-height: auto !important;
        max-height: none !important; /* НЕ ограничиваем высоту */
        margin: 0 auto !important;
        padding: 60px 15px 0px 15px !important; /* МИНИМАЛЬНЫЙ padding - убрали gap */
        z-index: 2 !important;
        overflow: visible !important; /* НЕ обрезаем выпадающие меню */
    }
    
    /* Стили для iframe внутри мобильного виджета */
    .about-hero .booking-widget-container.mobile-widget iframe {
        height: auto !important;
        min-height: 400px !important; /* УМЕНЬШИЛИ - убрали gap */
        max-height: none !important; /* НЕ ограничиваем */
        overflow: visible !important; /* НЕ обрезаем выпадающие меню */
        clip-path: none !important;
        transition: none !important;
    }
    
    /* Виджет Bnovo на мобильных - НЕ обрезаем */
    #_bn_widget_ {
        overflow: visible !important;
        min-height: 600px !important; /* УВЕЛИЧИВАЕМ минимальную высоту */
    }
    
    #_bn_widget_ iframe {
        overflow: visible !important;
        min-height: 600px !important; /* УВЕЛИЧИВАЕМ минимальную высоту */
    }
    
    .about-main {
        padding: 0 20px 40px !important; /* УБИРАЕМ padding-top */
        margin-top: 0 !important; /* Убираем лишний отступ сверху */
        position: relative;
        z-index: 3; /* Выше hero секции */
    }
    
    .about-main__container {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .about-main__decorative-text {
        font-size: 150px;
        line-height: 180px;
        top: 0 !important; /* УБИРАЕМ отрицательный top */
    }
    
    .about-main__title {
        position: relative;
        top: 0;
        left: 0;
        font-size: 42px;
        line-height: 50px;
        width: auto;
        height: auto;
    }
    
    .about-main__image {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 720px;
        height: 500px;
    }
    
    .about-main__content {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .about-main__text {
        font-size: 20px;
        line-height: 30px;
        margin-bottom: 30px; /* Отступ перед кнопкой */
    }
    
    .about-main__cta {
        position: relative;
        top: 0;
        left: 0;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .about-terms {
        padding: 60px 0 60px;
    }
    
    .about-terms__title {
        font-size: 32px;
        line-height: 38px;
        margin-bottom: 30px;
    }
    
    .about-terms__row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px 0;
    }
    
    .about-terms__label,
    .about-terms__value {
        font-size: 24px;
        line-height: 32px;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 0 15px;
        margin-bottom: 0 !important; /* УБИРАЕМ gap полностью */
        overflow: visible !important;
    }
    
    .about-hero__wrapper {
        position: relative;
        height: auto !important;
        min-height: 100px !important; /* МИНИМУМ - пусть контент определяет высоту */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible !important; /* НЕ обрезаем выпадающие меню */
        padding-bottom: 0px !important; /* БЕЗ отступа - убрали gap */
    }
    
    /* Картинка на весь фон - фиксированная высота */
    .about-hero__background {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0; /* ПРОДЛЕВАЕМ фон до самого низа */
        width: 100%;
        height: 100% !important; /* РАСТЯГИВАЕМ фон на всю высоту */
        min-height: 100%;
        border-radius: 16px;
        z-index: 1;
        overflow: hidden !important; /* Обрезаем ТОЛЬКО изображение */
    }
    
    .about-hero__background-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Вертикальный виджет по центру */
    .about-hero .booking-widget-container.mobile-widget {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 340px !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: 60px 15px 0px 15px !important; /* МИНИМАЛЬНЫЙ padding - убрали gap */
        overflow: visible !important;
        z-index: 2 !important;
    }
    
    .about-main {
        padding: 0 20px 30px !important; /* УБИРАЕМ padding-top */
        margin-top: 0 !important;
        position: relative;
        z-index: 3; /* Выше hero секции */
    }
    
    .about-main__container {
        width: 100%;
        height: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .about-main__decorative-text {
        font-size: 80px;
        line-height: 96px;
        top: 0 !important; /* УБИРАЕМ отрицательный top */
        left: -20px;
    }
    
    .about-main__title {
        position: relative;
        top: 0;
        left: 0;
        font-size: 28px;
        line-height: 34px;
        width: auto;
        height: auto;
        margin-bottom: 0;
    }
    
    .about-main__image {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: 300px;
        border-radius: 16px;
    }
    
    .about-main__content {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .about-main__text {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 25px; /* Отступ перед кнопкой */
    }
    
    .about-main__cta {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: 48px;
        font-size: 16px;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .about-terms {
        padding: 40px 0 40px;
    }
    
    .about-terms__container {
        padding: 0 20px;
    }
    
    .about-terms__title {
        font-size: 28px;
        line-height: 34px;
        margin-bottom: 20px;
    }
    
    .about-terms__row {
        padding: 15px 0;
    }
    
    .about-terms__label,
    .about-terms__value {
        font-size: 18px;
        line-height: 26px;
    }
}

/* ============================================
   АНИМАЦИИ ПРИ ПРОКРУТКЕ (Intersection Observer)
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

