/* style.css - Стили для клиентской части сайта */
:root { 
    --green: #2e7d32; 
    --dark-green: #1b5e20; 
    --light-bg: #f8f9fa; 
    --white: #ffffff; 
    --text-main: #2c3e50; 
    --text-muted: #6c757d;
    --radius: 16px; 
    --shadow: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 50px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Manrope', sans-serif; line-height: 1.6; color: var(--text-main); scroll-behavior: smooth; background: var(--white); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Кнопки */
.btn { display: inline-block; padding: 16px 32px; background: var(--green); color: white; border-radius: 50px; text-decoration: none; font-weight: 700; border: none; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3); }
.btn:hover { background: var(--dark-green); transform: translateY(-3px); box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4); }
.btn-outline { background: transparent; border: 2px solid white; box-shadow: none; }
.btn-outline:hover { background: white; color: var(--green); transform: translateY(-3px); }

/* Общие секции */
.section { padding: 100px 0; }
.bg-light { background: var(--light-bg); }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 15px; color: var(--dark-green); font-weight: 800; letter-spacing: -0.5px; }
.subtitle { text-align: center; color: var(--text-muted); margin-bottom: 50px; font-size: 1.15rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Герой */
.hero { 
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('static/img/hero-bg.jpg') center/cover no-repeat; 
    height: 85vh; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; color: white; 
}
.hero h1 { font-size: 3.5rem; margin-bottom: 25px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); font-weight: 800; line-height: 1.1; }
.hero p { font-size: 1.3rem; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; opacity: 0.95; }

/* Карточки преимуществ */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: var(--white); padding: 40px 30px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; transition: all 0.3s ease; border: 1px solid rgba(0,0,0,0.03); }
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.icon { font-size: 3rem; margin-bottom: 25px; height: 80px; display: flex; align-items: center; justify-content: center; }
.icon img { max-height: 100%; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.card h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--text-main); }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* Калькулятор */
.calc-input { width: 100%; max-width: 450px; margin: 0 auto 40px; display: block; padding: 18px; font-size: 1.3rem; border: 2px solid #e0e0e0; border-radius: 12px; text-align: center; outline: none; transition: 0.3s; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); }
.calc-input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1); }
.calc-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 30px; }
.calc-block { padding: 30px 20px; border-radius: var(--radius); color: white; text-decoration: none; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.calc-block:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.calc-red { background: linear-gradient(135deg, #d32f2f, #b71c1c); }
.calc-yellow { background: linear-gradient(135deg, #fbc02d, #f57f17); color: #333; }
.calc-green { background: linear-gradient(135deg, #388e3c, #1b5e20); }
.calc-count { font-size: 2.8rem; font-weight: 800; margin: 15px 0; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Форма заказа */
.form-wrapper { max-width: 600px; margin: 0 auto; background: var(--white); padding: 50px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,0.05); }
input, textarea { width: 100%; padding: 16px; margin-bottom: 20px; border: 1px solid #e0e0e0; border-radius: 10px; font-family: inherit; font-size: 1rem; transition: 0.3s; background: #fafafa; }
input:focus, textarea:focus { border-color: var(--green); background: white; box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1); outline: none; }
.full-btn { width: 100%; font-size: 1.1rem; margin-top: 10px; }
#form-msg { text-align: center; margin-top: 20px; font-weight: 600; min-height: 24px; }

/* Блок цены */
.price-card { background: var(--white); padding: 40px 30px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; border-top: 4px solid var(--green); }
.price-card h3 { color: var(--green); font-size: 2.5rem; margin-bottom: 15px; font-weight: 800; }

/* Аккордеон FAQ */
.faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { background: white; border-radius: 12px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); overflow: hidden; }
.faq-question { width: 100%; text-align: left; padding: 20px 25px; background: none; border: none; font-size: 1.1rem; font-weight: 600; color: var(--dark-green); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.faq-question:hover { background: #f8f9fa; }
.faq-icon { font-size: 1.5rem; font-weight: 300; transition: 0.3s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0 25px; }
.faq-answer p { padding-bottom: 20px; color: var(--text-muted); line-height: 1.6; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-item.active .faq-answer { max-height: 500px; }

/* Футер */
footer { background: #1a1a1a; color: #888; padding: 60px 0; text-align: center; }
footer h2 { color: white; }
footer a { color: white; text-decoration: none; transition: 0.3s; }
footer a:hover { color: var(--green); }

/* Адаптив */
@media (max-width: 768px) { 
    .hero h1 { font-size: 2.2rem; } .section { padding: 60px 0; } 
    .calc-results { grid-template-columns: 1fr; } .form-wrapper { padding: 30px 20px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 300px; margin-bottom: 10px; }
}

/* Липкая кнопка заказа */
.sticky-order-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: var(--green);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sticky-order-btn:hover {
    background: var(--dark-green);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.5);
}

/* Скрываем липкую кнопку, когда она достигает секции заказа */
.sticky-order-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

@media (max-width: 768px) {
    .sticky-order-btn {
        width: calc(100% - 40px);
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* === КАСТОМНЫЕ ФОНЫ ДЛЯ СЕКЦИЙ ЛЕНДИНГА === */

/* Блок "Галерея / Реальные фото" */
.bg-gallery {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('static/img/27.jpg') center/cover no-repeat;
    color: white;
}
.bg-gallery h2 { color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.bg-gallery .subtitle { color: rgba(255, 255, 255, 0.9); }
.bg-gallery .card { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(8px);
    border: none;
}

/* Блок "Цены и условия" */
.bg-prices {
    background: linear-gradient(rgba(27, 94, 32, 0.8), rgba(27, 94, 32, 0.8)), 
                url('static/img/31.jpg') center/cover no-repeat;
    color: white;
}
.bg-prices h2 { color: #ffffff; }
.bg-prices .subtitle { color: rgba(255, 255, 255, 0.85); }
.bg-prices .price-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 4px solid var(--green);
    color: var(--text-main); /* Возвращаем темный текст внутри белой карточки */
}
.bg-prices .price-card p { color: var(--text-muted); }

/* Блок "Частые вопросы (FAQ)" */
.bg-faq {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('static/img/36.jpg') center/cover no-repeat;
    color: white;
}
.bg-faq h2 { color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.bg-faq .subtitle { color: rgba(255, 255, 255, 0.9); }
.bg-faq .faq-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: none;
}
.bg-faq .faq-question { color: var(--dark-green); }

/* Адаптив: на мобильных заменяем тяжелые фото на сплошной цвет для скорости */
@media (max-width: 768px) {
    .bg-gallery { background: var(--dark-green); }
    .bg-prices { background: #1b5e20; }
    .bg-faq { background: #2c3e50; }
}