/* ==========================================================================
   1. ОБЩИЕ СИСТЕМНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #ff5c5c;     /* Фирменный красный цвет акцентов и кнопок */
    --dark: #222222;        /* Глубокий темный цвет для текста и заголовков */
    --light: #f9f9f9;       /* Светло-серый фон для разделения секций */
    --border: #cccccc;      /* Цвет рамок в формах */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333333;
    line-height: 1.6;
    background-color: #ffffff;
}

/* Настройки секций сайта */
section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: var(--dark);
    margin-top: 0;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    margin: 15px auto 0;
}

.bg-light {
    background-color: var(--light);
    max-width: 100%;
}

/* ==========================================================================
   2. ШАПКА И НАВИГАЦИЯ (HEADER)
   ========================================================================== */
header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-weight: bold;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark);
}

/* Стили для ссылки внутри логотипа */
.logo a {
    color: var(--dark);        /* Цвет как у обычного текста */
    text-decoration: none;      /* Убираем подчеркивание */
    transition: opacity 0.3s ease; /* Плавное изменение при наведении (опционально) */
}

/* При наведении мыши — можно сделать слегка прозрачным (опционально) */
.logo a:hover {
    opacity: 0.8;
    text-decoration: none;      /* Убираем подчеркивание при наведении (на всякий случай) */
}

nav a {
    color: var(--dark);
    text-decoration: none;
    margin-left: 25px;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

/* ==========================================================================
   3. ГЛАВНЫЙ ЭКРАН (HERO) — ОПТИМИЗИРОВАНО ДЛЯ ANDROID
   ========================================================================== */
.hero {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('banner.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    padding: 160px 20px 100px;
}

.hero h1 {
    font-size: 42px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 35px;
}

/* Кнопки */
.btn {
    background: var(--primary);
    color: #ffffff;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background: #e04b4b;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    display: block;
    font-size: 16px;
    box-sizing: border-box;
}

/* ==========================================================================
   4. БЛОК НАШИ УСЛУГИ — 3 КОЛОНКИ
   ========================================================================== */
.grid-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    justify-content: center;
}

.service-card {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.service-img-wrapper {
    width: calc(100% - 30px);
    margin: 15px auto 0;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    background-color: #eeeeee;
    flex-shrink: 0;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #ffffff;
    transition: transform 0.5s ease;
    will-change: transform;
    display: block;
}

.service-card:hover .service-img-wrapper img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 25px;
    flex-grow: 1;
}

.service-card h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: var(--dark);
    font-weight: bold;
}

.service-card p {
    margin: 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

/* ==========================================================================
   5. ЕДИНЫЙ СТИЛЬ ДЛЯ КАРТОЧЕК (СХЕМА РАБОТЫ И ПРЕИМУЩЕСТВА)
   ========================================================================== */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 20px;
    justify-content: center;
    align-items: stretch;
}

.styled-card {
    background: #ffffff;
    padding: 40px 25px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
    position: relative;
    box-sizing: border-box;
}

.styled-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.card-badge {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
    display: block;
}

.styled-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin: 0 0 12px 0;
    font-weight: bold;
}

.styled-card p {
    font-size: 14px;
    color: #666666;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   6. КАЛЬКУЛЯТОР И ФОРМА ЗАКАЗА
   ========================================================================== */
.calc-container {
    background: var(--light);
    padding: 40px 30px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: var(--dark);
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.total-box {
    background: #ffffff;
    border-left: 4px solid var(--primary);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    margin: 25px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.total-box span {
    color: var(--primary);
    font-size: 24px;
}

/* ==========================================================================
   7. ПОДВАЛ САЙТА (FOOTER)
   ========================================================================== */
footer {
    background: var(--dark);
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

footer p {
    margin: 6px 0;
    opacity: 0.8;
}

footer p strong {
    color: #ffffff;
    opacity: 1;
}

/* ==========================================================================
   8. АДАПТИВНОСТЬ ПОД МОБИЛЬНЫЕ ЭКРАНЫ
   ========================================================================== */
@media (max-width: 992px) {
    /* На планшетах — 2 колонки для услуг */
    .grid-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 50px 15px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }
    
    nav a {
        margin: 0 10px;
        font-size: 13px;
    }
    
    .hero {
        padding: 150px 15px 70px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 26px;
        margin-bottom: 35px;
    }
    
    .calc-container {
        padding: 25px 20px;
    }
}

@media (max-width: 576px) {
    /* На телефонах — 1 колонка для услуг */
    .grid-services {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-img-wrapper {
        width: calc(100% - 20px);
        margin: 10px auto 0;
    }
}