/* ============================================================
   ВЕЛОКИРИШИ — Dark Sports Theme
   Fonts: Bebas Neue (headings) + Inter (body)
   ============================================================ */

/* -------------------------------------------------------
   Переменные
------------------------------------------------------- */
:root {
  --bg:     #0D0D0D;
  --bg2:    #1A1A1A;
  --card:   #1F1F1F;
  --border: #2A2A2A;
  --text:   #FFFFFF;
  --muted:  #888888;
  --accent: #C8FF00;
  --accent-dark: #0D0D0D;
  --stats-bg: #EDEAE4;

  --font-h: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font:   'Inter', system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.4);
}

/* -------------------------------------------------------
   Сброс и база
------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
ul { list-style: none; }
main { flex: 1; }
h1,h2,h3,h4 { font-family: var(--font-h); letter-spacing: 0.03em; line-height: 1; }

/* -------------------------------------------------------
   Контейнер
------------------------------------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* -------------------------------------------------------
   Шапка
------------------------------------------------------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
}
.is-admin .site-header {
  position: sticky;
  top: 0; left: auto; right: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: 64px;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-wheel { display: flex; align-items: center; }
.logo-text {
  font-family: var(--font-h);
  font-size: 20px;
  color: #fff;
  letter-spacing: 0.08em;
}
.logo:hover .logo-text { color: var(--accent); }

.nav { display: flex; gap: 0; flex: 1; margin-left: 16px; }
.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 4px;
  transition: color .2s;
  white-space: nowrap;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--accent); }

.header-socials { display: flex; gap: 8px; }
.social-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.social-btn:hover { border-color: transparent; }
.social-btn--yt  { color: #FF0000; border-color: rgba(255,0,0,.25); }
.social-btn--vk  { color: #4C75A3; border-color: rgba(76,117,163,.25); }
.social-btn--tg  { color: #2CA5E0; border-color: rgba(44,165,224,.25); }
.social-btn--yt:hover  { background: #FF0000; color: #fff; }
.social-btn--vk:hover  { background: #4C75A3; color: #fff; }
.social-btn--tg:hover  { background: #2CA5E0; color: #fff; }

.btn-join {
  background: var(--accent);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 24px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .2s;
}
.btn-join:hover { opacity: .85; color: var(--accent-dark); }

/* Бургер */
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto;
}
.burger span { display: block; width: 22px; height: 2px; background: #888; border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-open span:nth-child(2) { opacity: 0; }
.burger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------
   Кнопки
------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; border: none; cursor: pointer;
  transition: opacity .2s, background .2s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-dark); }
.btn-primary:hover { opacity: .85; color: var(--accent-dark); }
.btn-secondary { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-secondary:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-accent-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-accent-outline:hover { background: var(--accent); color: var(--accent-dark); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 11px; }
.btn-danger { background: #FF3B30; color: #fff; }
.btn-danger:hover { opacity: .85; color: #fff; }
/* legacy compat */
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--accent-dark); }
.btn-gray { background: rgba(255,255,255,.08); color: var(--muted); }
.btn-gray:hover { background: rgba(255,255,255,.15); color: #fff; }

/* -------------------------------------------------------
   Теги
------------------------------------------------------- */
.tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.05em; text-transform: uppercase; }
.tag-easy   { background: rgba(200,255,0,.15); color: var(--accent); }
.tag-medium { background: rgba(255,180,0,.15); color: #FFB400; }
.tag-hard   { background: rgba(255,60,0,.15);  color: #FF3C00; }
.tag-asphalt{ background: rgba(80,140,255,.15); color: #508CFF; }
.tag-dirt   { background: rgba(120,200,60,.15); color: #78C83C; }
.tag-mixed  { background: rgba(160,100,255,.15);color: #A064FF; }

/* -------------------------------------------------------
   Hero (главная)
------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh; min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #0D0D0D 0%, #1A1A1A 50%, #0D0D0D 100%);
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0;
  background: #0D0D0D url('/assets/img/hero-bg.png') center center / cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 0 80px;
  width: 100%;
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero-title-wrap {
  margin-bottom: 20px;
  filter: url(#hero-grunge);
}
.hero-title-line {
  font-family: var(--font-h);
  font-size: 120px;
  line-height: 0.88;
  letter-spacing: -0.02em;
  display: block;
}
.hero-title-white { color: #fff; }
.hero-title-accent { color: var(--accent); }
.hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 340px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-badge-wrap {
  position: absolute;
  bottom: 60px; right: 80px;
  z-index: 2;
  opacity: .9;
}
.hero-badge-svg { display: block; }
.badge-ring {
  animation: spin-ring 22s linear infinite;
  transform-origin: 70px 70px;
}
@keyframes spin-ring { to { transform: rotate(360deg); } }

/* -------------------------------------------------------
   О проекте (about)
------------------------------------------------------- */
.about {
  background: var(--bg2);
  padding: 80px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.about-title {
  font-family: var(--font-h);
  font-size: 36px;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.05;
}
.about-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}
.about-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.about-feature { text-align: center; }
.about-feature-icon {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  color: var(--accent);
}
.about-feature-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.3;
}

.about-photo-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 420px;
}
.about-photo-bg {
  position: absolute; inset: 0;
  background: var(--bg2);
}
.about-photo-accent {
  position: absolute;
  bottom: 0; right: 0;
  width: 100px; height: 100px;
  background: var(--accent);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* -------------------------------------------------------
   Покатушки — карточки с фото
------------------------------------------------------- */
.rides-section { background: var(--bg); padding: 72px 0; }
.section-header-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 32px;
}
.section-heading {
  font-family: var(--font-h);
  font-size: 36px;
  color: rgba(255,255,255,.48);
  letter-spacing: 0.05em;
}
.section-all-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.section-all-link:hover { color: var(--accent); }

.rides-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

.ride-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 340px;
  background: var(--card);
  cursor: pointer;
}
.ride-card[data-photo-placeholder] {}
.ride-card-bg {
  position: absolute; inset: 0;
  background: var(--card);
}
.ride-card-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .6;
}
.ride-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}
.ride-card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px;
}
.ride-date { margin-bottom: 6px; }
.ride-date-num {
  font-family: var(--font-h);
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.ride-date-mon {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.ride-title {
  font-family: var(--font-h);
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.05em;
  margin: 6px 0 10px;
}
.ride-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.ride-meta-item { display: flex; align-items: center; gap: 4px; }
.ride-meta-item svg { flex-shrink: 0; opacity: .7; }

/* -------------------------------------------------------
   Цифры (светлая секция)
------------------------------------------------------- */
.stats-light { background: var(--stats-bg); padding: 72px 0; }
.stats-light-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.stats-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}
.stat-item {}
.stat-num {
  font-family: var(--font-h);
  font-size: 60px;
  color: #252e0a;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a6330;
  margin-top: 6px;
}
.stats-cta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a6330;
  margin-bottom: 12px;
}
.stats-cta-title {
  font-family: var(--font-h);
  font-size: 30px;
  color: #252e0a;
  margin-bottom: 14px;
  line-height: 1.1;
}
.stats-cta-text {
  font-size: 14px;
  color: #5A5854;
  line-height: 1.65;
  margin-bottom: 24px;
}
.stats-cta-socials { display: flex; gap: 10px; }
.social-dark {
  width: 40px; height: 40px;
  border: 1px solid #C8C4BC;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4A4844;
  transition: border-color .2s, color .2s, background .2s;
}
.social-dark:hover { border-color: #1C1C1A; color: #1C1C1A; background: rgba(0,0,0,.06); }

/* -------------------------------------------------------
   Баннер внутренних страниц
------------------------------------------------------- */
.page-banner {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}
.page-banner-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.page-banner-title {
  font-family: var(--font-h);
  font-size: 48px;
  color: #fff;
  letter-spacing: 0.05em;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  display: flex; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }

/* -------------------------------------------------------
   Секции (общие)
------------------------------------------------------- */
.section { padding: 56px 0; }
.section-dark  { background: var(--bg);  }
.section-dark2 { background: var(--bg2); }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-h);
  font-size: 32px;
  color: #fff;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.section-more {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-more:hover { color: var(--accent); }

/* -------------------------------------------------------
   Карточки (общий стиль)
------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: #444; }

.card-cover {
  height: 200px;
  background: #111;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .3s; }
.card:hover .card-cover img { opacity: 1; }
.card-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  color: var(--muted);
}

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 8px;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: auto; padding-top: 8px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -------------------------------------------------------
   Сетки
------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* -------------------------------------------------------
   Карточки событий (список на странице покатушек)
------------------------------------------------------- */
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: border-color .2s;
}
.event-card:hover { border-color: #444; }
.event-date-box {
  background: rgba(200,255,0,.08);
  border: 1px solid rgba(200,255,0,.2);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
.event-day  { font-family: var(--font-h); font-size: 26px; color: var(--accent); line-height: 1; }
.event-mon  { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
.event-info { flex: 1; }
.event-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 5px; }
.event-meta  { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }

/* -------------------------------------------------------
   Страница маршрута
------------------------------------------------------- */
#route-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.route-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: 12px; margin: 24px 0; }
.route-stat-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.route-stat-val { font-family: var(--font-h); font-size: 28px; color: var(--accent); }
.route-stat-key { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* -------------------------------------------------------
   Отчёт — тело
------------------------------------------------------- */
.report-body { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.85); }
.report-body h2 { font-family: var(--font-h); font-size: 26px; margin: 32px 0 12px; color: #fff; }
.report-body h3 { font-family: var(--font-h); font-size: 20px; margin: 24px 0 10px; color: #fff; }
.report-body p  { margin-bottom: 16px; }
.report-body strong { font-weight: 600; color: #fff; }
.report-body em { font-style: italic; color: var(--muted); }
.report-body a  { color: var(--accent); }

/* -------------------------------------------------------
   Галерея / Лайтбокс
------------------------------------------------------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 8px; }
.photo-thumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--card); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .2s; opacity: .8; }
.photo-thumb:hover img { transform: scale(1.06); opacity: 1; }

.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox-img { max-width: min(90vw,1200px); max-height: 88vh; border-radius: 6px; object-fit: contain; }
.lightbox-caption { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 13px; background: rgba(0,0,0,.6); padding: 4px 16px; border-radius: 20px; white-space: nowrap; }
.lightbox-close { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; background: none; border: none; opacity: .7; }
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; font-size: 22px; padding: 12px 16px; cursor: pointer; border-radius: 6px; transition: background .2s; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.18); }

/* -------------------------------------------------------
   Участники
------------------------------------------------------- */
.members-table { width: 100%; border-collapse: collapse; }
.members-table th { background: var(--bg2); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.members-table td { padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--border); color: rgba(255,255,255,.85); }
.members-table tr:hover td { background: rgba(255,255,255,.03); }
.member-rank { font-size: 12px; font-weight: 600; color: var(--muted); }
.member-rank-1 { color: #C8931A; }
.member-rank-2 { color: #7A8FA6; }
.member-rank-3 { color: #9B6845; }

/* -------------------------------------------------------
   Фильтры
------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; align-items: center; }
.filter-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-select {
  font-size: 13px; padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card); color: #fff;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* -------------------------------------------------------
   Пустое состояние
------------------------------------------------------- */
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.empty-state-text { font-size: 15px; }

/* -------------------------------------------------------
   Хлебные крошки
------------------------------------------------------- */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 24px; display: flex; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs-sep { color: var(--border); }

/* -------------------------------------------------------
   Формы
------------------------------------------------------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 7px; color: var(--muted); }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: var(--font);
  color: #fff; background: var(--card);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 200px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 28px; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 20px; }
.alert-success { background: rgba(200,255,0,.1); color: var(--accent); border: 1px solid rgba(200,255,0,.25); }
.alert-error   { background: rgba(255,60,0,.1); color: #FF3C00; border: 1px solid rgba(255,60,0,.25); }

/* -------------------------------------------------------
   Подвал
------------------------------------------------------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-logo-text {
  font-family: var(--font-h);
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}
.footer-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 260px;
}
.footer-socials { display: flex; gap: 8px; }
.footer-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-contact-item {
  font-size: 13px;
  color: var(--muted);
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 10px;
}
.footer-contact-item svg { margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.footer-bottom span { color: #FF3B30; }

/* -------------------------------------------------------
   Панель администратора
------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 0; min-height: calc(100vh - 64px); }
.admin-sidebar { background: var(--bg2); border-right: 1px solid var(--border); padding: 24px 0; }
.admin-sidebar-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 0 20px 10px; }
.admin-sidebar a { display: block; font-size: 13px; color: var(--muted); padding: 9px 20px; transition: background .15s, color .15s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(200,255,0,.06); color: var(--accent); }
.admin-content { padding: 36px; }
.admin-page-title { font-family: var(--font-h); font-size: 28px; letter-spacing: 0.05em; margin-bottom: 28px; }
.admin-table-actions { display: flex; gap: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 16px; margin-bottom: 32px; }
.stats-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stats-box-num { font-family: var(--font-h); font-size: 36px; color: var(--accent); }
.stats-box-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.stats-bar, .stats-bar-inner, .stats-bar-item, .stats-bar-num, .stats-bar-label, .stats-bar-divider,
.stats-cards, .stats-card, .stats-card-num, .stats-card-label { /* legacy compat - see stats-box */ }
.list-card, .content-grid { /* legacy compat - no-op */ }

/* -------------------------------------------------------
   Page-banner с фоновым фото
------------------------------------------------------- */
.page-banner {
  position: relative;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 88px 0 40px;
  overflow: hidden;
}
.page-banner-photo {
  position: absolute; inset: 0;
  background: var(--bg2);
  overflow: hidden;
}
.page-banner-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
}
.page-banner-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.48);
}
.page-banner-inner { position: relative; z-index: 2; }

/* ── Автор отчёта ── */
.report-author {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.report-author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  flex-shrink: 0;
}
.report-author-letter {
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h);
  font-size: 20px;
  color: var(--muted);
}
.report-author-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
.report-author-bio {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Event banner two-column layout ── */
.event-banner { min-height: 340px; }
.event-banner-inner {
  position: relative; z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 80px 0 36px;
}
.event-banner-left { flex: 1; min-width: 0; }

/* ── Виджет участия (EJW) ── */
.ejw {
  flex-shrink: 0;
  width: 210px;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200,255,0,.25);
  border-radius: 12px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color .3s, background .3s;
}
.ejw-joined {
  border-color: rgba(200,255,0,.6);
  background: rgba(200,255,0,.07);
}
.ejw-icon {
  color: var(--accent);
  opacity: .9;
}
.ejw-check {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  animation: checkPop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes checkPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.ejw-headline {
  font-family: var(--font-h);
  font-size: 20px;
  letter-spacing: .08em;
  color: #fff;
  line-height: 1.1;
}
.ejw-joined .ejw-headline { color: var(--accent); }
.ejw-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.ejw-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
}
.ejw-count-zero { color: var(--accent); font-size: 12px; opacity: .8; }
.ejw-btn {
  display: block;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 8px;
  font-family: var(--font-h);
  font-size: 17px;
  letter-spacing: .07em;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-align: center;
  text-decoration: none;
  margin-top: 2px;
}
.ejw-btn:hover  { opacity: .88; }
.ejw-btn:active { transform: scale(.97); }
.ejw-btn-join  { background: var(--accent); color: #000; }
.ejw-btn-leave {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.12);
  font-family: var(--font-b);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 8px 0;
}
.ejw-btn-leave:hover { color: #fff; border-color: rgba(255,255,255,.3); }
/* Прошедшие события */
.event-card-past {
  opacity: .7;
  transition: opacity .2s, border-color .2s;
}
.event-card-past:hover {
  opacity: 1;
  border-color: var(--accent) !important;
  color: inherit;
}
.event-card-mine {
  opacity: 1;
  border-color: rgba(200,255,0,.3) !important;
}
.event-card-mine:hover {
  border-color: var(--accent) !important;
}
.event-card-cancelled {
  opacity: .4;
}
.past-event-mine-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--accent);
  background: rgba(200,255,0,.1);
  border: 1px solid rgba(200,255,0,.3);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.ejw-login-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}
.ejw-login-hint a { color: var(--muted); text-decoration: underline; }
.ejw-login-hint a:hover { color: var(--accent); }
.ejw-cancelled {
  border-color: rgba(255,255,255,.1);
  opacity: .7;
}

/* Mobile: виджет уходит под заголовок */
@media (max-width: 700px) {
  .event-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 28px;
  }
  .ejw {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    text-align: left;
    padding: 16px 18px;
    gap: 8px;
  }
  .ejw-icon, .ejw-check { display: none; }
  .ejw-headline { font-size: 18px; }
  .ejw-btn { width: auto; padding: 10px 22px; font-size: 15px; }
  .ejw-count { font-size: 11px; }
}

/* -------------------------------------------------------
   Routes — двухколоночный макет
------------------------------------------------------- */
.routes-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: start;
}
.routes-sidebar {}
.routes-list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: inherit;
  transition: color .2s;
  display: block;
}
.routes-list-item:first-child { padding-top: 0; }
.routes-list-title {
  font-size: 15px; font-weight: 600; color: #fff;
  margin-bottom: 5px;
  transition: color .2s;
}
.routes-list-item:hover .routes-list-title { color: var(--accent); }
.routes-list-meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 12px; flex-wrap: wrap;
}
.routes-main {}
.route-map-block {
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
  flex-direction: column; gap: 10px;
}
.route-map-block svg { opacity: .3; }

/* -------------------------------------------------------
   News — featured карточка
------------------------------------------------------- */
.news-featured {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  height: 380px; background: var(--card);
  margin-bottom: 28px;
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--border);
  transition: border-color .2s;
}
.news-featured:hover { border-color: #444; }
.news-featured-bg { position: absolute; inset: 0; background: var(--card); }
.news-featured-bg img { width:100%; height:100%; object-fit:cover; opacity:.5; transition: opacity .3s; }
.news-featured:hover .news-featured-bg img { opacity: .6; }
.news-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.93) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
}
.news-featured-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 36px;
}
.news-featured-date {
  font-size: 10px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.news-featured-title {
  font-family: var(--font-h); font-size: 30px;
  color: #fff; letter-spacing: 0.03em; margin-bottom: 10px;
  line-height: 1.1;
}
.news-featured-meta {
  font-size: 12px; color: rgba(255,255,255,.55);
  display: flex; gap: 16px;
}
.news-read-more {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  transition: color .2s; display: inline-block; margin-top: 14px;
}
.news-read-more:hover { color: #fff; }

/* -------------------------------------------------------
   Gallery — masonry-сетка
------------------------------------------------------- */
.gallery-masonry {
  columns: 4; column-gap: 10px;
}
.gallery-item {
  break-inside: avoid; margin-bottom: 10px;
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; background: var(--card); display: block;
}
.gallery-item img {
  width: 100%; display: block; opacity: .82;
  transition: opacity .2s, transform .35s;
}
.gallery-item:hover img { opacity: 1; transform: scale(1.03); }
.gallery-item-ph {
  aspect-ratio: 4/3; display: flex;
  align-items: center; justify-content: center;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* -------------------------------------------------------
   Contacts — макет страницы
------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 60px; align-items: start;
}
.contact-info-title {
  font-family: var(--font-h); font-size: 36px;
  color: #fff; letter-spacing: 0.05em;
  margin-bottom: 16px; line-height: 1.05;
}
.contact-info-desc {
  font-size: 14px; color: var(--muted);
  line-height: 1.7; margin-bottom: 32px;
}
.contact-info-item {
  display: flex; align-items: flex-start;
  gap: 14px; margin-bottom: 22px;
}
.contact-info-icon {
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.contact-info-label {
  font-size: 10px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.contact-info-value { font-size: 14px; color: #fff; }
.contact-info-value a { color: #fff; }
.contact-info-value a:hover { color: var(--accent); }
.contact-socials { display: flex; gap: 8px; margin-top: 28px; }
.contact-form-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
}
.contact-form-title {
  font-family: var(--font-h); font-size: 26px;
  color: #fff; letter-spacing: 0.05em; margin-bottom: 24px;
}

/* -------------------------------------------------------
   Events stats row
------------------------------------------------------- */
.events-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-top: 52px;
}
.events-stat-box { background: var(--card); padding: 28px 20px; text-align: center; }
.events-stat-num {
  font-family: var(--font-h); font-size: 48px;
  color: var(--accent); line-height: 1;
}
.events-stat-label {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: 8px;
}

/* -------------------------------------------------------
   Адаптив
------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-title-line { font-size: 100px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1/-1; }
  .about-grid { gap: 40px; }
  .routes-layout { grid-template-columns: 280px 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .rides-grid { grid-template-columns: repeat(2,1fr); }
  .stats-light-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { height: 300px; order: -1; }
  .about-features { grid-template-columns: repeat(2,1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: 1px solid var(--border); padding: 16px 0; }
  .routes-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .gallery-masonry { columns: 3; }
  .events-stats-row { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 640px) {
  .burger { display: flex; }
  .nav {
    display: none; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 0; gap: 0; z-index: 99;
  }
  .nav.nav-open { display: flex; }
  .nav-link { padding: 12px 24px; border-radius: 0; }
  .header-socials { display: none; }
  .btn-join { display: none; }
  .header-inner { position: relative; }

  .hero-title-line { font-size: 72px; }
  .hero-badge-wrap { display: none; }
  .hero-content { padding-bottom: 48px; }

  .rides-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }

  .stats-numbers { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-num { font-size: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1/-1; }

  .about { padding: 48px 0; }
  .about-features { grid-template-columns: repeat(4,1fr); gap: 8px; }
  .about-feature-label { font-size: 9px; }
  .section { padding: 40px 0; }
  .rides-section { padding: 48px 0; }

  .form-row { grid-template-columns: 1fr; }
  .event-card { flex-direction: column; gap: 10px; }
  #route-map { height: 280px; }
  .members-table th:nth-child(4), .members-table td:nth-child(4) { display: none; }

  .page-banner { padding: 80px 0 24px; }
  .page-banner-title { font-size: 40px; }

  .gallery-masonry { columns: 2; }
  .news-featured { height: 260px; }
  .news-featured-content { padding: 20px 24px; }
  .news-featured-title { font-size: 22px; }
  .events-stats-row { grid-template-columns: repeat(2,1fr); }
  .contact-form-card { padding: 24px 20px; }
}

/* ============================================================
   USER AUTH / PROFILE
   ============================================================ */

/* Кнопка аватара в шапке */
.user-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: border-color .2s;
  flex-shrink: 0;
  text-decoration: none;
}
.user-avatar-btn:hover { border-color: var(--accent); }
.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-avatar-initials {
  font-family: var(--font-h);
  font-size: 18px;
  color: var(--accent);
  line-height: 1;
}

/* Превью фото в альбоме с автором */
.photo-thumb { position: relative; overflow: hidden; }
.photo-thumb-author {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4px 6px;
  background: rgba(0,0,0,.55);
  font-size: 10px;
  color: rgba(255,255,255,.75);
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-thumb:hover .photo-thumb-author { opacity: 1; }

/* Alert */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; }
.alert-success { background: rgba(200,255,0,.12); border: 1px solid rgba(200,255,0,.3); color: #c8ff00; }
.alert-error   { background: rgba(255,80,80,.1);  border: 1px solid rgba(255,80,80,.3);  color: #ff7070; }

/* ============================================================
   ALBUMS PAGE — карточки альбомов
   ============================================================ */

.album-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.album-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .15s;
}
.album-card:hover {
  border-color: rgba(200,255,0,.4);
  transform: translateY(-2px);
}

.album-card-cover {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg2);
}
.album-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.album-card:hover .album-card-cover img { transform: scale(1.04); }
.album-card-nocover {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.album-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 50%);
}
.album-card-count {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .05em;
  background: rgba(0,0,0,.4);
  padding: 2px 8px;
  border-radius: 20px;
}
.album-card-body {
  padding: 14px 16px 10px;
  flex: 1;
}
.album-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.album-card-sub {
  font-size: 12px;
  color: var(--muted);
}
.album-card-arrow {
  padding: 8px 16px 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================================
   ALBUM PAGE — шапка, зона загрузки, очередь
   ============================================================ */

.album-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.album-header-left { display: flex; align-items: center; gap: 8px; }
.album-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.album-back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--accent); text-decoration: none;
}
.album-back-link:hover { text-decoration: underline; }
.album-photo-count { font-size: 13px; color: var(--muted); }

/* Зона загрузки */
.upload-zone {
  margin-bottom: 28px;
}

.drop-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.drop-area.drop-active,
.drop-area:hover {
  border-color: var(--accent);
  background: rgba(200,255,0,.03);
}

.upload-mobile-btn {
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.upload-mobile-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
}
.upload-mobile-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Очередь загрузки */
.upload-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.uq-card {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uq-preview {
  position: relative;
  width: 100px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.uq-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.uq-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
}
.uq-spinner {
  width: 22px; height: 22px;
  border: 2px solid rgba(200,255,0,.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.uq-prog {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.uq-bar {
  height: 100%; width: 0;
  background: var(--muted);
  transition: width .3s, background .3s;
}
.uq-name {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Анимация нового фото в галерее */
.photo-thumb.uq-new {
  animation: fadeInScale .5s ease both;
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Пустой альбом */
.album-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}
.album-empty p { font-size: 14px; margin: 0; }
.album-empty a { color: var(--accent); }

/* CTA для незалогиненных */
.album-auth-cta {
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.album-auth-cta svg { flex-shrink: 0; opacity: .5; }
.album-auth-cta a { color: var(--accent); }

/* ── Mobile ── */
@media (max-width: 600px) {
  .album-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .album-card-title { font-size: 13px; }
  .album-card-body  { padding: 10px 12px 8px; }
  .album-card-arrow { display: none; }

  .album-header { flex-direction: column; align-items: flex-start; }
  .album-header-right { width: 100%; justify-content: space-between; }

  #add-photo-btn { flex: 1; text-align: center; justify-content: center; }

  .upload-mobile-btn { padding: 24px 16px; }
  .upload-mobile-label { font-size: 15px; }

  .upload-queue { gap: 8px; }
  .uq-card { width: calc(33.333% - 6px); }
  .uq-preview { width: 100%; height: 60px; }

  /* Автор фото всегда виден на мобильном */
  .photo-thumb-author { opacity: 1 !important; }
}

/* ============================================================
   BEATING HEART — двойной удар (lub-dub)
   ============================================================ */
.beating-heart {
  display: inline-block;
  color: #e8325a;
  animation: heartbeat 1.3s ease infinite;
  transform-origin: center;
  will-change: transform;
}

@keyframes heartbeat {
  0%   { transform: scale(1);    }
  12%  { transform: scale(1.35); }   /* первый удар */
  22%  { transform: scale(1.1);  }   /* отдача */
  34%  { transform: scale(1.28); }   /* второй удар (слабее) */
  46%  { transform: scale(1);    }   /* расслабление */
  100% { transform: scale(1);    }   /* пауза до следующего цикла */
}

/* ============================================================
   ВЫБОР ФОТО В АЛЬБОМЕ
   ============================================================ */

/* Чекбокс-иконка поверх фото */
.photo-select-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s, border-color .15s;
  pointer-events: none;
}

/* В режиме выбора — показываем кружок */
.photo-grid.select-mode .photo-thumb[data-deletable="1"] .photo-select-check {
  opacity: 1;
}

/* Выбрано */
.photo-thumb.selected .photo-select-check {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  opacity: 1 !important;
}
.photo-thumb.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* В режиме выбора подчёркиваем активные */
.photo-grid.select-mode .photo-thumb[data-deletable="1"] {
  cursor: pointer;
}
.photo-grid.select-mode .photo-thumb[data-deletable="1"]:hover img {
  opacity: .85;
}

/* Нижняя панель выбора */
.select-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: #1a1a1a;
  border-top: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.6);
  animation: slideUp .2s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.select-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.select-bar-count {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}
@media (max-width: 480px) {
  .select-bar-inner { justify-content: center; }
  .select-bar-count { width: 100%; text-align: center; }
}

/* ============================================================
   УЧАСТИЕ В СОБЫТИЯХ
   ============================================================ */

.participate-block {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Кнопка «Я участвую» (до записи) */
.participate-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  background: rgba(200,255,0,.06);
  border: 1.5px solid rgba(200,255,0,.35);
  border-radius: var(--radius);
}
.participate-cta .participate-label {
  display: block;
  font-family: var(--font-h);
  font-size: 22px;
  letter-spacing: .04em;
  color: #fff;
  margin-bottom: 4px;
}
.participate-cta .participate-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Состояние «Вы едете!» */
.participate-joined {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: rgba(200,255,0,.08);
  border: 1.5px solid rgba(200,255,0,.5);
  border-radius: var(--radius);
  animation: participatePop .4s ease;
}
@keyframes participatePop {
  0%   { transform: scale(.97); opacity:.5; }
  60%  { transform: scale(1.01); }
  100% { transform: scale(1); opacity:1; }
}
.participate-check {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(200,255,0,.15);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.participate-text {
  flex: 1;
  min-width: 160px;
}
.participate-label {
  display: block;
  font-family: var(--font-h);
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: 2px;
}
.participate-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Список участников */
.participants-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.participant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fadeInScale .3s ease;
}
.participant-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
}
.participant-avatar-letter {
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h);
  font-size: 22px;
  color: var(--muted);
}
.participant-name {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Рейтинг ─────────────────────────────────────────────── */

/* Подиум */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
}
.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 200px;
  padding-bottom: 0;
}
.podium-avatar-wrap { position: relative; margin-bottom: 10px; }
.podium-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  display: block;
}
.podium-avatar-1 { width: 88px; height: 88px; border-color: #FFD700; }
.podium-avatar-letter {
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h);
  font-size: 28px;
  color: var(--muted);
}
.podium-medal {
  position: absolute;
  bottom: -4px; right: -4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--bg);
}
.podium-medal-1 { font-size: 18px; background: transparent; border: none; bottom: -8px; right: -8px; }
.podium-medal-2 { background: #C0C0C0; color: #000; }
.podium-medal-3 { background: #CD7F32; color: #fff; }
.podium-name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  margin-bottom: 4px;
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-km {
  font-family: var(--font-h);
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 2px;
}
.podium-km span { font-size: 13px; color: var(--muted); }
.podium-rides { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.podium-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
}
.podium-bar-1 { height: 100px; background: linear-gradient(180deg,rgba(200,255,0,.3) 0%,rgba(200,255,0,.08) 100%); border-top: 2px solid var(--accent); }
.podium-bar-2 { height: 70px;  background: linear-gradient(180deg,rgba(192,192,192,.2) 0%,rgba(192,192,192,.05) 100%); border-top: 2px solid #C0C0C0; }
.podium-bar-3 { height: 50px;  background: linear-gradient(180deg,rgba(205,127,50,.2) 0%,rgba(205,127,50,.05) 100%); border-top: 2px solid #CD7F32; }

/* Таблица рейтинга */
.rating-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rating-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.rating-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.rating-table tr:last-child td { border-bottom: none; }
.rating-table tr:hover td { background: rgba(255,255,255,.02); }
.rating-row-me td { background: rgba(200,255,0,.04) !important; }
.rating-row-me:hover td { background: rgba(200,255,0,.07) !important; }

/* Большая кнопка участия */
.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
  font-family: var(--font-h);
  letter-spacing: .06em;
}

@media (max-width: 600px) {
  .participate-cta { flex-direction: column; align-items: flex-start; gap: 14px; }
  .participate-joined { gap: 12px; }
  .podium { gap: 0; }
  .podium-avatar { width: 56px; height: 56px; }
  .podium-avatar-1 { width: 68px; height: 68px; }
  .podium-name { font-size: 12px; max-width: 100px; }
  .podium-bar-1 { height: 70px; }
  .podium-bar-2 { height: 48px; }
  .podium-bar-3 { height: 34px; }
}

/* -------------------------------------------------------
   Видеохроника
------------------------------------------------------- */

/* Баннер видео */
.page-banner-photo--videos {
  background: linear-gradient(135deg, #0a0a14 0%, #111826 50%, #0d0d0d 100%);
}

/* Табы по годам */
.video-year-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.video-year-tab {
  font-family: var(--font-h);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 40px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
  text-decoration: none;
}
.video-year-tab:hover { color: #fff; border-color: #555; }
.video-year-tab.active {
  color: var(--accent-dark);
  background: var(--accent);
  border-color: var(--accent);
}

/* Год-заголовок */
.video-year-heading {
  font-family: var(--font-h);
  font-size: 36px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.video-year-section + .video-year-section { margin-top: 56px; }

/* Сетка видео */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* Карточка видео */
.video-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(200,255,0,.1);
  color: inherit;
}

/* Превью */
.video-card-thumb {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: #111;
  overflow: hidden;
}
.video-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.video-card:hover .video-card-thumb img { transform: scale(1.04); }
.video-card-thumb-blank {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
}

/* Кнопка play */
.video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .2s;
  color: #fff;
}
.video-card-play svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,.6)); }
.video-card:hover .video-card-play { opacity: 1; }

/* Бейдж года */
.video-card-year-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-family: var(--font-h);
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--accent-dark);
  background: var(--accent);
  padding: 2px 10px;
  border-radius: 20px;
}

/* Текст карточки */
.video-card-info { padding: 16px 18px 18px; }
.video-card-title {
  font-family: var(--font-h);
  font-size: 18px;
  letter-spacing: .03em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.video-card-event {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}
.video-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* -------------------------------------------------------
   Страница просмотра видео
------------------------------------------------------- */
.video-player-section {
  background: #000;
  padding: 0 0 4px;
}
.video-player-wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}
.video-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Панель под плеером */
.video-cinema-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 0;
}
.btn-cinema {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-h);
  font-size: 14px;
  letter-spacing: .07em;
  color: var(--accent-dark);
  background: var(--accent);
  border: none;
  padding: 9px 20px;
  border-radius: 40px;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.btn-cinema:hover { opacity: .85; transform: scale(1.02); }
.btn-video-external {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.btn-video-external:hover { color: #fff; }

/* Мета-блок */
.video-meta-block {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.video-title {
  font-family: var(--font-h);
  font-size: 32px;
  letter-spacing: .04em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.video-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.video-year-tag {
  font-family: var(--font-h);
  font-size: 14px;
  letter-spacing: .05em;
  color: var(--accent-dark);
  background: var(--accent);
  padding: 3px 12px;
  border-radius: 20px;
  display: inline-block;
}
.video-event-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.video-event-link:hover { color: var(--accent); }
.video-description {
  font-size: 15px;
  color: #ccc;
  line-height: 1.65;
}

/* Навигация между видео */
.video-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.video-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  max-width: 45%;
  transition: color .2s;
}
.video-nav-link:hover { color: var(--accent); }
.video-nav-next { text-align: right; }

/* -------------------------------------------------------
   Кино-режим (Cinema Mode)
------------------------------------------------------- */
.cinema-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #000;
  display: flex;
  flex-direction: column;
}
.cinema-overlay[hidden] { display: none; }

.cinema-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0,0,0,.7);
  z-index: 1;
}
.cinema-topbar-title {
  font-family: var(--font-h);
  font-size: 16px;
  letter-spacing: .05em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}
.cinema-exit-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-h);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--accent-dark);
  background: var(--accent);
  border: none;
  padding: 7px 16px;
  border-radius: 30px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .2s;
}
.cinema-exit-btn:hover { opacity: .85; }

.cinema-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}
.cinema-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* На телевизоре/большом экране чуть крупнее шрифты topbar */
@media (min-width: 1400px) {
  .cinema-topbar-title { font-size: 20px; }
  .cinema-exit-btn { font-size: 15px; padding: 9px 22px; }
}

/* Мобильный */
@media (max-width: 600px) {
  .videos-grid { grid-template-columns: 1fr; gap: 16px; }
  .video-title { font-size: 24px; }
  .video-cinema-row { flex-wrap: wrap; }
  .video-nav { flex-direction: column; gap: 8px; }
  .video-nav-link { max-width: 100%; }
  .cinema-topbar { padding: 8px 14px; }
  .cinema-topbar-title { font-size: 13px; }
}
