:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-soft: #edf3f4;
  --navy: #0b2733;
  --navy-2: #123946;
  --blue: #176782;
  --blue-hover: #10536b;
  --text: #15252b;
  --muted: #6d7b80;
  --line: #dce3e5;
  --white: #ffffff;
  --danger: #bd4a4a;
  --success: #2c765f;
  --shadow-sm: 0 8px 24px rgba(11, 39, 51, .07);
  --shadow-md: 0 18px 48px rgba(11, 39, 51, .12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Onest", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
::selection { color: var(--white); background: var(--blue); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-logo {
  width: 34px;
  height: 34px;
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--blue);
  border-radius: 10px;
}
.brand-logo i {
  position: absolute;
  left: 7px;
  width: 20px;
  height: 7px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-left: 0;
  border-right: 0;
  border-radius: 50%;
}
.brand-logo i:first-child { top: 9px; transform: rotate(-9deg); }
.brand-logo i:last-child { bottom: 8px; transform: rotate(9deg); }
.brand-mark { font-size: 16px; font-weight: 750; letter-spacing: -.045em; }
.brand-mark span { color: var(--blue); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav > a {
  padding: 9px 10px;
  color: #4e5e63;
  font-size: 14px;
  font-weight: 550;
  border-radius: 8px;
}
.nav > a:hover, .nav > a.is-active { color: var(--navy); background: var(--surface-soft); }
.nav .header-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 10px;
  padding: 9px 10px 9px 15px;
  color: var(--navy);
  background: transparent;
  border: 1px solid #b9c7cb;
  border-radius: 999px;
  font-weight: 600;
}
.nav .header-cta span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--blue);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
.nav .header-cta:hover { color: var(--navy); background: var(--surface-soft); border-color: #9cafb5; }
.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle span { width: 18px; height: 2px; display: block; background: var(--navy); border-radius: 2px; }

/* Typography and common controls */
.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
h1, h2, h3 { margin: 0; color: var(--text); font-weight: 650; letter-spacing: -.045em; }
h1 { max-width: 13ch; margin-bottom: 20px; font-size: clamp(44px, 6.4vw, 78px); line-height: 1.02; }
h2 { margin-bottom: 12px; font-size: clamp(28px, 3.5vw, 42px); line-height: 1.08; }
h3 { margin-bottom: 8px; font-size: 19px; line-height: 1.25; }
/* Заголовки внутри карточек и шапок остаются прижатыми — отступ получают только
   заголовки верхнего уровня, то есть прямые дети контентной колонки. */
.wrap > h2 { margin-top: 56px; }
.wrap > h3 { margin-top: 32px; }
.wrap > h2:first-child, .wrap > h3:first-child { margin-top: 0; }
.wrap > .grid + h2, .wrap > .table-wrap + h2 { margin-top: 52px; }
.lead { max-width: 52ch; margin: 0 0 28px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { color: var(--white); background: var(--blue-hover); border-color: var(--blue-hover); transform: translateY(-1px); }
.btn-ghost { color: var(--navy); background: transparent; border-color: #bcc9cd; }
.btn-ghost:hover { color: var(--navy); background: var(--surface-soft); border-color: #a3b4b9; }
.btn-light { color: var(--navy); background: var(--white); border-color: var(--white); }
.btn-light:hover { color: var(--navy); background: #eef4f5; border-color: #eef4f5; }
.btn-danger { color: var(--white); background: var(--danger); border-color: var(--danger); }

/* Hero */
.hero {
  position: relative;
  min-height: 660px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}
.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 28, 39, .9) 0%, rgba(6, 28, 39, .7) 43%, rgba(6, 28, 39, .14) 76%),
    linear-gradient(0deg, rgba(6, 28, 39, .25), transparent 44%),
    url("../img/hero-wakeboard.jpg") center / cover no-repeat;
}
.hero-inner { position: relative; z-index: 1; padding: 90px 0 82px; }
.hero-copy { width: min(660px, 60%); }
.hero .eyebrow { color: #b8dce8; }
.hero h1 { color: var(--white); }
.hero .lead { max-width: 46ch; color: rgba(255, 255, 255, .76); }
.search-bar {
  width: min(610px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.search-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  position: relative;
  margin-left: 7px;
  border: 2px solid #7b898e;
  border-radius: 50%;
}
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -5px; bottom: -2px; background: #7b898e; transform: rotate(45deg); border-radius: 2px; }
.search-bar input { min-width: 0; flex: 1; padding: 10px 8px; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-bar input::placeholder { color: #89969a; }
.search-bar .btn { min-width: 110px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; color: rgba(255,255,255,.72); font-size: 14px; }
.hero-meta b { color: var(--white); font-weight: 650; }
.hero-meta a { margin-left: 8px; color: var(--white); font-weight: 600; }
.hero-meta a span { margin-left: 5px; }
.hero-meta a:hover { color: #b8dce8; }

/* Sections and cards */
.section { padding: 84px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.catalog-section { padding-top: 16px !important; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(11, 39, 51, .02);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.card:hover, .park-card:hover { color: var(--text); border-color: #c0ccd0; box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.card-photo { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: var(--surface-soft) center / cover no-repeat; }
.card-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(7, 29, 39, .44)); }
.park-card .card-photo { transition: transform .45s ease; }
.park-card:hover .card-photo { transform: scale(1.025); }
.card-photo .badges { position: absolute; top: 13px; left: 13px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.card-body { padding: 18px 18px 20px; }
.card-body h3 a:hover { color: var(--blue); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.price { color: var(--navy); font-weight: 650; }
.stars { color: #af7e35; font-size: 13px; letter-spacing: 1px; }
.city-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip, .badge { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip { color: #44555b; background: var(--surface); border: 1px solid var(--line); }
.chip:hover { color: var(--navy); background: #e7f0f2; border-color: #c4d5da; }
.badge { color: var(--white); background: rgba(9, 36, 47, .76); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.badge-energy { color: var(--navy); background: rgba(255, 255, 255, .88); border-color: rgba(255,255,255,.72); }

/* Event */
.countdown {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.event-date { width: 104px; height: 104px; display: grid; align-content: center; padding: 14px; color: var(--white); background: var(--navy); border-radius: 16px; text-align: center; }
.event-date b { font-size: 24px; line-height: 1.1; letter-spacing: -.04em; }
.event-date span { margin-top: 4px; color: #b8dce8; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.countdown h2 { margin-bottom: 6px; font-size: clamp(23px, 2.6vw, 34px); }
.countdown .eyebrow { margin-bottom: 7px; }
.ticks { display: flex; gap: 8px; }
.tick { min-width: 62px; padding: 10px 8px; background: var(--surface-soft); border-radius: 10px; text-align: center; }
.tick b { display: block; color: var(--navy); font-size: 21px; line-height: 1.2; }
.tick span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

/* Secondary home blocks */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 44px 48px;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  border-radius: var(--radius-lg);
}
.cta-band h2 { color: var(--white); }
.cta-band .eyebrow { color: #9ecad8; }
.cta-band .muted { max-width: 58ch; color: rgba(255,255,255,.68); }
.soon-grid { margin-top: 4px; }
.soon-card { min-height: 210px; position: relative; padding: 24px; }
.soon-card .soon-kicker { margin: 0 0 36px; color: var(--blue); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.soon-card .muted { margin-bottom: 28px; }
.card-arrow { position: absolute; right: 22px; bottom: 18px; color: var(--blue); font-size: 20px; transition: transform .18s ease; }
.soon-card:hover .card-arrow { transform: translateX(4px); }

/* Directory and forms */
.filters { display: grid; grid-template-columns: 270px 1fr; gap: 30px; }
.filter-box { position: sticky; top: 92px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-box label { display: block; margin: 15px 0 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.filter-box label:first-child { margin-top: 0; }
.filter-box select,
.filter-box input[type="number"],
.filter-box input[type="text"],
.filter-box input[type="search"],
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--white);
  border: 1px solid #cbd5d8;
  border-radius: 9px;
  outline: 0;
}
.field input:focus, .field select:focus, .field textarea:focus, .filter-box select:focus, .filter-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,103,130,.12); }
.check-list { display: flex; flex-direction: column; gap: 7px; }
.check-list label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 13px; font-weight: 450; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface-soft); border-radius: 9px; }
.seg a { padding: 7px 13px; color: var(--muted); border-radius: 7px; font-size: 13px; font-weight: 550; }
.seg a.is-active { color: var(--navy); background: var(--white); box-shadow: 0 1px 4px rgba(11,39,51,.08); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { color: var(--muted); font-size: 13px; }
.field-full { grid-column: 1 / -1; }
.flash { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.flash-ok { color: var(--success); background: #edf7f3; border-color: #c3dfd5; }
.flash-error { color: var(--danger); background: #fcf0f0; border-color: #e7c5c5; }
.empty { padding: 30px; color: var(--muted); background: var(--surface); border: 1px dashed #c7d2d5; border-radius: var(--radius); }

/* Park detail */
.park-hero { min-height: 540px; position: relative; display: grid; align-items: end; color: var(--white); overflow: hidden; background: var(--navy); }
.park-hero-media { position: absolute; inset: 0; background-position: center; background-size: cover; }
.park-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,24,33,.9), rgba(5,24,33,.12) 72%); }
.park-hero .wrap { position: relative; z-index: 1; padding: 110px 0 44px; }
.park-hero h1 { color: var(--white); }
.park-hero .eyebrow { color: #b8dce8; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 24px 0; }
.gallery img { width: 100%; height: 100%; min-height: 140px; object-fit: cover; border-radius: 10px; }
.gallery a:first-child { grid-row: span 2; }
.gallery a:first-child img { min-height: 288px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.price-table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.social-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.map { height: 560px; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 24px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b, .stat strong { display: block; margin-bottom: 5px; color: var(--blue); font-size: 30px; font-weight: 700; letter-spacing: -.05em; }
.stat span { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { padding: 64px 0 28px; color: rgba(255,255,255,.62); background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.15fr; gap: 48px; margin-bottom: 48px; }
.site-footer .brand { color: var(--white); }
.site-footer .brand:hover { color: var(--white); }
.site-footer .brand-logo { background: #2b7890; }
.site-footer .brand-mark span { color: #9ecad8; }
.site-footer p { max-width: 34ch; margin: 0 0 10px; }
.site-footer a { color: rgba(255,255,255,.86); }
.site-footer a:hover { color: var(--white); }
.footer-label { margin-bottom: 16px !important; color: rgba(255,255,255,.42); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.footer-copy { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

/* Admin */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.admin-nav { padding: 24px 16px; color: var(--white); background: var(--navy); }
.admin-nav a { display: block; padding: 8px 0; color: rgba(255,255,255,.62); }
.admin-nav a:hover, .admin-nav a.is-active { color: var(--white); }
.admin-main { padding: 28px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.login-box { max-width: 420px; margin: 12vh auto; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }


/* ---------- Разделы портала: новости, календарь, трюки, сообщество, каталог ---------- */

.wrap-narrow { width: min(820px, calc(100% - 48px)); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Мета-строка сверху карточки — это заголовок, а не подвал: без линии и отступа. */
.card-body > .card-meta:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.chip-link:hover { color: var(--blue); border-color: #a8c6ce; }
.chip-muted { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
.chip-done { color: var(--success); border-color: #bcdccf; background: #eef7f3; }
.chip-in_progress { color: #8a6316; border-color: #e3d2ac; background: #fbf4e6; }
.chip-planned { color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.seg { width: fit-content; max-width: 100%; flex-wrap: wrap; margin: 18px 0 4px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.linkish, .linkish-danger { padding: 0; color: var(--muted); background: none; border: 0; font-size: 13px; font-weight: 550; cursor: pointer; }
.linkish:hover { color: var(--navy); }
.linkish-danger:hover { color: var(--danger); }

.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 22px; }
.filter-row input, .filter-row select {
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.filter-row input:focus-visible, .filter-row select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* Постраничная навигация */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.pager a { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 14px; }
.pager a:hover { color: var(--navy); border-color: #b9cad0; }
.pager-current { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--white); background: var(--blue); border-radius: 9px; font-size: 14px; font-weight: 600; }

/* Статья: новость и пост блога */
.article-page h1 { margin-bottom: 10px; }
.article-cover { width: 100%; margin: 22px 0; border-radius: var(--radius); }
.article-body { font-size: 17px; line-height: 1.7; }
.article-body p { margin: 0 0 18px; }
.link-card { margin-top: 26px; }
.link-card h2 { margin-top: 0; font-size: 17px; }
.link-card p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }

/* Календарь */
.month-head { margin: 34px 0 14px; font-size: 20px; }
.event-card { display: grid; grid-template-columns: auto 1fr; align-items: start; }
.event-card .event-date { margin: 18px 0 0 18px; }
.event-card.is-past { opacity: .72; }
.event-facts { margin: 26px 0; }

/* Трюки и шкала роста */
.difficulty { color: var(--blue); letter-spacing: 2px; font-size: 12px; }
.trick-card { overflow: hidden; }
.trick-card-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface-soft); }
.trick-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.trick-card:hover .trick-card-media img { transform: scale(1.035); }
.trick-hero-media { margin: 24px 0 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.trick-hero-media img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.trick-card.is-done { border-color: #bcdccf; }
.trick-status { margin: 12px 0 0; font-size: 13px; font-weight: 600; }
.trick-status-done { color: var(--success); }
.trick-status-in_progress { color: #8a6316; }
.trick-status-planned { color: var(--muted); }

.progress-card { margin: 18px 0 24px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.progress-head p { margin: 4px 0 0; font-size: 13px; }
.progress-percent { font-size: 28px; font-weight: 700; color: var(--blue); }
.progress-bar { height: 8px; margin-top: 14px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }

.scale { display: grid; gap: 10px; margin-top: 20px; }
.scale-row { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.scale-level { display: flex; flex-direction: column; min-width: 0; color: var(--muted); font-size: 12px; }
.scale-level strong { color: var(--navy); font-size: 19px; line-height: 1.15; letter-spacing: -.02em; }
.scale-tricks { display: flex; flex-wrap: wrap; gap: 8px; }
.scale-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; color: #44555b; background: var(--surface-soft); border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 550; }
.scale-chip:hover { color: var(--navy); border-color: #c4d5da; }
.scale-chip.is-done { color: var(--success); background: #eaf5f0; border-color: #bcdccf; }
.scale-chip.is-in_progress { color: #8a6316; background: #fbf4e6; border-color: #e3d2ac; }
.scale-chip.is-planned { color: var(--blue); background: #e9f2f5; border-color: #c2d9e0; }

.focus-card { margin: 4px 0 24px; border-left: 3px solid var(--blue); }
.focus-card h2 { margin-top: 0; font-size: 17px; }
.focus-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.check-grid { margin: 4px 0 26px; }
.check-card h2 { margin-top: 0; font-size: 16px; }
.check-card p { margin: 0; }
.steps { margin: 0 0 22px; padding-left: 20px; display: grid; gap: 8px; }
.mistakes { margin: 0 0 22px; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.safety-card { margin: 0 0 24px; border-left: 3px solid var(--danger); }
.safety-card h2 { margin-top: 0; font-size: 17px; }
.prereq-grid { margin: 8px 0 26px; }
.prereq-grid h2 { margin-top: 0; font-size: 16px; }
.log-card { margin: 18px 0 26px; }
.log-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.learn-steps { margin: 26px 0 34px; }
.learn-steps h2 { margin: 6px 0 8px; font-size: 19px; }

@media (max-width: 640px) {
  .trick-hero-media { margin: 20px 0 24px; border-radius: var(--radius-sm); }
  .trick-hero-media img { min-height: 220px; object-fit: cover; }
}

/* Сообщество */
.rider-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 28px; }
.rider-avatar { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; color: var(--white); background: var(--blue); border-radius: 50%; font-weight: 700; }
.rider-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rider-avatar-lg { width: 104px; height: 104px; font-size: 38px; }
.rider-hero-copy h1 { margin: 4px 0 8px; }
.rider-head { display: flex; align-items: center; gap: 12px; }
.rider-head h3 { margin: 0; font-size: 16px; }
.rider-head p { margin: 2px 0 0; font-size: 13px; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.plain-list li { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.friend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; }
.profile-photo { width: 96px; height: 96px; margin-top: 8px; object-fit: cover; border-radius: var(--radius-sm); }
.logout-form { margin-top: 18px; }

/* Комментарии */
.comments-section h2 { font-size: 20px; }
.comment-list { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 16px; }
.comment { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.comment p { margin: 0; }
.comment-form { display: grid; gap: 10px; max-width: 640px; }
.comment-form textarea { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical; }
.comment-form button { justify-self: start; }

/* Формы на публичной части */
.auth-card { margin-top: 10px; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-row label { flex: 1 1 auto; min-width: 0; }
.qty-row label { display: flex; align-items: center; gap: 8px; }
.qty-row .qty-input {
  width: 62px;
  min-height: 34px;
  padding: 4px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.qty-row .qty-input:disabled { color: var(--muted); background: var(--surface-soft); }
.price-rows { display: grid; gap: 10px; margin-bottom: 8px; }
.price-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gallery-item { overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: 10px 12px; }
.verify-card { margin: 18px 0; border-left: 3px solid var(--danger); }
.verify-card h2 { margin: 0 0 6px; font-size: 17px; }
.auth-card h1 { margin: 6px 0 10px; }
.form-card .card-body { padding: 24px; }
.form-stack { display: grid; gap: 16px; }
.form-card h2 { margin: 26px 0 12px; font-size: 19px; }
.form-card h2:first-child { margin-top: 0; }
.form-card label { font-weight: 550; font-size: 14px; }
/* Флажки и переключатели не растягиваем: правило ниже только для текстовых полей. */
.form-card input:not([type="checkbox"]):not([type="radio"]),
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.form-card input[type="checkbox"], .form-card input[type="radio"] {
  width: 17px;
  height: 17px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--blue);
}
.form-card input[type="file"] { padding: 9px 12px; font-size: 13px; }
.form-card .qty-input { width: 66px; min-height: 38px; padding: 6px 8px; text-align: center; }
.form-card .check-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 18px; }
.form-card .check-list label { font-weight: 450; }
.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
}
.form-card textarea { min-height: 110px; resize: vertical; }
.form-card input:focus-visible, .form-card select:focus-visible, .form-card textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.form-card .field small { font-weight: 400; }
.check-list-scroll { max-height: 210px; overflow-y: auto; padding: 12px; background: var(--surface-soft); border-radius: var(--radius-sm); }
.review-form { margin-top: 26px; }

/* Каталог снаряжения */
.listing-photo { background-color: var(--surface-soft); }
.listing-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 34px; }
.listing-media img { width: 100%; border-radius: var(--radius); }
.listing-media-empty { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--muted); background: var(--surface-soft); border-radius: var(--radius); }
.listing-info h1 { margin: 6px 0 10px; }
.listing-price { margin: 0 0 18px; font-size: 28px; font-weight: 700; color: var(--navy); }
.spec-list { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 10px; }
.spec-list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-list span { color: var(--muted); }
.seller-card { margin: 22px 0; }
.seller-card h2 { margin-top: 0; font-size: 17px; }

/* Шапка: профиль */
.map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 460px;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.map-embed + .muted { margin-top: 10px; }
.env-banner {
  margin: 0;
  padding: 8px 16px;
  text-align: center;
  color: var(--white);
  background: var(--navy);
  font-size: 13px;
  font-weight: 550;
}
.header-cta { white-space: nowrap; }
.header-search { flex: 0 1 190px; }
.header-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
}
.header-search input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; background: var(--white); }
.search-section { margin: 26px 0 10px; font-size: 19px; }
.search-list li { padding-bottom: 10px; }
.header-user { display: inline-flex; align-items: center; gap: 9px; max-width: 190px; font-size: 14px; font-weight: 550; white-space: nowrap; }
.header-user span:last-child { overflow: hidden; text-overflow: ellipsis; }
.header-avatar {
  width: 30px;
  height: 30px;
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  background: var(--blue);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.footer-logout { margin-top: 10px; }


/* ---------- Страница парка ---------- */

.park-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

.park-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 44px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.park-fact { display: flex; flex-direction: column; gap: 3px; padding: 20px 22px; background: var(--surface); }
.park-fact > span { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.park-fact strong { color: var(--navy); font-size: 22px; letter-spacing: -.03em; }
.park-fact small { color: var(--muted); font-size: 13px; }
.park-fact .stars { color: #d99a2b; font-size: 13px; }

.park-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.park-main > h2:first-child { margin-top: 0; }
.park-main h2 { margin-top: 52px; }
.park-main > *:first-child { margin-top: 0; }
.park-lists h3 { margin-top: 0; font-size: 17px; }
.park-lists .tag-row { margin-top: 10px; }
.park-map-head { margin: 52px 0 18px; align-items: baseline; }
.park-map-head h2 { margin: 0; }
.park-route { margin-top: 16px; }

.park-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
.park-aside h3 { margin-top: 0; font-size: 18px; }
.park-card-accent { border-top: 3px solid var(--blue); }
.park-booking { display: grid; gap: 12px; margin-top: 14px; }
.park-booking .field label { font-size: 13px; font-weight: 550; }
.park-booking input, .park-booking select, .park-booking textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.park-booking textarea { min-height: 78px; resize: vertical; }
.park-booking input:focus-visible, .park-booking select:focus-visible, .park-booking textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.contact-list span { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.score-list { margin: 12px 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; }
.score-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.score-list span { color: var(--muted); }

/* Галерея и просмотр фотографий */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 4px; }
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.lightbox {
  width: min(1100px, 94vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  display: none;
  color: var(--white);
  background: transparent;
  border: 0;
  overflow: visible;
}
.lightbox[open] { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 8px; }
.lightbox::backdrop { background: rgba(6, 22, 30, .88); backdrop-filter: blur(4px); }
.lightbox-figure { grid-column: 2; margin: 0; display: grid; gap: 10px; justify-items: center; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  background: var(--navy);
}
.lightbox-figure figcaption { color: rgba(255, 255, 255, .78); font-size: 13px; text-align: center; }
.lightbox-nav, .lightbox-close {
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, .14);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s ease;
}
.lightbox-nav { width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.lightbox-prev { grid-column: 1; justify-self: start; }
.lightbox-next { grid-column: 3; justify-self: end; }
.lightbox-close { width: 40px; height: 40px; position: absolute; top: -52px; right: 0; font-size: 22px; line-height: 1; }
.lightbox-nav[hidden] { display: none; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255, 255, 255, .26); }
.lightbox-nav:focus-visible, .lightbox-close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

@media (max-width: 980px) {
  .nav { display: none; }
  .nav.is-open { position: absolute; top: 72px; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; padding: 12px 24px 20px; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .nav.is-open .header-cta { align-self: flex-start; margin: 8px 0 0; }
  .menu-toggle { display: inline-flex; }
  .hero-copy { width: 72%; }
  .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr; }
  .filter-box { position: static; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 2 / -1; }
  .admin-shell { grid-template-columns: 1fr; }
  .countdown { grid-template-columns: auto 1fr; }
  .ticks { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .header-search { display: none; }
  .park-layout { grid-template-columns: 1fr; gap: 32px; }
  .park-aside { position: static; }
  .park-facts { grid-template-columns: repeat(2, 1fr); }
  .listing-page { grid-template-columns: 1fr; }
  .rider-hero { grid-template-columns: 1fr; text-align: left; }
  .scale-row { grid-template-columns: 1fr; gap: 10px; }
  .scale-level { flex-direction: row; align-items: baseline; gap: 8px; }
  .event-card { grid-template-columns: 1fr; }
  .event-card .event-date { margin: 18px 18px 0; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  .nav.is-open { top: 64px; }
  .hero { min-height: 620px; align-items: end; }
  .hero-media { background-position: 62% center; background-image: linear-gradient(90deg, rgba(6,28,39,.9), rgba(6,28,39,.56)), linear-gradient(0deg, rgba(6,28,39,.5), transparent 60%), url("../img/hero-wakeboard.jpg"); }
  .hero-inner { padding: 92px 0 52px; }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(40px, 12vw, 58px); }
  .hero .lead { font-size: 16px; }
  .search-bar { flex-wrap: wrap; border-radius: 13px; }
  .search-bar input { width: calc(100% - 38px); }
  .search-bar .btn { width: 100%; }
  .hero-meta { gap: 8px 16px; }
  .hero-meta a { width: 100%; margin: 4px 0 0; }
  .section { padding: 64px 0; }
  .catalog-section { padding-top: 4px !important; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .countdown { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .event-date { width: 100%; height: auto; display: flex; align-items: baseline; justify-content: center; gap: 8px; }
  .ticks { grid-column: auto; gap: 5px; }
  .tick { min-width: 0; flex: 1; padding-inline: 4px; }
  .cta-band { align-items: stretch; flex-direction: column; padding: 32px 24px; }
  .grid-4, .grid-3, .grid-2, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 16px; }
  .stat b, .stat strong { font-size: 24px; }
  .footer-grid > div:last-child { grid-column: auto; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery a:first-child { grid-column: 1 / -1; grid-row: auto; }
  .gallery a:first-child img { min-height: 210px; }
  .footer-copy { flex-direction: column; }
}

@media (max-width: 680px) {
  .map-embed { aspect-ratio: 4 / 3; }
  .park-facts { grid-template-columns: 1fr; margin-bottom: 32px; }
  .park-fact { padding: 16px 18px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .score-list { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); }
  .lightbox-prev { left: -4px; }
  .lightbox-next { right: -4px; }
  .price-row { grid-template-columns: 1fr 1fr; }
  .wrap-narrow { width: calc(100% - 32px); }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row input, .filter-row select { width: 100%; }
  .progress-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .article-body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
