/* =========================================================
   ВРОО «Спортивная федерация танцевального спорта»
   Современный дизайн — базовые стили
   ========================================================= */

:root {
  --navy-deep: #071b32;
  --navy: #0b2a4a;
  --navy-soft: #12406b;
  --blue: #2f6fb0;
  --gold: #cda449;
  --gold-light: #e6c789;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #182233;
  --text-muted: #5b6675;
  --border: #e6e9f0;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 16px rgba(11, 42, 74, 0.06);
  --shadow-md: 0 14px 40px rgba(11, 42, 74, 0.10);
  --shadow-lg: 0 24px 60px rgba(7, 27, 50, 0.18);
  --container: 1220px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0 0 .5em;
  color: var(--navy-deep);
  font-weight: 700;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-deep);
  color: #cfe0f2;
  font-size: 13.5px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}
.topbar-contacts { display: flex; gap: 22px; }
.topbar-contacts a { display: flex; align-items: center; gap: 7px; color: #cfe0f2; transition: color .2s; }
.topbar-contacts a:hover { color: var(--gold-light); }
.topbar-tag { letter-spacing: .06em; text-transform: uppercase; font-size: 11.5px; color: #7f9bb8; }
.icon { width: 15px; height: 15px; flex: none; fill: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease), padding .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  /* Только верт./ниж. отступы — левый/правый обязаны остаться от .container
     (padding: ... 0 шорткодом их обнулял и ломал общее выравнивание сетки). */
  padding-top: 16px;
  padding-bottom: 16px;
  transition: padding .3s var(--ease);
}
.site-header.is-scrolled .header-inner { padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 14px; margin-right: auto; flex: none; }
.brand img { height: 54px; width: auto; transition: height .3s var(--ease); }
.site-header.is-scrolled .brand img { height: 42px; }
.brand-text { line-height: 1.25; }
.brand-text .eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.brand-text strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 14.5px;
  line-height: 1.25;
  color: var(--navy-deep);
  max-width: 190px;
}
.brand-text .brand-short { display: none; }

/* ---------- Nav ---------- */
.main-nav { display: flex; align-items: center; gap: 2px; flex: none; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.main-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  border-radius: 999px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.main-nav .nav-link:hover,
.main-nav li.open > .nav-link { background: rgba(47, 111, 176, .1); color: var(--blue); }
.main-nav .nav-link.active { background: var(--navy); color: #fff; }
.main-nav .nav-link svg { width: 10px; height: 10px; transition: transform .25s var(--ease); fill: currentColor; }
.main-nav li.open > .nav-link svg { transform: rotate(180deg); }

.main-nav li.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
li.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: background .15s, color .15s, padding-left .15s;
}
.dropdown a:hover { background: var(--bg); color: var(--blue); padding-left: 18px; }

.nav-toggle {
  display: none;
  flex: none;
  width: 42px; height: 42px;
  border: none;
  background: var(--navy-deep);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  /* Кнопка и выезжающая .main-nav.is-open — обе внутри .site-header, поэтому
     их z-index сравниваются друг с другом локально: нужен явный z-index
     выше, чем у панели (190), иначе панель перекрывает кнопку. */
  z-index: 210;
  flex: none;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  display: block;
  position: absolute;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease), top .25s var(--ease);
}
/* left/width у span считаются от кнопки .nav-toggle, а у ::before/::after — уже
   от самого span (это его собственные псевдоэлементы), поэтому им нужны
   left:0/width:100%, а не те же самые 10px/22px, иначе они уезжают вправо. */
.nav-toggle span { top: 20px; left: 10px; width: 22px; }
.nav-toggle span::before { top: -7px; left: 0; width: 100%; }
.nav-toggle span::after { top: 7px; left: 0; width: 100%; }
.nav-toggle.is-active span { background: transparent; }
.nav-toggle.is-active span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-active span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  height: 88vh;
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slides img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s ease, transform 7s linear;
}
.hero-slides img.is-active { opacity: 1; transform: scale(1); }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(5,17,32,.92) 0%, rgba(5,17,32,.35) 55%, rgba(5,17,32,.55) 100%);
}
.hero-content { padding: 0 0 76px; max-width: 760px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero p.lead { color: #d9e3ee; font-size: 17.5px; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  border: 1px solid transparent;
}
.btn svg { width: 13px; height: 13px; fill: currentColor; }
.btn-primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy-deep); box-shadow: 0 12px 28px rgba(205, 164, 73, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(205, 164, 73, .45); }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.hero-dots {
  position: absolute;
  right: 28px; bottom: 30px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2;
}
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none; cursor: pointer; padding: 0;
  transition: background .25s, transform .25s;
}
.hero-dots button.is-active { background: var(--gold); transform: scale(1.3); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(255,255,255,.7);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  animation: floaty 2.4s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--navy-deep);
  background-image: radial-gradient(circle at 15% 20%, rgba(205,164,73,.14), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(47,111,176,.22), transparent 50%);
  color: #fff;
  padding: 46px 0;
}
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { text-align: center; padding: 6px 12px; border-left: 1px solid rgba(255,255,255,.12); }
.stat-item:first-child { border-left: none; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 3.4vw, 44px);
  color: var(--gold-light);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 13.5px; color: #b9c8db; }

/* ---------- Section framing ---------- */
.section { padding: 88px 0; }
.section-alt { background: #fff; }
.section-head { margin-bottom: 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); font-weight: 700; margin-bottom: 10px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); margin: 0; max-width: 640px; }
.section-desc { color: var(--text-muted); max-width: 520px; margin-top: 10px; }
.section-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; color: var(--navy);
  padding-bottom: 3px; border-bottom: 2px solid var(--gold);
  transition: color .2s, gap .2s;
}
.section-link:hover { color: var(--blue); gap: 12px; }
.section-link svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- Layout grids for main content ---------- */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}
.home-grid-split { grid-template-columns: 340px 1fr; }
@media (max-width: 900px) {
  .home-grid-split { grid-template-columns: 1fr; }
}

/* Tournament highlight card */
.tourney-card {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-radius: var(--radius-lg);
  padding: 34px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.tourney-card::after {
  content: '';
  position: absolute; right: -60px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(205,164,73,.35), transparent 70%);
}
.tourney-date {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 78px; height: 78px; border-radius: 20px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  margin-bottom: 22px;
}
.tourney-date .m { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-light); }
.tourney-date .d { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; line-height: 1.1; }
.tourney-card h3 { color: #fff; font-size: 24px; margin-bottom: 14px; }
.tourney-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; position: relative; z-index: 1; }
.tourney-meta span { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #d9e3ee; }
.tourney-meta svg { width: 15px; height: 15px; fill: var(--gold-light); flex: none; }

/* News cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}
.news-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .5s var(--ease); }
.news-card:hover .news-thumb img { transform: scale(1.08); }
.news-card .news-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-card h4 { font-size: 17px; line-height: 1.35; margin: 0; }
.news-card .news-read {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--blue);
}
.news-card .news-read svg { width: 10px; height: 10px; fill: currentColor; transition: transform .2s; }
.news-card:hover .news-read svg { transform: translateX(4px); }
.news-card.featured { grid-column: span 2; }
.news-card.featured .news-thumb { aspect-ratio: 16/9; }
.news-card.featured h4 { font-size: 21px; }

@media (max-width: 720px) {
  .news-card.featured { grid-column: span 1; }
}

/* Announcements */
.board {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 6px 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.board::-webkit-scrollbar { height: 7px; }
.board::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 8px; }
.board-card {
  scroll-snap-align: start;
  flex: 0 0 320px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.board-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.board-card.has-photo { border-left: none; }
.board-card-photo-link { display: block; margin: -24px -24px 0; border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; }
.board-card-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center top; display: block; transition: transform .4s var(--ease); }
.board-card:hover .board-card-photo { transform: scale(1.05); }
.board-read {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--blue);
}
.board-read svg { width: 10px; height: 10px; fill: currentColor; transition: transform .2s; }
.board-card:hover .board-read svg { transform: translateX(4px); }
.board-tag {
  align-self: flex-start;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); background: #eef2f8; padding: 5px 11px; border-radius: 999px;
}
.board-quote {
  font-size: 14px; color: var(--text); line-height: 1.6;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.board-quote::before { content: '\201C'; color: var(--gold); font-family: 'Playfair Display', serif; font-size: 22px; margin-right: 3px; }
.board-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
.board-foot strong { color: var(--navy); }

/* About teaser */
.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.about-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/5; }
.about-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-media .badge {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(7,27,50,.75); backdrop-filter: blur(8px);
  color: #fff; padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 13px; max-width: 220px;
}
.about-text .links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.chip-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--navy);
  transition: border-color .2s, color .2s, transform .2s;
}
.chip-link:hover { border-color: var(--gold); color: var(--blue); transform: translateY(-2px); }

@media (max-width: 860px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 16/9; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b9c8db; padding-top: 70px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 46px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.footer-brand img { height: 46px; filter: brightness(0) invert(1); opacity: .92; }
.footer-brand strong { display: block; color: #fff; font-family: 'Playfair Display', serif; font-size: 15.5px; max-width: 300px; line-height: 1.35; }
.site-footer h5 { color: #fff; font-family: 'Manrope', sans-serif; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul a { font-size: 14.5px; color: #b9c8db; transition: color .2s, padding-left .2s; display: inline-block; }
.site-footer ul a:hover { color: var(--gold-light); padding-left: 4px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.footer-contact svg { width: 15px; height: 15px; fill: var(--gold-light); flex: none; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 22px; padding-bottom: 22px; font-size: 13px; color: #7f93ac;
}
.footer-bottom a { color: #b9c8db; }
.footer-bottom a:hover { color: var(--gold-light); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy-deep); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s, transform .3s, visibility .3s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold); color: var(--navy-deep); }
.to-top svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Лайтбокс: просмотр фото/страниц с листанием ---------- */
body.lightbox-open-body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5, 12, 22, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 70px 76px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lightbox-img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.lightbox-counter { color: #cfe0f2; font-size: 13.5px; letter-spacing: .04em; }
.lightbox-close, .lightbox-nav {
  position: absolute; z-index: 2;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.2); }
.lightbox-close svg, .lightbox-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-close { top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav[disabled] { opacity: .25; cursor: default; pointer-events: none; }
@media (max-width: 640px) {
  .lightbox { padding: 76px 14px; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ---------- Внутренние страницы: декоративный баннер + хлебные крошки ---------- */
/* Без фотографий — фото остаются только в слайдере на главной. */
.page-hero {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: linear-gradient(150deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(205, 164, 73, .3), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(47, 111, 176, .38), transparent 48%),
    radial-gradient(circle at 78% 95%, rgba(205, 164, 73, .18), transparent 42%);
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.9) 65%, transparent);
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.9) 65%, transparent);
}
.page-hero .container { position: relative; z-index: 1; padding: 48px 24px 34px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cfe0f2; margin-bottom: 14px; }
.breadcrumbs a { color: #cfe0f2; }
.breadcrumbs a:hover { color: var(--gold-light); }
.breadcrumbs .sep { opacity: .5; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin: 0; }
.page-hero p.lead { color: #d9e3ee; margin: 10px 0 0; max-width: 560px; font-size: 15.5px; }

/* ---------- Список турниров ---------- */
.tourney-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-bottom: 8px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.status-pill.upcoming { background: #eaf3ea; color: var(--ok, #1f8a55); }
.status-pill.past { background: #eef2f8; color: var(--text-muted); }

.empty-note { background: #fff; border-radius: var(--radius-md); padding: 30px; text-align: center; color: var(--text-muted); box-shadow: var(--shadow-sm); }

/* ---------- Детальная страница турнира ---------- */
.detail-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 36px; }
.detail-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 26px 0; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-meta-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 5px; }
.detail-meta-grid dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--navy-deep); }
.detail-results { white-space: pre-line; color: var(--text); line-height: 1.7; }

/* ---------- Галерея фото (страница объявления) ---------- */
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 28px; }
.detail-gallery a, .detail-gallery > div { display: block; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.detail-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center top; display: block; transition: transform .3s var(--ease); }
.detail-gallery a:hover img { transform: scale(1.05); }

/* ---------- Галерея скан-страниц документа (антидопинг) ---------- */
.doc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.doc-gallery a {
  display: block; aspect-ratio: 3/4; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.doc-gallery a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.doc-gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Список документов (страницы /doc/*) ---------- */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border-radius: var(--radius-md); padding: 16px 20px;
  box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.doc-row:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-ext {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
}
.doc-ext.pdf { background: #c0392b; }
.doc-ext.doc, .doc-ext.docx { background: var(--blue); }
.doc-ext.xls, .doc-ext.xlsx { background: var(--ok, #1f8a55); }
.doc-row-body { flex: 1; min-width: 0; }
.doc-row-title { font-weight: 700; color: var(--navy-deep); font-size: 15px; margin: 0 0 3px; line-height: 1.35; }
.doc-row-meta { font-size: 12.5px; color: var(--text-muted); }
.doc-row .btn { flex: none; padding: 10px 18px; font-size: 13px; }

@media (max-width: 560px) {
  .doc-row { flex-wrap: wrap; }
  .doc-row .btn { width: 100%; justify-content: center; margin-top: 6px; }
}

/* ---------- Вкладки-переключатели (используются на доске объявлений) ---------- */
.tabs { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.tabs a {
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #fff; border: 1px solid var(--border); color: var(--navy);
  transition: background .2s, color .2s, border-color .2s;
}
.tabs a.active { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.tabs a:hover:not(.active) { border-color: var(--blue); color: var(--blue); }
.tabs .count { opacity: .65; font-weight: 600; margin-left: 4px; }

/* ---------- Доска объявлений: обзор категорий ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.category-tile {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.category-tile:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); text-decoration: none; }
.category-tile .count { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold); line-height: 1; }
.category-tile h3 { margin: 0; font-size: 19px; color: var(--navy-deep); }
.category-tile p { margin: 0; color: var(--text-muted); font-size: 14px; flex: 1; }
.category-tile .btn { align-self: flex-start; margin-top: 6px; pointer-events: none; }

/* ---------- Доска объявлений: список карточек одной категории ---------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.board-grid .board-card { height: 100%; }

/* ---------- Клубы ---------- */
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.club-card {
  background: var(--card); border-radius: var(--radius-md); padding: 24px;
  box-shadow: var(--shadow-sm); border-top: 4px solid var(--gold);
  display: flex; flex-direction: column; gap: 12px; height: 100%;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.club-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.club-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.club-card h3 { margin: 0; font-size: 18px; color: var(--navy-deep); line-height: 1.3; }
.club-city-pill {
  flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--navy); background: #eef2f8; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.club-meta { font-size: 13.5px; color: var(--text); line-height: 1.6; margin: 0; }
.club-meta strong { color: var(--navy); font-weight: 700; }
.club-address { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.club-address span { display: block; }
.club-address span + span { margin-top: 2px; }
.club-contact {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px; font-size: 13.5px;
}
.club-contact a { color: var(--blue); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1220px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.is-open {
    display: block;
    position: fixed; inset: 0 0 0 auto;
    width: min(340px, 86vw); height: 100vh;
    background: var(--navy-deep);
    padding: 100px 26px 26px;
    overflow-y: auto;
    z-index: 190;
    box-shadow: -20px 0 50px rgba(0,0,0,.35);
    animation: slideIn .3s var(--ease);
  }
  @keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
  .main-nav.is-open > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav.is-open .nav-link { color: #fff; padding: 13px 14px; border-radius: 10px; }
  .main-nav.is-open .nav-link:hover, .main-nav.is-open li.open > .nav-link { background: rgba(255,255,255,.08); color: var(--gold-light); }
  .main-nav.is-open .dropdown {
    position: static; box-shadow: none; background: rgba(255,255,255,.04);
    display: none; opacity: 1; visibility: visible; transform: none; margin: 4px 0 4px 10px;
  }
  .main-nav.is-open li.open .dropdown { display: block; }
  .main-nav.is-open .dropdown a { color: #cfe0f2; }
  .main-nav.is-open .dropdown a:hover { color: var(--gold-light); background: rgba(255,255,255,.06); }
  .nav-scrim { position: fixed; inset: 0; background: rgba(7,17,32,.55); z-index: 180; opacity: 0; visibility: hidden; transition: opacity .3s; }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }
}

@media (max-width: 860px) {
  .stats .container { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .stat-item:nth-child(3) { border-left: none; }
  .about-teaser { gap: 30px; }
}

@media (max-width: 640px) {
  .topbar .topbar-tag { display: none; }
  .brand img { height: 40px; }
  .brand-text strong { font-size: 15px; max-width: none; }
  .brand-text .brand-full { display: none; }
  .brand-text .brand-short { display: inline; }
  .hero { height: auto; min-height: 560px; padding-top: 40px; }
  .hero-content { padding-bottom: 56px; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* ---------- Публичные формы (например «Предложить объявление») ---------- */
.form-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 34px; max-width: 720px; }
.form-card .field { margin-bottom: 20px; }
.form-card .field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--navy); }
.form-card .field .req { color: #c0392b; }
.form-card .field input[type=text],
.form-card .field input[type=number],
.form-card .field input[type=tel],
.form-card .field input[type=date],
.form-card .field input[type=datetime-local],
.form-card .field select,
.form-card .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text);
}
.form-card .field input:focus, .form-card .field select:focus, .form-card .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,176,.14);
}
.form-card .field textarea { resize: vertical; }
.form-card .field-help { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 0; }
.form-card .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card .field-file { border: 2px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; }
.form-card .field-file input { font-size: 13.5px; }
.form-card .field-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.form-card .field-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.form-card .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .form-actions { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-error, .form-success {
  padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-size: 14.5px; max-width: 720px;
}
.form-error { background: #fdecea; color: #c0392b; border: 1px solid #f3c8c3; }
.form-success { background: #e9f8ef; color: #1f8a55; border: 1px solid #bfe8d0; }

@media (max-width: 640px) {
  .form-card { padding: 24px 20px; }
  .form-card .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Длинный текст (История федерации и т.п.) ---------- */
.article-content { max-width: 780px; color: var(--text); line-height: 1.85; font-size: 15.5px; }
.article-content p { margin: 0 0 16px; }
.article-content h2 { margin: 44px 0 18px; font-size: 23px; }
.article-content h2:first-child { margin-top: 0; }
.article-photo {
  margin: 8px 0 26px; padding: 0;
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.article-photo img { width: 100%; display: block; object-fit: cover; }
.article-photo figcaption {
  padding: 10px 16px; background: var(--card);
  font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.5;
}

/* ---------- Таблицы данных (чемпионы, судьи и т.п.) ---------- */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: #fff; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
  background: var(--navy-deep); color: #fff; text-align: left; padding: 12px 16px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
table.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table td.team-coach-cell { white-space: normal; min-width: 220px; line-height: 1.5; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover td { background: #fafbfd; }
table.data-table td a { color: var(--blue); font-weight: 600; }

.jury-confirmed-cell { text-align: center; }
.jury-confirmed {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
}
.jury-confirmed svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jury-confirmed-yes { background: var(--ok, #1f8a55); }
.jury-confirmed-no { background: var(--danger, #c0392b); }

/* ---------- Карточки людей (Президиум) ---------- */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.person-card {
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  overflow: hidden; padding-bottom: 18px; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.person-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.person-photo { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; display: block; background: var(--bg); }
.person-name { font-weight: 700; color: var(--navy-deep); margin: 16px 16px 2px; font-size: 15.5px; line-height: 1.3; }
.person-role { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--gold); font-weight: 800; margin: 0 16px 10px; }
.person-email a { font-size: 13px; color: var(--blue); word-break: break-all; }
.person-email { margin: 0 16px 12px; }
.person-duties { text-align: left; font-size: 12.5px; color: var(--text-muted); margin: 0 16px; padding-top: 12px; border-top: 1px solid var(--border); line-height: 1.65; }
.person-duties li { margin-bottom: 4px; }

/* ---------- Поиск (Судейская коллегия) ---------- */
.search-box { max-width: 380px; margin-bottom: 26px; position: relative; }
.search-box input {
  width: 100%; padding: 12px 16px 12px 42px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,176,.14); }
/* top:50% считался бы от высоты всего .search-box (поле + текст-счётчик под ним),
   поэтому иконка съезжала вниз — центрируем именно по высоте самого поля (~45px). */
.search-box svg { position: absolute; left: 16px; top: 15px; width: 15px; height: 15px; fill: var(--text-muted); }
.search-box .count { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }
