/*
  CTRL+EVENT — статична верстка
  Власний CSS, написаний з нуля за мотивами оригінального дизайну (кольори, шрифти,
  відступи, порядок блоків). Жодного коду чи класів Weblium не використано.
  Структура: 1) reset/base  2) design tokens  3) typography  4) layout utils
             5) header  6) footer  7) buttons  8) sections/blocks  9) components
             10) popups/modal  11) lightbox  12) responsive
*/

/* ===================== 1. Reset / base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
input, textarea { font-family: inherit; font-size: 16px; }

/* ===================== 2. Design tokens ===================== */
:root {
  /* Colors — взято з CSS-змінних оригінальної теми Weblium (--ui-*) */
  --color-brand: #c1ff72;       /* акцентний зелений — кнопки, theme-color */
  --color-dark: #000000;        /* заголовки */
  --color-text: #44413e;        /* основний текст / посилання */
  --color-text-muted: #535353;  /* підзаголовки, цитати, підписи */
  --color-text-soft: #757575;
  --color-hover: #f56a06;       /* оранжевий hover для посилань */
  --color-bg: #ffffff;
  --color-bg-light: #f5f4f3;
  --color-bg-soft: #f7f8fa;
  --color-border: #dfe2e8;
  --color-border-soft: #c5cbd6;
  --color-overlay: rgba(0, 0, 0, 0.55);

  /* Typography */
  --font-heading: 'Rubik', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --font-button: 'Lato', sans-serif;

  --fs-hero: 68px;
  --fs-h2: 50px;
  --fs-h3: 28px;
  --fs-body: 16px;
  --fs-small: 14px;
  --lh-heading: 1.1;
  --lh-body: 1.5;

  /* Layout */
  --container: 1200px;
  --gutter: 20px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --header-height: 88px;
}

@media (max-width: 991px) {
  :root {
    --fs-hero: 54px;
    --fs-h2: 38px;
    --fs-h3: 24px;
  }
}

/* ===================== 3. Typography ===================== */
h1, h2, .h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-dark);
  line-height: var(--lh-heading);
}
h2, .h2 { font-size: var(--fs-h2); font-weight: 700; }
h3, .h3 { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 700; color: var(--color-dark); line-height: 1.3; }
.hero-title { font-size: var(--fs-hero); font-weight: 800; }
p { font-size: var(--fs-body); line-height: var(--lh-body); }
.lede { font-size: 18px; color: var(--color-text-muted); }
.eyebrow { font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-soft); }

/* ===================== 4. Layout utilities ===================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
@media (max-width: 767px) {
  section { padding: 48px 0; }
  h2, .h2 { text-align: left; }
}
.text-center { text-align: center; }
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===================== 5. Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}
.logo img { height: 32px; width: auto; }
.main-nav { flex: 1; }
.main-nav__list {
  display: flex;
  gap: 32px;
  justify-content: center;
}
.main-nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: color .2s ease;
}
.main-nav__link:hover, .main-nav__link.is-active { color: var(--color-hover); }
.site-header__phone {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-dark);
  white-space: nowrap;
}
.burger {
  display: none;
  width: 32px; height: 32px;
  position: relative;
}
.burger span, .burger::before, .burger::after {
  content: '';
  position: absolute; left: 4px; right: 4px;
  height: 2px; background: var(--color-dark);
  transition: transform .2s ease, opacity .2s ease;
}
.burger::before { top: 9px; }
.burger span { top: 15px; }
.burger::after { top: 21px; }
.burger.is-open::before { transform: translateY(6px) rotate(45deg); }
.burger.is-open::after { transform: translateY(-6px) rotate(-45deg); }
.burger.is-open span { opacity: 0; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: #fff;
  z-index: 99;
  padding: 32px var(--gutter);
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.mobile-nav__link { font-size: 22px; font-weight: 600; color: var(--color-dark); }
.mobile-nav__phone { font-size: 18px; font-weight: 700; }

@media (max-width: 991px) {
  .main-nav, .site-header__phone { display: none; }
  .burger { display: block; }
}

/* ===================== 6. Footer ===================== */
.site-footer {
  background: var(--color-dark);
  color: #fff;
  padding: 64px 0 32px;
}
.site-footer a { color: #fff; }
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.site-footer__brand .logo img { height: 32px; margin-bottom: 16px; }
.site-footer__tagline { color: rgba(255,255,255,0.7); max-width: 320px; }
.site-footer__contacts { display: flex; gap: 48px; flex-wrap: wrap; }
.site-footer__col-title { font-size: var(--fs-small); color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.site-footer__col-value { font-size: 17px; font-weight: 600; }
.site-footer__col-value:hover { color: var(--color-brand); }
.site-footer__bottom {
  padding-top: 24px;
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.5);
}
@media (max-width: 767px) {
  .site-footer__top { flex-direction: column; gap: 24px; }
  .site-footer__contacts { gap: 24px; }
}

/* ===================== 7. Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-button);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  padding: 17px 40px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-brand); color: #000; }
.btn-primary:hover { background: #aeeb5f; }
.btn-dark { background: var(--color-dark); color: #fff; }
.btn-dark:hover { background: #2b2b2b; }
.btn-outline { background: transparent; color: var(--color-dark); border-color: var(--color-dark); }
.btn-outline:hover { background: var(--color-dark); color: #fff; }
.btn-sm { padding: 12px 21px; font-size: 14px; }

/* ===================== 8. Hero ===================== */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.15) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.hero__inner .hero-title, .hero__inner h1 { color: #fff; }
.hero__lede { color: rgba(255,255,255,0.9); margin: 20px 0 32px; font-size: 18px; }
.hero--compact { min-height: 420px; }

/* ===================== 9. Cards / grids ===================== */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 991px) { .formats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 340px) { .formats-grid { grid-template-columns: 1fr; } }

.format-card {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 767px) { .format-card { padding: 20px; } }
.format-card__icon { display: inline-block; width: 48px; height: 48px; color: var(--color-dark); }
@media (max-width: 767px) { .format-card__icon { width: 36px; height: 36px; } }
.format-card__icon svg { width: 100%; height: 100%; }
.format-card h3 { font-size: 20px; }
.format-card p { color: var(--color-text-muted); flex: 1; }

.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
@media (max-width: 600px) { .carousel__track { gap: 12px; } }
.carousel__item {
  scroll-snap-align: start;
  flex: 0 0 320px;
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (max-width: 600px) { .carousel__item { flex-basis: 58vw; } }
.carousel__item img { width: 100%; height: 220px; object-fit: cover; }
@media (max-width: 600px) { .carousel__item img { height: 140px; } }
.carousel__item-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.carousel__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.carousel__tag {
  font-size: 12px;
  padding: 4px 10px;
  background: #fff;
  border-radius: 999px;
  color: var(--color-text-soft);
}
.carousel__item h3 { font-size: 18px; }
.carousel__item p { color: var(--color-text-muted); font-size: 15px; flex: 1; }
.carousel__actions { display: flex; gap: 12px; margin-top: 8px; }
.carousel__nav {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}
.carousel__nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-soft);
  display: flex; align-items: center; justify-content: center;
}
.carousel__nav button:hover { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }
.carousel__nav svg { width: 18px; height: 18px; }

/* Photo gallery + lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 991px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-grid__item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 0;
  position: relative;
}
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid__item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px; color: #fff;
}
.lightbox__close svg { width: 100%; height: 100%; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; color: #fff;
}
.lightbox__nav svg { width: 100%; height: 100%; }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }

/* CTA block */
.cta-block {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  padding: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: space-between;
}
.cta-block img { width: 320px; height: 240px; object-fit: cover; border-radius: var(--radius-lg); }
.cta-block__text { flex: 1; max-width: 520px; }
.cta-block__text p { color: var(--color-text-muted); margin: 16px 0 24px; }
@media (max-width: 767px) {
  .cta-block { flex-direction: column-reverse; padding: 32px; text-align: left; }
  .cta-block img { width: 100%; height: 200px; }
}

/* Feature list (quiz page params) */
.feature-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 991px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list__item { padding: 24px 0; border-top: 1px solid var(--color-border); }
.feature-list__icon { display: inline-block; width: 40px; height: 40px; margin-bottom: 16px; color: var(--color-dark); }
.feature-list__icon svg { width: 100%; height: 100%; }
.feature-list__item h3 { font-size: 17px; margin-bottom: 8px; }
.feature-list__item p { color: var(--color-text-muted); font-size: 15px; }

/* Accordion (online page) */
.accordion__item { border-top: 1px solid var(--color-border); }
.accordion__item:last-child { border-bottom: 1px solid var(--color-border); }
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  cursor: pointer;
}
.accordion__header h3 { font-size: 19px; }
.accordion__arrow { width: 20px; height: 20px; flex-shrink: 0; transition: transform .2s ease; }
.accordion__item.is-open .accordion__arrow { transform: rotate(180deg); }
.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.accordion__content p { padding-bottom: 24px; color: var(--color-text-muted); }

/* Numbered steps (offline "under key" process) */
.steps-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 40px;
}
@media (max-width: 767px) { .steps-list { grid-template-columns: 1fr; } }
.steps-list__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--color-bg-light);
  border-radius: var(--radius-md);
}
.steps-list__num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-soft);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.steps-list__item h3 { font-size: 17px; margin-bottom: 4px; }
.steps-list__item p { color: var(--color-text-muted); font-size: 14.5px; }

/* Special-formats cards (quiz page bottom) */
.special-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 991px) { .special-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .special-grid { grid-template-columns: 1fr; } }
.special-card {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.special-card__icon { display: inline-block; width: 40px; height: 40px; margin-bottom: 20px; color: var(--color-dark); }
.special-card__icon svg { width: 100%; height: 100%; }
.special-card h3 { font-size: 18px; margin-bottom: 10px; }
.special-card p { font-size: 14.5px; color: var(--color-text-muted); }

/* ===================== 10. Popups / modal ===================== */
.popup-overlay {
  position: fixed; inset: 0;
  background: var(--color-overlay);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 48px var(--gutter);
}
.popup-overlay.is-open { display: flex; }
.popup {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  position: relative;
  padding: 40px;
  margin: auto;
}
.popup__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  color: var(--color-dark);
}
.popup__close svg { width: 100%; height: 100%; }
.popup__image { width: 100%; height: 260px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 24px; }
.popup h2 { font-size: 26px; margin-bottom: 16px; }
.popup__meta { list-style: none; margin: 20px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.popup__meta li { font-size: 15px; color: var(--color-text-muted); }
.popup__meta li strong { color: var(--color-dark); }
.popup p { color: var(--color-text-muted); margin-bottom: 12px; }
.popup h4 { font-family: var(--font-heading); font-size: 16px; color: var(--color-dark); margin: 20px 0 8px; }
.popup .btn { margin-top: 16px; }

/* Contact popup (form) */
.contact-popup__social { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.contact-popup__social .btn svg { width: 20px; height: 20px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.contact-form input {
  padding: 14px 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
}
.contact-form input:focus { outline: 2px solid var(--color-brand); border-color: transparent; }
.contact-form__note { font-size: 13px; color: var(--color-text-soft); }

@media (max-width: 600px) {
  .popup { padding: 24px; }
  .popup-overlay { padding: 24px 16px; }
}

/* ===================== 11. Misc ===================== */
.divider-dot { width: 8px; height: 8px; margin: 0 auto 24px; color: var(--color-brand); }
.divider-dot svg { width: 100%; height: 100%; }
.section-heading { margin-bottom: 48px; }
.section-heading p { margin-top: 16px; color: var(--color-text-muted); max-width: 640px; }
.anchor-offset { scroll-margin-top: calc(var(--header-height) + 16px); }
