:root {
    /* ТЕПЛАЯ ДЕТСКАЯ ПАЛИТРА */
    --primary: #7868E6; 
    --accent: #FFA27A;  
    --accent-light: #FFE8D6; 
    --bg-page: #FFFBF7; 
    
    --text-main: #36324A; 
    --text-muted: #85819E;
    --white: #FFFFFF;
    
    /* Скругления */
    --radius-lg: 32px;
    --radius-md: 20px;
    
    /* Тени */
    --shadow-soft: 0 12px 30px -10px rgba(120, 104, 230, 0.12);
    --shadow-hover: 0 20px 40px -10px rgba(120, 104, 230, 0.25);
    
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* ЖЁСТКИЙ ЗАПРЕТ НА ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ И ЗУМ */
html, body { 
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body { 
    font-family: 'Nunito', sans-serif; 
    background: var(--bg-page); 
    color: var(--text-main); 
    line-height: 1.6; 
    -webkit-text-size-adjust: 100%; /* Запрещаем iOS самовольно увеличивать шрифты */
}

/* КОНТЕЙНЕРЫ И ТЕКСТЫ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.section-padding { padding: 120px 0; }
.text-center { text-align: center; }
.max-w-800 { max-width: 800px; margin: 0 auto; }
.text-accent { color: var(--primary); }

h1, h2, h3 { font-weight: 900; letter-spacing: -0.01em; color: #2A253E; overflow-wrap: break-word; }
.section-title { font-size: 2.8rem; margin-bottom: 20px; line-height: 1.2; }
.section-subtitle { font-size: 1.25rem; color: var(--text-muted); font-weight: 600; max-width: 600px; margin: 0 auto; }

/* КНОПКИ */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 20px 40px; border-radius: 100px; font-weight: 800; font-size: 1.1rem;
    text-decoration: none; border: none; cursor: pointer; transition: all 0.3s var(--bounce);
    text-align: center; white-space: normal; /* Важно: разрешаем тексту переноситься */
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 8px 20px rgba(120, 104, 230, 0.3); }
.btn-primary:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 15px 30px rgba(120, 104, 230, 0.4); background: #6857D6; }

.btn-outline { background: var(--white); color: var(--primary); box-shadow: var(--shadow-soft); }
.btn-outline:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.btn-vk { background: #0077FF; color: white; margin-top: 24px; padding: 18px 40px; box-shadow: 0 8px 20px rgba(0, 119, 255, 0.3); }
.btn-vk:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 15px 30px rgba(0, 119, 255, 0.4); }

/* HEADER */
.glass {
    background: rgba(255, 251, 247, 0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(120, 104, 230, 0.08); position: sticky; top: 0; z-index: 100;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; min-height: 80px; padding: 10px 24px; }
.logo { font-size: 26px; font-weight: 900; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.main-nav { display: flex; gap: 40px; align-items: center; }
.main-nav a { color: var(--text-main); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.main-nav a:hover { color: var(--accent); }
.btn-nav { background: var(--accent-light); color: var(--primary) !important; padding: 10px 24px; border-radius: 100px; text-align: center; }
.btn-nav:hover { background: var(--accent); color: var(--white) !important; }

/* HERO ЭКРАН */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center; color: var(--white); text-align: center; padding: 120px 0; overflow: hidden; /* Прячем вылетающую волну */ }
.hero-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: linear-gradient(to bottom, rgba(42, 37, 62, 0.4), rgba(42, 37, 62, 0.8)); }
.hero-badge { display: inline-block; background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); padding: 8px 20px; border-radius: 100px; font-weight: 700; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.4); }
.hero-content h1 { font-size: 4.5rem; margin-bottom: 24px; color: var(--white); line-height: 1.1; }
.hero-content p { font-size: 1.3rem; font-weight: 600; max-width: 600px; margin: 0 auto 40px; opacity: 0.95; }

/* ВОЛНА ВНИЗУ HERO */
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 10; }
.hero-wave svg { position: relative; display: block; width: calc(130% + 1.3px); height: 80px; }
.hero-wave .shape-fill { fill: var(--bg-page); }

/* BENTO GRID */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; }
.bento-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px;
    box-shadow: var(--shadow-soft); transition: all 0.4s var(--bounce);
    display: flex; flex-direction: column; justify-content: space-between; grid-column: span 6;
}
.bento-card:hover { transform: translateY(-8px) rotate(0.5deg); box-shadow: var(--shadow-hover); }

.bg-card-1 { border-top: 6px solid var(--accent); }
.bg-card-2 { border-top: 6px solid #FFC973; }
.bg-card-3 { border-top: 6px solid #6ED5B8; }
.bg-card-4 { border-top: 6px solid var(--primary); background: var(--primary); color: white; }
.bg-card-4 h3, .bg-card-4 p { color: white; }

.large-card { grid-column: span 12; flex-direction: row; padding: 0; overflow: hidden; }
.large-card .card-text { padding: 60px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.large-card .card-image { flex: 1; background: var(--accent-light); min-height: 300px; }

.wide-card { grid-column: span 12; padding: 50px; }
.flex-row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 30px; }

.tag { display: inline-block; padding: 8px 20px; border-radius: 100px; background: var(--accent-light); color: #E05F2B; font-weight: 800; font-size: 0.9rem; margin-bottom: 20px; width: max-content; }
.bento-card h3 { font-size: 1.8rem; margin-bottom: 16px; line-height: 1.2; }
.bento-card p { font-size: 1.1rem; font-weight: 600; color: #36324A; }

/* ЗАГЛУШКИ ДЛЯ ФОТО */
.placeholder-img { display: flex; align-items: center; justify-content: center; color: rgba(0,0,0,0.3); font-weight: 700; font-size: 1.2rem; text-align: center; padding: 20px; }

/* БЛОК ВКОНТАКТЕ */
#vk-life { padding-top: 0; }
.vk-block {
    background: #0077FF; border-radius: 40px; color: var(--white);
    display: flex; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 119, 255, 0.2);
    position: relative;
}
.vk-block::after {
    content: ''; position: absolute; width: 400px; height: 400px; background: rgba(255,255,255,0.1);
    border-radius: 50%; top: -100px; right: 30%; z-index: 0; pointer-events: none;
}
.vk-content { padding: 80px; flex: 1; position: relative; z-index: 1; }
.vk-icon { margin-bottom: 24px; color: #fff; }
.vk-content h2 { font-size: 2.8rem; margin-bottom: 20px; color: white; line-height: 1.2; }
.vk-content p { font-size: 1.2rem; font-weight: 600; opacity: 0.9; margin-bottom: 30px; }
.vk-features { list-style: none; margin-bottom: 40px; }
.vk-features li { margin-bottom: 16px; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 12px; }
.emoji { font-size: 1.5rem; }
.vk-image { flex: 1; background: #005CE6; position: relative; z-index: 1; min-height: 300px; }

/* ПОДВАЛ */
.main-footer { padding: 80px 0 40px; border-top: 1px solid rgba(0,0,0,0.05); }
.footer-content { display: flex; justify-content: space-between; margin-bottom: 60px; color: var(--text-muted); }
.hover-link { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.hover-link:hover { color: var(--primary); }
.copyright { border-top: 1px solid rgba(0,0,0,0.05); padding-top: 24px; color: #9CA3AF; text-align: center; font-size: 0.9rem; }

/* АНИМАЦИИ */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s var(--bounce); }
.fade-up.is-visible { opacity: 1; transform: translateY(0); }


/* =========================================
   ИДЕАЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (MAX 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Навигация (Header) - аккуратно складываем в столбик, чтобы не наезжала */
    .nav-container { 
        flex-direction: column; 
        padding: 16px;
    }
    .main-nav { 
        width: 100%;
        flex-direction: column; /* Элементы друг под другом */
        gap: 12px; 
        margin-top: 16px;
    }
    .main-nav a { 
        padding: 8px 0; 
        text-align: center;
        width: 100%;
    }
    .btn-nav { 
        width: 100%; 
        margin-top: 8px;
    }

    /* Отступы блоков */
    .section-padding { padding: 60px 0; }
    
    /* Тексты (уменьшаем для телефонов) */
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; margin-bottom: 30px; }
    .section-title { font-size: 2rem; }
    .vk-content h2 { font-size: 2rem; }
    
    /* Кнопки (уменьшаем паддинги, делаем на всю ширину экрана) */
    .btn { 
        padding: 14px 20px; 
        font-size: 1rem; 
        width: 100%; 
        line-height: 1.3;
    }

    /* Карточки (одна под другой) */
    .bento-card { grid-column: span 12; padding: 24px; border-radius: 24px; }
    .bento-card h3 { font-size: 1.5rem; }
    
    .large-card { flex-direction: column; }
    .large-card .card-text { padding: 30px 24px; }
    .large-card .card-image { min-height: 200px; }
    
    .wide-card { padding: 30px 24px; }
    .flex-row { flex-direction: column; align-items: flex-start; gap: 20px; }
    
    /* Блок ВК */
    .vk-block { flex-direction: column; border-radius: 24px; }
    .vk-content { padding: 40px 24px; }
    .vk-image { min-height: 250px; }
    
    /* Подвал */
    .footer-content { 
        flex-direction: column; 
        text-align: center; 
        gap: 30px; 
        margin-bottom: 40px; 
    }
}


.footer-map-container {
    width: 100%;
    max-width: 500px;  /* или любую ширину, какая тебе нужна */
    margin: 0 auto;
}

.footer-map {
    width: 100%;
    height: 250px;  /* фиксируем высоту, чтобы карта не схлопывалась */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-address {
    text-align: center;
    margin-top: 16px;
    font-weight: 700;
    color: var(--primary, #7868E6);
}