/*
  Onepage Template
  Структура:
  - Header: логотип + подпись + десктопное меню / мобильный бургер
  - Main: адаптивное видео 16:9 во всю ширину + mute-кнопка
  - Cards: сетка карточек 4 в ряд на десктопе, адаптивная перестройка на мобильных
  - Footer: ссылки, предупреждения, копирайт с автогодом
*/

:root {
  --color-bg: #ffffff;
  --color-text: #1f2526;
  --color-muted: #5f6b6d;

  --color-header-footer: #283d3e;
  --color-header-footer-text: #ffffff;

  --color-card-overlay: rgba(40, 61, 62, 0.72);
  --color-border: rgba(40, 61, 62, 0.14);
  --color-accent: #2f8f5b;
  --color-page: #0f1115;
  --color-surface: #171a21;
  --color-surface-strong: #20242d;
  /*--color-text: #f4f4f5;*/
  /*--color-muted: #a9adb8;*/
  /*--color-border: rgba(255, 255, 255, 0.12);*/
  --color-overlay: rgba(0, 0, 0, 0.58);
  --color-overlay-soft: rgba(0, 0, 0, 0.38);
  --color-active: #1f9d55;
  --color-active-hover: #28b866;
  --color-inactive: rgba(255, 255, 255, 0.24);
  --header-height: 76px;
  --container-width: 1440px;
  --gap: 18px;
  --radius-card: 0;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  /*background: var(--color-page);*/
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* =========================
   Header
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  /* background: rgba(15, 17, 21, 0.92); */
  background: var(--color-header-footer);
  color: var(--color-header-footer-text);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(100%, var(--container-width));
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--color-surface-strong);
  background-image: url(../img/logo.jpg);
  background-position: center;
  background-size: contain;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /*color: var(--color-muted);*/
  color: var(--color-header-footer-text);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 13px;
  /*color: var(--color-muted);*/
  color: var(--color-header-footer-text);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.5);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface-strong);
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  /*background: var(--color-text);*/
  background: var(--color-header-footer-text);
  transition: transform var(--transition), opacity var(--transition);
}

/* =========================
   Main / Video
   ========================= */

.site-main {
  /*background: var(--color-page);*/
  background: var(--color-bg);
}

.hero-video-section {
  width: 100%;
  background: #000;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000 url('../img/video-poster.png') center / cover no-repeat;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.mute-button {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(0, 0, 0, 0.54);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.mute-button:hover,
.mute-button:focus-visible {
  background: rgba(0, 0, 0, 0.74);
  border-color: rgba(255, 255, 255, 0.62);
  transform: translateX(-50%) translateY(-1px);
  outline: none;
}

/* =========================
   Cards section
   ========================= */

.cards-section {
  padding: 34px 0 54px;
  /*background: var(--color-page);*/
  background: var(--color-bg);
}

.section-inner {
  width: min(100%, var(--container-width));
  margin: 0 auto;
  padding: 0 28px;
}

.section-title {
  margin: 0 0 20px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

.article-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22)),
    var(--card-image);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  isolation: isolate;
  color: var(--color-header-footer-text);
}

.article-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-overlay-soft);
  opacity: 0;
  transition: opacity var(--transition);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card-2 {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22)),
    var(--card-image);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  isolation: isolate;
  color: var(--color-header-footer-text);
}

.article-card-2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-overlay-soft);
  opacity: 0;
  transition: opacity var(--transition);
}

.article-card-2:hover::before {
  opacity: 1;
}


.card-lang-links {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.lang-link {
  min-width: 38px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.lang-link.is-active {
  background: var(--color-active);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.lang-link.is-active:hover,
.lang-link.is-active:focus-visible {
  background: var(--color-active-hover);
  transform: translateY(-1px);
  outline: none;
}

.lang-link.is-inactive {
  background: var(--color-inactive);
  color: rgba(255, 255, 255, 0.62);
  cursor: default;
  pointer-events: none;
}

.card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: block;
  padding: 18px;
  background: var(--color-overlay);
  transition: background var(--transition), padding-bottom var(--transition);
}

.card-content:hover,
.card-content:focus-visible {
  background: rgba(0, 0, 0, 0.72);
  padding-bottom: 22px;
  outline: none;
}

.card-content h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.22;
  font-weight: 800;
  text-wrap: balance;
}

.wrapp {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.article {
  padding: 30px;
}

.article a {
  text-decoration: underline;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  /*background: #0a0c10;*/
  background: var(--color-header-footer);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  width: min(100%, var(--container-width));
  margin: 0 auto;
  padding: 24px 28px;
  display: grid;
  gap: 16px;
}

.footer-nav {
  display: flex;
  justify-items: center;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.footer-nav a {
  /*color: var(--color-text);*/
  color: var(--color-header-footer-text);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  /*color: var(--color-muted); */
  color: var(--color-accent);
  outline: none;
}

.footer-warnings {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.footer-warnings p,
.copyright {
  margin: 0;
}

.copyright {
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

/* =========================
   Partner / Sponsoren
   ========================= */

.sponsortab {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 25px;
  margin: auto;
  width: 90%;
  justify-items: center;
  justify-content: center;
  align-items: center;
}
.sponsortab a {
  display: block;
  width: 200px;
  height: 200px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
/* =========================
   Tablet
   ========================= */

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-title,
  .brand-subtitle {
    max-width: 320px;
  }
}

/* =========================
   PDF
   ========================= */

.pdf-section {
  padding: 16px 16px;
  background: #ffffff;
  color: #1f2526;
}

.pdf-container {
  max-width: 1180px;
  margin: 0 auto;
}

.pdf-title {
  margin: 0 0 24px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  color: #1f2526;
}

.pdf-viewer {
  width: 100%;
  height: min(80vh, 900px);
  min-height: 520px;

  border: 1px solid rgba(40, 61, 62, 0.18);
  border-radius: 16px;
  overflow: hidden;

  background: #f5f7f7;
}

.pdf-object {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-fallback {
  min-height: 520px;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 32px;
  box-sizing: border-box;
  text-align: center;
  color: #1f2526;
}

.pdf-fallback p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 20px;
  box-sizing: border-box;

  border: 1px solid #283d3e;
  border-radius: 999px;

  background: #283d3e;
  color: #ffffff;

  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;

  cursor: pointer;
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.pdf-button:hover {
  opacity: 0.86;
}

.pdf-button-secondary {
  background: #ffffff;
  color: #283d3e;
}

.pdf-button-secondary:hover {
  background: #283d3e;
  color: #ffffff;
  opacity: 1;
}

/* =========================
   Form
   ========================= */

.contact-section {
  padding: 64px 16px;
  background: #ffffff;
  color: #1f2526;
}

.contact-container {
  max-width: 720px;
  margin: 0 auto;
}

.contact-title {
  margin: 0 0 28px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  color: #1f2526;
}

.contact-form {
  display: grid;
  gap: 18px;

  padding: 28px;
  border: 1px solid rgba(40, 61, 62, 0.14);
  border-radius: 18px;

  background: #f7f9f9;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #283d3e;
}

.form-field input,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid rgba(40, 61, 62, 0.22);
  border-radius: 10px;

  background: #ffffff;
  color: #1f2526;

  font: inherit;
  font-size: 16px;
  line-height: 1.4;

  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-field input {
  min-height: 46px;
  padding: 10px 14px;
}

.form-field textarea {
  min-height: 160px;
  padding: 12px 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #283d3e;
  box-shadow: 0 0 0 3px rgba(40, 61, 62, 0.12);
}

.form-button {
  justify-self: start;

  min-height: 46px;
  padding: 12px 26px;

  border: 1px solid #283d3e;
  border-radius: 999px;

  background: #283d3e;
  color: #ffffff;

  font: inherit;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;

  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.form-button:hover {
  opacity: 0.88;
}

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

/* =========================
   Mobile header + cards
   ========================= */

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
    --gap: 14px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }

  .brand-title {
    max-width: 210px;
    font-size: 15px;
  }

  .brand-subtitle {
    max-width: 210px;
    font-size: 10px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    /*background: rgba(15, 17, 21, 0.98);*/
    background: var(--color-header-footer);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
  }

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

  .main-nav a {
    padding: 15px 18px;
    border-top: 1px solid var(--color-border);
  }

  .site-header.is-menu-open .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-menu-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .video-shell {
    aspect-ratio: 16 / 9;
  }

  .mute-button {
    bottom: 14px;
    min-width: 98px;
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
  }

  .cards-section {
    padding: 24px 0 38px;
  }

  .section-inner {
    padding: 0 14px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .card-content {
    padding: 14px;
  }

  .card-content h2 {
    font-size: 18px;
  }

  .footer-inner {
    padding: 22px 16px;
  }

/* =========================
   PDF
   ========================= */
   .pdf-section {
    padding: 40px 12px;
  }

  .pdf-title {
    font-size: 26px;
  }

  .pdf-viewer {
    height: 72vh;
    min-height: 420px;
    border-radius: 12px;
  }

  .pdf-fallback {
    min-height: 420px;
    padding: 24px;
  }

  .pdf-actions {
    flex-direction: column;
  }

  .pdf-button {
    width: 100%;
  }

/* ========================
   Form
   ======================== */

     .contact-section {
    padding: 40px 12px;
  }

  .contact-title {
    font-size: 26px;
  }

  .contact-form {
    padding: 18px;
    border-radius: 14px;
  }

  .form-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand-title,
  .brand-subtitle {
    max-width: 168px;
  }

  .article-card {
    aspect-ratio: 4 / 3;
  }

  .lang-link {
    min-width: 34px;
    height: 30px;
    font-size: 11px;
  }
}
