/* ==========================================================================
   1. СБРОС СТИЛЕЙ И ПЕРЕМЕННЫЕ (Переменные ускоряют кастомизацию)
   ========================================================================== */
:root {
    --primary-color: #0077c8;     /* Аргентинский голубой */
    --secondary-color: #333333;   /* Темно-серый для текста */
    --accent-color: #ffb81c;      /* Солнечно-желтый для кнопок CTA */
    --bg-light: #f8f9fa;          /* Светлый фон для секций */
    --white: #ffffff;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px;
    --transition-fast: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

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

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ==========================================================================
   2. ШАПКА И ВЫПАДАЮЩЕЕ МЕНЮ (SEO-friendly & Accessible Navigation)
   ========================================================================== */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.menu-list {
    display: flex;
    gap: 20px;
}

.menu-item {
    position: relative;
    padding: 30px 0; /* Увеличивает зону наведения мыши */
}

.menu-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--secondary-color);
    transition: var(--transition-fast);
}

.menu-link:hover, .menu-link.active {
    color: var(--primary-color);
}

/* Логика выпадающего подменю (Dropdown) */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    transition: var(--transition-fast);
}

.sub-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Показ меню при наведении (Desktop) */
.menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Кнопки (CTA) */
.btn, .btn-menu-cta {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-menu-cta {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    font-size: 14px;
}

.btn-menu-cta:hover {
    background-color: #e5a413;
}

/* ==========================================================================
   3. ГЛАВНЫЙ ЭКРАН И СЕТКА КОНТЕНТА (Index Content Elements)
   ========================================================================== */
/* ==========================================================================
   ОБНОВЛЕННАЯ СЕКЦИЯ HERO (Премиальный Mesh-градиент для Google LCP)
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 140px 0 120px 0;
    text-align: center;
    overflow: hidden;
    /* Базовый градиент в цветах флага Аргентины */
    background-color: #f3f9fd;
    background-image: 
        radial-gradient(at 0% 0%, rgba(190, 227, 248, 0.5) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 234, 167, 0.3) 0px, transparent 40%),
        radial-gradient(at 50% 100%, rgba(255, 255, 255, 1) 0px, transparent 60%);
}

/* Декоративный геометрический элемент на фоне (улучшает визуальную глубину) */
.hero-section::before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 1400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 119, 200, 0.04) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2; /* Поднимаем контент над фоновыми эффектами */
    max-width: 900px;
}

/* Стилизация главного заголовка H1 (Критически важен для SEO) */
.hero-section h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #111111;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

/* Выделение года или важных акцентов цветом */
.hero-section h1 span {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, #005fa0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Стилизация подзаголовка */
.hero-section .subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #4a5568;
    max-width: 720px;
    margin: 0 auto 40px auto;
    font-weight: 400;
}

/* Блок с кнопками (CTA) */
.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Кнопки с современными микро-взаимодействиями */
.hero-section .btn {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.2s ease, 
                box-shadow 0.2s ease;
}

.hero-section .btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 119, 200, 0.15);
}

.hero-section .btn-primary:hover {
    background-color: #0066ad;
    box-shadow: 0 12px 24px rgba(0, 119, 200, 0.25);
    transform: translateY(-2px);
}

.hero-section .btn-secondary {
    background-color: var(--white);
    color: var(--secondary-color);
    border: 1px solid #e2e8f0;
}

.hero-section .btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Активный клик по кнопкам */
.hero-section .btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ДИСПЛЕЕВ ТАБЛЕТОВ И СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 80px 0;
    }
    
    .hero-section h1 {
        font-size: 34px;
        line-height: 1.3;
        margin-bottom: 16px;
        padding: 0 10px;
    }
    
    .hero-section .subtitle {
        font-size: 17px;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .hero-cta {
        flex-direction: column; /* Кнопки встают друг под друга на мобильном */
        gap: 12px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .hero-section .btn {
        width: 100%; /* Кнопки растягиваются на всю доступную ширину экрана */
        text-align: center;
        padding: 14px 24px;
    }
}


.btn-primary { background-color: var(--primary-color); color: var(--white); }
.btn-primary:hover { background-color: #005fa0; }
.btn-secondary { background-color: #e9ecef; color: var(--secondary-color); }
.btn-secondary:hover { background-color: #dee2e6; }

.intro-section {
    padding: 60px 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-section h2 { margin-bottom: 20px; }

/* Сетка карточек через CSS Grid */
.services-grid {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.services-grid h2 {
    text-align: center;
    margin-bottom: 40px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-card h3 { margin-bottom: 15px; color: var(--primary-color); }
.grid-card p { margin-bottom: 20px; color: #555; }
.card-link { font-weight: 600; color: var(--primary-color); }

/* ==========================================================================
   4. ПОДВАЛ САЙТА (Footer Layout)
   ========================================================================== */
.site-footer {
    background-color: #1a1a1a;
    color: #aeaeae;
    padding: 60px 0 0 0;
    font-size: 14px;
}

.footer-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    padding-bottom: 40px;
}

.footer-block {
    flex: 1;
    min-width: 250px;
}

.footer-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 20px;
}

.footer-nav ul li {
    margin-bottom: 10px;
}

.footer-nav ul li a:hover {
    color: var(--white);
}

.footer-contacts p {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid #2d2d2d;
    padding: 20px 0;
    font-size: 12px;
    text-align: center;
}

/* ==========================================================================
   5. АДАПТИВНОСТЬ / МОБИЛЬНЫЕ СТИЛИ (Responsive Design)
   ========================================================================== */
@media (max-width: 992px) {
    .main-navigation, .header-cta-btn {
        display: none; /* Скрываем десктопное меню, готовимся к мобильной кнопке-гамбургеру */
    }
    .hero-section h1 { font-size: 32px; }
    .footer-wrap { flex-direction: column; }
}

.form-status-message {
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================================================
   СЕКЦИЯ С ФОРМОЙ ОБРАТНОЙ СВЯЗИ (Form Section)
   ========================================================================== */
.form-section {
    padding: 80px 0;
    background-color: var(--white);
    border-top: 1px solid #e9ecef;
}

.form-container {
    max-width: 600px; /* Ограничиваем ширину формы для удобства чтения на ПК */
    margin: 0 auto;
    text-align: center;
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Мягкая современная тень */
}

.form-container h2 {
    font-size: 28px;
    color: #111111;
    margin-bottom: 15px;
}

.form-container p {
    font-size: 15px;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Элементы формы */
.ajax-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Отступы между полями */
    text-align: left;
}

.form-group {
    position: relative;
    width: 100%;
}

/* Стилизация текстовых полей и выпадающего списка */
.ajax-form input[type="text"],
.ajax-form input[type="email"],
.ajax-form select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: var(--font-main);
    color: var(--secondary-color);
    background-color: var(--white);
    border: 1px solid #cccccc;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none; /* Убираем дефолтные стили Safari для select */
    -moz-appearance: none;
    appearance: none;
}

/* Стилизация стрелочки в select (так как мы отключили стандартную через appearance) */
.form-group:has(select)::after {
    content: "▼";
    font-size: 12px;
    color: #888888;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Чтобы клик проходил сквозь стрелочку */
}

/* Эффект фокуса (Focus State) — критически важен для доступности сайта по правилам Google */
.ajax-form input:focus,
.ajax-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.15); /* Мягкое голубое свечение */
}

/* Стилизация кнопки отправки */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background-color: #005fa0;
}

.submit-btn:active {
    transform: scale(0.98); /* Легкий эффект нажатия */
}

/* Состояние заблокированной кнопки при отправке через AJAX */
.submit-btn:disabled {
    background-color: #a0c4de !important;
    cursor: not-allowed;
}

/* Стили для сообщений об успехе/ошибке (дополнение к прошлому коду) */
.form-status-message {
    font-size: 15px;
    border-radius: 6px;
    text-align: center;
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 576px) {
    .form-container {
        padding: 25px 20px;
        border-radius: 0; /* На мобильных экранах форма растянется на всю ширину */
    }
    .form-container h2 {
        font-size: 22px;
    }
}

/* ==========================================================================
   МОБИЛЬНОЕ МЕНЮ-ГАМБУРГЕР (Responsive Navigation Styles)
   ========================================================================== */

/* Кнопка гамбургера (по умолчанию скрыта на ПК) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Стили для экранов смартфонов и планшетов */
@media (max-width: 992px) {
    /* Показываем кнопку гамбургера */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Превращаем гамбургер в крестик при активации */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Перестраиваем навигацию в выезжающую панель */
    .main-navigation {
        display: block !important; /* Перебиваем display: none из прошлых стилей */
        position: fixed;
        top: 0;
        right: -100%; /* Меню спрятано за правым экраном */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 100px 20px 40px 20px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1050;
        overflow-y: auto; /* Добавляем прокрутку, если пунктов много */
    }

    /* Когда меню активно, выдвигаем его */
    .main-navigation.active {
        right: 0;
    }

    /* Делаем пункты меню вертикальными */
    .menu-list {
        flex-direction: column;
        gap: 15px;
    }

    .menu-item {
        padding: 0;
        width: 100%;
    }

    .menu-link {
        display: block;
        padding: 10px 0;
        font-size: 18px; /* Увеличиваем размер шрифта для удобства нажатия пальцем */
        border-bottom: 1px solid #f1f1f1;
    }

    /* Отключаем десктопное раскрытие подменю при наведении мыши */
    .menu-item:hover .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    /* Стили для подменю на мобильных (делаем его раскрытым списком ниже основного пункта) */
    .sub-menu {
        position: relative;
        top: 0;
        box-shadow: none;
        padding: 5px 0 5px 15px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
    }
    
    .sub-menu li a {
        padding: 8px 0;
        font-size: 15px;
        color: #666666;
    }

    /* Прячем кнопку CTA из шапки на мобильных, чтобы не забивать экран */
    .header-cta-btn {
        display: none;
    }
}

/* ==========================================================================
   ОБНОВЛЕННАЯ СЕТКА КАРТОЧЕК (Services Grid Section)
   ========================================================================= */
.services-grid {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.services-grid .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Элегантные карточки с мягкой тенью и плавным эффектом наведения */
.grid-card {
    background-color: var(--white);
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.grid-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: 0 15px 35px rgba(0, 119, 200, 0.06);
}

.grid-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.grid-card:hover h3 {
    color: var(--primary-color);
}

.grid-card p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Интерактивная ссылка-стрелка */
.card-link {
    font-weight: 600;
    font-size: 15px;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.grid-card:hover .card-link {
    gap: 10px; /* Стрелка изящно сдвигается вправо при наведении */
}

/* ==========================================================================
   БЛОК ПРЕИМУЩЕСТВ ПАСПОРТА (Benefits Section)
   ========================================================================= */
.benefits-section {
    padding: 100px 0;
    background-color: var(--white);
}

.benefits-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-lead {
    text-align: center;
    font-size: 18px;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.benefits-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.benefit-item {
    position: relative;
    padding-left: 24px;
    border-left: 3px solid var(--primary-color); /* Вместо смайликов используем строгий графический маркер */
}

.benefit-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 12px;
}

.benefit-item p {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ЭКРАНОВ
   ========================================================================= */
@media (max-width: 768px) {
    .services-grid, .benefits-section {
        padding: 60px 0;
    }
    
    .services-grid .section-title, 
    .benefits-section h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .section-lead {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .grid-container, .benefits-list-grid {
        gap: 20px;
    }
    
    .grid-card {
        padding: 30px 25px;
    }
}

/* ==========================================================================
   СТИЛИ ДЛЯ ВНУТРЕННИХ СТРАНИЦ (Inner Pages Layout)
   ========================================================================== */
.inner-hero {
    background: linear-gradient(135deg, #f1f8fc 0%, #ffffff 100%);
    padding: 60px 0 50px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumbs {
    font-size: 13px;
    color: #718096;
    margin-bottom: 15px;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.inner-hero h1 {
    font-size: 38px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 15px;
    line-height: 1.2;
}

.inner-subtitle {
    font-size: 18px;
    color: #4a5568;
    max-width: 800px;
}

.content-section {
    padding: 60px 0;
}

.content-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 25px;
}

.content-section p {
    font-size: 16px;
    line-height: 1.7;
    color: #2d3748;
    margin-bottom: 20px;
}

/* Выделенные блоки внимания */
.highlight-box {
    background-color: #f7fafc;
    border-left: 4px solid var(--primary-color);
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #111111;
}

/* Сетка особенностей (ПМЖ / Суд) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 35px 0;
}

.feature-card {
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: 8px;
}

.feature-card h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.warning-text {
    font-style: italic;
    color: #718096 !important;
}

/* SEO Таблица цен */
.seo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0 15px 0;
    font-size: 15px;
    text-align: left;
}

.seo-table th, .seo-table td {
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
}

.seo-table th {
    background-color: #edf2f7;
    color: #111111;
    font-weight: 700;
}

.seo-table tr:nth-child(even) {
    background-color: #f7fafc;
}

.table-caption {
    font-size: 13px !important;
    color: #718096;
}

/* Адаптивность */
@media (max-width: 768px) {
    .inner-hero { padding: 40px 0 35px 0; }
    .inner-hero h1 { font-size: 26px; }
    .inner-subtitle { font-size: 15px; }
    .content-section { padding: 40px 0; }
    .content-section h2 { font-size: 22px; }
    .seo-table { display: block; overflow-x: auto; } /* Скролл для таблицы на мобилках */
}
