@font-face {
    font-family: "RobotoRegular";
    src: url("../fonts/Roboto-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
}

@font-face {
    font-family: "Vetrino";
    src: url("../fonts/vetrino.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
}



* {
    padding: 0px;
    margin: 0px;
    border: none;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Links */

a, a:link, a:visited  {
    text-decoration: none;
}

a:hover  {
    text-decoration: none;
}

/* Common */

aside, nav, footer, header, section, main {
    display: block;
}

h1, h2, h3, h4, h5, h6, p {
    font-size: inherit;
    font-weight: inherit;
}

ul, ul li {
    list-style: none;
}

img {
    vertical-align: top;
}

img, svg {
    max-width: 100%;
    height: auto;
}

address {
    font-style: normal;
}

/* Form */

input, textarea, button, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: transparent;
}

input::-ms-clear {
    display: none;
}

textarea {
    resize: vertical;
}

button, input[type="submit"] {
    display: inline-block;
    box-shadow: none;
    background-color: transparent;
    background: none;
    cursor: pointer;
}

button::-moz-focus-inner {
    padding: 0;
    border: 0;
}

label {
    cursor: pointer;
}

legend {
    display: block;
}

input[type='file'] {
    max-width: 100%;
}



body {
    margin: 0;
    font-family: sans-serif;
    background-color: #000;
    color: white;
}

.main--face {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 30px 120px;

    align-items: center;

    background-color: black;
}

.main--face__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.main-menu {
    display: flex;
    justify-content: flex-end;
    gap: 40px;
}

.main-menu a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-family: "RobotoRegular";
}

.main-menu a:last-child {
    color: #BE0000;
}

.burger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

/* Рисуем полоски бургера */
.burger-btn span {
    display: block;
    width: 30px;
    height: 1px;
    background-color: #fff; /* Белые полоски */
    margin: 8px 0;
    transition: 0.3s;
}

.burger-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Отключаем клики по невидимой кнопке */
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0; /* Прижимаем к правому краю */
    left: auto; /* Отменяем привязку к левому краю */

    width: 300px; /* Фиксированная ширина (или 80%, если хотите) */
    max-width: 85vw; /* Чтобы на очень узких экранах не вылезало */
    height: 100vh; /* Полная высота */

    background-color: #000;
    z-index: 2000;

    /* Тень, чтобы меню отделялось от сайта */
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);

    /* Логика анимации (прячем вправо) */
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;

    display: flex;
    flex-direction: column;
    padding: 30px 40px 30px 30px;
    box-sizing: border-box;
}

/* Когда меню активно - возвращаем его на место */
.mobile-menu-overlay.active {
    transform: translateX(0);
}

/* Кнопка закрытия (крестик) */
.mobile-close {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 30px;
    left: 30px; /* Крестик слева, как на макете */
    padding: 0;
}

.mobile-close img {
    width: 100%;
    height: 100%;
}

/* Ссылки внутри мобильного меню */
.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Прижимаем текст вправо */
    gap: 30px; /* Расстояние между пунктами */
}

.mobile-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 18px; /* Размер шрифта как на макете */
    text-transform: lowercase; /* Маленькие буквы */
    font-family: "RobotoRegular"; /* Ваш шрифт */
    transition: color 0.3s;
}

/* Особый стиль для кнопки "СВЯЗЬ" */
.mobile-nav a.mobile-contact {
    color: #BE0000; /* Красный цвет */
    margin-top: 50px; /* Отступ от остальных ссылок */
    font-size: 18px;
    font-family: "RobotoRegular";
}

.mobile-close img {
    width: 25px;
}


.main--title {
    text-align: center;
    align-self: center;
    justify-self: center;


    font-size: 60px;
    font-weight: normal;
    font-family: "Vetrino"


}

.test--str {
    grid-row: 3;
    align-self: center;
    justify-self: center;
    grid-column: 1 / -1;
}



.intro-section {
    background-color: #000; /* Черный фон */
    color: #fff; /* Белый текст */


    display: flex;

    padding: 45px 120px;
    column-gap: 20px;

    align-items: flex-start;
    justify-content: space-between;
}

.intro-text {
    font-family: "Vetrino";
    font-size: 36px;
    line-height: 1.4;
    text-transform: lowercase;

    max-width: 1048px;
}

.intro-star {
    grid-column: 12;

    text-align: right;
    font-size: 60px;
    font-family: serif;
}

.about--face {
    background-color: #fff;
    color: #000;

    padding: 75px 120px 0 120px;
    column-gap: 20px;

    align-items: flex-start;
}

.about--face h3 {
    font-family: "Vetrino";
}

h3 {
    background-color: white;
    color: black;
    font-family: "Vetrino";
    font-size: 26px;
    text-align: center;
}

.small--about {
    padding: 75px 120px 50px 120px;
    background-color: white;
}

.about--cards {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.card--about--1 {
    margin-right: 10px;
}

.card--about--2 {
    margin-right: 10px;
}

.additional-text-1 {
    max-width: 675px;
    font-size: 32px;
    color: black;
    margin-bottom: 95px;
    margin-top: 166px;
}

.additional-text-2 {
    text-align: right;
    max-width: 563px;
    font-size: 32px;
    justify-self: flex-end;
    margin-bottom: 94px;
}

.additional-text-3 {
    text-align: center;
    max-width: 414px;
    font-size: 24px;
    margin-bottom: 54px;
}

.additional-text-4 {
    text-align: right;
    max-width: 364px;
    justify-self: flex-end;
    font-size: 20px;
    color: #6D6D6D;
}

h2 {
    font-family: "Vetrino";
    font-size: 50px;
    text-align: center;
    padding-bottom: 75px;
}

.about--point {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    padding-bottom: 25px;
}

.about--description {
    grid-column: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about--description p {
    font-family: "Vetrino";
    font-size: 26px;
    max-width: 445px;
    text-align: center;
    padding-right: 50px;
}

.about--point img {
    grid-column: 2 / -1;
    width: 100%;
}



/* 1. РОДИТЕЛЬ */
.intro-section-2 {
    position: relative; /* Это делает блок "якорем" для текста */
    width: 100%;
    /* Высоту не задаем! Она растянется по картинке */
}

/* 2. КАРТИНКА (Нижний слой) */
.banner-img {
    width: 100%;        /* Ширина всегда во весь экран */
    height: auto;       /* Высота подстраивается (ничего не обрежется) */
    display: block;     /* Убирает лишнюю белую полоску снизу в 4px */
}

/* 3. ОБЕРТКА ТЕКСТА (Верхний слой) */
.banner-content {
    position: absolute; /* Накладываем поверх */

    /* Магия центрирования: */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Сдвиг назад на 50% своего размера */

    width: 90%; /* Ширина блока с текстом (чтобы не прилипал к краям на мобильном) */
    text-align: center; /* Центруем сам текст внутри блока */
    z-index: 2; /* Поднимаем слой выше картинки */
}

/* 4. СТИЛИ ЗАГОЛОВКА */
.banner-content h2 {
    justify-self: center;
    align-self: center;
    color: #fff; /* Белый цвет. Если картинка светлая — поменяй на #000 */
    font-family: "Vetrino"; /* Твой шрифт с засечками */
    font-weight: normal; /* Убираем жирность, если нужно утонченно */
    margin: 0;

    font-size: 50px;
    max-width: 627px;
    padding: 0;
}

.intro-section-3 {
    background-color: #000; /* Черный фон */
    color: #fff; /* Белый текст */

    display: flex;

    padding: 77px 320px;

    align-items: center;
    justify-content: center;
}

.intro-text-3 {
    font-family: "Vetrino";
    font-size: 35px;
    line-height: 1.4;
    text-align: center;

    max-width: 1048px;
}

.videos {
    background-color: #fff;
    color: #000;
    padding: 108px 120px 0 120px;
}

.videos--wrapper {
    width: 100%;
    height: 100%;
}

.video {
    background-color: #000;
    width: 100%;
    height: 50vw;
    margin-bottom: 87px;
}

.video:last-child {
    margin-bottom: 0;
}

.videos--wrapper h2 {
    padding-bottom: 109px;
}


.photos {
    background-color: #fff;
    color: #000;
    padding: 108px 120px;
}

.swipe-section {
    display: flex;
    flex-direction: column;
    background-color: white;
}

.title--space {
    background-color: white;
    padding: 100px 40px 0 40px;
}

.photos--title {
    font-family: "Vetrino";
    color: black;
    font-size: 70px;
    background-color: white;
}

.photos--wrapper {
    height: 200vw;
}

.footer--main {
    background-color: #fff;
    width: 100%;
}

.footer--main img {
    width: 100%;
}

.footer-hover {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
}

.space {
    background-color: white;
    height: 300px;
    width: 100%;
}

.footer__contacts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    height: 45%;

    z-index: 10;
    display: flex;
    justify-content: space-between;

    align-items: flex-end;

    padding: 0 30px 20px 30px;

    box-sizing: border-box;

    transform: translateY(200%);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 1s ease;
    pointer-events: none;
}

.footer__cover-wrapper {
    width: 100%;
    line-height: 0;
}

.footer__svg {
    display: block;
    width: 100%;
    height: auto;

    transition: transform 2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1s ease;
    transform-origin: top center;
    fill: #000;
}

.footer-hover:hover .footer__contacts {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.footer-hover:hover .footer__svg {
    transform: translateY(50%);
    opacity: 0.1;
}

.footer__col {
    display: flex;
    flex-direction: column;
}

.footer__phone {
    margin-bottom: 23px;
    font-family: "Vetrino";
    font-size: 32px;
    color: #000;
}

.footer__socials {
    display: flex;
    gap: 20px;
}

.footer__socials a {
    text-decoration: none;
    color: #000;
    text-transform: uppercase;
    font-family: "Vetrino";
    font-size: 32px;
}

.footer__col--right span {
    text-transform: uppercase;
    font-family: "Vetrino";
    font-size: 32px;
    color: #BE0000;
    cursor: pointer;
}





/* --- СВАЙП СЕКЦИЯ (ИСПРАВЛЕННАЯ) --- */
.swipe-section {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background-color: white;
    padding: 0 100px 0 100px;
}

/* КОНТЕЙНЕР: Делаем его на весь экран, но прозрачным для кликов */
.card-stack {
    width: 100%;
    height: 80%;
    display: grid;
    place-items: center; /* Это идеально центрирует фото любого размера */
    position: relative;
    pointer-events: none; /* Чтобы клики проходили сквозь пустые места */
}

/* КАРТОЧКА: Просто обертка вокруг фото */
.card {
    /* 1. РАЗМЕР: Авто, подстраивается под содержимое */
    width: auto;
    height: auto;
    position: absolute; /* Чтобы лежать стопкой */

    /* Убираем жесткие ограничения отсюда */
    display: block;


    will-change: transform;
    cursor: grab;
    pointer-events: auto; /* Включаем клики для самой карточки */

    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);

    /* Важно для мобильных */
    touch-action: none;
}

.card:active {
    cursor: grabbing;
}

/* ФОТО: Оно диктует размеры */
.card img {
    display: block; /* Убираем нижний отступ */

    /* 2. РАЗМЕРЫ: Натуральные размеры фото */
    width: auto;
    height: auto;

    /* 3. ОГРАНИЧЕНИЯ: Вот здесь мы говорим "не будь больше экрана" */
    /* Фото уменьшится, если оно слишком большое, но сохранит пропорции */
    max-width: 80vw;  /* Максимум 80% от ширины экрана */
    max-height: 70vh; /* Максимум 70% от высоты экрана */

    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* --- СОСТОЯНИЯ --- */
.card.is-active {
    z-index: 1000; /* Гарантированно сверху */
}

.card.is-dragging {
    transition: none;
    z-index: 1001 !important;
}

.card.fly-out {
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}




@media (max-width: 1024px) {
    .main--face {

        padding: 23px 60px;
    }
    .main--title {
        font-size: 48px;
    }

    .small--about {
        padding: 75px 60px;
    }

    .intro-section {
        padding: 45px 60px;
    }

    .intro-text {
        font-size: 22px;
    }

    .about--face {
        padding: 75px 60px 0 60px;
    }

    h2 {
        font-size: 38px;
    }

    .about--description p {
        font-size: 22px;
    }

    .small--about h3 {
        font-size: 22px;
    }

    .banner-content h2 {
        font-size: 22px;

    }

    .intro-section-3 {
        padding: 45px 60px;
    }

    .intro-text-3 {
        font-size: 22px;
    }

    .title--space h2 {
        font-size: 55px;
        padding-bottom: 0;
    }

    .footer__phone {
        font-size: 22px;
    }

    .footer__socials a {
        font-size: 22px;
    }

    .footer__col span {
        font-size: 22px;
    }

    .space {
        height: 0;
    }


}


@media (max-width: 768px) {

    .test--str {
        opacity: 0;

    }
    .logo {
        width: 33px;
    }
    .logo img {
        width: 100%;
    }

    .main-menu a {
        font-size: 18px;
    }

    .main-menu a:not(:last-child) {
        display: none; /* Скрываем их */
    }

    .main--title {
        font-size: 48px;
    }

    .about--face h2 {
        max-width: 250px;
        align-self: center;
        justify-self: center;
    }

    .main--face {
        grid-template-columns: 1fr;

        padding: 20px 35px;
    }

    .main-menu {
        display: none;
    }

    /* Показываем кнопку бургер */
    .burger-btn {
        display: block;
    }

    .intro-section {
        padding: 25px 45px;
    }

    .intro-text {
        font-size: 21px;
    }
    .intro-star {
        font-size: 36px;
    }

    h2 {
        font-size: 26px;
        padding-bottom: 31px;
    }

    .about--face {
        padding: 31px 20vw 0 20vw;
    }

    .about--face {
        padding-bottom: 31px;
    }

    .about--description p {
        font-size: 20px;
        max-width: 409px;
        padding: 16px 0 0 0;
    }

    .small--about h3 {
        font-size: 20px;
    }

    .about--point {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        padding-bottom: 60px;
    }

    .small--about {
        padding: 31px 20vw 31px 20vw;
    }

    .about--cards {
        flex-direction: column;
        align-items: center;
    }

    .card--about--1 {
        margin: 36px 0 0 0;
    }
    .card--about--2 {
        margin: 36px 0 0 0;
    }
    .card--about--3 {
        margin: 36px 0 0 0;
    }

    .banner-content {
        max-width: 300px;
    }

    .banner-content h2 {
        font-size: 20px;

    }

    .videos {
        background-color: #fff;
        color: #000;
        padding: 36px 44px 0 44px;
    }

    .videos--wrapper h2 {
        padding-bottom: 50px;
    }

    .video {
        margin-bottom: 30px;
    }

    .photos {
        padding: 84px 44px;
    }

    .title--space h2 {
        font-size: 28px;
    }

    .intro-section-3 {
        padding: 25px 45px;
    }

    .intro-text-3 {
        font-size: 21px;
    }

    .additional-text-1 {
        margin-top: 20px;
        margin-bottom: 25px;
        font-size: 18px;
        max-width: 308px;
    }

    .additional-text-2 {
        margin-bottom: 25px;
        font-size: 17px;
        max-width: 308px;
    }

    .additional-text-3 {
        margin-bottom: 25px;
        font-size: 16px;
        max-width: 170px
    }

    .additional-text-4 {
        font-size: 15px;
        max-width: 200px;
    }

    .footer__phone {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .footer__socials a {
        font-size: 16px;
    }

    .footer__col span {
        font-size: 16px;
    }

    .footer-hover {
        padding-top: 55px;
    }
    .footer__contacts {
        height: 60%;
    }

    .swipe-section {
        height: 80vh;
    }
}

@media (max-width: 375px) {
    .main--face {
        grid-template-columns: 1fr;

        padding: 13px 20px;
    }

    .main--title {
        font-size: 48px;
    }

    .intro-section {
        padding: 20px;
    }

    .intro-text {
        font-size: 20px;
        text-align: left;
    }

    h2 {
        font-size: 25px;
        padding-bottom: 33px;
    }

    .about--face {
        padding: 29px 0 0 0;
    }

    .about--face {
        padding-bottom: 31px;
    }

    .about--description p {
        font-size: 20px;
        max-width: 260px;
        padding: 16px 0 0 0;
    }

    .about--point {
        padding-bottom: 35px;
    }

    .small--about {
        padding: 29px 0 0 0;
    }

    .small--about {
        padding-bottom: 31px;
    }


    .banner-content {
        max-width: 250px;
    }

    .banner-content h2 {
        font-size: 28px;

    }

    .intro-section-3 {
        padding: 20px;
    }

    .intro-text-3 {
        font-size: 20px;
        text-align: left;
    }

    .videos {
        background-color: #fff;
        color: #000;
        padding: 31px 20px 0 20px;
    }

    .videos--wrapper h2 {
        padding-bottom: 31px;
        font-size: 30px;
    }

    .video {
        margin-bottom: 23px;
    }

    .photos {
        padding: 32px 20px;
    }

    .title--space h2 {
        font-size: 30px;
    }

    .title--space {
        padding-left: 10px;
        padding-right: 10px;
    }

    .about--face h3 {
        padding: 0 20px 0 20px;
    }

    .additional-text-1 {
        margin-top: 60px;
        margin-bottom: 43px;
        font-size: 20px;
    }

    .additional-text-2 {
        margin-bottom: 43px;
        font-size: 20px;
    }

    .additional-text-3 {
        margin-bottom: 43px;
        font-size: 20px;
    }

    .additional-text-4 {
        font-size: 18px;
    }

    .footer-hover {
        padding-top: 30px;
    }
    .footer__phone {
        font-size: 14px;
        margin-bottom: 13px;
    }

    .footer__socials a {
        font-size: 14px;
    }

    .footer__col span {
        font-size: 14px;
        margin-top: 13px;
    }

    .footer__contacts {
        height: 50%;
        flex-direction: column;
        padding: 0 20px 90px 20px;
        align-items: flex-start;
    }

}


/* 1. Фон-подложка (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Полупрозрачный черный */
    backdrop-filter: blur(8px);      /* Тот самый блюр фона */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Класс для открытия окна */
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 2. Само окно */
.modal-window {
    background: #000; /* Черный фон как на макете */
    width: 100%;
    max-width: 400px; /* Ширина карточки */
    color: #fff;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Анимация появления */
    transform: translateY(20px);
    transition: transform 0.3s ease;

    padding: 30px;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

/* Картинка сверху */
.modal-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;

}

/* Контент внутри */
.modal-content {
    text-align: center;
}

/* Заголовок */
.modal-title {
    font-family: "Vetrino"; /* Шрифт с засечками */
    text-transform: uppercase;
    font-size: 20px;
    margin-top: 32px;
    padding: 0;
    text-align: center;
}

/* Поля ввода (Инпуты) */
.input-group {
    position: relative;
    margin-top: 20px;
    text-align: left;
}

.modal-form input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #444; /* Тусклая линия */
    padding: 10px 0;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: 'Roboto', sans-serif;
}

.modal-form input:focus {
    border-bottom-color: #fff;
}

/* Лейблы (подписи полей) */
.modal-form label {
    position: absolute;
    top: 10px;
    left: 0;
    color: #666;
    font-size: 14px;
    pointer-events: none;
    transition: 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

/* Анимация лейбла при вводе или фокусе */
.modal-form input:focus ~ label,
.modal-form input:not(:placeholder-shown) ~ label {
    top: -15px;
    font-size: 12px;
    color: #aaa;
}

/* Кнопка */
.modal-submit {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    padding: 15px 30px;
    margin-top: 40px;
    font-family: "Vetrino";
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%; /* Можно сделать на всю ширину или inline-block */
}

.modal-submit:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1001;

    /* Сбрасываем стили кнопки */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0; /* Убираем отступы, чтобы картинка встала ровно */

    /* Задаем размеры вашей иконки */
    width: 30px;  /* Можете поменять на свой размер */
    height: 30px;

    /* Сохраняем анимацию вращения */
    transition: transform 0.3s;
}

/* Растягиваем картинку на всю кнопку */
.modal-close img {
    width: 100%;
    height: 100%;
    display: block; /* Убираем лишние отступы снизу */
}

/* Эффект при наведении (вращение) */
.modal-close:hover {
    transform: rotate(90deg);
}


.justified-gallery {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос на новую строку */
    gap: 10px; /* Аккуратные отступы */
    width: 100%;
}

.justified-gallery img {
    /* 1. БАЗОВАЯ ВЫСОТА */
    height: 60vh; /* Высота строки = 35% от высоты экрана (примерно 300-400px) */

    /* 2. МАГИЯ РАСТЯГИВАНИЯ */
    flex-grow: 1; /* Заставляет фото растянуться, чтобы заполнить ряд до конца */

    /* 3. УМНАЯ ОБРЕЗКА */
    object-fit: cover; /* Обрезаем лишнее, чтобы сохранить пропорции */

    /* ВАЖНО: Смещаем фокус вверх!
       Так мы не обрежем головы, если фото будет подгоняться.
       20% значит "чуть выше центра". */
    object-position: center 20%;

    border-radius: 4px;

    /* Ограничение, чтобы узкие вертикальные фото не становились гигантскими на широких экранах */
    max-width: 100%;
    min-width: 200px;
}

/* --- АДАПТИВНОСТЬ --- */

/* На планшетах делаем строки поменьше */
@media (max-width: 1000px) {
    .justified-gallery img {
        height: 25vh;
    }
}

/* На телефонах - еще меньше, или вообще на всю ширину */
@media (max-width: 600px) {
    .justified-gallery img {
        height: auto; /* Отменяем высоту */
        width: 100%; /* На всю ширину */
        max-width: 100%;
        flex-grow: 0;
        object-fit: contain; /* Показываем фото целиком */
    }
}


/* --- СТИЛИ ЛАЙТБОКСА --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Почти черный фон */
    backdrop-filter: blur(5px);      /* Размытие фона */
    z-index: 9999; /* Поверх всего, даже меню */

    display: flex;
    justify-content: center;
    align-items: center;

    /* Скрыт по умолчанию */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Класс для открытия */
.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Контейнер картинки */
.lightbox-content {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Сама картинка внутри лайтбокса */
.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Картинка влезает целиком, не обрезается */
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* Кнопка закрытия (такая же, как везде) */
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    z-index: 10000;
    padding: 0;
}

.lightbox-close img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
}

.lightbox-close:hover img {
    transform: rotate(90deg);
}


.justified-gallery img {
    /* ... ваши старые стили ... */
    cursor: pointer; /* Показывает "палец" при наведении */
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Небольшой эффект при наведении */
.justified-gallery img:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}















