/* ===== МСОО «Лыжные гонки города Волжска» ===== */

:root {
  --navy: #0e2a47;
  --navy-dark: #091d33;
  --ice: #eef4f9;
  --ice-2: #dce9f4;
  --accent: #f28c28;
  --accent-dark: #d97516;
  --text: #22303e;
  --text-muted: #5b6b7a;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(14, 42, 71, 0.10);
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(242, 140, 40, 0.35);
}
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.22); }
.btn--vk {
  background: #0077ff;
  color: var(--white);
  box-shadow: 0 6px 18px rgba(0, 119, 255, 0.3);
}
.btn--vk:hover { background: #0066dd; }
.btn--small { padding: 9px 18px; font-size: 14px; }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(14, 42, 71, 0.08);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}
.logo__img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text strong { font-size: 16px; }
.logo__text small { font-size: 12px; color: var(--text-muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav > a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.2s ease;
}
.nav > a:not(.btn):hover::after,
.nav > a:not(.btn).is-active::after { right: 0; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background-image: url("../images/hero.jpg");
  background-size: cover;
  background-position: center 30%;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(9, 29, 51, 0.88) 0%,
    rgba(9, 29, 51, 0.72) 45%,
    rgba(9, 29, 51, 0.45) 100%);
}
.hero__content {
  position: relative;
  padding-top: 72px;
  padding-bottom: 72px;
  color: var(--white);
}
.hero__kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(242, 140, 40, 0.9);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.12;
  font-weight: 800;
  max-width: 780px;
  margin-bottom: 18px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero__subtitle {
  font-size: clamp(16px, 2vw, 19px);
  max-width: 620px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.92);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.hero__badges li {
  font-size: 13.5px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}

/* ===== Секции ===== */
.section { padding: 84px 0; }
.section--tinted { background: var(--ice); }
.section--dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}
.section__title {
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 10px;
}
.section--dark .section__title { color: var(--white); }
.section__lead {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 42px;
  max-width: 640px;
}
.section--dark .section__lead { color: rgba(255, 255, 255, 0.75); }

/* ===== Об организации ===== */
.about {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text p { margin-bottom: 16px; }
.about__text p:last-child { margin-bottom: 0; }

.about__facts {
  display: grid;
  gap: 18px;
}
.fact {
  background: var(--white);
  border: 1px solid var(--ice-2);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.fact__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ice);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fact__icon svg { width: 26px; height: 26px; }
.fact h3 { font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.fact p { font-size: 14.5px; color: var(--text-muted); }

/* ===== Деятельность ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(14, 42, 71, 0.16);
}
.card__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--ice);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-muted); }

/* ===== Проект ===== */
.project {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.project__kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.project__text p { margin-bottom: 14px; color: rgba(255, 255, 255, 0.88); }
.project__partners {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 28px 30px;
  backdrop-filter: blur(4px);
}
.project__partners h3 {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}
.project__partners ul { list-style: none; display: grid; gap: 10px; }
.project__partners li {
  padding-left: 26px;
  position: relative;
  font-size: 15px;
}
.project__partners li::before {
  content: "❄";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

/* ===== Новости ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--ice-2);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(14, 42, 71, 0.16);
}
.news-card__imgwrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.news-card__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.news-card:hover .news-card__imgwrap img { transform: scale(1.04); }
.news-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.news-card__body time {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.news-card__body h3 { font-size: 19px; color: var(--navy); line-height: 1.35; }
.news-card__body p { font-size: 14.5px; color: var(--text-muted); flex: 1; }
.news-card__link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.news-card__link:hover { color: var(--accent-dark); }

/* ===== Галерея ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery__item {
  border: none;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__more { margin-top: 24px; color: var(--text-muted); font-size: 15px; }
.gallery__more a { color: #0077ff; font-weight: 600; text-decoration: none; }
.gallery__more a:hover { text-decoration: underline; }

/* ===== Контакты ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 44px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--ice-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: center;
}
.contact-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #1c4a7c);
  color: var(--white);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  letter-spacing: 0.03em;
}
.contact-card h3 { font-size: 17px; color: var(--navy); }
.contact-card__role {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 2px 0 14px;
}
.contact-card__phone,
.contact-card__mail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 4px 0;
}
.contact-card__phone:hover,
.contact-card__mail:hover { color: var(--accent-dark); }

.contacts-vk {
  text-align: center;
  background: var(--ice);
  border-radius: var(--radius);
  padding: 30px;
}
.contacts-vk p { margin-bottom: 16px; color: var(--text); }

/* ===== Подвал ===== */
.footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 44px 0 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 32px;
}
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.footer__name { font-weight: 700; color: var(--white); font-size: 16px; }
.footer__addr { font-size: 14px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14.5px;
}
.footer__nav a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  padding-bottom: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 29, 51, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--white);
  font-size: 52px;
  line-height: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox__arrow:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox__arrow--prev { left: 20px; }
.lightbox__arrow--next { right: 20px; }
body.lightbox-open { overflow: hidden; }

/* ===== Анимация появления ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Адаптив ===== */
@media (max-width: 1020px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .project { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 1100px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 22px;
    box-shadow: 0 16px 30px rgba(14, 42, 71, 0.14);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
    z-index: 99;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav > a:not(.btn) { padding: 13px 4px; font-size: 16px; border-bottom: 1px solid var(--ice); }
  .nav > a:last-child { border-bottom: none; margin-top: 10px; justify-content: center; }
}

@media (max-width: 760px) {
  .section { padding: 60px 0; }

  .news-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 500px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .lightbox__arrow { width: 46px; height: 46px; font-size: 38px; }
  .lightbox__arrow--prev { left: 8px; }
  .lightbox__arrow--next { right: 8px; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .logo__text strong { font-size: 14px; }
}
