/* --- 1. ПЕРЕМЕННЫЕ И БАЗА --- */
:root {
    --primary-color: #566b58;
    --bg-light: #f9fbf9;
    --white: #ffffff;
    --text-dark: #333333;
    --transition: 0.3s ease;
}

html { 
    scroll-behavior: smooth; 
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* --- 2. УНИВЕРСАЛЬНЫЕ КНОПКИ --- */
.cta-button, .price-btn, .tg-button {
    display: inline-block;
    padding: 15px 35px;
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-sizing: border-box;
}

.cta-button:hover, .price-btn:hover, .tg-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Специфичный стиль для кнопки Telegram (пульсация) */
.tg-button {
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(86, 107, 88, 0.2);
    animation: tg-pulse 2s infinite;
}

.tg-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

@keyframes tg-pulse {
    0% { box-shadow: 0 0 0 0 rgba(86, 107, 88, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(86, 107, 88, 0); }
    100% { box-shadow: 0 0 0 0 rgba(86, 107, 88, 0); }
}

/* --- 3. ШАПКА И НАВИГАЦИЯ --- */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    box-sizing: border-box;
}

.logo { 
    display: flex;
    align-items: center;
    font-weight: bold; 
    font-size: 1.5rem; 
    letter-spacing: 1px; 
}

.logo span { color: var(--primary-color); }

header .logo img {
    height: 50px;
    width: auto;
    display: block;
}

nav a {
    text-decoration: none;
    color: #444;
    margin: 0 15px;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover { color: var(--primary-color); }

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    color: var(--text-dark);
}

/* --- 4. ГЛАВНЫЙ ЭКРАН (СЛАЙДЕР) --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 85vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.slide.active { opacity: 1; z-index: 2; }

.hero-content h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

/* --- 5. КОНТЕНТНЫЕ СЕКЦИИ --- */
.yoga-description, .about-me-section, .benefits-section, .room-section, .prices-section, .final-zone {
    padding: 40px 0;
}

.functional-box {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    background: #f4f6f4;
    border-radius: 30px;
}

.about-grid, .room-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.image-wrapper { position: relative; }
.image-wrapper img {
    width: 100%;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.image-decoration {
    position: absolute;
    width: 100%; height: 100%;
    border: 2px solid var(--primary-color);
    top: 20px; left: 20px;
    border-radius: 20px;
    z-index: 1;
}

/* --- 6. КАРТОЧКИ ПОЛЬЗЫ --- */
.benefits-section {
    padding: 80px 0;
    background-color: var(--white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: white;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    overflow: hidden;
    /* Убираем общее центрирование текста */
    text-align: left; 
}

.card:hover { 
    transform: translateY(-5px); 
}

.card-img-container {
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 30px; /* Увеличили отступы для «воздуха» */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Прижимаем контент к верху */
    align-items: flex-start;    /* Выравниваем все элементы по левому краю */
}

.card-content h3 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
    font-size: 1.4rem;
    line-height: 1.2;
    width: 100%; /* Гарантирует, что заголовок не будет прыгать */
}

.card-content p {
    margin: 0;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    /* Убираем ограничение ширины, чтобы текст заполнял карточку слева направо */
    width: 100%; 
}
/* --- Адаптивность для карточек --- */
@media (max-width: 992px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .benefits-grid {
        grid-template-columns: 1fr; /* 1 колонка на мобильных */
        max-width: 350px; /* Ограничиваем ширину, чтобы не растягивалось на весь экран */
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- 7. СЕКЦИЯ ЦЕН --- */
.price-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.price-card {
    background: white;
    padding: 40px 30px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column; 
    align-items: center;
    text-align: center;
}

.price-card.featured {
    position: relative;
    outline: 2px solid var(--primary-color);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
}

.price-header h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.price-header .amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: block;
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    width: 100%;
    flex-grow: 1;
}

.price-features li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-features li:last-child { border-bottom: none; }

/* Кнопки в ценах */
.price-card:not(.featured) .price-btn {
    background-color: #444;
}

.price-btn {
    width: 100%;
    max-width: 250px;
    margin-top: auto;
}

/* --- 8. ФОРМА И ФУТЕР --- */
.action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.contact-form-box, .contact-info-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.yoga-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.yoga-form input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box;
}

.mini-logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 30px auto 0 auto;
    display: block;
    border: 3px solid #f4f6f4;
}

.site-footer {
    padding: 30px 0;
    background-color: #f4f6f4;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* --- 9. СЕКЦИЯ ФИЛОСОФИИ --- */
.philosophy-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-light), #ffffff);
}

.philosophy-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px;
    background: white;
    border-radius: 40px;
    box-shadow: 0 15px 45px rgba(86, 107, 88, 0.08);
    position: relative;
    text-align: center;
}

.quote-container {
    position: relative;
    margin-bottom: 40px;
}

.quote-mark {
    font-family: 'Georgia', serif;
    font-size: 8rem;
    color: var(--primary-color);
    opacity: 0.15;
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
}

.main-quote {
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
    font-style: italic;
}

.sub-text {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.divider-with-leaf {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.divider-with-leaf::before,
.divider-with-leaf::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
    max-width: 200px;
}

.leaf-icon {
    margin: 0 20px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.trainer-note-box {
    background: var(--bg-light);
    padding: 25px 40px;
    border-radius: 20px;
    border-left: 4px solid var(--primary-color);
    display: inline-block;
}

.trainer-note-box p {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.trainer-note-box .highlight {
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 10. МОДАЛЬНОЕ ОКНО --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- 11. ОБЩАЯ АДАПТИВНОСТЬ (СГРУППИРОВАНО) --- */
@media (max-width: 992px) {
    .price-grid { 
        grid-template-columns: 1fr; 
        max-width: 450px; 
        margin: 0 auto; 
    }
}

@media (max-width: 768px) {
    /* Навигация */
    header { padding: 10px 20px; }
    .menu-toggle { display: block; }
    nav {
        display: none;
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    nav.active { display: flex; }
    
    /* Тексты и сетки */
    .hero-content h1 { font-size: 2.2rem; }
    .about-grid, .room-grid, .benefits-grid, .action-row { 
        grid-template-columns: 1fr; 
    }
    .image-decoration { display: none; }

    /* Блок философии */
    .philosophy-card {
        padding: 40px 20px;
        margin: 0 15px;
    }
    .main-quote {
        font-size: 1.4rem;
    }
    .quote-mark {
        font-size: 5rem;
        top: -30px;
    }
}
/* --- 12. КАРУСЕЛЬ ОТЗЫВОВ (ИСПРАВЛЕНО) --- */
.reviews-section {
    display: flex !important;
    flex-direction: column !important; /* Выстраивает Заголовок и Карусель вертикально */
    align-items: center !important;    /* Центрирует всё содержимое по горизонтали */
    padding: 80px 0;
    width: 100%;
}

.section-title {
    width: 100%;
    text-align: center !important;
    margin-bottom: 50px; /* Отступ от заголовка до самой карусели */
    display: block !important;
}

/* Контейнер карусели внутри секции остается горизонтальным */
.carousel-container {
  display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important; /* Растягиваем на всю ширину секции */
    max-width: 1000px; /* Ограничиваем, чтобы кнопки не улетели слишком далеко */
    margin: 0 auto;
    position: relative; /* Для позиционирования кнопок */
}

.carousel-wrapper {
    overflow: hidden; /* Это наше "окно" */
    width: 100%;
    max-width: 700px; 
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    flex: 0 1 700px; /* Окно может сжиматься, но его идеальная ширина 700px */
     margin: 0 20px; /* Отступы, чтобы кнопки не прилипали к краям отзывов */
}

.carousel-track {
    display: flex !important;
    /* Ускоряем работу видеокарты для плавной анимации */
    will-change: transform; 
    /* Плавная кривая без рывков */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.review-card {
    flex: 0 0 100% !important; /* Каждый слайд ровно 100% от ширины wrapper */
    width: 100%;
    padding: 50px 40px;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.review-text {
    display: block !important;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 25px auto;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #555;
    /* Исправляем растягивание в линию */
    white-space: normal !important; 
    word-wrap: break-word;
}

.review-author {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.carousel-btn {
    position: absolute !important; /* Возвращаем абсолют, чтобы кнопки не расталкивали контент */
    top: 50% !important;
    transform: translateY(-50%) !important; /* Центрируем строго по вертикали */
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 45px !important;
    height: 45px !important;
    z-index: 100 !important;
    transition: background 0.3s, transform 0.3s !important;
    visibility: visible !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
}

.prev-btn { 
    left: -60px !important; /* Выносим за пределы отзыва в веб-версии */
}
.next-btn { 
    right: -60px !important; 
}

.carousel-btn:hover {
    background: #445446;
    transform: scale(1.1);
}

/* Если контейнер слишком прижат к краям экрана, уменьшим вынос */
@media (max-width: 1100px) {
    .prev-btn { left: 0px !important; }
    .next-btn { right: 0px !important; }
}

.carousel-btn:hover {
    background: #445446 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* --- ФИНАЛЬНЫЕ ПРАВКИ МОБИЛЬНОЙ КАРУСЕЛИ --- */
@media (max-width: 768px) {
    /* 1. Убираем внешние отступы, чтобы блок не сжимался */
    .carousel-wrapper {
        margin: 0 !important; 
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }

    /* 2. Даем контейнеру небольшой внутренний отступ для кнопок */
    .carousel-container {
        padding: 0 45px !important; /* Место под кнопки 36px + зазор */
        box-sizing: border-box !important;
    }

    /* 3. Фиксируем кнопки, чтобы не уезжали */
    .carousel-btn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }

    /* 4. Прижимаем их плотно к краям контейнера */
    .prev-btn { left: 5px !important; }
    .next-btn { right: 5px !important; }

    /* 5. Уменьшаем отступы внутри карточки отзыва, чтобы влезло на экран */
    .review-card {
        padding: 30px 15px !important;
    }

    .review-text {
        font-size: 1rem !important; /* Чуть меньше текст для мобилок */
        margin-bottom: 15px !important;
    }
}

/* Фикс для очень маленьких экранов (iPhone SE и т.д.) */
@media (max-width: 380px) {
    .carousel-container {
        padding: 0 40px !important;
    }
    .carousel-btn {
        width: 32px !important;
        height: 32px !important;
    }
}
.guide-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.guide-overlay.show {
    display: flex;
    opacity: 1;
}

.guide-modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    animation: slidePop 0.5s ease;
}

@keyframes slidePop {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.guide-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-form-side {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.guide-badge {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.guide-form-side h3 {
    font-size: 2rem;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.popup-form input {
    padding: 14px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.close-popup {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 35px;
    border: none; background: none;
    cursor: pointer;
    color: #888;
    z-index: 10;
}

@media (max-width: 768px) {
    .guide-grid { grid-template-columns: 1fr; }
    .guide-img-side { display: none; } /* На мобилках скрываем картинку, чтобы не мешала форме */
    .guide-form-side { padding: 30px 20px; text-align: center; }
}