/* =========================================
   1. БАЗОВЫЕ НАСТРОЙКИ (ИСПРАВЛЕННЫЕ ШРИФТЫ)
   ========================================= */
:root {
    --primary-color: #4CC9F0;
    --accent-color: #F72585;
    --success-color: #489F26;
    --sun-color: #FFD60A;
    --text-dark: #3A0CA3;
    --text-light: #ffffff;
    
    /* ШРИФТЫ: Важное исправление для мобильных */
    /* Убрали cursive, добавили надежные альтернативы */
    --font-heading: 'Fredoka One', 'Nunito', sans-serif; 
    --font-body: 'Nunito', sans-serif;
    
    --shadow-soft: 0 10px 25px rgba(58, 12, 163, 0.15);
    --radius-card: 25px;
    --radius-btn: 50px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #E0F7FA;
    line-height: 1.6;
    overflow-x: hidden;
    /* Запрет на авто-изменение размера текста при повороте экрана */
    -webkit-text-size-adjust: 100%; 
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 1rem;
    /* ПРИНУДИТЕЛЬНО ОТКЛЮЧАЕМ КУРСИВ */
    font-style: normal !important; 
    font-weight: 400; /* Fredoka жирный по умолчанию */
}

a { text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. НАВИГАЦИЯ
   ========================================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 5%;
    background: rgba(50, 50, 50, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo { 
    font-family: var(--font-heading); font-size: 1.5rem; 
    color: #fff; text-shadow: 1px 1px 0 #000; 
    font-style: normal !important;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: #fff; font-weight: 700; font-size: 0.95rem;
    transition: color 0.3s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.nav-links a:hover { color: var(--sun-color); }

/* Кнопки */
.btn-main, .btn-secondary, .btn-submit, .btn-ai, .btn-small {
    display: inline-block; padding: 15px 35px;
    border-radius: var(--radius-btn);
    font-weight: 700; font-family: var(--font-heading);
    text-transform: uppercase; cursor: pointer; border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1.1rem;
    font-style: normal !important;
}
.btn-main, .btn-submit {
    background-color: var(--accent-color); color: white;
    box-shadow: 0 5px 0 #b5179e;
}
.btn-main:active { transform: translateY(5px); box-shadow: none; }
.btn-secondary {
    background-color: var(--success-color); color: white;
    box-shadow: 0 5px 0 #2d6a12;
}
.btn-ai {
    background-color: #7209B7; color: white;
    box-shadow: 0 5px 0 #480ca8;
}
.btn-small {
    padding: 8px 20px; font-size: 0.9rem;
    background-color: var(--sun-color); color: var(--text-dark);
    box-shadow: 0 3px 0 #cca000;
}
.pulse-animation { animation: pulse 2s infinite; }
@keyframes pulse { 0% {transform: scale(1);} 50% {transform: scale(1.05);} 100% {transform: scale(1);} }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 60px;
    padding-bottom: 50px;
}

.parallax-layer {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; will-change: transform;
}

/* ФОН HERO */
.layer-bg { 
    background-image: url('../img/hero_bg.webp');
    background-size: cover; background-position: center bottom;
    z-index: -3; 
} 

/* ПЕРСОНАЖ HERO (Летит над карточкой) */
.layer-front { 
    background-image: url('../img/hero_character.webp');
    z-index: 20; 
    
    background-position: 90% 60%; 
    background-size: 70vh; 
    background-repeat: no-repeat;
    pointer-events: none; 

    animation: floatCharacter 4s ease-in-out infinite;
}
@keyframes floatCharacter {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* БЕЛАЯ КАРТОЧКА HERO */
.hero-content {
    max-width: 750px;
    z-index: 10; 
    position: relative;
    background: rgba(255,255,255,0.85);
    padding: 50px;
    border-radius: var(--radius-card);
    backdrop-filter: blur(8px);
    border: 3px solid #fff;
    box-shadow: var(--shadow-soft);
    margin-right: 20%; 
}
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.3rem; margin-bottom: 30px; color: #444; font-weight: 600; }


/* =========================================
   4. СВЕТЛЫЙ БЛОК (ПРЕПОДАВАТЕЛЬ + БОЛИ)
   ========================================= */
.parallax-wrapper-light {
    position: relative; overflow: hidden;
    padding-bottom: 50px; margin-top: -30px;
    border-radius: 40px 40px 0 0; background: #fff; z-index: 5;
}
.layer-light-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 120%;
    background-image: url('../img/light_clouds_bg.webp');
    background-size: cover; background-position: center top;
    z-index: 0; opacity: 0.6;
}
.teacher-section, .pain-section { position: relative; background: transparent !important; z-index: 2; }

/* ПРЕПОДАВАТЕЛЬ (Стиль Карточки) */
.teacher-section { padding: 80px 0; }
.teacher-card {
    display: flex; align-items: center; 
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-card); padding: 40px; 
    box-shadow: var(--shadow-soft);
    gap: 60px; 
    border: 1px solid #eee;
}

.teacher-photo { 
    flex: 0 0 400px; 
    display: flex; justify-content: center;
}

/* Фото с наклоном */
.img-placeholder {
    width: 100%; 
    height: 450px; 
    
    background-image: url('../img/teacher_photo.webp');
    background-size: cover; 
    background-position: center;
    
    border-radius: 20px;
    border: 8px solid #fff; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    
    transform: rotate(-3deg) scale(1.05); 
    transition: transform 0.3s ease;
}
.img-placeholder:hover {
    transform: rotate(0deg) scale(1.1); 
}

.teacher-info h2 { font-size: 2.5rem; color: #7209B7; }
.achievements li { margin-bottom: 12px; font-size: 1.1rem; padding-left: 30px; position: relative; color: #333; }
.achievements li::before { content: '★'; position: absolute; left: 0; color: var(--sun-color); font-size: 1.2rem; }
.teacher-quote { margin-top: 25px; font-style: italic; background: #e0f7fa; padding: 20px; border-radius: 20px; border-left: 6px solid var(--primary-color); }


/* БОЛИ */
.pain-section { padding: 60px 0; }
.pain-content { display: flex; flex-direction: row-reverse; align-items: center; gap: 50px; }
.pain-text { flex: 1; }
.pain-image { flex: 1; }
.pain-image .img-placeholder {
    background-image: url('../img/pain_monster.webp');
    background-size: contain; background-repeat: no-repeat; background-position: center;
    background-color: transparent; border: none; box-shadow: none; height: 350px;
    transform: none; /* Без наклона */
}
.pain-list li { margin-bottom: 15px; font-size: 1.2rem; color: #d00000; font-weight: bold; }
.solution-text { margin: 25px 0; font-size: 1.2rem; color: var(--success-color); background: #e8f5e9; padding: 15px; border-radius: 10px; }

/* =========================================
   5. КУРСЫ И УЧИТЕЛЯ
   ========================================= */
.courses-section { padding: 100px 0; background: linear-gradient(to bottom, #fff, #E0F7FA); }
.cards-wrapper { display: flex; gap: 30px; margin-top: 50px; }
.course-card {
    flex: 1; background: white; padding: 40px 30px;
    border-radius: var(--radius-card); text-align: center;
    border: 2px solid #eee; transition: transform 0.3s; box-shadow: var(--shadow-soft);
}
.course-card:hover { transform: translateY(-10px); border-color: var(--primary-color); }
.card-icon { font-size: 4rem; margin-bottom: 20px; }

.teachers-ai-section {
    padding: 120px 0;
    background: url('../img/ai_lab_bg.webp') no-repeat center center/cover;
    color: white; text-align: center;
    box-shadow: inset 0 0 0 1000px rgba(36, 0, 70, 0.85); 
}
.teachers-ai-section h2 { color: var(--sun-color); font-size: 2.8rem; }
.ai-desc { font-size: 1.3rem; margin-bottom: 40px; max-width: 800px; margin: 0 auto 40px; }
.ai-benefits { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.ai-benefits li {
    background: rgba(255,255,255,0.15); padding: 15px 30px;
    border-radius: 30px; border: 1px solid rgba(255,255,255,0.3);
}

/* =========================================
   6. ФУТЕР
   ========================================= */
footer {
    padding: 80px 0 40px;
    background: url('../img/footer_space.webp') no-repeat center bottom/cover;
    color: white; text-align: center;
}
footer h2 { 
    color: #ffffff; 
    margin-bottom: 10px; 
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.8);
}
footer p { font-size: 1.1rem; color: #fff; opacity: 1; }

.contact-form {
    max-width: 500px; margin: 40px auto; display: flex; flex-direction: column; gap: 15px;
    background: rgba(255,255,255,0.15); padding: 30px; border-radius: var(--radius-card); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
.contact-form input, .contact-form select {
    padding: 15px; border-radius: 15px; border: none; font-size: 1rem; outline: none;
}
.footer-links { margin-top: 60px; font-size: 0.8rem; opacity: 0.6; }

/* =========================================
   7. АДАПТИВ (MOBILE)
   ========================================= */

@media (max-width: 1024px) {
    /* ПЛАНШЕТЫ: Тут пока оставим сзади, чтобы текст читался */
    .hero-content { margin-right: 0; }
    .layer-front { 
        z-index: -1; 
        opacity: 0.6; 
        background-position: center bottom; 
    }
}

@media (max-width: 768px) {
    /* МОБИЛКИ: ВОЗВРАЩАЕМ УЧИТЕЛЯ ВПЕРЕД! */
    
    .layer-front {
        /* 1. Возвращаем на передний план */
        z-index: 20; 
        opacity: 1; /* Полная яркость */
        
        /* 2. Сдвигаем вниз, чтобы он "выглядывал" снизу и не закрывал текст */
        background-position: center 95%; 
        background-size: 45vh; /* Чуть меньше, чтобы влез */
        
        /* Отключаем клики по нему, чтобы сквозь него жалась кнопка, если что */
        pointer-events: none; 
    }

    /* Поднимаем контент выше, чтобы освободить место снизу для учителя */
    .hero-content { 
        padding: 30px 20px; 
        margin-bottom: 250px; /* Отступ снизу для учителя */
    }

    .hero h1 { font-size: 2.0rem; }
    
    /* Остальное без изменений */
    .teacher-card, .pain-content, .cards-wrapper { flex-direction: column; }
    .teacher-photo { flex: auto; width: 100%; }
    .img-placeholder { height: 300px; transform: none; }
    .img-placeholder:hover { transform: none; }
    .pain-image .img-placeholder { height: 250px; }
    .nav-links { display: none; }
    .btn-small { display: none; }
    .navbar { justify-content: center; }
}
