@import url('https://fonts.googleapis.com/css2?family=TikTok+Sans:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@300;400;500&family=Raleway:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ronnia+Condensed:wght@400;700&display=swap'); /* Fallback if needed */

@font-face {
    font-family: 'Breamcatcher';
    src: url('/font/font.ttf') format('truetype'); /* Note: Download and host locally for production; this is demo. Replace with your hosted URL. */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Robotoflex';
    src: url('/font/font2.ttf') format('truetype'); /* Note: Download and host locally for production; this is demo. Replace with your hosted URL. */
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body {
    font-family: 'Robotoflex', serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
h1, h2, h3 {
    font-family: 'Breamcatcher', serif;
    color: #fff;
}
a{
    text-decoration:none;
}
.slogan {
    font-family: 'Breamcatcher', serif;
}
.section h2 {
    font-family: 'Breamcatcher', serif;
    text-align: center;
    color: #000;
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
}
.partners-marquee h2 {
    font-family: 'Breamcatcher', serif;
    text-align: center;
    color: #000;
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
}
.partners-marquee h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #F396A9, #FF72B7);
    margin: 10px auto;
    border-radius: 2px;
}
.highlight {
    font-weight: 700;
    color: #ED65ED;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 0 0;  /* <- Убрал padding-left, оставил только справа */
    min-height: 60px;
}
.logo {
    font-family: 'Breamcatcher', serif;
    font-size: 1.8em;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(to right, #ED65ED, #F1C8C2, #80CDF9);
    -webkit-background-clip: text;
    color: transparent;
    background-clip: text;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1; /* Добавлено: растягивает список по ширине контейнера */
    white-space: nowrap; /* Добавлено: предотвращает перенос строк */
}
.nav-list li {
    margin: 0 20px;
}
.nav-list a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 5px;
    white-space: nowrap; /* Добавлено: текст ссылки в одну строчку */
}
.nav-list a:hover {
    transform: translateY(-2px);
    color: #ED65ED;  /* <- Оставляем только это и transform */
}
.nav-contact {
    background: linear-gradient(135deg, #ED65ED, #F396A9);
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95em;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;  /* <- Добавь эту строку */
}
.nav-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 101, 237, 0.4);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #000;
    font-size: 1.5em;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.menu-toggle:hover {
    color: #ED65ED;
}
.header {
    background: linear-gradient(135deg, #F396A9, #ED65ED, #FF72B7);
    color: #fff;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
    margin-top: 60px; /* Для fixed nav */
}
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}
.header h1 {
    margin: 0;
    font-size: 3em;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}
.header h1 span.highlight {
    color: #80CDF9;
}
.slogan {
    font-size: 1.8em;
    font-weight: 300;
    margin: 15px 0;
    position: relative;
    z-index: 1;
    color: #fff;
}
.slogan span.highlight {
    color: #CAD1FD;
    font-weight: 500;
}
.subheader {
    background-color: #F1C8C2;
    text-align: center;
    padding: 20px;
    font-size: 1.4em;
    font-weight: 400;
    color: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.marquee {
    background-color: #CAD1FD;
    padding: 15px 0;
    text-align: center;
    font-size: 1.3em;
    color: #000;
    font-weight: 300;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-top: 60px;
}
.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
    will-change: transform;
}
.marquee-content span.highlight {
    color: #F396A9;
    font-weight: 500;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.tabs {
    display: flex;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.tab-button {
    background: none;
    border: none;
    padding: 15px 30px;
    margin: 0 15px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 400;
    color: #000;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.tab-button:hover:not(:active), .tab-button.active {
    background-color: #FF72B7;
    color: #fff;
    border-color: #FF72B7;
    transform: translateY(-2px);
}
.tab-content {
    display: none;
    padding: 40px 20px;
    text-align: center;
    color: #000;
}
.tab-content.active {
    display: block;
}
.photo-gallery {
    display: flex;
    flex-wrap: wrap; /* Wrap для второй линии на ПК */
    justify-content: center;
    gap: 10px; /* Небольшой отступ между фото */
    padding: 20px;
    margin-bottom: 30px;
    max-width: 1400px; /* Для 5 фото по 250px + gap */
    margin: 0 auto 30px;
}
.photo-gallery img {
    width: 250px;
    height: 333px; /* 3:4 соотношение */
    object-fit: cover; /* Заполняет без искажений */
    border: none; /* Без рамок */
    border-radius: 0; /* Без скруглений фото */
    transition: transform 0.3s ease; /* Легкий hover */
    cursor: pointer; /* Для клика (модал) */
    display: block;
    flex: 0 0 250px; /* Фикс ширины, без сжатия */
}
.photo-gallery img:hover {
    transform: scale(1.02);
}
/* Чередование по расположению */
.photo-gallery img:nth-child(odd) {
    margin-top: -25px;
}
.photo-gallery img:nth-child(even) {
    margin-top: 25px;
}
/* Дополнительные фото скрыты изначально на ПК */
.extra-photos {
    display: none; /* Скрыты до клика на ПК */
    margin-top: 20px;
    gap: 10px;
    flex-wrap: wrap; /* Обертывание во вторую линию */
    justify-content: center;
}
.photo-gallery.expanded .extra-photos {
    display: flex; /* Показ при expanded, wrap для второй линии */
}
.more-btn {
    background: linear-gradient(135deg, #ED65ED, #F396A9);
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto 20px;
    font-family: 'Breamcatcher', sans-serif;
}
.more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 101, 237, 0.4);
}
/* Стрелки (скрыты на ПК) */
.nav-arrow {
    display: none; /* Скрыты на ПК */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}
.nav-arrow:hover {
    background: rgba(255, 255, 255, 1);
}
.nav-arrow.left {
    left: 10px;
}
.nav-arrow.right {
    right: 10px;
}

/* Мобильные: все 10 фото visible, свайп, кнопка hidden */
@media (max-width: 768px) {
    .photo-gallery {
        flex-wrap: nowrap; /* No wrap, горизонтальный свайп */
        overflow-x: auto; /* Свайп горизонтальный */
        justify-content: flex-start; /* Для свайпа */
        gap: 5px;
        padding: 10px;
        -webkit-overflow-scrolling: touch; /* Плавный свайп на iOS */
    }
    .photo-gallery img {
        width: 100%; /* 1 фото на 100% ширины */
        max-width: 300px; /* Ограничение */
        height: 400px; /* 3:4, полная высота */
        margin-top: 0; /* Без offset на мобилках */
        flex-shrink: 0; /* Не сжимается при свайпе, нормальная ширина */
        display: block !important; /* Все img visible */
    }
    .extra-photos {
        display: contents !important; /* "Распаковка" — img из extra идут в основной flex .photo-gallery */
    }
    .extra-photos img {
        display: block !important; /* Explicit для экстра */
    }
    .more-btn {
        display: none; /* Кнопка скрыта на мобильных */
    }
    .nav-arrow {
        display: block; /* Стрелки visible */
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}
@media (max-width: 480px) {
    .photo-gallery img { height: 300px; }
}
.cta-button {
    background: linear-gradient(135deg, #ED65ED, #F396A9);
    color: #fff;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(237, 101, 237, 0.3);
    font-weight: 500;
}
.cta-button:hover:not(:active) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(237, 101, 237, 0.4);
}
.section {
    padding-top: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 span.highlight {
    color: #ED65ED;
    font-weight: 700;
}
.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #F396A9, #FF72B7);
    margin: 10px auto;
    border-radius: 2px;
}
#services .services-structure {
    display: flex; /* Fallback на flex для лучшей совместимости */
    flex-direction: row; /* Слева школа, справа агентство */
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between; /* Равномерно распределяет блоки */
}
#services .services-structure > * { /* Для дочерних блоков */
    flex: 1; /* Каждый блок занимает равную ширину */
}
.service-block.school {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    padding-top:0;
    border-radius: 20px;
    gap: 20px;
}
.school-title {
    font-family: 'Breamcatcher', serif;
    color: #000;
    font-size: 2em;
    margin: 0;
}
.service-block.school p {
    color: #000;
    line-height: 1.6;
    font-size: 1em;
    max-width: 80%;
    margin: 0;
}
.service-block.agency {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 627.781px; /* Фиксированная высота для фона */
    padding: 40px 20px; /* Добавлено: отступы как у школы */
}
.agency-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover без потери качества */
    object-position: center; /* Центрирование */
    border-radius: 20px;
    z-index: 1;
    filter: none; /* Явно отключаем фильтры для чистоты */
    image-rendering: auto; /* Оптимальный рендеринг для фото */
}
.agency-bg-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../service/agency.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    z-index: 1;
}
.agency-mini-blocks .reviews-link {
    height: 60px; /* Для занятия всего пространства */
    display: flex;
    border-radius: 15px;
    align-items: center;
    justify-content: center;
    font-size:1.4em;
}

.cta-button.agency-link {
    display: block;
    width: 100%;
    height: 100%;
    font-size: inherit; /* Соответствует размеру шрифта .cta-button */
    padding: 0; /* Убрать padding, чтобы заполнить див */
    line-height: inherit; /* Для вертикального центрирования */
    text-align: center;
}
.agency-mini-blocks {
    position: absolute;
    bottom: 40px; /* Добавлено: учитываем padding снизу */
    left: 20px; /* Левый угол */
    right: 20px; /* Чтобы кнопка не выходила за край */
    display: flex;
    justify-content: flex-start; /* Заголовок слева, кнопка справа от него */
    align-items: center;
    gap: 20px; /* Расстояние между заголовком и кнопкой */
    z-index: 2;
}
.mini-block {
    background: rgba(255, 255, 255, 0.9); /* Полупрозрачный белый для читаемости */
    border-radius: 15px;
    padding: 15px;
    flex: 1;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.title-block {
    flex: 2; /* Заголовок шире, слева */
}
.button-block {
    flex: 1;
    max-width: 200px;
    background: linear-gradient(135deg, #ED65ED, #F396A9); /* Градиент как у .cta-button */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.3s ease;
}
.button-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 101, 237, 0.4); /* Hover как у кнопки */
}
.agency-link {
    background: none; /* Убираем фон у самой ссылки */
    border: none;
    color: #fff; /* Белый текст */
    font-weight: 500;
    padding: 10px 20px; /* Меньше padding, так как блок уже с padding */
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    width: auto;
    font-size: 0.9em;
}
.agency-link:hover {
    background: rgba(255, 255, 255, 0.2); /* Легкий белый оверлей на hover */
    transform: translateY(-1px);
}
.agency-title {
    font-family: 'Breamcatcher', serif;
    color: #000;
    font-size: 1.5em;
    margin: 0;
}

.service-block.agency button {
    width: 40%; /* Кнопка на всю ширину мини-блока */
    font-size: 1.1em; /* Чуть меньше для компактности */
}
.intro-block {
    position: relative;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    z-index: 2;
    overflow: visible; /* Чтобы лепестки выходили за края */
    text-align: center; /* Центрирование всего текста */
}
.intro-content {
    position: relative;
    z-index: 3;
}
.intro-block h3 {
    text-align: center; /* Центрирование заголовков */
    margin-bottom: 15px;
}
.intro-block p {
    text-align: center; /* Центрирование текста */
    line-height: 1.6;
    font-size: 1em;
    margin: 0 auto;
    max-width: 90%;
}
.petal {
    position: absolute;
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 15px;
    opacity: 1; /* Непрозрачные */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1; /* За блоком */
}

/* Левые лепестки: ближе к блоку, поднятые вверх */
.petal-left1 { top: 0%; left: -60px; transform: rotate(-30deg); }
.petal-left2 { top: 20%; left: -70px; transform: rotate(-35deg); z-index: 0; } /* Перекрытие */
.petal-left3 { top: 40%; left: -65px; transform: rotate(-40deg); }
.petal-left4 { top: 60%; left: -75px; transform: rotate(-45deg); z-index: 0; }
.petal-left5 { top: 80%; left: -60px; transform: rotate(-35deg); }

/* Правые лепестки: ближе к блоку, поднятые вверх */
.petal-right1 { top: 0%; right: -60px; transform: rotate(30deg); }
.petal-right2 { top: 20%; right: -70px; transform: rotate(35deg); z-index: 0; }
.petal-right3 { top: 40%; right: -65px; transform: rotate(40deg); }
.petal-right4 { top: 60%; right: -75px; transform: rotate(45deg); z-index: 0; }
.petal-right5 { top: 80%; right: -60px; transform: rotate(35deg); }

/* Адаптив для лепестков */
@media (max-width: 768px) {
    .agency-mini-blocks .reviews-link{ height:30px; }
    .petal { width: 80px; height: 120px; left: -50px; right: -50px; } /* Ближе на планшетах */
    .petal-left4, .petal-left5, .petal-right4, .petal-right5 { display: none; } /* Скрыть 2 нижних */
    .service-block.agency {
    padding: 30px 15px; /* Уменьшенный padding на мобилке, как у школы */
    height: auto;
    min-height: 300px;
    }
    .agency-bg-photo {
        height: 250px;
        border-radius: 15px; /* Закругления для мобильки */
    }
    .agency-mini-blocks {
        flex-direction: row; /* На мобилке row, но с меньшим gap (заголовок слева, кнопка справа) */
        gap: 10px;
        bottom: 30px; /* Учитываем padding снизу */
        left: 15px;
        right: 15px;
        justify-content: flex-start; /* Левый угол */
    }
    .title-block {
        flex: 1; /* На мобилке заголовок уже */
    }
    .button-block {
        flex: 1;
    }
    #services .services-structure {
        flex-direction: column; /* Вертикальный стек на мобильных */
    }
    .square-photo {
        width: 300px; /* Увеличено в 2 раза от старого мобильного */
        height: 300px;
    }
    .service-block.agency {
    height: auto; /* Авто-высота на мобилке */
    min-height: 300px; /* Минимум для фона */
    }
    .agency-bg-photo {
        height: 250px; /* Фикс для фона на мобилке */
    }
    .agency-mini-blocks {
        flex-direction: column; /* Мини-блоки вертикально на мобилке */
        gap: 10px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    .button-block {
    max-width: none; /* На мобилке кнопка на всю ширину */
    padding: 12px;
    }
    .agency-link {
        font-size: 1em; /* Немного больше на мобилке */
    }
}
@media (max-width: 480px) {
    .petal { display: none; } /* Скрыть все на маленьких */
}
.square-photo {
    width: 400px; /* Увеличено в 2 раза */
    height: 400px; /* Увеличено в 2 раза */
    object-fit: cover;
    border-radius: 15px; /* Закругленные края */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.intro-block h3 {
    color: #FF72B7;
    font-size: 1.5em;
    margin-bottom: 15px;
}
.intro-block p {
    color: #000;
    line-height: 1.6;
    font-size: 1em;
}
.about-structure {
    display: grid;
    grid-template-columns: 1fr; /* Вертикальный стек: школа сверху, агентство снизу */
    gap: 40px;
    width: 100%; /* Full-width как intro-block */
    max-width: 1200px; /* Ограничение ширины */
    margin: 0 auto;
}
.about-block {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Ключ: подстраивает фото под высоту text-side */
    width: 100%; /* Full-width блока */
    position: relative;
}
.text-side {
    flex: 1;
    padding: 20px;
    border-radius: 20px 0 0 20px; /* Скругления слева для школы */
    text-align: center;
    /* text-side определяет высоту: естественная от контента, без stretch */
}
.text-side p{
    color: #000000;
}
.photo-side {
    color: black;
    flex: 1;
    position: relative;
    z-index: 1;
    overflow: hidden; /* Чтобы скругления работали */
    height:700px;
}
.photo-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mini-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#team {
    width: 100%;
    max-width: none;           /* убираем ограничение по ширине */
    padding: 60px 0;
    background: #fff;
}
.team-grid {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 40px 40px 50px 40px;     /* отступы по бокам */
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;                      /* растягиваем на всю ширину */
    box-sizing: border-box;
    cursor: grab;
    user-select: none;
}
.team-grid.dragging {
    cursor: grabbing;
    scroll-behavior: auto;       /* отключаем плавность во время драга */
}
.team-grid::-webkit-scrollbar {
    display: none;
}
.team-member {
    flex: 0 0 320px;                  /* фиксированная ширина карточки */
    background: #fff;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09);
    transition: all 0.3s ease;
    color: #000;
    text-align: left;                 /* текст по левому краю */
    min-height: 380px;                /* минимальная высота для ровности */
}
.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.13);
}
.team-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background-size: cover;
    background-position: center;
    border: 4px solid #f8f8f8;
}
.team-member h4 {
    font-family: 'Breamcatcher', serif;
    font-size: 1.45em;
    margin: 0 0 12px 0;
    color: #000;
    text-align: left;
}
.team-member p {
    font-size: 1em;
    line-height: 1.65;
    color: #444;
    margin: 0;
    text-align: left;
    word-wrap: break-word;           /* перенос длинных слов */
    overflow-wrap: break-word;
    hyphens: auto;                   /* перенос по слогам (если нужно) */
}
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    justify-content: center;
}
.program-card {
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    padding: 20px;
    height: auto; /* Добавлено: авто-высота, подстраивается под фото + текст */
}
.program-card .photo-grid {
    flex-shrink: 0; /* Фото не сжимается, текст растягивается */
}
.program-card h3, .program-card p {
    flex-grow: 1; /* Текст занимает оставшееся место ниже фото */
    margin-top: 10px; /* Добавлено: отступ сверху от фото */
}
.program-card:hover {
    transform: translateY(-5px);
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    height: 250px;
    margin-bottom: 15px;
}
.photo-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px; /* Лёгкие скругления */
}
/* Чередование margin-top для фото в каждой карточке */
.program-card .photo-grid img:nth-child(1) {
    margin-top: -10px; /* Первая +15px */
}
.program-card .photo-grid img:nth-child(2) {
    margin-top: 10px; /* Вторая -15px */
}
.program-card .photo-grid img:nth-child(3) {
    margin-top: -10px; /* Третья +15px (по очереди) */
}
.program-card.pink {
    background: linear-gradient(135deg, #FF72B7, #F396A9);
}
.program-card.blue {
    background: linear-gradient(135deg, #80CDF9, #CAD1FD);
}
.program-card h3 span.highlight {
    color: #CAD1FD;
}

/* Адаптив: 2 колонки на всех, но фото/текст меньше на мобильных, без съезда */
@media (max-width: 768px) {
    .program-grid {
        grid-template-columns: repeat(1, 1fr); /* 2 колонки на мобильных */
        gap: 20px; /* Уменьшенный gap, но с padding для отступов */
        justify-content: center; /* Центрирование */
        width: 100%; /* Full-width без съезда */
    }
    .program-card {
        padding: 15px; /* Меньше padding для читаемости */
        padding-top: 8px;
        padding-bottom: 8px; /* Отступы сверху/снизу */
    }
    .photo-grid {
    gap: 3px;
    margin-bottom: 15px; /* Добавлено: отступ снизу, чтобы фото не заходили на текст */
    height:350px;
    }
    .photo-grid img {
    height: 350px;
    }
    .photo-grid img {
        border-radius: 3px;
    }
    .program-card h3 {
        font-size: 1.1em; /* Меньше заголовок */
    }
    .program-card p {
        font-size: 0.85em; /* Меньше текст для читаемости */
    }
    .program-card .photo-grid img:nth-child(1) {
    margin-top: 5px; /* Меньше на мобилке */
    }
    .program-card .photo-grid img:nth-child(2) {
        margin-top: -5px;
    }
    .program-card .photo-grid img:nth-child(3) {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .program-grid {
        grid-template-columns: repeat(1, 1fr); /* 2 колонки на 480px, меньший масштаб */
        gap: 15px;
        justify-content: center;
    }
    .program-card {
        padding: 12px; /* Ещё меньше padding */
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 0.9em; /* Общий меньший масштаб */
    }
    .photo-grid {
        height: 200px; /* Меньше на 480px */
        gap: 2px;
    }
    .program-card h3 { font-size: 1em; }
    .program-card p { 
        font-size: 0.8em; }
    .photo-grid img {
    height: 200px;
    }
}

@media (max-width: 360px) {
    .program-grid {
        grid-template-columns: 1fr; /* 1 колонка только ниже 360px */
        gap: 10px;
    }
}
.program-intro {
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 40px;
    color: #000; /* Текст чёрный для контраста */
}
.program-intro p {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Адаптив: фон сохраняется на мобильных */
@media (max-width: 768px) {
    .program-intro {
        padding: 20px;
        margin-bottom: 30px;
    }
    .program-intro p {
        font-size: 1em;
    }
}
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    justify-content: center;
}
.review {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}
.review:hover {
    transform: translateY(-3px);
}
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover; /* Чтобы аватар заполнял круг без искажений */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Опционально: легкая тень для реализма */
}
.review p {
    font-style: italic;
    margin: 10px 0;
    color: #333;
}
.review small {
    color: #666;
}
.reviews-button-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}
.reviews-link {
    display: inline-block;
    background: linear-gradient(135deg, #ED65ED, #F396A9); /* Градиент как у cta-button */
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(237, 101, 237, 0.3);
}
.reviews-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(237, 101, 237, 0.4);
    color: #fff; /* Остаётся белым */
}
.model-card {
    position: relative;
    width: 100%; /* Полная ширина карточки */
    height: 400px; /* Фикс высота, фото заполнит */
    background-size: cover; /* Фото на весь фон, обрезка по краям без искажений */
    background-position: center; /* Центр фото */
    background-repeat: no-repeat; /* Без повтора */
    border-radius: 15px;
    overflow: hidden; /* Обрезает фото по краям карточки */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}
.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 20px;
    text-align: center;
    z-index: 2;
    opacity: 1 !important; /* Всегда видимый */
    visibility: visible !important; /* Немедленный показ */
    display: block !important; /* Block по умолчанию */
    animation: fadeInOverlay 0.5s ease-in; /* Анимация на load для гарантии */
}
@keyframes fadeInOverlay {
    from { opacity: 0; visibility: hidden; }
    to { opacity: 1; visibility: visible; }
}
.card-overlay h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.book-button {
    background: linear-gradient(135deg, #F396A9, #ED65ED);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px;
}
.book-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 150, 169, 0.4);
}
.model-card:not(.visible) .card-overlay { display: none; } /* Скрыть overlay в скрытых карточках */
.model-card.visible .card-overlay { display: block; opacity: 1; } /* Показать в видимых */
/* Адаптив: 3 колонки на мобильных, фото 100% visible */
@media (max-width: 768px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 в ряд на мобильных */
        gap: 10px; /* Меньший gap */
    }
    .models-grid .single-card {
    width: 300px; /* Меньше на мобильке, 2 в ряд */
    height: 300px;
    margin: 0 auto;
    }
    .model-card {
        height: 250px; /* Меньшая высота для компактности */
    }
    .model-card:first-child:last-child {
        width: 300px; /* Фикс для одиночной на мобильке */
        height: 300px;
        margin: 0 auto;
    }
    .card-overlay {
        padding: 15px;
    }
    .card-overlay h4 {
        font-size: 1.3em;
    }
    .book-button {
        padding: 8px 16px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .models-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на очень маленьких */
        gap: 8px;
    }
    .model-card {
        height: 250px;
    }
    .card-overlay h4 {
        font-size: 1.1em;
    }
}
.book-button {
    background: linear-gradient(135deg, #F396A9, #ED65ED);
    color: #fff;
    border: none;
    padding: 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}
.book-button:hover:not(:active) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 150, 169, 0.4);
}
.partners-marquee {
    padding: 20px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    color: #000;
}
.partners-content {
    display: inline-block;
    animation: partners-marquee 30s linear infinite;
    will-change: transform;
}
.partners-content .partners-grid {
    display: inline-flex;
    gap: 50px;
    height: 60px;
    align-items: center;
}
@keyframes partners-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.partner-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: bold;
    font-family: 'Breamcatcher', sans-serif;
    color: #000;
    
    flex-shrink: 0;
    overflow: hidden;           /* ← важно */
    text-overflow: ellipsis;    /* ← обрезает длинный текст */
    white-space: nowrap;        /* ← не переносит на новую строку */
}
.footer {
    background-color: #CAD1FD;
    color: #000;
    margin-top:20px;
    padding: 60px 20px 40px;
    text-align: left;
    font-size: 0.95em;
    position: relative;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 5px;
}

.footer-column {
    flex: 1;
    min-width: 220px;
}

.footer-menu h4,
.footer-info h4,
.footer-questions h4 {
    font-family: 'Breamcatcher', serif;
    font-size: 1.6em;
    margin-bottom: 20px;
    color: #000;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a,
.footer-info a,
.footer-questions a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover,
.footer-info a:hover,
.footer-questions a:hover {
    color: #ED65ED;
}

.footer-info p,
.footer-questions p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* Стили для кнопки в третьей колонке */
.footer-questions .cta-button.vk-link {
    display: inline-block;
    margin-top: 15px;
    background: linear-gradient(135deg, #0077FF, #4C9EFF); /* синий VK-стиль */
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s;
}

.footer-questions .cta-button.vk-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 119, 255, 0.4);
}

/* Адаптив — на мобильных в одну колонку */
@media (max-width: 992px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-menu ul {
        padding: 0;
    }
    
    .footer-questions .cta-button {
        margin: 20px auto 0;
    }
}
/* Responsive для ПК: растяжка навбара */
@media (min-width: 769px) {
    .nav-list {
        justify-content: space-around; /* Добавлено: равномерно растягивает ссылки по ширине */
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .photo-gallery { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .photo-gallery img { height: 200px; }
    .team-grid, .reviews-grid, .models-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .reviews-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-container {
        justify-content: space-between;
    }
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        animation: slideDown 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .nav-list.active {
        display: flex;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .nav-list li {
        margin: 0;
        width: 100%;
    }
    .nav-list a {
        border-radius: 0;
        text-align: center;
        padding: 20px;
        color: #000;
    }
    .nav-contact {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .marquee { margin-top: 60px; }
    .header { padding: 40px 15px 30px; margin-top: 60px; }
    .header h1 { font-size: 2em; color: #fff; }
    .slogan { font-size: 1.4em; color: #fff; }
    .subheader { font-size: 1.2em; padding: 15px; color: #000; }
    .marquee { font-size: 1.1em; color: #000; }
    .marquee-content { animation-duration: 30s; }
    .tabs { flex-direction: column; align-items: center; padding: 15px; }
    .tab-button { margin: 5px 0; padding: 12px 20px; font-size: 1em; color: #000; font-family: 'Breamcatcher', sans-serif; }
    .tab-button.active { color: #fff; }
    .tab-content { padding: 30px 15px; color: #000; }
    .photo-gallery { grid-template-columns: 1fr; }
    .photo-gallery img { height: 100%; max-width: 100%; }
    .section h2 { font-size: 2em; color: #000; }
    .section {padding-top:20px;}
    .about-structure { grid-template-columns: 1fr; gap: 20px; }
    .team-grid, .reviews-grid, .models-grid { grid-template-columns: 1fr; gap: 20px; }
    .reviews-grid { grid-template-columns: 1fr; }
    .program-list { gap: 10px; }
    .partners-content { animation-duration: 35s; }
    .partners-content .partners-grid { gap: 30px; }
    .partner-logo { height: 50px; font-size: 0.9em; color: #000; }
    .cta-button, .book-button { padding: 12px 20px; font-size: 1em; color: #fff; }
    .footer { padding: 30px 15px; font-size: 0.9em; color: #000; }
    /* Отключаем hover на touch */
    @media (hover: none) and (pointer: coarse) {
        .nav-list a:hover, .tab-button:hover, .photo-gallery img:hover, .cta-button:hover, .about-block:hover, .team-member:hover, .review:hover, .model-card:hover, .program-list li:hover, .book-button:hover, .menu-toggle:hover { transform: none; }
    }
}

@media (max-width: 480px) {
    .header h1 { font-size: 1.6em; color: #fff; }
    .slogan { font-size: 1.2em; color: #fff; }
    .section h2 { font-size: 1.8em; color: #000; }
    .partners-content .partners-grid { gap: 20px; }
    .partner-logo { height: 40px; color: #000; }
    .nav-list a { padding: 15px; color: #000; }
}
.bubbles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Чтобы фон был за контентом */
  background: linear-gradient(to bottom, #fff5f8, #ffe4ed); /* Нежно-розовый градиент */
  overflow: hidden;
}

/* Общие стили пузырей */
.bubble {
  position: absolute;
  bottom: -100px;
  background-color: rgba(255, 182, 193, 0.4); /* Полупрозрачный розовый */
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
  animation: rise 15s infinite linear;
}

/* Анимация подъема */
@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) scale(1.2);
    opacity: 0;
  }
}

/* Разные размеры и позиции для создания хаотичности */
.bubble:nth-child(1) { left: 5%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 18s; }
.bubble:nth-child(2) { left: 15%; width: 40px; height: 40px; animation-delay: 2s; animation-duration: 12s; }
.bubble:nth-child(3) { left: 30%; width: 60px; height: 60px; animation-delay: 4s; }
.bubble:nth-child(4) { left: 50%; width: 100px; height: 100px; animation-delay: 0s; animation-duration: 22s; }
.bubble:nth-child(5) { left: 70%; width: 50px; height: 50px; animation-delay: 6s; }
.bubble:nth-child(6) { left: 85%; width: 90px; height: 90px; animation-delay: 3s; animation-duration: 15s; }
.bubble:nth-child(7) { left: 95%; width: 30px; height: 30px; animation-delay: 1s; }
.bubble:nth-child(8) { left: 40%; width: 70px; height: 70px; animation-delay: 8s; }
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Затемнение */
    animation: fadeIn 0.3s ease;
}
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80%;
    object-fit: contain; /* Сохраняет пропорции, без обрезки */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    transition: 0.3s;
}
.close:hover {
    color: #ED65ED; /* Розовый hover */
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.5); }
    to { transform: translate(-50%, -50%) scale(1); }
}

/* Клик на img для открытия */
.photo-gallery img {
    cursor: pointer; /* Указатель на фото */
}
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, max-content)); /* max-content — фиксированная ширина, не 1fr */
    gap: 20px;
    justify-content: center; /* Центрирует, если ряд не полный */
}
.models-grid .single-card { /* Для одиночной видимой карточки */
    width: 400px; /* Фиксированная ширина */
    height: 400px; /* Фиксированная высота */
    margin: 0 auto; /* Центр */
    grid-column: span 1; /* Не растягивается на 1fr */
}
.models-grid .single-card .card-overlay { /* Overlay всегда видимый */
    display: block !important;
    opacity: 1;
}
.portfolio-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.model-detail h1, .model-detail h2 {
    color: #000;
    font-family: 'Breamcatcher', serif;
}
.model-detail h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}
.model-detail h2 {
    font-size: 1.8em;
    margin-top: 40px;
}
@media (max-width: 768px) {
    .model-detail {
        padding: 20px 15px;
        margin: 20px auto;
    }
    .portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .portfolio-thumb {
        height: 150px;
    }
}
.developer-link {
  right: 10px;  /* Отступ от правого края */
  bottom: 5px;  /* Отступ от самого низа */
}

.developer-link a {
  font-size: 9px;            /* Очень маленький размер */
  color: rgba(0, 0, 0, 0.3); /* Полупрозрачный цвет (подстройте под фон) */
  text-decoration: none;     /* Убирает подчеркивание */
  text-transform: lowercase; /* Все буквы маленькие */
  transition: opacity 0.3s;
}

.developer-link a:hover {
  opacity: 1;                /* Ссылка становится четче при наведении */
  text-decoration: underline;
}