/* ==========================================
   ИНВЕСТИЦИИ В БУДУЩЕЕ — СТИЛИ
========================================== */

:root {
    --primary: #0B2345;
    --secondary: #C8A24D;
    --white: #ffffff;
    --light: #f6f7fb;
    --text: #2b2b2b;
    --shadow: 0 15px 40px rgba(0,0,0,.12);
    --radius: 18px;
    --transition: .35s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Страховка от растягивания картинок.
   Если у <img> заданы атрибуты width/height, а в CSS указана только width,
   браузер берёт высоту из атрибута и изображение деформируется.
   height:auto заставляет высоту считаться из пропорций файла. */
img {
    height: auto;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #f4f4f4;
    overflow-x: hidden;
    /* Исходное разрешение 4216x5968 сохранено полностью: на HiDPI-экранах
       фон не растягивается. WebP q85 при этом весит 257 КБ вместо 13.4 МБ
       у исходного PNG (PSNR 47.4 дБ — отличие не различимо глазом).
       background-position НЕ задаём: по умолчанию это "0 0", и при cover
       видна верхняя часть картинки с волнами. Со "center" окно съезжает
       на нижнюю часть с сеткой крестиков — внешний вид меняется. */
    background-image: url("../images/background.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================
   HEADER
========================================== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    backdrop-filter: blur(18px);
    background: rgba(11,35,69,.85);
    border-bottom: 1px solid rgba(255,255,255,.08);
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    transition: all 0.3s ease;
}

header.shrink .container {
    padding: 8px 0;
}

header.shrink .logo img {
    height: 46px;
    width: auto;
}

header.shrink nav ul {
    gap: 20px;
}

header.shrink nav a {
    font-size: 13px;
}

header.shrink .header-button {
    padding: 8px 16px;
    font-size: 12px;
}

/* Логотип почти квадратный (512x491), поэтому размер задаём по высоте:
   при width:180px он давал высоту ~175px и шапка вырастала до ~210px. */
.logo img {
    height: 64px;
    width: auto;
    transition: all 0.3s ease;
    display: block;
}

/* Меню и кнопка «Поддержать» в одной строке: на широких экранах кнопка
   стоит справа от пунктов, на телефоне прячется внутрь бургера. */
nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
    transition: all 0.3s ease;
}

nav a {
    color: white;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    font-size: 15px;
    letter-spacing: 0.3px;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary);
    left: 0;
    bottom: -8px;
    transition: var(--transition);
}

nav a:hover {
    color: var(--secondary);
}

nav a:hover::after {
    width: 100%;
}

.header-button {
    padding: 12px 24px;
    background: var(--secondary);
    color: white;
    border-radius: 40px;
    font-weight: 700;
    transition: var(--transition);
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(200,162,77,.45);
}

/* Тот же приём для кнопки в шапке: надпись не должна пропадать */
.header-button:hover,
.header-button:focus,
.header-button:active {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* ==========================================
   КНОПКА МЕНЮ (БУРГЕР) — только на телефоне
========================================= */
/* Три полоски. Когда меню раскрыто, складываются в крестик. */
.nav-toggle {
    display: none;              /* на широких экранах меню и так видно */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle:hover {
    border-color: var(--secondary);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   HERO
========================================== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(11,35,69,.70), rgba(11,35,69,.78));
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-logo {
    width: 240px;
    height: auto;
    margin-bottom: 40px;
}

#hero h1 {
    color: white;
    font-size: 64px;
    letter-spacing: 4px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
    /* Тень, чтобы заголовок читался поверх любого фонового фото */
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

#hero h1 span {
    color: var(--secondary);
}

#hero p {
    color: white;
    font-size: 24px;
    max-width: 700px;
    margin: auto;
    margin-bottom: 50px;
    line-height: 1.8;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 800;
    transition: var(--transition);
    box-shadow: var(--shadow);
    background: white;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons .btn:hover {
    transform: translateY(-6px);
}

.hero-buttons .gold {
    background: var(--secondary);
    color: white;
}

.hero-buttons .gold:hover {
    box-shadow: 0 15px 40px rgba(200,162,77,.5);
}

/* Жёстко фиксируем цвет надписи на золотой кнопке при наведении и фокусе.
   Правило идёт с повышенной точностью (.btn.gold:hover), поэтому его не
   перебьют ни другие правила, ни расширения браузера, меняющие цвета.
   Раньше здесь оставался только общий цвет — на золотом фоне надпись
   могла стать невидимой. */
.hero-buttons .btn.gold:hover,
.hero-buttons .btn.gold:focus,
.hero-buttons .btn.gold:active {
    color: #fff;
    -webkit-text-fill-color: #fff;
    background: var(--secondary);
}

.hero-buttons .outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.hero-buttons .outline:hover {
    background: white;
    color: var(--primary);
}

/* Анимированное «колёсико» внизу первого экрана — намекает листать вниз */
.scroll-indicator {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 15px;
}

.scroll-indicator span {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 9px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0%   { opacity: 0; transform: translateY(0); }
    35%  { opacity: 1; }
    75%  { opacity: 0; transform: translateY(15px); }
    100% { opacity: 0; }
}

/* ==========================================
   ОБЩИЕ СЕКЦИИ
========================================== */
section {
    padding: 110px 0;
    /* Шапка фиксированная: при переходе по ссылке из меню браузер
       прокручивает страницу к самому краю секции, и её заголовок
       оказывался под шапкой. Отступ равен высоте шапки. */
    scroll-margin-top: 110px;
}

section h2 {
    text-align: center;
    color: var(--primary);
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 22px;
}

/* Золотая черта под заголовком раздела — единый акцент по всему сайту */
section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 76px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

section .section-subtitle {
    text-align: center;
    font-size: 18px;
    color: rgba(11,35,69,0.6);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.7;
}

/* ==========================================
   О ПРОЕКТЕ
========================================== */
#about {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    text-align: left;
    margin-top: 30px;
}

.about-text-content p {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 20px;
    text-align: justify;
    text-justify: inter-word;
    text-indent: 30px;
}

.about-text-content p:last-child {
    margin-bottom: 0;
}

/* Блок с видео в «О проекте». Локальный файл отдаётся нативно,
   поэтому пропорции рамки должны совпадать с пропорциями самого видео:
   при несовпадении плеер покажет чёрные полосы (не растянет картинку). */
.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}

.about-image video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================
   НАПРАВЛЕНИЯ
========================================== */
#directions {
    background: rgba(11,35,69,0.03);
    padding-top: 70px;
    padding-bottom: 90px;
}

.direction-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 10px;
}

.direction-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 35px 25px;
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(200,162,77,0.15);
}

.direction-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: var(--secondary);
}

.direction-card .icon {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(200,162,77,0.18), rgba(200,162,77,0.05));
    border: 1px solid rgba(200,162,77,0.28);
    transition: var(--transition);
}

.direction-card:hover .icon {
    border-color: var(--secondary);
    transform: scale(1.08);
}

.direction-card h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.direction-card p {
    font-size: 14px;
    color: rgba(11,35,69,0.6);
    line-height: 1.6;
}

/* ==========================================
   ОСНОВАТЕЛИ
========================================== */
.founders-title {
    text-align: center;
    color: var(--primary);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 70px 0 0;
}

/* Специфичность: у `section .section-subtitle` — (0,1,1), поэтому селектор
   тоже должен опираться на section, иначе margin из общего правила побеждает. */
section .founders-subtitle {
    margin: 15px auto 45px;
}

.founders-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
}

.founders-grid .founder-block {
    flex: 1 1 300px;
    max-width: 370px;
    margin: 0;
    padding: 45px 30px 35px;
}

/* Размеры карточки задаёт .founders-grid .founder-block выше:
   все .founder-block на странице находятся внутри .founders-grid,
   поэтому дублировать здесь padding/margin/max-width не нужно. */
.founder-block {
    background: linear-gradient(135deg, #fef9f0 0%, #fff 40%, #fef9f0 100%);
    border: 3px solid var(--secondary);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(200,162,77,0.15);
    position: relative;
    transition: var(--transition);
    text-align: center;
}

.founder-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(200,162,77,0.2);
}

.founder-block .founder-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 28px;
    border-radius: 30px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(200,162,77,0.4);
    white-space: nowrap;
}

/* Единая рамка для фото/логотипа: любое изображение — портрет, квадрат
   или широкая «плашка» — занимает абсолютно одинаковую область и
   масштабируется пропорционально, без растяжения и обрезки.
   Формат 3:4 — книжная (портретная) ориентация. */
.founder-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    margin: 10px auto 20px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(11,35,69,0.10);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.founder-photo .founder-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    filter: none;
    margin: 0;
}

/* Вариант без белой подложки — для фотографии человека.
   Селектор из двух классов, чтобы перебить .founder-photo из медиазапросов
   (у них одинаковая специфичность, но они идут ниже по файлу). */
.founder-photo.founder-photo--plain {
    background: transparent;
    border: none;
    padding: 0;
}

/* Снимок заполняет рамку целиком: белых полей вокруг не остаётся.
   object-position подобран так, чтобы в кадр попадало лицо целиком. */
.founder-photo.founder-photo--plain .founder-logo {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: center 35%;
}

.founder-block .founder-company {
    color: rgba(11,35,69,0.55);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin: -8px 0 16px;
}

.founder-block .founder-sub {
    color: var(--secondary);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.founder-block .founder-desc {
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto;
}

.founders-grid .founder-block .founder-desc {
    font-size: 16px;
    line-height: 1.7;
}

/* ==========================================
   СТАТИСТИКА
========================================== */
#stats {
    background: var(--primary);
    color: white;
    padding: 80px 0;
}

#stats h2 {
    color: white;
    margin-bottom: 10px;
}

#stats .section-subtitle {
    color: rgba(255,255,255,0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    margin-top: 20px;
}

.stat-card h3 {
    font-size: 52px;
    color: var(--secondary);
    margin-bottom: 8px;
    font-weight: 900;
    position: relative;
    padding-bottom: 16px;
}

/* Золотая черта под цифрой — в тон заголовкам разделов */
.stat-card h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: rgba(200,162,77,0.55);
}

.stat-card span {
    font-size: 18px;
    letter-spacing: 1px;
    opacity: 0.8;
    font-weight: 400;
}

/* ==========================================
   МЕРОПРИЯТИЯ + КАРТА
========================================== */
#events {
    background: rgba(11,35,69,0.04);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.event-card {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 24px 20px;
    transition: var(--transition);
    border: 1px solid rgba(200,162,77,0.18);
    border-left: 5px solid var(--secondary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(200,162,77,0.4);
}

.event-card .date {
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-bottom: 12px;
    display: inline-block;
    align-self: flex-start;
    padding: 5px 14px;
    background: rgba(200,162,77,0.12);
    border-radius: 20px;
}

.event-card h3 {
    font-size: 20px;
    color: var(--primary);
    margin: 0 0 6px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.3;
    min-height: 52px;
}

.event-card .place {
    color: #666;
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 400;
    flex-shrink: 0;
}

.event-card .event-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    min-height: 38px;
}

.event-card .btn-small {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: auto;
    align-self: flex-start;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.event-card .btn-small:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Сообщение внутри сетки мероприятий: пустой список или ошибка загрузки.
   grid-column: 1 / -1 растягивает блок на всю сетку при любом числе колонок
   (раньше было 1/4, из-за чего на мобильной одноколоночной сетке создавались
   три лишних трека и появлялся горизонтальный скролл). */
.event-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 24px;
    color: #64748b;
    background: rgba(255,255,255,0.6);
    border-radius: var(--radius);
    line-height: 1.7;
}

/* Заглушка карты, если API Яндекс.Карт не загрузился */
.map-fallback {
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    text-align: center;
    background: rgba(255,255,255,0.75);
    color: #64748b;
}

.map-fallback-icon {
    font-size: 46px;
    line-height: 1;
}

.map-fallback p {
    color: var(--primary);
    font-weight: 600;
    font-size: 17px;
    margin: 0;
}

.map-fallback small {
    font-size: 13px;
    opacity: 0.8;
}

/* ==========================================
   КАРТА
========================================== */
.map-wrapper {
    position: relative;
    margin-top: 0;
}

#yandex-map {
    width: 100%;
    height: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid rgba(200,162,77,0.2);
}

.map-title {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 15px;
    font-size: 32px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.map-hint {
    text-align: center;
    margin: 0 0 20px;
    font-size: 14px;
    color: #64748b;
}

/* Кнопки-фильтры над картой: «Все», «Мероприятия ИВБ», виды спорта.
   Количество точек в категории видно сразу — понятно, что найдётся. */
.map-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}

.map-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: #fff;
    border: 2px solid rgba(11, 35, 69, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}

.map-filter:hover {
    border-color: var(--secondary);
    transform: translateY(-1px);
}

.map-filter.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.map-filter-count {
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(11, 35, 69, 0.08);
}

/* Точка на кнопке фильтра: тот же цвет, что у меток этого вида спорта
   на карте. Так видно, какой цвет чему соответствует. */
.map-filter-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}

.map-filter.is-active .map-filter-count {
    background: rgba(255, 255, 255, 0.22);
}

/* ==========================================
   FOOTER
========================================== */
footer {
    background: #06152b;
    color: rgba(255,255,255,0.7);
    padding: 50px 0 30px;
    border-top: 2px solid rgba(200,162,77,0.15);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

footer .socials {
    display: flex;
    gap: 20px;
    align-items: center;
}

footer .socials a.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    overflow: hidden;
    position: relative;
}

footer .socials a .social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: none !important;
    transition: var(--transition);
    display: inline-block;
}

footer .socials a .social-fallback {
    display: none;
    color: white;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    line-height: 1;
}

footer .socials a .social-icon[style*="display: none"] + .social-fallback {
    display: inline-block !important;
}

footer .socials a.social-link:hover {
    background: var(--secondary);
    transform: translateY(-4px);
}

footer .socials a.social-link:hover .social-icon {
    transform: scale(1.1);
}

footer .socials a.social-link:hover .social-fallback {
    color: white;
}

footer .copy {
    text-align: center;
    font-size: 14px;
    opacity: 0.5;
    /* Начертание 400 вместо 300: разница в подписи незаметна, а из
       загрузки уходит целое начертание шрифта (~25 КБ). */
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Адрес сайта текстом. Специально не ссылка: выделить и скопировать его
   можно, а браузерная подмена на ASCII-вид при этом не срабатывает. */
footer .copy-site {
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ==========================================
   АНИМАЦИИ
========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   ОТЧЁТЫ О МЕРОПРИЯТИЯХ (вертикальные видео)
========================================== */
/* Лента как в ВК Клипах: карточки 9:16 выстроены в ряд и листаются
   по горизонтали с прилипанием. Так лента занимает одну высоту экрана
   и не растягивает страницу, сколько бы отчётов ни добавили. */
#reports {
    background: rgba(11, 35, 69, 0.04);
}

.reels-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(11, 35, 69, 0.3) transparent;
}

.reels-row::-webkit-scrollbar {
    height: 8px;
}

.reels-row::-webkit-scrollbar-thumb {
    background: rgba(11, 35, 69, 0.25);
    border-radius: 4px;
}

.reel {
    flex: 0 0 auto;
    width: 240px;
    scroll-snap-align: start;
}

.reel-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(11, 35, 69, 0.22);
}

.reel-media video,
.reel-media iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    /* cover: кадр заполняет рамку целиком, без чёрных полей.
       Вертикальные видео ложатся в формат 9:16 почти без обрезки. */
    object-fit: cover;
}

.reel-info {
    padding: 12px 2px 0;
}

.reel-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary);
}

.reel-date {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.reels-empty {
    grid-column: 1 / -1;
    width: 100%;
    padding: 34px 20px;
    text-align: center;
    font-size: 15px;
    color: #64748b;
    background: #fff;
    border: 1px dashed rgba(11, 35, 69, 0.2);
    border-radius: 16px;
}

/* ==========================================
   КНОПКА "НАВЕРХ"
========================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(200,162,77,0.4);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    font-weight: 700;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(200,162,77,0.6);
}

/* ==========================================
   АДАПТИВНОСТЬ
========================================== */
@media (max-width: 992px) {
    /* Шапка в одну строку: логотип и кнопка меню. Список пунктов прячется
       в выпадающее меню — на телефоне это освобождает около 130px экрана
       (раньше шапка разворачивалась в три ряда и занимала ~190px). */
    header .container {
        flex-direction: row;
        gap: 12px;
        padding: 10px 0;
    }
    header.shrink .container {
        padding: 10px 0;
    }
    .nav-toggle {
        display: flex;
    }
    header .header-button {
        display: none;
    }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 6px 20px 18px;
        background: rgba(11, 35, 69, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    }
    header.nav-open nav {
        display: block;
    }
    nav ul {
        flex-direction: column;
        gap: 0;
        flex-wrap: nowrap;
        align-items: stretch;
    }
    nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    nav a {
        display: block;
        padding: 14px 2px;
        font-size: 16px;
    }
    nav a::after {
        display: none;
    }
    /* Кнопка «Поддержать» переезжает внутрь раскрытого меню */
    header.nav-open .header-button {
        display: block;
        margin-top: 16px;
        text-align: center;
    }
    /* Шапка стала ниже — отступы героя и якорей уменьшаем соответственно */
    #hero {
        padding-top: 90px;
    }
    section {
        scroll-margin-top: 90px;
    }
    #hero h1 {
        font-size: 44px;
    }
    #hero p {
        font-size: 20px;
    }
    .hero-logo {
        width: 180px;
        height: auto;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .direction-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .event-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #yandex-map {
        height: 380px;
    }
    .founders-title {
        font-size: 26px;
        margin-top: 55px;
    }
    .founders-grid {
        gap: 25px;
    }
    /* padding задаётся здесь, а не в .founder-block: селектор .founder-block
       имеет меньшую специфичность и был бы перебит этим правилом. */
    .founders-grid .founder-block {
        flex: 1 1 260px;
        padding: 40px 22px 30px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* Фильтры карты в одну прокручиваемую строку. Иначе 15 кнопок
       переносились и блок занимал 590px — почти весь экран телефона,
       и до самой карты приходилось долго листать. */
    .map-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: 10px;
        margin-bottom: 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .map-filter {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 8px 14px;
        font-size: 13px;
    }
    .logo img {
        height: 52px;
        width: auto;
    }
    #hero h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }
    #hero p {
        font-size: 18px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
        margin: auto;
        font-size: 16px;
        padding: 16px 28px;
    }
    section {
        padding: 70px 0;
    }
    section h2 {
        font-size: 30px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stat-card h3 {
        font-size: 40px;
    }
    .direction-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .event-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    #yandex-map {
        height: 300px;
    }
    .map-title {
        font-size: 24px;
    }
    #back-to-top {
        width: 45px;
        height: 45px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
    .founders-title {
        font-size: 22px;
        margin-top: 45px;
    }
    .founders-subtitle {
        margin-bottom: 35px;
    }
    .founders-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .founders-grid .founder-block {
        flex: 0 1 auto;
        width: 100%;
        max-width: 420px;
        padding: 25px 20px;
    }
    .founder-block .founder-badge {
        font-size: 10px;
        padding: 4px 16px;
        top: -12px;
    }
    .founder-block .founder-sub {
        font-size: 15px;
    }
    .founder-block .founder-desc {
        font-size: 15px;
    }
    header.shrink .logo img {
        height: 38px;
        width: auto;
    }
    header.shrink nav ul {
        gap: 10px;
    }
    header.shrink nav a {
        font-size: 10px;
    }
    header.shrink .header-button {
        padding: 6px 12px;
        font-size: 10px;
    }
    header.shrink .container {
        padding: 5px 0;
    }
}

@media (max-width: 480px) {
    .founder-photo {
        padding: 10px;
    }
}

/* ==========================================
   ПРОИЗВОДИТЕЛЬНОСТЬ НА МОБИЛЬНЫХ
========================================== */
/* Здесь раньше отключался background-attachment: fixed на узких экранах и
   тач-устройствах. Отключение убрано: при scroll фон прокручивается вместе
   со страницей, и на разных секциях видна разная его часть — вид отличается
   от исходного. Вернуть при необходимости — одна строка:
   @media (max-width:768px),(hover:none){ body { background-attachment: scroll } } */