/* ==========================================================================
   1. CSS Переменные и Базовые настройки
   ========================================================================== */
/* Локальные шрифты Montserrat */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

   :root {
    --primary-color: #0b2c56; 
    --accent-color: #c9a050; /* Золотой для фонов, кнопок и крупных элементов (где контраст не так критичен) */
    --accent-text: #82621f;  /* Добавлено (a11y): Более темный золотой для текста на белом фоне (WCAG >= 4.5:1) */
    --text-color: #2D3748;
    --text-light: #718096;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --focus-color: #3182ce;
    --font-family: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Доступность: Видимый фокус при навигации с клавиатуры */
*:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 2px;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Фикс для предотвращения скролла из-за позиционированных элементов */
html { max-width: 100vw; overflow-x: hidden; }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--primary-color); font-weight: 700; line-height: 1.2; }
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; } .mt-60 { margin-top: 60px; }
.mb-20 { margin-bottom: 20px; } .mb-40 { margin-bottom: 40px; } .mb-60 { margin-bottom: 60px; }

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

/* ==========================================================================
   2. Утилиты (Доступность)
   ========================================================================== */
/* Скрываем заголовки визуально, но оставляем для скринридеров и SEO */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0);
    border: 0; white-space: nowrap;
}

/* ==========================================================================
   3. Кнопки
   ========================================================================== */
.btn { 
    display: inline-block; padding: 16px 32px; border-radius: 4px; text-decoration: none; 
    font-weight: 600; cursor: pointer; border: none; text-align: center; transition: all 0.3s ease; 
}
.btn-primary { background-color: var(--primary-color); color: var(--white); }
.btn-primary:hover { 
    background-color: var(--accent-color); transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(201, 160, 80, 0.3); 
}
.btn-outline { background-color: transparent; color: var(--accent-color); border: 2px solid var(--accent-color); }
.btn-outline:hover { 
    background-color: var(--accent-color); color: var(--primary-color); 
    transform: translateY(-3px); box-shadow: 0 10px 20px rgba(201, 160, 80, 0.25); 
}
.btn-block { width: 100%; display: block; }

/* ==========================================================================
   4. Шапка и Навигация (Mobile First)
   ========================================================================== */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 1000;
}

.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; position: relative; }

.logo-wrapper { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-icon { width: 44px; height: 44px; }
.logo-text { font-weight: 300; font-size: 24px; color: var(--primary-color); letter-spacing: 2px; text-transform: uppercase; }
.logo-text span { font-weight: 600; color: var(--accent-color); }

/* Мобильное меню (По умолчанию) */
.mobile-menu-btn { 
    display: flex; background: none; border: none; cursor: pointer; 
    flex-direction: column; gap: 6px; width: 30px; height: 24px; position: relative; z-index: 1001; 
}
.mobile-menu-btn span { 
    display: block; width: 100%; height: 2px; background: var(--primary-color); 
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); position: absolute; left: 0; 
}
.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 11px; }
.mobile-menu-btn span:nth-child(3) { top: 22px; }

.mobile-menu-btn.open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

.nav-links { 
    list-style: none; position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--white); display: flex; flex-direction: column; gap: 0;
    padding: 10px 0; box-shadow: 0 15px 20px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s ease; z-index: 999;
}
.nav-links.active { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-links li { width: 100%; text-align: center; }
.nav-links a { 
    display: block; padding: 15px 20px; border-bottom: 1px solid var(--border-color);
    text-decoration: none; color: var(--text-color); font-weight: 500; font-size: 15px; 
    text-transform: uppercase; transition: 0.3s; 
}
.nav-links li:last-child a { border-bottom: none; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-text); }

/* ==========================================================================
   5. Макеты страниц (Mobile First)
   ========================================================================== */

/* Hero */
.hero-section { 
    position: relative; padding: 40px 0; min-height: 480px; 
    display: flex; align-items: center; text-align: center;
    background-color: var(--primary-color); 
}
.hero-bg { background-image: url('../img/index.webp'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-section::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(90deg, rgba(11, 44, 86, 0.98) 0%, rgba(11, 44, 86, 0.85) 45%, rgba(11, 44, 86, 0.1) 100%);
}
.hero-split { position: relative; z-index: 1; display: block; max-width: 100%; }
.hero-title { color: var(--white); font-size: 30px; line-height: 1.25; margin-bottom: 24px; }
.hero-subtitle { font-size: 18px; color: #e2e8f0; margin-bottom: 40px; line-height: 1.6; }

/* Философия */
.philosophy-section { position: relative; padding: 60px 0; min-height: 400px; display: flex; align-items: center; background-color: var(--primary-color); }
.philosophy-bg { background-image: url('../img/about.webp'); background-size: cover; background-position: center right; background-repeat: no-repeat; }
.philosophy-section::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(90deg, rgba(11, 44, 86, 0.98) 0%, rgba(11, 44, 86, 0.85) 55%, rgba(11, 44, 86, 0.1) 100%);
}
.philosophy-text { position: relative; z-index: 1; max-width: 650px; color: var(--white); font-size: 18px; line-height: 1.7; border-left: 4px solid var(--accent-color); padding-left: 20px; }
.philosophy-text .page-title { color: var(--white); margin-bottom: 30px; font-size: 28px; text-align: left; }

/* Услуги (Каталог и Детали) */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.catalog-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.06); display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.catalog-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.catalog-image { width: 100%; height: 240px; object-fit: cover; border-bottom: 4px solid var(--accent-color); }
.catalog-content { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.catalog-icon { font-size: 28px; color: var(--accent-text); margin-bottom: 15px; } 
.catalog-content h2, .catalog-content h3 { font-size: 20px; margin-bottom: 15px; color: var(--primary-color); line-height: 1.4; }
.catalog-content p { color: var(--text-light); font-size: 15px; margin-bottom: 25px; flex-grow: 1; line-height: 1.6; }

.service-page-hero { position: relative; padding: 60px 0; background-color: var(--primary-color); z-index: 1; }
.service-page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(11, 44, 86, 0.85); z-index: -1; }
.service-page-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: -2; }
.service-page-content { max-width: 800px; margin: 0 auto; text-align: center; color: var(--white); }
.service-page-content h1 { color: var(--white); font-size: 28px; margin-bottom: 20px; }
.service-page-content p { font-size: 18px; color: #e2e8f0; }

.service-details-grid { display: grid; grid-template-columns: 1fr; gap: 30px; padding: 60px 0; }
.service-col h4 { font-size: 20px; margin-bottom: 20px; color: var(--primary-color); display: flex; align-items: center; gap: 12px; }
.service-col h4 i { color: var(--accent-text); font-size: 24px; }
.service-col p, .service-col ul { color: var(--text-color); font-size: 16px; line-height: 1.7; }
.service-col ul { padding-left: 20px; }
.service-col li { margin-bottom: 12px; }

/* Стоимость услуг */
.pricing-section { position: relative; padding: 60px 0; min-height: 500px; display: flex; align-items: center; background-color: var(--primary-color); z-index: 1;}
.pricing-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: -2; }
.pricing-section::before { content: ''; position: absolute; inset: 0; background: rgba(11, 44, 86, 0.88); z-index: -1; }
.pricing-content { max-width: 800px; margin: 0 auto; color: var(--white); }
.pricing-text { font-size: 16px; line-height: 1.7; color: #e2e8f0; }
.pricing-text strong { color: var(--white); }
.pricing-text .highlight-text { color: var(--accent-color); font-weight: 600; border: 1px solid rgba(201, 160, 80, 0.3); padding: 20px; font-size: 15px; border-radius: 8px; background: rgba(11, 44, 86, 0.5); backdrop-filter: blur(5px); }

/* Контакты */
.contacts-section { position: relative; padding: 60px 0; min-height: auto; display: flex; align-items: center; background-color: var(--primary-color); z-index: 1; }
.contacts-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; z-index: -2; }
.contacts-section::before { content: ''; position: absolute; inset: 0; background: rgba(11, 44, 86, 0.90); z-index: -1; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: start; }
.contact-info h2, .contact-info h3 { color: var(--white); font-size: 18px; margin-bottom: 10px; margin-top: 30px; display: flex; align-items: center; gap: 10px; }
.contact-info h2:first-child, .contact-info h3:first-child { margin-top: 0; }
.contact-info h2 i, .contact-info h3 i { color: var(--accent-color); font-size: 20px; }
.contact-info p { color: #e2e8f0; font-size: 16px; margin-bottom: 20px; padding-left: 0; }
.contact-info .email-link { color: var(--accent-color); text-decoration: none; font-weight: 600; font-size: 20px; transition: color 0.3s; }
.contact-info .email-link:hover { color: var(--white); }

.map-container { border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); }
.map-container iframe { display: block; width: 100%; }

.contact-form-container { background: var(--white); padding: 30px 20px; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.contact-form-container h2, .contact-form-container h3 { color: var(--primary-color); font-size: 22px; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.contact-form-container h2 i, .contact-form-container h3 i { color: var(--accent-text); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--primary-color); }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 6px; font-family: inherit; font-size: 16px; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--focus-color); } 
.checkbox-group { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-group input { width: auto; margin-top: 4px; }
.checkbox-group label { font-weight: 400; font-size: 13px; color: var(--text-light); }
.checkbox-group a { color: var(--primary-color); text-decoration: underline; }

/* Доверие и Команда */
.trust-section { padding: 60px 0; background: var(--white); border-bottom: 1px solid var(--border-color); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 30px; text-align: center; }
.trust-icon { font-size: 48px; color: var(--accent-text); margin-bottom: 15px; } 
.trust-number { font-size: 42px; font-weight: 800; color: var(--primary-color); margin-bottom: 10px; }
.trust-desc { font-size: 16px; color: var(--text-light); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.team-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.team-photo img { width: 100%; height: auto; display: block; border-bottom: 3px solid var(--accent-color); object-fit: cover; }
.team-info { padding: 30px; }
.team-role { color: var(--accent-text); font-weight: 600; margin-bottom: 15px; font-size: 14px; text-transform: uppercase; }

/* Футер */
.site-footer { background: #061830; color: #a0aec0; padding-top: 60px; padding-bottom: 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h2, .footer-col h3 { color: var(--white); margin-bottom: 20px; font-size: 18px; }
.footer-logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 15px; }
.footer-logo-link .footer-icon { width: 32px; height: 32px; }
.footer-logo-link .footer-title { font-family: var(--font-family); color: var(--white); font-size: 20px; font-weight: 600; text-transform: uppercase; }
.footer-logo-link .footer-title span { color: var(--accent-color); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #a0aec0; text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; flex-direction: column; text-align: center; gap: 15px; font-size: 14px; }

/* Анимации */
.fade-in-up { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; } .delay-2 { transition-delay: 0.3s; }

/* ==========================================================================
   6. Планшеты (Tablet) >= 768px
   ========================================================================== */
@media (min-width: 768px) {
    /* Навигация десктопного вида */
    .mobile-menu-btn { display: none; }
    .nav-links {
        position: static; width: auto; background: transparent; padding: 0; box-shadow: none;
        flex-direction: row; gap: 30px; align-items: center;
        opacity: 1; visibility: visible; transform: none;
    }
    .nav-links li { width: auto; text-align: left; }
    .nav-links a { display: inline; padding: 0; border: none; }

    /* Hero-блок */
    .hero-section { min-height: clamp(500px, 75vh, 800px); padding: 0; text-align: left; }
    .hero-bg { background-position: center right; }
    .hero-split { max-width: 650px; }
    .hero-title { font-size: 42px; }

    /* Философия */
     .philosophy-section { min-height: clamp(500px, 70vh, 800px); padding: 8vh 0; }
    .philosophy-text { padding-left: 30px; }
    .philosophy-text .page-title { font-size: 36px; }

    /* Страницы услуг и стоимости */
    .service-page-hero { padding: 8vh 0; }
    .service-page-content h1 { font-size: 40px; }
    .pricing-section { padding: 8vh 0; min-height: clamp(500px, 70vh, 800px); }
    .pricing-text { font-size: 18px; }
    .pricing-text .highlight-text { padding: 25px; }
    
    /* Контакты */
    .contacts-section { padding: 8vh 0; min-height: clamp(600px, 80vh, 900px); }
    .contact-form-container { padding: 40px; }
    .contact-info p { padding-left: 30px; }

    /* Сетки */
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ==========================================================================
   7. Десктопы (Desktop) >= 992px
   ========================================================================== */
@media (min-width: 992px) {
    .trust-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
    .service-details-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
    .contact-grid { grid-template-columns: 1fr 1fr; gap: 50px; }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}