/* css/style.css - Полный файл стилей для сайта ОкнаБелгород */

/* ===== 1. СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Запасной шрифт, пока Google Fonts не подключим */
    line-height: 1.6;
    color: #333;
    background-color: #FAF9F7; /* Тёплый бежевый фон */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1; /* Чтобы футер был внизу */
}

/* ===== 2. ТИПОГРАФИЯ ===== */
h1, h2, h3, h4 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: #2A4F6E; /* Глубокий синий */
    margin-bottom: 1rem;
}

h1 { 
    font-size: 2.5rem; 
    margin-top: 0;
}

h2 { 
    font-size: 2rem; 
    margin-top: 1.5rem;
}

h3 { 
    font-size: 1.5rem; 
    margin-top: 1.2rem;
}

p { 
    margin-bottom: 1rem; 
    color: #555;
}

a {
    color: #C95B47; /* Тёплый терракотовый */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #A84A3A; /* Более тёмный терракотовый при наведении */
}

/* ===== 3. КНОПКИ ===== */
.button {
    display: inline-block;
    background-color: #C95B47;
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

.button:hover {
    background-color: #A84A3A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 91, 71, 0.3);
}

.button-secondary {
    background-color: #3A7B5C; /* Зелёный */
    margin-left: 10px;
}

.button-secondary:hover {
    background-color: #2E634A;
    box-shadow: 0 4px 12px rgba(58, 123, 92, 0.3);
}

/* ===== 4. ШАПКА И НАВИГАЦИЯ ===== */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2A4F6E;
}

.logo:hover {
    color: #2A4F6E;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin-right: 30px;
}

.nav-link {
    margin-left: 25px;
    color: #555;
    font-weight: 600;
}

.nav-link:hover {
    color: #C95B47;
}

.phone-button {
    background-color: #3A7B5C;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
}

.phone-button:hover {
    background-color: #2E634A;
    color: white;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #2A4F6E;
    cursor: pointer;
    padding: 5px;
}

/* ===== 5. ПОДВАЛ ===== */
.footer {
    background-color: #2A4F6E;
    color: #ddd;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer a {
    color: #ddd;
}

.footer a:hover {
    color: #C95B47;
}
.footer, .footer *:not(a):not(a *) { color: white !important; }

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3A627C;
    font-size: 0.9rem;
    color: #aaa;
}

/* ===== 6. ОСНОВНЫЕ СЕКЦИИ (для главной страницы) ===== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #C95B47;
    margin: 15px auto;
}

/* Блок преимуществ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #3A7B5C;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3A7B5C;
}

/* ===== 7. АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 15px;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(255, 255, 255, 0.1);
        flex-direction: column;
        text-align: center;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-list {
        flex-direction: column;
        margin-right: 0;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .nav-link {
        margin: 10px 0;
        display: block;
    }
    
    .phone-button {
        align-self: center;
        margin-top: 10px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    
    .button-secondary {
        margin-left: 0;
        margin-top: 10px;
        display: block;
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 50px 0;
    }
}

/* ===== 8. УТИЛИТЫ ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ===== 9. СТИЛИ ДЛЯ ФОРМ И TELEGRAM ===== */

/* Анимации для сообщений форм */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* Индикатор загрузки в кнопке */
.button {
    position: relative;
    overflow: hidden;
}

.button.loading {
    color: transparent !important;
    pointer-events: none;
}

.button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Сообщения об успехе/ошибке */
.success-message,
.phone-fallback {
    animation: fadeIn 0.3s ease;
    margin-top: 20px;
}

/* Стили для валидации форм */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #C95B47 !important;
    background-color: rgba(201, 91, 71, 0.05);
}

.error-message {
    color: #C95B47;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Улучшенный фокус для полей формы */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3A7B5C;
    box-shadow: 0 0 0 3px rgba(58, 123, 92, 0.1);
}

/* Адаптивность для сообщений */
@media (max-width: 768px) {
    .success-message > div,
    .phone-fallback > div {
        padding: 12px !important;
        font-size: 0.9rem;
    }
    
    .phone-fallback a {
        display: block !important;
        text-align: center;
        padding: 12px 15px !important;
    }
}