:root {
  --bg: #f6f6f2;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #182028;
  --muted: #586371;
  --line: rgba(24, 32, 40, 0.1);
  --shadow: 0 20px 50px rgba(24, 32, 40, 0.08);
  --blue: #0d5eaf;
  --red: #c84333;
  --gold: #d8b25a;
  --green: #4f7a54;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: min(1180px, calc(100vw - 32px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(246, 246, 242, 0.92), rgba(246, 246, 242, 0.98)),
    url("/assets/images/eysk-map-sketch.svg") center 120px / min(1200px, 94vw) no-repeat,
    var(--bg);
}

body.no-scroll {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  width: var(--container);
  margin: 0 auto;
  padding-bottom: 48px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 30px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand__emblem {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand__title,
h1,
h2,
h3 {
  font-family: "Montserrat", sans-serif;
}

.brand__title {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
}

.brand__subtitle {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  transition: 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(13, 94, 175, 0.12), rgba(200, 67, 51, 0.12)),
    var(--surface-strong);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero,
.section,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero--home {
  grid-template-columns: 1fr;
}

.hero--inner {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
}

.hero--banner {
  grid-template-columns: 1fr;
}

.hero__content,
.hero__aside,
.section,
.site-footer {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero__content {
  position: relative;
  padding: 52px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero__content::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 24px;
  width: 180px;
  height: 180px;
  background:
    radial-gradient(circle at center, rgba(216, 178, 90, 0.28), transparent 66%),
    linear-gradient(135deg, rgba(13, 94, 175, 0.14), transparent 68%);
  filter: blur(2px);
}

.hero__content--home {
  padding-right: 320px;
}

.hero__content--home::after {
  display: none;
}

.hero__content--featured {
  padding-right: 320px;
  min-height: 280px;
}

.hero__content--featured::after {
  display: none;
}

.hero__content--banner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 44px;
  background:
    linear-gradient(90deg, rgba(24, 32, 40, 0.84) 0%, rgba(24, 32, 40, 0.62) 44%, rgba(24, 32, 40, 0.14) 100%),
    url("/assets/images/place-primorskaya-naberezhnaya.jpg") center / cover no-repeat;
  color: #fff;
}

.hero__content--banner .eyebrow,
.hero__content--banner .hero__lead {
  color: rgba(255, 255, 255, 0.88);
}

.hero__content--banner h1 {
  max-width: none;
}

.hero__content--contacts {
  background:
    linear-gradient(135deg, rgba(13, 94, 175, 0.1), rgba(216, 178, 90, 0.08)),
    var(--surface);
}

.hero__aside {
  padding: 30px;
  border-radius: var(--radius-lg);
}

.hero__accent-image {
  position: absolute;
  top: 28px;
  bottom: auto;
  right: 28px;
  width: 230px;
  height: 230px;
  padding: 10px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(13, 94, 175, 0.12), rgba(216, 178, 90, 0.16));
  box-shadow: 0 16px 32px rgba(24, 32, 40, 0.08);
}

.hero__accent-image img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.hero__accent-image--eysk {
  object-position: center;
}

.hero h1 {
  max-width: 12ch;
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.98;
}

.hero__lead {
  max-width: 58ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.button,
.button--ghost:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--red));
  color: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.summary-card__label {
  margin: 0 0 18px;
  font-weight: 700;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list li:last-child {
  border-bottom: 0;
}

.section {
  margin-bottom: 24px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.section--highlight {
  background:
    linear-gradient(135deg, rgba(13, 94, 175, 0.06), rgba(216, 178, 90, 0.12)),
    var(--surface);
}

.section--video-showcase {
  background:
    linear-gradient(135deg, rgba(13, 94, 175, 0.08), rgba(200, 67, 51, 0.08)),
    var(--surface);
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
}

.section-heading,
.event-detail__head,
.meta-row,
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 22px;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.3rem);
}

.section-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.text-link {
  color: var(--blue);
}

.text-link:hover {
  color: var(--red);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--news,
.grid--features,
.grid--videos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--events {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card,
.feature-card,
.event-card,
.video-card,
.gallery-card,
.event-detail,
.place-card,
.player-card,
.countdown-card,
.contact-card,
.contact-form {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(24, 32, 40, 0.05);
}

.news-card,
.feature-card,
.event-card {
  padding: 22px;
}

.news-card h3,
.feature-card h3,
.event-card h3,
.gallery-card h3,
.place-card h3,
.video-card h3,
.event-detail h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
}

.card-meta,
.meta-row,
.event-card__date,
.event-detail__type {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-meta span,
.meta-row span + span {
  margin-left: 10px;
}

.feature-card {
  min-height: 220px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.toolbar--stacked {
  grid-template-columns: 1fr;
}

.toolbar label,
.contact-form label {
  display: grid;
  gap: 8px;
}

.toolbar span,
.contact-form span {
  font-size: 0.9rem;
  color: var(--muted);
}

.toolbar input,
.toolbar select,
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.player-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  overflow: hidden;
}

.player-card__frame {
  background: #0c1320;
}

.player-card__frame iframe {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.player-card__content {
  padding: 28px;
}

.player-card--home {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.player-card__content--home {
  display: grid;
  align-content: center;
  gap: 14px;
}

.player-card__content--home h3,
.player-card__content--home p,
.player-card__actions {
  margin: 0;
}

.player-card__lead {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.player-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.player-card__actions .button {
  width: auto;
  min-width: 220px;
}

.video-card {
  overflow: hidden;
}

.video-card__preview,
.gallery-card__button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-card__preview iframe,
.gallery-card img,
.place-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.gallery-card img,
.place-card img {
  object-fit: cover;
}

.video-card__preview iframe {
  border: 0;
  pointer-events: none;
  background: #0c1320;
}

.video-card__play {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.78);
  color: #fff;
}

.video-card__body,
.gallery-card__body,
.place-card__body {
  padding: 18px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-public-form {
  margin-bottom: 24px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(8, 12, 18, 0.86);
}

.lightbox img {
  max-width: min(1080px, 92vw);
  max-height: 76vh;
  border-radius: 20px;
}

.lightbox__caption {
  color: #fff;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
}

.countdown-card {
  padding: 28px;
}

.countdown-card__number {
  margin: 14px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--red);
}

.month-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.month-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.month-chip:hover {
  color: var(--text);
  border-color: rgba(13, 94, 175, 0.3);
}

.events-list,
.places-list {
  display: grid;
  gap: 16px;
}

.event-detail {
  padding: 22px;
}

.event-detail__grid {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}

.event-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(216, 178, 90, 0.18);
}

.status-badge--подтверждено {
  background: rgba(79, 122, 84, 0.16);
  color: #2f5b35;
}

.status-badge--запланировано {
  background: rgba(13, 94, 175, 0.14);
  color: #0d5eaf;
}

.status-badge--отменено {
  background: rgba(200, 67, 51, 0.16);
  color: #a13a2e;
}

.contact-card,
.contact-form {
  padding: 28px;
}

.admin-form-actions,
.admin-item__actions,
.admin-quick-actions,
.admin-panel__actions,
.admin-panel__auth {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-fields,
.admin-list {
  display: grid;
  gap: 14px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-item h3 {
  margin: 0 0 6px;
}

.admin-item p {
  margin: 0;
  color: var(--muted);
}

.admin-workspace,
.admin-form {
  position: relative;
}

.admin-form.is-locked,
.admin-workspace.is-locked {
  pointer-events: none;
  opacity: 0.58;
}

.admin-access-gate {
  position: absolute;
  inset: 24px;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.admin-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 18, 0.72);
}

.admin-auth-modal__card {
  position: relative;
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-auth-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 32, 40, 0.08);
  cursor: pointer;
}

.admin-auth-form {
  display: grid;
  gap: 14px;
}

.admin-auth-form label {
  display: grid;
  gap: 8px;
}

.admin-auth-form__error {
  margin: 0;
  color: var(--red);
}

.technical-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.technical-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.max-badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--red));
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.contact-list p {
  margin: 0 0 12px;
}

.contact-list p:last-child {
  margin-bottom: 0;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 20px;
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.footer-brand p,
.footer-copy,
.footer-contacts p {
  margin: 0;
}

.footer-brand span,
.footer-contacts,
.footer-socials {
  color: var(--muted);
}

.footer-contacts,
.footer-socials {
  display: grid;
  gap: 8px;
}

.footer-socials--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero,
  .section--split,
  .site-footer,
  .player-card,
  .grid--news,
  .grid--features,
  .grid--videos,
  .grid--events {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero--inner {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__content--featured {
    padding-right: 280px;
  }

  .hero__content--banner {
    min-height: 320px;
    padding-right: 34px;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100vw - 20px, 100%);
    padding-bottom: 28px;
  }

  .site-header {
    top: 10px;
    gap: 14px;
    margin: 12px 0 20px;
    padding: 14px 16px;
    border-radius: 24px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
  }

  .site-nav a {
    width: 100%;
    padding: 12px 14px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .section--split,
  .site-footer,
  .player-card,
  .grid--news,
  .grid--features,
  .grid--videos,
  .grid--events,
  .gallery-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero__content,
  .hero__aside,
  .section,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero__content {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .hero__content--home {
    padding-right: 20px;
    padding-bottom: 28px;
  }

  .hero__content--featured {
    min-height: auto;
    padding-right: 20px;
    padding-bottom: 28px;
  }

  .hero__content--banner {
    min-height: 280px;
    padding: 26px 20px;
    padding-bottom: 34px;
    background-position: center 42%;
  }

  .hero__accent-image {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 16 / 10;
    margin: 18px auto 0;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2rem, 9vw, 3.1rem);
    line-height: 1.02;
  }

  .hero__lead {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .hero__accent-image img {
    object-position: center;
  }

  .section {
    margin-bottom: 18px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .section-heading,
  .event-detail__head,
  .meta-row,
  .site-footer,
  .admin-item {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    gap: 12px;
  }

  .month-strip {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .month-chip {
    flex: 0 0 auto;
  }

  .contact-card,
  .contact-form,
  .event-detail,
  .player-card__content,
  .gallery-card__body,
  .place-card__body,
  .video-card__body {
    padding: 20px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox img {
    max-width: 100%;
    max-height: 70vh;
  }

  .footer-socials--inline,
  .technical-card__actions,
  .admin-form-actions,
  .admin-item__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .button--ghost:hover {
    width: 100%;
  }

  .player-card__actions .button {
    min-width: 0;
  }

  .footer-brand {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand__emblem {
    width: 46px;
    height: 46px;
  }

  .brand__title {
    font-size: 1.02rem;
  }

  .brand__subtitle {
    font-size: 0.82rem;
  }

  .hero__content--home {
    padding-bottom: 24px;
  }

  .hero__content--featured {
    padding-bottom: 24px;
  }

  .hero__content--banner {
    min-height: 240px;
    background-position: center 40%;
  }

  .hero__accent-image {
    width: min(220px, 100%);
    height: auto;
    margin-top: 16px;
    padding: 8px;
  }

  .hero__accent-image--eysk {
    object-position: center 30%;
  }

  .gallery-card img,
  .place-card img,
  .video-card__preview iframe {
    aspect-ratio: 4 / 3;
  }

  .contact-form textarea {
    min-height: 130px;
  }
}
