/* ==========================================================================
   1. CSS Переменные и Дизайн-система (Enterprise Консалтинг)
   ========================================================================== */
:root {
    --primary-color: #0b2c56; /* Глубокий премиальный синий (Trust Navy) */
    --accent-color: #c9a050; /* Приглушенное золото (Boutique Gold) */
    --text-color: #2D3748;
    --text-light: #718096;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Переменные безопасных зон (Safe Areas) для iOS */
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

/* ==========================================================================
   2. Базовый сброс и Типографика
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: var(--sat) var(--sar) 0 var(--sal); 
    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-20 { margin-top: 20px; }
.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; }
.w-100 { width: 100%; }

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

/* ==========================================================================
   3. Навигация
   ========================================================================== */
.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;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo-icon { width: 44px; height: 44px; display: block; }

.logo-text {
    font-family: 'Montserrat', sans-serif;
    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); }

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); }

.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px;
}
.mobile-menu-btn span { width: 25px; height: 3px; background: var(--primary-color); transition: 0.3s; }

/* ==========================================================================
   4. Кнопки
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    will-change: transform;
}

.btn-primary { background-color: var(--primary-color); color: var(--white); }
.btn-primary:hover { 
    background-color: var(--accent-color); 
    transform: translate3d(0, -3px, 0); 
    box-shadow: 0 10px 20px rgba(201, 160, 80, 0.3); 
}

/* ==========================================================================
   5. Блоки страниц (Герой, Траст, О компании, Услуги)
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #061830 100%);
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-title { 
    color: var(--white); 
    font-size: 42px; 
    line-height: 1.25;
    margin-bottom: 24px; 
}

.hero-subtitle { 
    font-size: 18px; 
    color: #e2e8f0; 
    margin-bottom: 40px; 
    line-height: 1.6;
}

.hero-image-wrapper {
    margin-top: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.trust-section { padding: 60px 0; background: var(--white); border-bottom: 1px solid var(--border-color); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.trust-icon { font-size: 48px; color: var(--accent-color); 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); }

.philosophy-section .text-content {
    background: var(--white); padding: 40px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    font-size: 18px; border-left: 4px solid var(--accent-color);
}
.philosophy-section p { margin-bottom: 20px; }
.philosophy-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 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-color); font-weight: 600; margin-bottom: 15px; font-size: 14px; text-transform: uppercase; }

.service-block { background: var(--white); border-radius: 8px; padding: 40px; margin-bottom: 40px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
.service-header-wrapper { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 25px; }
.service-icon { font-size: 32px; color: var(--accent-color); }
.service-block h2 { font-size: 24px; color: var(--primary-color); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-grid h4 { font-size: 16px; margin-bottom: 15px; color: var(--accent-color); display: flex; align-items: center; gap: 8px; }
.service-grid ul { padding-left: 20px; font-size: 15px; color: var(--text-color); }
.service-grid li { margin-bottom: 10px; }

/* ==========================================================================
   6. Футер и Нижняя Безопасная Зона
   ========================================================================== */
.site-footer { 
    background: #061830; 
    color: #a0aec0; 
    padding-top: 60px;
    padding-bottom: calc(20px + var(--sab)); 
    margin-top: 60px; 
}
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--white); margin-bottom: 20px; font-size: 18px; }

.footer-logo-link {
    display: flex; align-items: center; gap: 12px; text-decoration: none !important; margin-bottom: 15px; white-space: nowrap;
}
.footer-logo-link .footer-icon { display: block; width: 32px; height: 32px; }
.footer-logo-link .footer-title { font-family: 'Montserrat', sans-serif; color: #ffffff !important; font-size: 20px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.footer-logo-link .footer-title span { color: var(--accent-color) !important; font-weight: 600; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #a0aec0; text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-color); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; font-size: 14px; }

/* ==========================================================================
   7. Аппаратное ускорение анимаций (Standard UX)
   ========================================================================== */
.fade-in-up { 
    opacity: 0; 
    transform: translate3d(0, 30px, 0); 
    will-change: opacity, transform; 
}
.fade-in-up.is-visible {
    animation: fadeInUpCustom 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

@keyframes fadeInUpCustom {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ==========================================================================
   8. Медиа-запросы (Мобильная адаптивность)
   ========================================================================== */
@media (max-width: 992px) {
    .trust-grid, .service-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-text { text-align: center; }
}

@media (max-width: 768px) {
    .hero-section { padding: 40px 0 60px 0; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 16px; }
    
    .hero-image-wrapper {
        border-radius: 8px; 
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links { 
        display: flex; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        padding: 20px; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out; 
        z-index: 999;
    }
    
    .nav-links.active { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0); 
    }
    
    .mobile-menu-btn { display: flex; z-index: 1000; }
    
    .mobile-menu-btn.open span:nth-child(1) { 
        transform: translateY(8px) rotate(45deg); 
    }
    .mobile-menu-btn.open span:nth-child(2) { 
        opacity: 0; 
    }
    .mobile-menu-btn.open span:nth-child(3) { 
        transform: translateY(-8px) rotate(-45deg); 
    }
    
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 10px; }
    .philosophy-image { height: 250px; }
    
    .contact-form .btn { 
        width: 100%; 
    }
}

/* Стили для формы обратной связи */
.contact-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.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;
    box-sizing: border-box;
    font-family: inherit; 
    font-size: 16px;
    transition: border-color 0.3s;
}
.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-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);
}