/* Общие настройки в стиле референса */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #e0e0e0;
    --side-margin: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.page {
    height: 100vh;
    width: 100%;
    padding: 40px var(--side-margin);
    position: relative;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Боковой вертикальный текст */
.sidebar-text {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: rotate(-90deg) translateY(-50%);
    transform-origin: left top;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Нижняя линия (как в презентации) */
.footer-line {
    position: absolute;
    bottom: 20px;
    left: var(--side-margin);
    right: var(--side-margin);
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    text-transform: uppercase;
    border-top: 1px solid #000;
    padding-top: 10px;
}

/* Стили СТРАНИЦЫ 1 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.main-title {
    font-size: 80px;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.image-block-main img {
    width: 100%;
    filter: grayscale(100%);
}

/* Стили СТРАНИЦЫ 2 (Галерея) */
.gallery-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    flex-grow: 1; /* Занимает всё свободное место */
    min-height: 0; /* Важно для корректной работы flex в Firefox/Chrome */
    margin-bottom: 20px;
}

.gallery-left, .gallery-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    min-height: 0;
}

.img-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.img-wrap.small { flex: 1; }
.img-wrap.tall { flex: 2; }
.img-wrap.wide { flex: 3; }

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото заполняет блок, не деформируясь и не вылезая */
    display: block;
}

.description-text h3 {
    text-transform: uppercase;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Стили СТРАНИЦЫ 3 (Контакты) */
.thank-you-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr;
    gap: 20px;
    align-items: center;
    flex-grow: 1;
}

.big-text {
    font-size: clamp(60px, 10vw, 120px);
    line-height: 0.8;
    text-transform: uppercase;
    margin: 0;
}

.contact-image img {
    display: block;
    width: 80%;
    height: auto;
}

.contact-details {
    font-size: 12px;
    line-height: 2;
    text-transform: uppercase;
}

.contact-details .label {
    font-weight: bold;
    margin-bottom: 10px;
}





/* Уникальный контейнер первой страницы */
.hero-page-fixed {
    height: 100vh; /* Полна высота экрана */
    width: 100%;
    background-color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 40px 30px 80px; /* Большой отступ слева под боковой текст */
    box-sizing: border-box;
    overflow: hidden;
}

/* Вертикальный текст у левого края */
.hero-sidebar-tag {
    position: absolute;
    left: 25px;
    top: 50px; /* Начало надписи сверху */
    writing-mode: vertical-rl; /* Вертикальный текст */
    transform: rotate(180deg); /* Поворот как на макете */
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #000;
}

/* Центрированная сетка контента */
.hero-main-container {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr; /* Текст шире, чем картинка */
    align-items: center;
    flex-grow: 1; /* Растянуть на всё доступное пространство */
    gap: 20px;
}

/* Огромный заголовок */
.hero-title-large {
    font-size: clamp(60px, 10vw, 130px); /* Масштабируется от размера экрана */
    line-height: 0.85; /* Плотный межстрочный интервал */
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 25px 0;
}

.hero-subtitle-tag {
    font-size: 24px;
    font-weight: 400;
    color: #333;
}

/* Стили для изображения конверта */
.hero-visual-content {
    display: flex;
    justify-content: flex-end; /* Картинка прижата к правому краю своей колонки */
}

.hero-main-img {
    width: 100%;
    max-width: 580px; /* Максимальная ширина картинки как на макете */
    height: auto;
    object-fit: contain;
}

/* Нижняя панель */
.hero-bottom-footer {
    width: 100%;
}

.hero-footer-line {
    width: 100%;
    height: 1px;
    background-color: #000;
    margin-bottom: 15px;
}

.hero-footer-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}







/* ============================================================
   ПОЛНЫЙ БЛОК МОБИЛЬНОЙ АДАПТАЦИИ (БЕЗ ОБРЕЗКИ ФОТО)
   ============================================================ */

@media (max-width: 768px) {
    /* 1. Сброс глобальных ограничений */
    html, body {
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    /* 2. Исправление контейнеров страниц */
    .page, .hero-page-fixed, .container, .marketing-container {
        height: auto !important;       /* Позволяет контенту растягивать страницу */
        min-height: 100vh;
        padding: 60px 20px !important; /* Удобные отступы для пальцев */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow: visible !important;  /* Убирает обрезку */
    }

    /* 3. ФОТОГРАФИИ: Видны полностью */
    .main-hero-image,
    .hero-visual-content,
    .marketing-photo,
    .grid-item,
    .img-wrap,
    .image-block-main {
        width: 100% !important;
        height: auto !important;       /* Высота зависит от фото */
        aspect-ratio: auto !important; /* Отключаем принудительные квадраты */
        margin: 20px 0 !important;
        position: relative !important;
        overflow: visible !important;
    }

    .main-hero-image img,
    .hero-visual-content img,
    .marketing-photo img,
    .grid-item img,
    .img-wrap img {
        width: 100% !important;
        height: auto !important;       /* Фото само определяет высоту */
        position: static !important;
        object-fit: contain !important; /* ГАРАНТИЯ: Фото не обрезается */
        display: block;
    }

    /* 4. ТЕКСТ: Чтобы не уезжал */
    .main-title,
    .hero-title-large,
    .marketing-title-mega {
        font-size: clamp(32px, 10vw, 48px) !important;
        line-height: 1.1 !important;
        width: 100% !important;
        transform: none !important;     /* Убираем искажения, если текст не влазит */
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        word-wrap: break-word !important;
        hyphens: auto;
    }

    /* 5. СЕТКИ (GRID) -> В ОДНУ КОЛОНКУ */
    .intro-grid,
    .hero-main-container,
    .marketing-grid,
    .marketing-layout-grid,
    .photo-grid,
    .grid-container,
    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* 6. БОКОВЫЕ ЭЛЕМЕНТЫ (Sidebar) */
    .sidebar-text, .hero-sidebar-tag {
        position: relative !important;  /* Возвращаем в общий поток */
        transform: none !important;     /* Отменяем поворот -90 градусов */
        writing-mode: horizontal-tb !important; /* Делаем горизонтальным */
        left: 0 !important;
        top: 0 !important;
        margin-bottom: 15px !important;
        font-size: 12px !important;
        text-align: left;
    }

    /* 7. ОПИСАНИЯ И ПОДЗАГОЛОВКИ */
    .description-block, .m-description, .hero-subtitle-tag, .text-block .description {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    /* 8. СКРЫВАЕМ ЛИШНЕЕ (если нужно) */
    .scroll-arrow, .marketing-hero-arrow {
        display: none !important; /* Стрелки часто мешают на мобилах */
    }

    /* 9. НИЖНИЕ ПАНЕЛИ */
    .info-footer, .meta-header {
        position: relative !important;
        bottom: 0 !important;
        width: 100% !important;
        padding: 20px 0 !important;
        border-top: 1px solid #eee;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
    }
}