/* =========================================
   1. БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ========================================= */
:root {
    --bg-color: #FAFAF8;       
    --bg-light: #F0EBE1;       
    --text-color: #2C2C2C;     /* Сделали чуть темнее для контраста */
    --text-muted: #444444;     /* Затемнили, чтобы читалось на фоне bg-light */
    --primary-color: #6A5C51;  /* Более глубокий коричневый (проходит тест 4.5:1) */
    --primary-hover: #4F443C;  /* Темный ховер */
    --border-color: #D6CEC0;   /* Чуть контрастнее граница */
    
    --font-main: 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    position: relative;
    z-index: 1;
}

/* =========================================
   2. АНИМИРОВАННЫЙ ФОНОВЫЙ УЗОР (Сердечко)
   ========================================= */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z' fill='%238c7a6b' fill-opacity='0.15'/%3E%3C/svg%3E");
    /* Изменяй эту цифру, чтобы сделать сердечки больше или меньше: */
    background-size: 35px; 
    animation: patternMove 100s linear infinite;
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

/* Базовые элементы */
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

h1, h2, h3 { font-weight: 400; margin-bottom: 20px; color: var(--text-color); }
h1 { font-size: 2.2rem; line-height: 1.2; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }
p { margin-bottom: 15px; color: var(--text-muted); }

/* =========================================
   3. КНОПКИ И ССЫЛКИ
   ========================================= */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover { background-color: var(--primary-color); color: #fff; }

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
}
.social-links .btn { width: 100%; max-width: 300px; }

.link-arrow { display: inline-block; color: var(--primary-color); font-weight: 500; margin-top: 10px; }
.link-arrow::after { content: ' →'; transition: var(--transition); }
.link-arrow:hover::after { padding-left: 5px; }

/* =========================================
   4. ШАПКА САЙТА (HEADER)
   ========================================= */
.header {
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.2rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.nav-list { display: none; }
.mobile-menu-btn {
    display: block; background: none; border: none; width: 30px; height: 20px;
    position: relative; cursor: pointer; z-index: 1001;
}
.mobile-menu-btn span {
    position: absolute; width: 100%; height: 2px;
    background-color: var(--text-color); left: 0; transition: var(--transition);
}
.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 9px; }
.mobile-menu-btn span:nth-child(3) { top: 18px; }

.nav.active .nav-list {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; width: 100%; background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color); padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.nav.active .nav-list li { margin-bottom: 15px; }

/* =========================================
   5. БЛОКИ С КОНТЕНТОМ (ОБЩЕЕ)
   ========================================= */
/* На мобилках всё идет колонкой: Текст -> Картинка */
.hero-inner, .about-inner, .datebrand-inner, .perspective-inner, .topics-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.custom-list li { position: relative; padding-left: 20px; margin-bottom: 10px; color: var(--text-muted); }
.custom-list li::before {
    content: "•"; color: var(--primary-color); position: absolute;
    left: 0; font-size: 1.2rem; line-height: 1;
}

/* =========================================
   6. КАРТОЧКИ (ФОРМАТЫ И ШАГИ)
   ========================================= */
.formats-grid, .contact-steps {
    display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px;
}
.format-card, .step-card {
    background-color: #fff; padding: 30px; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.format-card:hover, .step-card:hover {
    transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
/* --- НОВЫЕ ПРАВИЛА ДЛЯ ЦЕНТРИРОВАНИЯ И УМЕНЬШЕНИЯ КАРТОЧЕК --- */
.format-card {
    padding: 20px; /* Уменьшаем карточку визуально */
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем картинку по горизонтали */
    text-align: center; /* Центрируем текст */
}

.format-card img {
    border-radius: 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    margin-bottom: 15px; /* Отступ от картинки до заголовка */
}

.format-card p:last-child {
    margin-bottom: 0; /* Убираем огромную дыру снизу карточки */
}
/* =========================================
   7. ПОДВАЛ (FOOTER)
   ========================================= */
.footer { background-color: #fff; padding: 30px 0; border-top: 1px solid var(--border-color); }
.footer-copyright { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); }
.privacy-link { text-decoration: underline; }
.privacy-link:hover { color: var(--primary-color); }

/* =========================================
   8. АДАПТИВНОСТЬ ДЛЯ ПК И ПЛАНШЕТОВ
   ========================================= */
@media (min-width: 768px) {
    .section { padding: 80px 0; }
    h1 { font-size: 3rem; }
    
    .mobile-menu-btn { display: none; }
    .nav-list { display: flex; gap: 30px; }
    .nav-list a:hover { color: var(--primary-color); }
    
    /* 1. БАЗОВАЯ РАССТАНОВКА НА ПК (Текст слева, Фото справа) */
    .hero-inner, .about-inner, .datebrand-inner, .perspective-inner, .topics-inner {
        flex-direction: row;
        align-items: center;
        gap: 50px;
    }
    
    /* 2. ШАХМАТНЫЙ ПОРЯДОК: Переворачиваем нужные блоки (Фото слева, Текст справа) */
    .about-inner, 
    .perspective-inner {
        flex-direction: row-reverse;
    }
    
    /* Чтобы блоки занимали ровно по 50% ширины */
    .hero-content, .hero-image,
    .about-content, .about-image,
    .datebrand-content, .datebrand-image,
    .perspective-content, .perspective-image,
    .topics-content, .topics-image {
        flex: 1;
    }

    .social-links { flex-direction: row; }
    .social-links .btn { width: auto; }
    .formats-grid, .contact-steps { grid-template-columns: repeat(3, 1fr); }
    .footer-copyright { flex-direction: row; justify-content: flex-start; gap: 20px; }
}

/* Класс для выравнивания текста по ширине */
.text-justify {
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* =========================================
   ДОПОЛНИТЕЛЬНЫЕ КЛАССЫ (ДЛЯ БЕЗОПАСНОГО HTML)
   ========================================= */
.social-start {
    justify-content: flex-start !important;
}
.mt-70 {
    margin-top: 70px !important;
}
.contact-subtitle {
    margin-bottom: 45px;
    color: var(--text-muted);
    font-size: 1.1rem;
}
