/* =========================================
   1. БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ========================================= */
:root {
    --bg-color: #ffffff;
    --bg-alt: #f5f5f7;
    --text-main: #1d1d1f;
    --text-gray: #6e6e73;
    --accent: #1d1d1f;
    --radius: 32px;
    --transition: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   2. НАВИГАЦИЯ
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 14px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img { height: 40px; width: auto; }

.nav-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(90deg, #000, #444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }

.nav-links a {
    text-decoration: none;
    color: #424245;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover { color: #000; }

.nav-cta {
    background: #000;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
}

.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('images/bg-new.jpg') no-repeat center center / cover;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    color: #fff;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-title .italic { font-style: italic; font-weight: 400; opacity: 0.9; }

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.hero-button {
    padding: 18px 40px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.hero-button:hover { transform: scale(1.05); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.hero-link {
    padding: 18px 24px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    font-weight: 500;
}

/* =========================================
   4. TRUST BAR
   ========================================= */
.trust-bar {
    padding: 60px 0;
    background: var(--bg-color);
    border-bottom: 1px solid #f5f5f7;
}

.trust-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
}

.trust-number { display: block; font-family: 'Playfair Display', serif; font-size: 48px; font-weight: 700; color: #000; }
.trust-label { font-size: 14px; color: var(--text-gray); text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; display: block; }

/* =========================================
   5. ОБЩИЕ СЕКЦИИ
   ========================================= */
section { padding: 120px 0; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(32px, 4vw, 48px); text-align: center; margin-bottom: 80px; letter-spacing: -0.01em; }

/* =========================================
   6. PROBLEM SECTION
   ========================================= */
.problem-section { background: #fff; }
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }

/* Обновление 👇 */
.problem-lead {
    text-align: center;
    margin-bottom: 40px;
    font-size: 18px;
    color: var(--text-gray);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.problem-item { 
    padding: 0; 
    border-radius: var(--radius); 
    overflow: hidden; 
    height: 100%; 
    background: #f9f9f9; 
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.problem-item:hover { transform: translateY(-5px); }

.problem-img-wrapper {
    width: 100%;
    height: 250px; 
    overflow: hidden;
    filter: grayscale(100%) contrast(1.1); 
    transition: all 0.5s ease;
}

.problem-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.problem-item:hover .problem-img-wrapper {
    filter: grayscale(0%) contrast(1.1);
}

.problem-item:hover .problem-img-wrapper img { transform: scale(1.05); }

.problem-item h3 { padding: 25px 30px 10px; font-size: 24px; }
.problem-item p { padding: 10px 30px 30px; color: var(--text-gray); }

/* =========================================
   7. ABOUT SECTION
   ========================================= */
.about-section { background: var(--bg-alt); }
.about-container { display: flex; gap: 80px; align-items: center; }

.about-image-wrapper { flex: 1; border-radius: var(--radius); overflow: hidden; max-width: 500px; margin: 0 auto; }
.doctor-img { width: 100%; height: auto; display: block; object-fit: cover; }

.about-text { flex: 1; }
.about-text .subtitle { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-gray); display: block; margin-bottom: 10px; }
.about-title { font-family: 'Playfair Display', serif; font-size: 40px; margin-bottom: 30px; }
.about-description { font-size: 18px; margin-bottom: 30px; color: #424245; }
.credentials { list-style: none; }
.credentials li { margin-bottom: 12px; font-size: 16px; font-weight: 500; }

/* =========================================
   8. METHODS
   ========================================= */
.methods-section { background: #fff; }
.methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.method-card { background: var(--bg-alt); padding: 40px; border-radius: var(--radius); transition: var(--transition); }
.method-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.method-card h3 { font-size: 22px; margin-bottom: 15px; }
.method-card p { color: var(--text-gray); font-size: 15px; }

/* =========================================
   9. PRICING
   ========================================= */
.pricing-section { background: var(--bg-alt); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; }

.price-card { background: #fff; padding: 50px 40px; border-radius: var(--radius); text-align: center; position: relative; transition: var(--transition); }
.price-card.featured { transform: scale(1.05); box-shadow: 0 30px 60px rgba(0,0,0,0.1); z-index: 2; }
.price-card.featured .badge { position: absolute; top: 20px; right: 20px; background: #000; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 12px; }

.price-value { font-family: 'Playfair Display', serif; font-size: 36px; margin: 20px 0; }
.price-features { list-style: none; margin-bottom: 30px; text-align: left; }
.price-features li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; color: #6e6e73; }

.price-action {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #d2d2d7;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-secondary:hover { border-color: #000; background: #fff; }

/* =========================================
   10. TESTIMONIALS
   ========================================= */
.testimonials-section { background: #fff; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card { background: var(--bg-alt); padding: 40px; border-radius: var(--radius); }
.testimonial-text { font-style: italic; font-size: 17px; margin-bottom: 20px; color: #424245; }
.testimonial-author { font-weight: 600; text-align: right; }

/* =========================================
   11. CONTACTS
   ========================================= */
.final-contact-section { background: #fff; }
.final-title { font-family: 'Playfair Display', serif; font-size: 40px; text-align: center; margin-bottom: 20px; }
.final-subtitle { text-align: center; color: var(--text-gray); margin-bottom: 60px; }

.contact-buttons { display: flex; flex-direction: column; gap: 20px; max-width: 400px; margin: 0 auto; }

.big-phone-button, .tg-button {
    display: flex; align-items: center; justify-content: center;
    padding: 20px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 18px; transition: var(--transition);
}
.big-phone-button { background: #000; color: #fff; }
.tg-button { background: #f5f5f7; color: #000; border: 1px solid #e0e0e0; }
.big-phone-button:hover { transform: scale(1.02); }
.tg-button:hover { background: #e8e8ed; }

.map-wrapper { max-width: 1050px; margin: 60px auto 0; overflow: hidden; }

/* =========================================
   12. MODAL
   ========================================= */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
    background: #fff; width: 90%; max-width: 600px; max-height: 85vh;
    border-radius: 32px; padding: 40px; position: relative;
    transform: scale(0.95); transition: var(--transition);
    overflow-y: auto; box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}
.modal-overlay.active .modal-container { transform: scale(1); }

.modal-close { position: absolute; top: 20px; right: 25px; border: none; background: none; font-size: 30px; cursor: pointer; color: #86868b; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 28px; margin-bottom: 30px; text-align: center; }
.price-list { padding-right: 5px; }
.price-category { margin-bottom: 25px; }
.category-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #86868b; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.price-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f5f5f7; }
.service-cost { font-weight: 600; }

/* =========================================
   13. FOOTER
   ========================================= */
.footer { background: var(--bg-alt); padding: 60px 0; text-align: center; color: #86868b; font-size: 14px; border-top: 1px solid #e8e8ed; }
.legal-info { margin-top: 8px; font-size: 13px; opacity: 0.8; }

/* =========================================
   14. АНИМАЦИИ
   ========================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-visible { opacity: 1; transform: translateY(0); }

/* АНИМАЦИЯ ПУЛЬСАЦИИ */
@keyframes pulse-cta {
    0% { box-shadow: 0 10px 30px rgba(0,0,0,0.2); transform: scale(1); }
    50% { box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4), 0 0 0 8px rgba(79, 70, 229, 0.1); transform: scale(1.03); }
    100% { box-shadow: 0 10px 30px rgba(0,0,0,0.2); transform: scale(1); }
}

/* =========================================
   15. RESPONSIVE & ANIMATIONS
   ========================================= */
@media (max-width: 900px) {
    .about-container { flex-direction: column; text-align: center; }
    .about-text { text-align: center; }
    .about-image-wrapper { margin-bottom: 30px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 38px; }
    .section-title { font-size: 32px; margin-bottom: 50px; }
    .price-card.featured { transform: scale(1); }
    
    /* Отступ снизу, чтобы кнопки не перекрывали контент */
    body {
        padding-bottom: 80px;
    }

    /* --- ФИКСИРОВАННЫЕ КРУГЛЫЕ КНОПКИ --- */
    .mobile-sticky-cta {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        justify-content: center;
        gap: 20px;
        width: auto; 
        z-index: 1000;
        padding: 0;
        /* Скрываем кнопки до момента появления */
        opacity: 0;
        transition: opacity 0.5s ease;
    }

    /* Класс для показа кнопок (добавляется JS) */
    .mobile-sticky-cta.visible {
        opacity: 1;
    }
    
    .sticky-btn {
        width: 60px;  
        height: 60px; 
        border-radius: 50%; 
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        /* Более плавная анимация */
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        flex-shrink: 0;
        box-sizing: border-box;
    }

    /* Кнопка ЗВОНОК (Черная) */
    .btn-call {
        background: #000;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 26px;
    }
    
    /* Кнопка MAX (Фиолетовый градиент) */
    .btn-max {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 26px;
    }

    /* АНИМАЦИЯ ПРИ НАВЕДЕНИИ/НАЖАТИИ */
    .sticky-btn:hover, 
    .sticky-btn:active {
        transform: scale(1.1); /* Чуть меньше увеличение для элегантности */
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    }
    
    .sticky-btn span {
        display: none;
    }

    /* АНИМАЦИЯ ПУЛЬСАЦИИ (Только при появлении) */
    @keyframes pulse-intro {
        0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        50% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4); }
        100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
    }

    /* Применяем анимацию только если добавлен класс 'pulse' */
    .sticky-btn.pulse {
        animation: pulse-intro 0.8s ease-in-out 3; /* 3 повтора */
    }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .sticky-btn { transition: none; }
    .sticky-btn:hover { transform: none; }
}
