/* --- БАЗОВЫЕ НАСТРОЙКИ --- */
:root {
    --bg-color: #F9F8F6;
    --text-main: #1C1C1C;
    --text-sec: #4A4A4A;
    --accent: #999999;
    --border: #E5E5E5;
    --font-head: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    overflow: hidden; 
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
button { font-family: inherit; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
}

/* --- ШАПКА --- */
.header {
    padding: 25px 0;
    position: absolute; 
    top: 0; left: 0; width: 100%;
    z-index: 100;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Важно: предотвращает сжатие элементов */
    flex-wrap: nowrap; 
}

/* Гамбургер */
.hamburger {
    display: none;
    background: none; border: none;
    cursor: pointer;
    flex-direction: column; gap: 6px;
    z-index: 101;
    padding-right: 15px; /* Отступ от лого */
}
.hamburger span {
    width: 24px; height: 2px; background: var(--text-main);
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    white-space: nowrap; /* ЗАПРЕТ ПЕРЕНОСА */
}

.logo-main {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.logo-sub {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-sec);
    margin-top: 5px;
    font-weight: 500;
}
.sep { margin: 0 2px; color: #ccc; }

/* ДЕСКТОП МЕНЮ */
.desktop-menu { display: flex; gap: 30px; }
.menu-link {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
    color: #888; /* По умолчанию серый */
    transition: color 0.3s;
}
.menu-link:hover { color: var(--text-main); }

/* Подчеркивание при наведении */
.menu-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 1px; background: var(--text-main); transition: 0.3s;
}
.menu-link:hover::after { width: 100%; }

/* АКТИВНЫЙ ПУНКТ МЕНЮ */
.menu-link.active {
    color: var(--text-main); /* Черный цвет */
}
.menu-link.active::after {
    width: 100%; /* Подчеркивание всегда */
}

.phone-header { 
    font-weight: 600; font-size: 15px; 
    white-space: nowrap; /* ЗАПРЕТ ПЕРЕНОСА */
}

/* --- HERO --- */
.hero {
    height: 100vh;
    padding-top: 100px; 
    padding-bottom: 40px;
    display: flex;
    align-items: center; 
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 80px;
    align-items: center;
    width: 100%;
}

.hero-left-wrapper {
    position: relative;
    min-height: 450px; 
}

/* --- АНИМАЦИЯ КОНТЕНТА (Исправленная) --- */
.content-section {
    display: none; 
    opacity: 0;
    transform: translateY(10px); /* Исходное положение чуть ниже */
    transition: opacity 0.4s ease, transform 0.4s ease; /* Плавный переход */
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0); /* Встает на место */
}

h1, h2 {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 3.5vw, 4rem); 
    line-height: 1.15;
    margin-bottom: 30px;
    color: #000;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-sec);
    margin-bottom: 40px;
    max-width: 90%;
    padding-left: 20px;
    border-left: 3px solid var(--text-main);
}

.service-list {
    margin-bottom: 40px;
    padding-left: 20px;
}
.service-list li {
    margin-bottom: 12px;
    position: relative;
    font-size: 1.05rem;
    color: var(--text-sec);
}
.service-list li::before {
    content: "—";
    position: absolute; left: -20px; color: var(--text-main);
}

/* Кнопки */
.practices-tags {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 50px;
}
.tag-btn {
    background: #EBEAE8;
    border: none;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: 0.2s;
}
.tag-btn:hover { background: #dcdbd9; }

.btn-main {
    display: inline-block;
    background: var(--text-main);
    color: #fff;
    padding: 20px 40px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none; cursor: pointer;
    transition: background 0.3s;
}
.btn-main:hover { background: #3E3E3E; }
.btn-main:disabled { background: #999; cursor: not-allowed; }

.btn-group { display: flex; gap: 20px; align-items: center; }
.btn-back {
    background: none; border: none;
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    color: var(--text-sec); cursor: pointer; opacity: 0.6;
}
.btn-back:hover { opacity: 1; }

/* Форма */
.contact-form { max-width: 400px; margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }
.form-group input {
    width: 100%; padding: 15px;
    background: #fff; border: 1px solid #ddd;
    font-family: var(--font-body); font-size: 16px; color: var(--text-main);
}
.form-group input:focus { outline: none; border-color: var(--text-main); }
.contact-info p { color: var(--text-sec); margin-bottom: 5px; }

/* Партнеры */
.team-box {
    background: #fff; padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
}
.box-title {
    display: block; font-size: 10px; text-transform: uppercase; 
    letter-spacing: 2px; color: var(--accent); margin-bottom: 30px; font-weight: 600;
}
.partner-row {
    display: flex; align-items: center; gap: 20px; 
    margin-bottom: 25px; padding-bottom: 25px; 
    border-bottom: 1px solid #F0F0F0; cursor: pointer; transition: transform 0.2s;
}
.partner-row:last-child { border: none; margin: 0; padding: 0; }
.partner-row:hover { transform: translateX(5px); }
.avatar {
    width: 64px; height: 64px; background: #E5E5E5; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-info h4 { font-family: var(--font-head); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.p-info span { font-size: 13px; color: var(--text-sec); line-height: 1.4; display: block; }
.p-link { margin-top: 8px; font-size: 10px !important; text-transform: uppercase; font-weight: 700; opacity: 0.5; }

/* Мобильное меню */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); z-index: 200;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateY(-100%); transition: transform 0.3s ease;
    text-align: center;
}
.mobile-menu-overlay.active { transform: translateY(0); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 20px; }
.mobile-nav-links a {
    font-family: var(--font-head); font-size: 24px; 
    color: var(--text-main); text-decoration: none; display: block;
}
.close-menu {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; font-size: 30px; cursor: pointer;
}

/* Модалка */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(5px);
    z-index: 999; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
    background: #fff; width: 90%; max-width: 600px; padding: 50px;
    position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
.modal-close {
    position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 24px; cursor: pointer;
}
.modal-body { font-size: 15px; line-height: 1.6; color: var(--text-sec); }
.modal-body p { margin-bottom: 15px; }


/* --- АДАПТИВНОСТЬ --- */

/* Планшеты */
@media (max-width: 1024px) {
    body { height: auto; overflow: auto; } 
    .hero { height: auto; display: block; padding-top: 80px; }
    .hero-grid { grid-template-columns: 1fr; gap: 50px; }
    
    .desktop-menu { display: none; } 
    .hamburger { display: flex; } 
    
    .team-box { margin-top: 50px; }
    
    .nav-flex { justify-content: flex-start; gap: 20px; }
    .phone-header { margin-left: auto; font-size: 14px; }
    .logo-wrapper { align-items: flex-start; }
}

/* МОБИЛЬНЫЕ (До 480px) - Самые важные фиксы */
@media (max-width: 480px) {
    .container { padding: 0 20px; }
    
    /* 1. Логотип: Уменьшаем, чтобы влезал */
    .logo-main { font-size: 18px; }
    .logo-sub { font-size: 7px; letter-spacing: 1px; }
    
    /* 2. Телефон: Уменьшаем */
    .phone-header { font-size: 12px; }
    
    /* 3. Гамбургер: Чуть меньше */
    .hamburger { padding-right: 10px; }
    
    /* 4. Заголовки */
    h1, h2 { font-size: 2rem; }
    
    /* 5. Кнопки на всю ширину */
    .btn-main { width: 100%; text-align: center; }
    .btn-group { flex-direction: column; align-items: stretch; gap: 10px; }
    .btn-back { text-align: center; padding: 10px; }
    
    /* 6. Карточки партнеров */
    .partner-row { flex-direction: column; text-align: center; gap: 10px; }
    .p-info span { font-size: 12px; }
}