/* ================================
   BASE SETTINGS
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #ffffff;
    color: #000000;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Убираем декоративные фоны */
.bg-blur,
.bg-blur-1,
.bg-blur-2,
.bg-blur-3,
.bg-blur-4,
.bg-blur-5,
.bg-blur-6 {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 16px 0 10px;
}

.section p,
.section li {
    font-size: 18px;
    line-height: 1.6;
}

ul {
    margin-left: 20px;
}

/* ================================
   HEADER — GLASSMORPHISM
================================ */

.header {
    position: relative; /* больше не липнет */
    z-index: 100;
    margin-top: 16px; /* воздух сверху */
    width: 100%;
    display: flex;
    justify-content: center; /* центрируем “плашку” */
    pointer-events: none; /* чтобы клики были только по внутреннему блоку */
    background: transparent;
}

.header__inner {
    pointer-events: auto;
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0,50); /* жидкое стекло */
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.6),
        0 18px 40px rgba(0, 0, 0, 0.10);
}

/* ==== LOGO ==== */

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
}

.logo__img {
    width: 70px;
    height: 70px;
    background: url("/img/logo.png") center/contain no-repeat;
}

.logo__text {
    margin-left: 12px;
    text-align: center;
    line-height: 1.1;
}

.logo__text strong {
    font-size: 20px;
    font-weight: 800;
}

.logo__text span {
    font-size: 13px;
    font-weight: 400;
    display: block;
}

/* ==== NAVIGATION ==== */

.nav {
    display: flex;
    gap: 22px;
}

.nav a {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    transition: 0.2s;
}

.nav a:hover {
    opacity: 0.65;
}

/* ==== AUTH BUTTONS ==== */

.header__auth {
    display: flex;
    gap: 10px;
}

/* ================================
   BUTTONS
================================ */

.btn {
    padding: 12px 20px;
    border-radius: 14px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-size: 16px;
    transition: 0.25s ease;
}

/* Бирюзовая кнопка */
.btn--glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #3D7692;
}

.btn--glass:hover {
    background: rgba(255, 255, 255, 0.75);
}

/* Золотая кнопка */
.btn--gold {
    background: #C5A34C;
    color: #fff;
    box-shadow: 0 0 18px rgba(197, 163, 76, 0.45);
}

.btn--gold:hover {
    background: #d4b158;
}

/* ================================
   GOLD GLASS CARDS
================================ */

.card {
    background: rgba(197, 163, 76, 0.18);
    border: 1px solid rgba(197, 163, 76, 0.35);
    backdrop-filter: blur(18px);

    padding: 26px;
    border-radius: 18px;

    color: #000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.card__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card__muted {
    color: #333;
    opacity: 0.85;
}

/* ================================
   GRID LAYOUTS
================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

/* ================================
   TEAM PHOTOS
================================ */

.team-photo {
    width: 100%;
    border-radius: 18px;
    height: 340px;
    object-fit: cover;
}

/* Фото экспертов — уменьшенные */
.team-photo--small {
    height: 220px;
}

/* ================================
   FOOTER
================================ */

.footer {
    margin-top: 80px;
    padding: 60px 0;
    background: #111;
    color: #fff;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer__title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    opacity: 0.6;
}

/* ================================
   FORMS
================================ */

.input {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-size: 16px;
    margin-bottom: 14px;
}

label {
    font-size: 16px;
    font-weight: 500;
}

.form-box {
    max-width: 520px;
    margin: 40px auto;
}

/* ================================
   ANIMATIONS
================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in 0.8s forwards ease;
}

@keyframes fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1024px) {
    .nav {
        gap: 14px;
    }

    .header {
        height: 100px;
    }

    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 14px;
    }

    .header__row {
        flex-direction: column;
        gap: 12px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}
/* === ГЛОБАЛЬНО: отступ от хедера, чтобы главная не заезжала под шапку === */
.body,
body {
    margin: 0;
    padding: 0;
}

.page-content {
    padding-top: 180px; /* подстрой при необходимости под высоту хедера */
}

/* === КНОПКИ: везде черный шрифт и золотой фон === */

.btn,
.btn--primary,
.btn--secondary,
.btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.25s ease;
    color: #000000; /* ЧЕРНЫЙ ТЕКСТ НА ВСЕХ КНОПКАХ */
}

.btn--primary {
    background: #C5A34C; /* золотой */
    box-shadow: 0 0 0 1px rgba(197, 163, 76, 0.4);
}

.btn--primary:hover {
    background: #e0bf5c;
    box-shadow: 0 0 25px rgba(197, 163, 76, 0.7);
    color: #000000;
}

.btn--ghost {
    background: transparent;
    border: 1px solid #C5A34C;
}

.btn--ghost:hover {
    background: rgba(197, 163, 76, 0.12);
    box-shadow: 0 0 18px rgba(197, 163, 76, 0.5);
    color: #000000;
}

/* === ХЕДЕР: фиксированная стеклянная шапка с логотипом и 3 строками === */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 24px;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000000;
}

.header__logo-mark {
    width: 85px;
    height: 85px;
    border-radius: 14px;
    border: 1px solid #C5A34C;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.06);
}

.header__logo-img {
    width: 80px;
    height: 80px;
    background-image: url('../img/logo-appe.png'); /* логотип в шапке */
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
/* Центрирование текста возле логотипа */
.header-title {
    display: flex;
    flex-direction: column;
    align-items: center; /* центр по горизонтали */
    text-align: center; /* центрирование строк */
}

/* Контейнер логотипа + текста */
.header .logo {
    display: flex;
    align-items: center;      /* Центруем текст относительно логотипа вертикально */
    justify-content: center;  /* Центрируем общую группу */
    gap: 14px;                /* Расстояние между логотипом и текстом */
}

/* Контейнер текста */
.header .logo-text {
    margin-left: 12px;
    text-align: center;       /* ← ВАЖНО! Центрирует весь текст */
    line-height: 1.1;
}

/* Строки текста */
.appe-line1 {
    font-size: 28px;
    font-weight: 900;
}

.appe-line2,
.appe-line3 {
    font-size: 14px;
    font-weight: 500;
}

.header__logo-abbr {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header__logo-line {
    font-size: 12px;
    font-weight: 500;
}

.header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 14px;
}

.header__nav a {
    text-decoration: none;
    color: #000000;
    position: relative;
    padding-bottom: 2px;
}

.header__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: #C5A34C;
    transition: width 0.2s ease;
}

.header__nav a:hover::after {
    width: 100%;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === ПЕРВЫЙ ЭКРАН: плитка с логотипом слева, текст и кнопка справа === */

.hero {
    padding: 40px 0 32px;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero__logo-card {
    display: flex;
    justify-content: flex-start;
}

.hero__logo-card-inner {
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #C5A34C; /* золотая рамка */
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(197, 163, 76, 0.3),
        0 22px 45px rgba(0, 0, 0, 0.08);
}

.hero__logo-img {
    display: block;
    max-width: 440px;
    height: auto;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.hero__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    max-width: 560px;
}

.hero__cta {
    margin-top: 8px;
}

/* === ОБЩИЕ СЕКЦИИ === */

.section {
    padding: 40px 0;
}

.section__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section__text {
    font-size: 16px;
    max-width: 760px;
}

/* кнопка под миссией — как и все золотые */
.mission__btn {
    margin-top: 16px;
}

/* === КОМАНДА: золотые стеклянные плитки, одинаковые фото === */

.team__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.team-card {
    border-radius: 24px;
    background: rgba(197, 163, 76, 0.10);
    border: 1px solid rgba(197, 163, 76, 0.9);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.4),
        0 22px 45px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.team-card__photo-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.team-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* одинаковый размер и центрирование */
    display: block;
}

.team-card__body {
    padding: 14px 16px 16px;
}

.team-card__name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.team-card__role {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.team__more {
    margin-top: 24px;
}

/* Адаптив для мобильных */
@media (max-width: 960px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__logo-card {
        justify-content: center;
    }

    .team__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .header__nav {
        font-size: 13px;
    }

    .team__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
.footer {
    background-color: #ffffff;
    color: #000000;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px 0;
}

.footer a {
    color: #000000;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
.header {
    width: 90%;
    max-width: 1500px;
    margin: 25px auto;           /* Воздух сверху */
    padding: 14px 30px;
    
    /* Жидкое стекло: */
    background: rgba(255, 255, 255, 0.25); /* Более прозрачный */
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.4);
    
    /* Неподвижный */
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);

    z-index: 9999;
}
/* --- Плавное появление первого экрана --- */
.hero-fade {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1.2s ease-out forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ТЕКСТОВОЙ БЛОК СПРАВА ОТ ЛОГОТИПА
   — центрируем его по горизонтали и по вертикали */
.header__logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;      /* <--- центр по горизонтали */
    justify-content: center;  /* <--- центр по вертикали */
    text-align: center;       /* текст тоже по центру */
    line-height: 1.2;
}

.header__logo-abbr {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}

.header__logo-line {
    font-size: 13px;
    font-weight: 500;
}

/* навигация */
.header__nav {
    display: flex;
    gap: 18px;
    font-size: 14px;
    white-space: nowrap;
}

.header__nav a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.header__nav a:hover {
    color: #a67c29; /* аккуратное золото при наведении */
}

/* блок с кнопками справа */
.header__actions {
    display: flex;
    gap: 12px;
}

/* кнопки (оставляем твои базовые стили, здесь только общие усиления под чёрный шрифт) */
.btn {
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000; /* ВСЕГДА чёрный текст */
}

.btn--ghost {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* эффект «лампочки» при наведении */
.btn--primary:hover,
.btn--ghost:hover {
    box-shadow: 0 0 22px rgba(244, 192, 103, 0.8);
    transform: translateY(-1px);
}

/* ================================
   EVENTS — FINAL VISUAL (STEP 2)
================================ */

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

/* Карточка */
.event-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(197, 163, 76, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 18px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  height: 100%;
}

/* Блок с баннером */
.event-card__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;              /* 👈 ключевой момент */
  background: #ffffff;
  border-bottom: 1px solid rgba(197, 163, 76, 0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px;
}

/* Баннер */
.event-card__image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;              /* 👈 НИЧЕГО НЕ РЕЖЕТ */
  display: block;
}

/* Заглушка (логотип) */
.event-card__placeholder {
  max-width: 120px;
  opacity: 0.9;
}

/* Контент */
.event-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-card__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.event-card__date {
  font-size: 14px;
  color: #888;
  margin-bottom: 10px;
}

.event-card__desc {
  font-size: 14px;
  color: #444;
  line-height: 1.4;
  flex-grow: 1;
}

/* Кнопка */
.event-card__actions {
  margin-top: 14px;
}

/* Адаптив */
@media (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   БЛИЖАЙШИЕ МЕРОПРИЯТИЯ
   ================================ */

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

/* Карточка */
.event-card {
    background: #ffffff;
    border: 1px solid #d4af37; /* золотая рамка */
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Картинка — СТРОГО 4:3 */
.event-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;      /* ← ВАЖНО */
    background: #f3f3f3;
    position: relative;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* ← НЕ РЕЖЕТ */
    background: #f3f3f3;   /* аккуратные поля */
    display: block;
}

/* Заглушка (логотип АППЭ) */
.event-placeholder-logo {
    object-fit: contain;
    padding: 32px;
    opacity: 0.6;
}

/* Контент карточки */
.event-card-content {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    color: #000;
}

.event-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.btn-gold {
    background: #d4af37;
    color: #000;
}

.btn-gold:hover {
    background: #c39b2e;
}

.event-card-content .btn {
    margin-top: auto;
}

/* Кнопка "Полный календарь" */
.events-actions {
    margin-top: 36px;
    text-align: center;
}

/* Адаптив */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}
}

/* Кнопки */
.event-card-content .btn {
    margin-top: auto;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.btn-gold {
    background: #d4af37;
    color: #000;
}

.btn-gold:hover {
    background: #c39b2e;
}

.events-actions {
    margin-top: 36px;
    text-align: center;
}

/* Адаптив */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   EVENT PAGE
================================ */

.event-page {
    padding-top: 40px;
}

.event-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    gap: 48px;
    align-items: flex-start;
}

/* === ЛЕВАЯ ПЛИТКА (как hero__logo-card) === */

.event-media-card {
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #C5A34C;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(197, 163, 76, 0.3),
        0 22px 45px rgba(0, 0, 0, 0.08);
}

.event-media-card__img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* === ПРАВЫЙ КОНТЕНТ === */

.event-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 20px;
    font-size: 15px;
}

.event-meta__item {
    color: #333;
}

.event-meta__type {
    font-weight: 600;
    color: #3D7692;
}

/* === ОПИСАНИЕ === */

.event-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* === КНОПКА === */

.event-action {
    margin-top: 12px;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 960px) {
    .event-page__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .event-title {
        font-size: 26px;
    }
}

/* ================================
   EVENT DESCRIPTION TYPOGRAPHY
================================ */

.event-description {
    font-size: 16px;
    line-height: 1.7;
    color: #000;
}

/* Абзацы */
.event-description p {
    margin-bottom: 16px;
}

/* Последний абзац без лишнего отступа */
.event-description p:last-child {
    margin-bottom: 0;
}

/* Списки */
.event-description ul,
.event-description ol {
    margin: 16px 0 16px 22px;
}

.event-description li {
    margin-bottom: 8px;
}

/* Жирный текст */
.event-description strong {
    font-weight: 600;
}

/* Ссылки внутри описания */
.event-description a {
    color: #3D7692;
    text-decoration: underline;
}

.event-description a:hover {
    opacity: 0.75;
}

/* ================================
   HOME EVENTS CARD TITLE
================================ */

/* Карточки мероприятий на главной */
.event-card h3 {
    font-size: 20px;
    line-height: 1.3;
}

/* ================================
   HEADER MOBILE FIX (FINAL)
================================ */

@media (max-width: 1024px) {

    /* Скрываем десктоп-меню и кнопки */
    .header__nav,
    .header__actions {
        display: none !important;
    }

    /* Показываем бургер */
    .header__burger {
        display: flex !important;
        margin-left: auto;
    }

    /* Фиксируем шапку */
    .header {
        position: relative;
        z-index: 1000;
    }
}

/* Мобильное меню по умолчанию скрыто */
.mobile-menu {
    display: none;
}

/* Открытое состояние */
.mobile-menu.is-open {
    display: flex;
}

/* ================================
   MOBILE HEADER FINAL FIX
================================ */

@media (max-width: 1024px) {

    /* Прячем ВСЁ десктопное меню жёстко */
    .header__nav,
    .header__actions {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Перестраиваем внутренности хедера */
    .header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Показываем бургер */
    .header__burger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        margin-left: auto;
        z-index: 1100;
    }

    /* Убираем любые nav вне mobile-menu */
    header nav {
        display: none !important;
    }
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    padding: 100px 24px 32px;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-menu.is-open {
    display: flex;
}

/* ================================
   MOBILE HEADER — CLEAN VERSION
================================ */

.header__burger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #000;
    margin: 4px 0;
}

/* Mobile nav hidden */
.header__mobile-nav {
    display: none;
    flex-direction: column;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    background: #fff;
}

.header__mobile-nav a {
    padding: 10px 0;
    font-size: 16px;
    color: #000;
    text-decoration: none;
}

.header__mobile-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

/* Open state */
.header__mobile-nav.is-open {
    display: flex;
}

@media (max-width: 1024px) {

    .header__nav,
    .header__actions {
        display: none;
    }

    .header__burger {
        display: block;
    }

    .header__inner {
        align-items: center;
    }

    .header {
        padding-bottom: 0;
    }
}

/* ================================
   MOBILE HEADER — VISUAL FIX
================================ */

@media (max-width: 768px) {

    /* Вся плашка хедера */
    .header {
        max-width: calc(100% - 24px);
        margin: 12px auto;
        padding: 10px 14px;
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }

    /* Внутренности хедера в одну линию */
    .header__inner {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Логотип — компактнее */
    .header__logo-mark {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    /* Текст логотипа */
    .header__logo-text {
        line-height: 1.1;
    }

    .header__logo-abbr {
        font-size: 16px;
        font-weight: 700;
    }

    .header__logo-line {
        font-size: 10px;
        opacity: 0.75;
    }

    /* Бургер аккуратно справа */
    .header__burger {
        margin-left: auto;
        padding: 6px;
    }

    .header__burger span {
        width: 22px;
        height: 2px;
        margin: 4px 0;
    }
}

/* ================================
   MOBILE HERO FIX
================================ */

@media (max-width: 768px) {

    .hero {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .hero .tile,
    .hero .hero-tile,
    .hero .hero-card {
        max-width: 320px;
        margin: 0 auto;
        padding: 16px;
    }

    .hero img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}

/* ================================
   MOBILE HERO FIX
================================ */

@media (max-width: 768px) {

    .hero {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .hero .tile,
    .hero .hero-tile,
    .hero .hero-card {
        max-width: 320px;
        margin: 0 auto;
        padding: 16px;
    }

    .hero img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}
/* =====================================
   MOBILE PORTRAIT HEADER FIX (iOS)
===================================== */

@media (max-width: 768px) and (orientation: portrait) {

    /* ЖЁСТКО ограничиваем высоту хедера */
    .header {
        max-height: 68px;
        height: 68px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    /* Контент хедера не может растягивать плашку */
    .header__inner {
        height: 100%;
        align-items: center;
    }

    /* Гарантируем, что бургер в строке */
    .header__burger {
        align-self: center;
    }

    /* Самое важное — изолируем хедер от hero */
    .hero {
        margin-top: 24px;
        position: relative;
        z-index: 1;
    }

    /* Хедер всегда выше hero */
    .header {
        z-index: 1000;
    }
}

/* =====================================
   MOBILE HEADER — HARD FIX
   убираем раздутие и выравниваем бургер
===================================== */

@media (max-width: 768px) {

    /* Сам хедер — ТОЛЬКО контейнер */
    .header {
        position: relative;
        height: 64px;           /* ФИКСИРОВАННАЯ ВЫСОТА */
        max-height: 64px;
        padding: 0;
        margin: 12px auto;
        max-width: calc(100% - 32px);
        border-radius: 18px;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        z-index: 1000;
    }

    /* Декоративный фон — ОТДЕЛЬНО */
    .header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: #fff;
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        z-index: 0;
    }

    /* Реальный контент хедера */
    .header__inner {
        position: relative;
        z-index: 1;
        height: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 14px;
    }

    /* Логотип */
    .header__logo-mark {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    /* Текст */
    .header__logo-text {
        line-height: 1.05;
    }

    .header__logo-abbr {
        font-size: 15px;
        font-weight: 700;
    }

    .header__logo-line {
        font-size: 9px;
        opacity: 0.7;
    }

    /* Бургер — ЧАСТЬ СТРОКИ */
    .header__burger {
        margin-left: auto;
        width: 26px;
        height: 18px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: none;
        border: none;
        padding: 0;
    }

    .header__burger span {
        height: 2px;
        width: 100%;
        background: #000;
        border-radius: 2px;
    }

    /* Скрываем десктоп */
    .header__nav,
    .header__actions {
        display: none !important;
    }
}

@media (max-width: 768px) {

    /* Поднимаем контент хедера НАД фоном */
    .header__inner {
        position: relative;
        z-index: 2;
    }

    /* ЯВНО поднимаем бургер */
    .header__burger {
        position: relative;
        z-index: 3;
    }
}

/* =====================================
   FORCE SHOW BURGER (iOS PORTRAIT)
===================================== */

@media (max-width: 768px) and (orientation: portrait) {

    .header__burger {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 26px !important;
        height: 18px !important;
        position: relative !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
    }

    .header__burger span {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: #000 !important;
    }
}
/* =========================
   NEWS ITEM TYPOGRAPHY
   ========================= */

.content {
    font-size: 16px;
    line-height: 1.6;
    color: #1f1f1f;
}

.content p {
    margin-bottom: 16px;
}

.content h2,
.content h3,
.content h4 {
    margin: 28px 0 14px;
    font-weight: 600;
}

.content ul,
.content ol {
    margin: 16px 0 16px 20px;
}

.content li {
    margin-bottom: 8px;
}

.content a {
    color: #b89b5e; /* золото АППЭ */
    text-decoration: underline;
}

.content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

/* Мобилка */
@media (max-width: 768px) {
    .content {
        font-size: 15px;
    }
}
/* NEWS ITEM LAYOUT IMPROVEMENT */

.event-page__media {
    flex: 0 0 48%;
}

.event-page__content {
    flex: 0 0 52%;
}

.event-description {
    max-width: 640px;
}
/* =========================
   NEWS LIST PAGE
   ========================= */

.news-section .news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 32px;
}

.news-section .news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(201, 162, 77, 0.4); /* золото */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-section .news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* Картинка 4:3 */
.news-section .news-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.news-section .news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Контент */
.news-section .news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-section .news-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.news-section .news-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 16px;
}

/* Кнопка всегда внизу */
.news-section .news-card-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* =========================
   ADAPTIVE
   ========================= */

@media (max-width: 1024px) {
    .news-section .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .news-section .news-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
/* =========================
   NEWS PAGE ACTIONS
   ========================= */

.news-page-actions {
    margin-top: 48px;
    text-align: center;
}
/* =========================
   NEWS PAGINATION
   ========================= */

.news-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.news-page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    border: 2px solid #c9a24d;
    color: #c9a24d;
    font-weight: 600;
    text-decoration: none;

    transition: background 0.2s ease, color 0.2s ease;
}

.news-page-link:hover {
    background: #c9a24d;
    color: #fff;
}

.news-page-link.is-active {
    background: #c9a24d;
    color: #fff;
    pointer-events: none;
}
/* === Новости: сетка плиток === */

.news-list__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-item {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.news-media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* мобильная адаптация */
@media (max-width: 1024px) {
  .news-list__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .news-list__grid {
    grid-template-columns: 1fr;
  }
}
/* Отступ кнопки "Вся лента" под блоком новостей */
.section__footer {
    margin-top: 32px;
}
/* ===== КАЛЕНДАРЬ МЕРОПРИЯТИЙ ===== */

.events-calendar {
    margin-top: 40px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.calendar-day-name {
    font-weight: 600;
    text-align: center;
    padding: 8px 0;
}

.calendar-cell {
    min-height: 120px;
    border: 1px solid #d4af37;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    position: relative;
}

.calendar-cell--empty {
    border: none;
    background: transparent;
}

.calendar-date {
    font-weight: 600;
    margin-bottom: 6px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event {
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #f7f3e8;
    color: #000;
    text-decoration: none;
    transition: 0.2s;
}

.calendar-event:hover {
    background: #d4af37;
    color: #fff;
}

.calendar-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}
/* ===== КАЛЕНДАРЬ МЕРОПРИЯТИЙ ===== */

.events-calendar {
    margin-top: 40px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

/* СЕТКА МЕСЯЦА */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 140px; /* ВАЖНО: фиксируем высоту ячеек */
    gap: 0; /* чтобы линии были ровные */
    border: 1px solid #d4af37;
    border-radius: 16px;
    overflow: hidden;
}

/* ДНИ НЕДЕЛИ */
.calendar-day-name {
    text-align: center;
    font-weight: 600;
    padding: 10px 0;
    border-right: 1px solid #d4af37;
    border-bottom: 1px solid #d4af37;
    background: #faf7ef;
}

.calendar-day-name:nth-child(7n) {
    border-right: none;
}

/* ЯЧЕЙКА ДНЯ */
.calendar-cell {
    position: relative;
    padding: 8px;
    border-right: 1px solid #d4af37;
    border-bottom: 1px solid #d4af37;
    background: #fff;
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

/* ПУСТЫЕ ЯЧЕЙКИ */
.calendar-cell--empty {
    background: #faf7ef;
}

/* ДАТА */
.calendar-date {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
}

/* СОБЫТИЯ */
.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event {
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    background: #f7f3e8;
    color: #000;
    text-decoration: none;
    line-height: 1.2;
}

.calendar-event:hover {
    background: #d4af37;
    color: #fff;
}

/* КНОПКИ ВНИЗУ */
.calendar-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}
/* === КАЛЕНДАРЬ МЕРОПРИЯТИЙ === */

.events-calendar {
    margin-top: 40px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-grid--weekdays div {
    text-align: center;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid #d4af37;
}

.calendar-grid--days {
    border: 1px solid #d4af37;
    border-radius: 12px;
    overflow: hidden;
}

.calendar-cell {
    min-height: 140px;
    padding: 8px;
    border-right: 1px solid #d4af37;
    border-bottom: 1px solid #d4af37;
    background: #fffaf0;
}

.calendar-cell:nth-child(7n) {
    border-right: none;
}

.calendar-date {
    font-weight: 600;
    margin-bottom: 6px;
}

/* === ВАЖНОЕ МЕСТО === */
/* Если 6-я неделя пустая — скрываем её */
.calendar-grid--days .calendar-cell:nth-last-child(-n+7):empty {
    display: none;
}

.calendar-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}
/* === КАЛЕНДАРЬ МЕРОПРИЯТИЙ === */

.events-calendar {
    margin-top: 40px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 12px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    padding: 8px 0;
    color: #000;
    border-bottom: 2px solid #d4af37;
}

/* === СЕТКА ДНЕЙ === */

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
}

/* === КАРТОЧКА ДНЯ === */

.calendar-day {
    background: #fff;
    border: 2px solid #d4af37;
    border-radius: 14px;
    padding: 12px;
    min-height: 140px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.calendar-day:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

/* === НОМЕР ДНЯ === */

.calendar-day-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

/* === СОБЫТИЯ ВНУТРИ ДНЯ === */

.calendar-day-events {
    font-size: 13px;
    color: #555;
}

/* === КНОПКИ === */

.calendar-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
}
.calendar-day--empty {
    border: none;
    background: transparent;
    cursor: default;
    box-shadow: none;
}

