body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Твой исходный розово-желтый градиент */
    background: linear-gradient(135deg, #e666ea 0%, #f0ed56 100%) !important;
    background-attachment: fixed;
    font-family: sans-serif;
    overflow-x: hidden !important;
    position: relative;
}

.no-transition {
    transition: none !important;
}

.no-transition::before {
    transition: none !important;
}


body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e666ea 0%, #f0ed56 100%);
    z-index: -2;
    /* Самый нижний слой */
    display: block;
}


/* Слой для темной темы (плавное появление) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #5a1791 0%, #0e0422 100%) !important;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -1;
}

/* Активация темной темы */
body.dark-mode::before {
    opacity: 1;
}

.content-column {
    min-height: 1000px;
}



.theme-btn {
    position: fixed;
    top: 15px;
    left: 160px;
    z-index: 10005;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #000;
    /* Черная рамка для светлой темы */
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.mode-icon {
    width: 24px;
    height: 24px;
    stroke: #000;
    /* Цвет иконки — черный */
}

/* Стили для темной темы */
body.dark-mode .theme-btn {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .mode-icon {
    stroke: #fff;
    /* Цвет иконки — белый */
}

/* Эффект при наведении */
.theme-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}



.background-overlay {
    position: fixed;
    /* Чтобы фон не дергался при скролле */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* За всеми элементами */
    overflow: hidden;
    pointer-events: none;
    /* Пропускает клики сквозь себя */
}

.scrolling-content {
    display: flex;
    flex-direction: column;
    /* Текст идет строками вниз */
    gap: 20px;
    /* Расстояние между строками */
    color: rgba(255, 255, 255, 0.12);
    font-size: 27px;
    /* Размер букв */
    font-weight: bold;
    text-transform: uppercase;
    line-height: 0.9;
    white-space: nowrap;
}

div {
    min-width: none;
}

.horizontal-container {
    display: flex;
    overflow-x: auto;
    /* Включаем горизонтальный скролл */
    overflow-y: hidden;
    height: 100vh;
    scroll-snap-type: x mandatory;
    /* Опционально: "прилипание" к краям */
}

.content-column {
    flex: 0 0 auto;
    /* Не дает колонке сжиматься */
    width: 30vw;
    /* Ширина одной колонки (80% экрана) */
    height: 100%;
    padding: 40px;
    box-sizing: border-box;
    scroll-snap-align: center;

    /* Настройка текста внутри колонки */
    column-width: 300px;
    /* Если хочешь, чтобы текст внутри сам разбивался на газетные колонки */
    column-gap: 40px;
    overflow: hidden;
}

h1 {
    font-size: 3rem;
    margin: 50px 25px 20px;

}

.h7 {
    margin: 0 80px 20px;
    color: #333;
}

.h8 {

    margin: 0 180px 20px;
    color: #333;
}

.h9 {
    margin: 0 100px 20px;
    color: #333;
}

.h1-button {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 18px 24px;
    backdrop-filter: blur(5px);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.h1-button:hover,
.h1-button:focus {
    background: rgba(255, 255, 255, 0.3);
    color: #000000;
    transform: translateY(-3px);
}

p {
    line-height: 1.8;
    font-size: 32px;
    color: rgb(255, 255, 255);
    font-weight: 600;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.5px;

    /* Новая логика анимации */
    display: grid;
    grid-template-rows: 1fr;
    /* Разрешаем занимать всё место */
    opacity: 1;
    transition: grid-template-rows 0.7s ease, opacity 0.5s ease, margin 0.5s ease;
    overflow: visible;
    /* Убираем обрезку */
    margin-top: 50px;
    /* Адекватный отступ от картинки */
    pointer-events: none;
    /* Текст пропускает клики сквозь себя */
    user-select: none;

}

.p3 {
    margin: 450px 100px 20px;

}

.p1 {
    margin: 450px 40px 0px;

}

.p2 {
    margin: 450px 70px 20px;
}

/* Анимация для текста */

/* Скрытое состояние */
p.hidden {

    grid-template-rows: 0fr;
    /* Схлопываем в ноль */
    opacity: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
    /* Обрезаем только когда скрыто */
}

.photos-img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.photos-img:hover {
    transform: scale(1.05);
}

.btn6 {
    position: fixed;
    top: 20px;
    left: 40px;
    width: auto;
    max-width: 150px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    padding: 12px 20px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    font-size: 14px;
}

.btn6:hover,
.btn6:focus {
    transition: 0.3s ease-in-out;
    background-color: rgba(255, 255, 255, 0.2);
    /* Slightly more opaque on hover */
    color: rgb(0, 0, 0);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    backdrop-filter: blur(15px);
    /* Increase blur on hover */
    -webkit-backdrop-filter: blur(15px);
}


/* Gallery Styles */
.photos-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    margin-top: -650px;

    animation: slideUp 1s ease-out;

}

.photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

.photos-img {
    display: block;
    width: 80%;
    height: 350px;
    /* Можно немного увеличить высоту для красоты */
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.photos-img:hover {
    transform: scale(1.05) translateY(-10px);
    filter: brightness(1.1) drop-shadow(0 15px 35px rgba(0, 0, 0, 0.4));
    animation: slideUp 0.5s ease-out;
}

@media (max-width: 768px) {

    .content-column {
        min-height: 100vh;
    }


    .photos-container {
        margin-top: -700px;

    }





    .content-column {
        column-width: 20px
    }

    .h7,
    .h8,
    .h9 {
        margin-bottom: 10px;

    }


    /* ИСПРАВЛЯЕМ КНОПКИ (H7, H8, H9) */
    .horizontal-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 100px !important;
        height: auto !important;
        /* Убираем ограничение высоты */
        overflow: visible !important;
    }

    /* Сами колонки: запрещаем им сжиматься в полоску */
    .content-column {
        flex: 0 1 auto !important;
        /* Блок занимает ровно столько места, сколько нужно тексту */
        min-width: 80px !important;
        /* Минимальная ширина, чтобы не сжимались */
        border: none !important;
        /* Убираем те самые вертикальные полоски */
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;

    }

    /* Оформление самих кнопок (подложка) */
    .h1-button {
        font-size: 14px !important;
        /* Чуть меньше шрифт, чтобы всё влезло в ряд */
        display: inline-block !important;

        margin: 0;
        padding: 8px 12px !important;
        /* Внутренние отступы для формы кнопки */
        background: rgba(255, 255, 255, 0.1);
        /* Полупрозрачный фон */
        -webkit-backdrop-filter: blur(5px);
        /* ОБЯЗАТЕЛЬНО для Safari */
        backdrop-filter: blur(5px);
        border-radius: 8px;
        /* Скругление углов подложки */
        white-space: nowrap !important;
        /* Запрещаем перенос букв */
        text-align: center;
    }

    /* Контейнер с фотографиями */
    .photos {
        display: flex;
        flex-direction: column;
        gap: 50px;
        /* Увеличим расстояние, чтобы текст влез */
        padding: 0px 20px 50px;
        align-items: flex-start;
        /* Фото слева */
    }

    .photos-img {
        width: 140px !important;
        height: 140px !important;
        border-radius: 15px;
        z-index: 5;
    }

    /* Общие стили для текстов p1, p2, p3 */
    .p1,
    .p2,
    .p3 {
        position: absolute !important;
        /* Включаем свободное перемещение */
        left: 230px !important;
        /* Отступ вправо от края фото (120 + зазор) */

        width: calc(80% - 170px) !important;
        /* Оставшееся место справа */
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        font-size: 16px !important;
        line-height: 1.3;
        color: white;
        transition: opacity 0.5s ease, transform 0.5s ease !important;
        pointer-events: none;
        /* Чтобы текст не мешал кликать */
    }

    /* Анимация появления */
    p.hidden {

        opacity: 0 !important;
        transform: translateX(10px) !important;
        display: block !important;
        /* Не используем none, иначе не будет анимации */
    }


}