/* --- Основные настройки --- */
:root {
    --color-orange-start: #FBAF00;
    --color-orange-end: #F36F21;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #C4C4C4;
    --color-text-dark: #000000;
    --color-bg-dark: #000000;
    --color-bg-header: #f0f2f4;
    --color-bg-ovals: #FFFFFF;
    --font-main: 'Montserrat', sans-serif;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    /* Отступ для новой высоты шапки */
    padding-top: 64px; 
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Шапка сайта (Header) - ИСПРАВЛЕНИЯ --- */
.header {
    background-color: var(--color-bg-header);
    height: 64px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    /* ДОБАВЛЕНО: Улучшает рендеринг при скролле на мобильных */
    transform: translateZ(0);
}

.header-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px; /* Добавляем базовый отступ между элементами */
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.header-logo img {
    height: 30px; /* Было 48px */
    width: 30px;  /* Было 48px */
}

.header-logo span {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-dark);
}

.header-nav-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.navigation-oval {
    display: flex; /* Чтобы ссылки были в ряд */
    background-color: var(--color-bg-ovals);
    border-radius: 100px;
    padding: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    /* Ширина теперь будет автоматически подстраиваться под контент */
}

/* Это стиль для ссылок внутри овала */
.navigation-oval a {
    color: var(--color-text-dark);
    text-decoration: none;
    /* Строка text-transform удалена */
    font-size: 16px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.header-nav-wrapper a:hover {
    background-color: #f0f2f4;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 16px; /* Чуть больше воздуха между иконками */
    background-color: var(--color-bg-ovals);
    border-radius: 100px;
    padding: 10px 20px; /* Увеличены отступы, чтобы овал стал выше и шире */
}

.social-links a img {
    height: 28px; /* Увеличен размер самих иконок */
    width: 28px;
}

/* --- Кнопки --- */
.btn {
    border: none;
    border-radius: 100px;
    padding: 10px 28px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-primary);
    background: linear-gradient(90deg, var(--color-orange-start), var(--color-orange-end));
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* --- Первый блок (Hero) --- */
.main { background-color: var(--color-bg-dark); }
.hero { padding: 60px 0; }
.hero-container { display: flex; align-items: center; gap: 40px; }
.hero-image-block { flex-basis: 50%; }
.hero-image-block img { width: 100%; display: block; }
.hero-content-block { flex-basis: 50%; text-align: right; }
.hero-title { font-size: 56px; font-weight: 900; line-height: 1.2; text-transform: uppercase; margin: 0 0 10px 0; white-space: nowrap; }
.hero-title-accent-img { display: block; width: 420px; margin-top: 20px; margin-left: auto; }
.hero-subtitle { font-size: 24px; font-weight: 800; text-transform: uppercase; margin: 80px 0 30px; }
.hero-description { font-size: 16px; color: var(--color-text-secondary); line-height: 1.7; max-width: 480px; margin: 0 0 50px auto; }

/* Скрываем мобильные элементы на ПК */
.mobile-only { display: none; }

/* --- Блок "Обо мне" --- */
.about-section { padding: 100px 0; background-color: #FFFFFF; }
.about-wrapper { display: flex; align-items: center; gap: 80px; }
.about-content { flex: 1; }
.about-image { flex-shrink: 0; }
.about-image img { width: 400px; height: 520px; object-fit: cover; border-radius: 15px; }
.tag { display: inline-block; padding: 10px 24px; background: linear-gradient(90deg, var(--color-orange-start), var(--color-orange-end)); color: var(--color-text-primary); font-weight: 700; font-size: 14px; border-radius: 100px; margin-bottom: 30px; }
.about-title { font-size: 48px; font-weight: 800; text-transform: uppercase; margin: 0 0 20px 0; color: var(--color-text-dark); }
.about-description { font-size: 16px; line-height: 1.6; color: #555555; max-width: 500px; }
.about-subtitle { font-size: 24px; font-weight: 800; text-transform: uppercase; margin: 40px 0 15px 0; color: var(--color-text-dark); }
.about-titles-list p { margin: 4px 0; color: #555555; font-size: 16px; }
.about-experience { margin-top: 40px; }
.about-experience p { font-size: 18px; font-weight: 700; color: var(--color-text-dark); margin: 8px 0; }
.about-experience span { color: #555555; font-weight: 500; }

/* --- Блок "Ученики" --- */
.students-section { background-color: var(--color-bg-dark); padding: 100px 0 120px; }
.students-section .tag { display: block; width: fit-content; margin: 0 0 50px; }
.slider-wrapper { width: 100%; overflow-x: auto; padding-bottom: 20px; }
.slider { display: flex; width: max-content; gap: 30px; }
.slide { width: 640px; flex-shrink: 0; }
.slide iframe { width: 100%; height: 360px; border-radius: 15px; border: none; display: block; }
.slider-wrapper::-webkit-scrollbar { height: 8px; }
.slider-wrapper::-webkit-scrollbar-track { background: #2c2c2c; border-radius: 10px; }
.slider-wrapper::-webkit-scrollbar-thumb { background-color: var(--color-orange-start); border-radius: 10px; }

/* --- Блок "Цены" --- */
/* --- Секция "Цены" (с новым мобильным SVG) --- */
.pricing-section {
    background-color: #FFFFFF;
    padding: 120px 0;
    text-align: center;
}

.pricing-section .tag {
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 0 60px;
}

.pricing-wrapper {
    position: relative;
    max-width: 1017px;
    height: 160px;
    margin: 0 auto 60px;
}

.pricing-lines-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 109px;
    z-index: 1;
}

/* Скрываем мобильный SVG на ПК по умолчанию */
.mobile-svg {
    display: none;
}

.pricing-options {
    position: relative;
    z-index: 2;
    height: 100%;
}

.price-card {
    position: absolute;
    top: -15px;
    width: 220px;
    text-align: center;
}

.price-card:nth-child(1) { left: 0; transform: translateX(-50%); }
.price-card:nth-child(2) { left: 50%; transform: translateX(-50%); }
.price-card:nth-child(3) { left: 100%; transform: translateX(-50%); }

.price-card h4 {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin: 0 0 10px 0;
}

.price-card .price {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0;
}

/*
==========================================
--- МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) ---
==========================================
*/
@media (max-width: 768px) {

    /* --- Блок "Цены" на мобильных --- */
 .pricing-section .tag {
        margin: 0 0 40px;
    }

.pricing-wrapper {
    display: flex;
    align-items: center;
    height: auto;
    /* gap: -150px; <-- УДАЛИТЕ ЭТУ СТРОКУ */
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
    box-sizing: border-box;
}

.pricing-options {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    height: 535px;
    margin-left: -50px; /* <-- ДОБАВЬТЕ ЭТУ СТРОКУ. Она сдвинет текст влево. */
}


    
    /* 1. Увеличиваем SVG, чтобы он не был маленьким */
    .mobile-svg {
    display: block;
    position: static;
    flex-shrink: 0;
    width: 200px;  /* Было 130px */
    height: 565px; /* Было 370px */
}

    /* 3. Делаем цвет линии черным */
    .mobile-svg path {
        fill: var(--color-text-dark); /* Был #e0e0e0 */
    }

    /* Переключаем видимость SVG */
    .desktop-svg {
        display: none;
    }
    .price-card,
    .price-card:nth-child(1),
    .price-card:nth-child(2),
    .price-card:nth-child(3) {
        position: static;
        transform: none;
        left: auto;
        width: 100%;
        text-align: left;
    }
}
/*
==========================================
--- МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) ---
==========================================
/*
==========================================
--- МОБИЛЬНАЯ АДАПТАЦИЯ (до 768px) - ФИНАЛЬНАЯ ВЕРСИЯ ---
==========================================
*/
@media (max-width: 768px) {
    /* --- Шапка --- */
    .header-nav-wrapper { display: none; }
    .header-actions .btn { display: none; }
    .header-container { justify-content: space-between; }
    .social-links { padding: 8px 16px; }
    .social-links a img { height: 24px; width: 24px; }

    /* --- Первый блок --- */
    .hero-container { flex-direction: column; text-align: center; }
    .desktop-only { display: none; }
    .mobile-only { display: block; margin: 20px auto; }
    .hero-content-block { text-align: right; }
    .hero-title { white-space: nowrap; font-size: 32px; text-align: center; }
    .hero-title-accent-img { width: 100%; margin-left: auto; margin-right: auto; }
    .hero-subtitle { font-size: 18px; margin: 20px 0; }
    .hero-description { margin: 0 0 30px auto; }

    /* --- Блок "Обо мне" --- */
    .about-section .container .about-tag {
        display: block;
        width: -moz-fit-content;
        width: fit-content; /* 2. Ограничиваем ширину тега размером текста */
        margin-bottom: 30px;
    }
    .about-wrapper { flex-direction: column; gap: 30px; }
    .about-image { order: 1; width: 100%; height: auto; }
    .about-content { order: 2; text-align: left; }
    .about-title { font-size: 32px; }
    .about-subtitle { font-size: 20px; }

    /* --- Блок "Ученики" --- */
    .students-section .tag { margin: 0 0 40px; }
    .slider-wrapper {
        overflow: visible; /* Отключаем скролл */
        margin: 0;
        padding: 0;
    }
    .slider {
        flex-direction: column; /* 1. Видео теперь идут вниз */
        align-items: stretch;    /* Растягиваем их по ширине */
        gap: 20px;
        padding: 0;
    }
    .slide {
        width: 100%; /* Слайд занимает всю ширину контейнера */
    }
    .slide iframe { height: 200px; }
    .about-image img {
        width: 100%;
        height: auto;
    }


}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--color-text-dark);
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        border-radius: 10px;
    }
}

/* === PERF (без изменения внешнего вида) === */
.about-section,
.students-section,
.pricing-section,
.hero,
header,
footer { content-visibility: auto; contain-intrinsic-size: 1px 1000px; }

svg { max-width: 100%; height: auto; shape-rendering: geometricPrecision; text-rendering: optimizeLegibility; }

.tag,
.about-title,
.about-subtitle,
.price,
.price-desc { overflow-wrap: anywhere; }
/* === /PERF === */
