/* Базовые настройки и переменные */
:root {
    --color-bg: #f4f4f2;
    --color-text: #1a1a1a;
    --color-accent: #e63946;
    --font-main: 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    /* Защита от горизонтального скролла на узких экранах */
    overflow-x: hidden; 
    width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Плавная адаптивная типографика */
h1 { font-size: clamp(2.2rem, 5vw, 5.5rem); line-height: 1.1; margin-bottom: 20px; text-transform: uppercase; letter-spacing: -2px; word-wrap: break-word; }
h1 span { color: var(--color-accent); }
h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); margin-bottom: 40px; letter-spacing: -1px; word-wrap: break-word; }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); margin-bottom: 15px; }
p { font-size: clamp(1rem, 1.5vw, 1.15rem); margin-bottom: 20px; opacity: 0.9; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary { background-color: var(--color-accent); color: #fff; }
.btn-primary:hover { background-color: #1a1a1a; }

/* Структурные блоки */
.block { padding: 100px 0; }
.center { text-align: center; }

/* Hero секция */
.hero { height: 100vh; min-height: 600px; display: flex; align-items: center; border-bottom: 2px solid var(--color-text); }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; width: 100%; }
.dates { font-weight: bold; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; font-size: clamp(0.8rem, 1vw, 0.9rem); }
.subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); margin-bottom: 40px; max-width: 90%; }

/* Изображения (десктоп) */
.content-img {
    width: 100%;
    height: 600px;
    object-fit: cover; /* На десктопе обрезаем под единую сетку */
    display: block;
    background-color: #ddd;
}
.content-img.tall { height: 700px; }

/* Сетки */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card { border-top: 3px solid var(--color-text); padding-top: 20px; }
.layout-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

/* Подвал */
footer { background-color: var(--color-text); color: #fff; padding: 40px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
footer a { color: var(--color-accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Анимации */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Цвета и Z-паттерн */
.dark-bg { background-color: #1a1a1a; color: #f4f4f2; }
.dark-bg h2 { color: #fff; }
.dark-bg p { opacity: 0.8; }
.lead { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: bold; margin-bottom: 25px; color: var(--color-accent); opacity: 1 !important; }
.section-title { margin-bottom: 80px; }

.z-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 100px; }
.z-row:last-child { margin-bottom: 0; }
.z-text h3 { color: var(--color-accent); }
.z-row.reverse .z-text { order: 2; }
.z-row.reverse .z-img { order: 1; }

/* ========================================= */
/* АДАПТИВНОСТЬ (МЕДИА-ЗАПРОСЫ)              */
/* ========================================= */

/* 1. БОЛЬШИЕ ЭКРАНЫ (Мониторы от 1440px и до 1920px+) */
@media (min-width: 1440px) {
    .container { max-width: 1400px; }
    .block { padding: 130px 0; }
    .content-img { height: 700px; }
    .content-img.tall { height: 800px; }
    .hero .container { gap: 80px; }
    .layout-split, .z-row { gap: 100px; }
}

/* 2. НОУТБУКИ / ГОРИЗОНТАЛЬНЫЕ ПЛАНШЕТЫ (до 1024px) */
@media (max-width: 1024px) {
    .block { padding: 80px 0; }
    .content-img { height: 400px; }
    .content-img.tall { height: 500px; }
    .layout-split, .z-row, .hero .container { gap: 40px; }
    .z-row { margin-bottom: 80px; }
}

/* 3. ВЕРТИКАЛЬНЫЕ ПЛАНШЕТЫ (до 768px) */
@media (max-width: 768px) {
    .hero { height: auto; padding: 100px 0 60px; border-bottom: none; }
    .hero .container, .layout-split, .z-row { grid-template-columns: 1fr; gap: 30px; }
    
    /* ИСПРАВЛЕНИЕ: Автоматическая высота для показа картинки без обрезки */
    .content-img, .content-img.tall { height: auto; margin-top: 20px; }
    
    .subtitle { max-width: 100%; }
    
    .z-row.reverse .z-text { order: 1; } 
    .z-row.reverse .z-img { order: 2; }
    .z-row { margin-bottom: 60px; }
    
    .footer-content { flex-direction: column; text-align: center; gap: 20px; }
}

/* 4. СМАРТФОНЫ (до 480px) */
@media (max-width: 480px) {
    .block { padding: 60px 0; }
    .section-title { margin-bottom: 40px; }
    
    .grid-3 { grid-template-columns: 1fr; gap: 20px; }
    
    /* ИСПРАВЛЕНИЕ: Автоматическая высота */
    .content-img, .content-img.tall { height: auto; }
    
    .z-row { margin-bottom: 50px; }
    
    .btn { display: block; width: 100%; text-align: center; padding: 16px 20px; }
}

/* 5. УЗКИЕ СМАРТФОНЫ (до 320px) */
@media (max-width: 320px) {
    .container { padding: 0 15px; }
    .block { padding: 40px 0; }
    
    .btn { padding: 14px 15px; font-size: 1rem; }
    
    /* ИСПРАВЛЕНИЕ: Автоматическая высота */
    .content-img, .content-img.tall { height: auto; margin-top: 15px; }
    
    h1 { letter-spacing: -1px; }
    .z-row { margin-bottom: 40px; gap: 20px; }
}