/* =========================================================
   biglesa.com.ua — design system
   ========================================================= */

:root {
  /* Цветовая палитра — индустриальная (сталь + hi-vis жёлтый) */
  --c-bg: #FAFAF9;
  --c-surface: #FFFFFF;
  --c-surface-2: #F4F4F2;
  --c-ink: #0F172A;
  --c-ink-2: #334155;
  --c-ink-3: #64748B;
  --c-border: #E2E8F0;
  --c-border-2: #CBD5E1;

  --c-brand: #0F172A;          /* slate-900 */
  --c-accent: #F59E0B;         /* amber-500 — hi-vis */
  --c-accent-dark: #B45309;
  --c-success: #16A34A;
  --c-danger: #DC2626;

  --c-dark-bg: #0B1220;
  --c-dark-surface: #111A2E;
  --c-dark-ink: #F8FAFC;

  /* Радиусы и тени */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);

  /* Размеры */
  --header-h: 76px;
  --container: 1280px;

  /* Типографика */
  --ff-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Тайминги */
  --t-fast: 150ms cubic-bezier(.4, 0, .2, 1);
  --t-med: 250ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--c-ink);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 1.5vw, 1.375rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Контейнер */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform var(--t-fast), background var(--t-fast), border var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--c-accent);
  color: var(--c-brand);
  border-color: var(--c-accent);
}
.btn--primary:hover { background: var(--c-accent-dark); color: #fff; border-color: var(--c-accent-dark); }

.btn--secondary {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
}
.btn--secondary:hover { background: #1E293B; }

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-border-2);
}
.btn--ghost:hover { background: var(--c-surface-2); border-color: var(--c-ink-3); }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }

/* =========================================================
   Шапка
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.header__logo { display: flex; align-items: center; gap: 10px; }
.header__logo img { height: 40px; width: auto; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin-left: 24px;
  min-width: 0;
}
.nav__link {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--c-ink-2);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.nav__link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.nav__link.is-active { background: var(--c-brand); color: #fff; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phones {
  position: relative;
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}
.header__phone:hover { color: var(--c-accent-dark); background: var(--c-surface-2); }
.header__phones-caret {
  transition: transform var(--t-fast);
}
.header__phone[aria-expanded="true"] .header__phones-caret {
  transform: rotate(180deg);
}
.header__phones-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 230px;
  padding: 6px;
  display: none;
  z-index: 55;
}
.header__phones-dropdown.is-open { display: block; }
.header__phones-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--c-ink);
  font-weight: 600;
  white-space: nowrap;
}
.header__phones-item:hover { background: var(--c-surface-2); color: var(--c-accent-dark); }
.header__phones-item svg { color: var(--c-accent-dark); flex-shrink: 0; }

.lang-switcher {
  display: inline-flex;
  background: var(--c-surface-2);
  border-radius: 999px;
  padding: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.lang-switcher a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--c-ink-3);
}
.lang-switcher a.is-active {
  background: var(--c-brand);
  color: #fff;
}

.burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  border-radius: 10px;
  color: var(--c-ink);
  align-items: center;
  justify-content: center;
}
.burger:hover { background: var(--c-surface-2); }
.burger svg { width: 24px; height: 24px; display: block; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger__close { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block; }

@media (max-width: 1200px) {
  .nav { display: none; }
  .header__phone span { display: none; }
  .burger { display: inline-flex; }
}

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__link {
  padding: 18px 0;
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-ink);
  display: block;
}
.mobile-menu__link:active { color: var(--c-accent-dark); }
.mobile-menu__divider {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  margin: 24px 0 8px;
}

/* =========================================================
   BENTO — сетка
   ========================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.bento__cell {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.bento__cell:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-2); }

/* Размеры ячеек bento */
.bento__cell--hero { grid-column: span 8; grid-row: span 2; min-height: 480px; padding: 48px; background: var(--c-brand); color: #fff; }
.bento__cell--hero h1 { color: #fff; }
.bento__cell--stat { grid-column: span 4; min-height: 232px; }
.bento__cell--feature { grid-column: span 4; min-height: 232px; }
.bento__cell--wide { grid-column: span 8; }
.bento__cell--full { grid-column: span 12; }
.bento__cell--accent { background: var(--c-accent); color: var(--c-brand); border-color: var(--c-accent); }
.bento__cell--dark { background: var(--c-brand); color: #fff; }
.bento__cell--dark h2, .bento__cell--dark h3 { color: #fff; }

@media (max-width: 1024px) {
  .bento__cell--hero { grid-column: span 12; min-height: 360px; padding: 32px; }
  .bento__cell--stat { grid-column: span 6; min-height: 180px; }
  .bento__cell--feature { grid-column: span 6; }
  .bento__cell--wide { grid-column: span 12; }
}
@media (max-width: 640px) {
  .bento { gap: 12px; }
  .bento__cell { padding: 20px; border-radius: var(--r-md); }
  .bento__cell--hero { padding: 24px; min-height: 320px; }
  .bento__cell--stat,
  .bento__cell--feature { grid-column: span 12; min-height: 160px; }
}

/* Hero внутренности */
.hero__eyebrow {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-brand);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; max-width: 18ch; }
.hero__lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 50ch;
  margin-bottom: 32px;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stat-блок */
.stat__value {
  font-family: var(--ff-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 0.95rem;
  color: var(--c-ink-3);
  font-weight: 500;
}
.bento__cell--dark .stat__label { color: rgba(255,255,255,0.7); }
.bento__cell--accent .stat__label { color: rgba(15,23,42,0.7); }

/* Feature-блок */
.feature__icon {
  display: inline-flex;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--c-surface-2);
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature__icon svg { width: 26px; height: 26px; color: var(--c-brand); }
.bento__cell--dark .feature__icon { background: rgba(255,255,255,0.1); }
.bento__cell--dark .feature__icon svg { color: var(--c-accent); }
.bento__cell--accent .feature__icon { background: rgba(15,23,42,0.1); }
.feature__title { font-size: 1.125rem; margin-bottom: 8px; }
.feature__text { color: var(--c-ink-3); font-size: 0.95rem; line-height: 1.55; }
.bento__cell--dark .feature__text { color: rgba(255,255,255,0.7); }
.bento__cell--accent .feature__text { color: rgba(15,23,42,0.7); }

/* =========================================================
   Секции
   ========================================================= */
section { padding: 80px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section__title { max-width: 24ch; }
.section__lead { color: var(--c-ink-3); max-width: 50ch; font-size: 1.05rem; }
.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* =========================================================
   Категории — большие плитки
   ========================================================= */
.categories {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
  min-height: 280px;
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  cursor: pointer;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.cat-tile--big { grid-column: span 6; min-height: 360px; }
.cat-tile--reg { grid-column: span 6; }

@media (max-width: 768px) {
  .cat-tile--big, .cat-tile--reg { grid-column: span 12; min-height: 240px; }
}

.cat-tile__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.cat-tile__lead { color: var(--c-ink-3); font-size: 0.95rem; margin-bottom: 20px; }
.cat-tile__meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent-dark);
}
.cat-tile__arrow {
  position: absolute;
  top: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-surface-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.cat-tile:hover .cat-tile__arrow { background: var(--c-accent); transform: rotate(-45deg); }

/* =========================================================
   Продукты — карточки
   ========================================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.product-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--c-surface-2);
  overflow: hidden;
  position: relative;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 400ms cubic-bezier(.2,.6,.2,1);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-card__title { font-size: 1rem; flex: 1; line-height: 1.3; }
.product-card__title-link { color: inherit; }
.product-card__title-link:hover { color: var(--c-accent-dark); }
.product-card__stock {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-success);
  background: #DCFCE7;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.product-card__prices { display: flex; align-items: baseline; gap: 12px; margin-top: auto; }
.product-card__specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--c-ink-3);
}
.product-card__specs li { display: flex; justify-content: space-between; gap: 8px; }
.product-card__specs strong { color: var(--c-ink); font-weight: 600; }
.price-old {
  font-size: 0.85rem;
  color: var(--c-ink-3);
  text-decoration: line-through;
}
.price-new {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--ff-display);
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
.product-card__cta { width: 100%; }

/* =========================================================
   Город — спец-блоки
   ========================================================= */
.city-hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-border);
}
.city-hero h1 { margin-bottom: 16px; }
.city-hero__breadcrumbs {
  font-size: 0.875rem;
  color: var(--c-ink-3);
  margin-bottom: 16px;
}
.city-hero__breadcrumbs a { color: var(--c-ink-3); }
.city-hero__breadcrumbs a:hover { color: var(--c-ink); }
.city-hero__usp { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }

/* Якорная навигация по секциям внутри пиллара */
.jump-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}
.jump-nav__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-right: 4px;
}
.jump-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: #fff;
  border: 2px solid var(--c-brand);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-brand);
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.jump-nav__link::before {
  content: "↓";
  font-size: 1.05em;
  font-weight: 800;
  opacity: 0.65;
}
.jump-nav__link:hover {
  background: var(--c-brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}
.jump-nav__link:hover::before { opacity: 1; }

/* Учитываем sticky-хедер при якорном скролле */
[id^="seria-"] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.city-hero__usp-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.city-hero__usp-item svg { width: 16px; height: 16px; color: var(--c-success); }

.warehouse-card {
  background: var(--c-brand);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 32px;
}
.warehouse-card h3 { color: #fff; margin-bottom: 16px; }
.warehouse-card__address { font-size: 1.125rem; color: rgba(255,255,255,0.85); }

.np-offices { display: grid; gap: 12px; margin-top: 16px; }
.np-office {
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.np-office svg { color: #DC2626; width: 18px; height: 18px; flex-shrink: 0; }

.frontline-note {
  margin-top: 16px;
  padding: 16px;
  background: #FEF3C7;
  border-left: 4px solid var(--c-accent);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* =========================================================
   Кросс-линковка — блок похожих страниц
   ========================================================= */
.cross-links {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.cross-links h2 { font-size: 1.25rem; margin-bottom: 20px; }
.cross-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cross-links__list a {
  display: inline-flex;
  padding: 8px 14px;
  background: var(--c-surface-2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-ink-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.cross-links__list a:hover { background: var(--c-brand); color: #fff; }

/* =========================================================
   Футер
   ========================================================= */
.footer {
  background: var(--c-dark-bg);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer__about p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
/* =========================================================
   Контактная строка: телефон + кнопка мессенджера
   ========================================================= */
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact-row__phone {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--ff-display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.contact-row__phone:hover { color: var(--c-accent); }
.contact-row__msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  transition: transform var(--t-fast), filter var(--t-fast);
}
.contact-row__msg svg { flex-shrink: 0; }
.contact-row__msg:hover { transform: translateY(-1px); filter: brightness(1.1); }
.contact-row__msg--telegram { background: #0088cc; }
.contact-row__msg--viber { background: #7360f2; }

/* =========================================================
   Карточки месенджеров (страница контактов)
   ========================================================= */
.messenger-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  max-width: 700px;
}
.messenger-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--r-md);
  color: #fff;
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
  text-decoration: none;
}
.messenger-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); filter: brightness(1.05); color: #fff; }
.messenger-card svg { flex-shrink: 0; }
.messenger-card div { display: flex; flex-direction: column; line-height: 1.2; }
.messenger-card strong { font-size: 1.1rem; font-weight: 700; }
.messenger-card span { font-size: 0.95rem; opacity: 0.95; margin-top: 4px; }
.messenger-card--telegram { background: #0088cc; }
.messenger-card--viber { background: #7360f2; }

.footer__messengers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.footer__messenger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.footer__messenger:hover { background: rgba(255,255,255,0.1); border-color: var(--c-accent); color: #fff; }
.footer__messenger svg { color: var(--c-accent); flex-shrink: 0; }
.footer__messenger span { display: flex; flex-direction: column; line-height: 1.2; }
.footer__messenger strong { font-size: 0.95rem; font-weight: 700; }
.footer__messenger small { font-size: 0.7rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.footer__nav { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.footer__nav a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* =========================================================
   Sticky bottom CTA (mobile)
   ========================================================= */
.sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--c-accent);
  color: var(--c-brand);
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  display: none;
  z-index: 40;
  text-align: center;
}
@media (max-width: 768px) { .sticky-cta { display: block; } }

/* =========================================================
   Лид-форма (модал)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.is-open { display: flex; }
.modal__box {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--c-surface-2);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal h2 { margin-bottom: 8px; }
.modal__lead { color: var(--c-ink-3); margin-bottom: 24px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form__field {
  display: flex; flex-direction: column; gap: 6px;
}
.form__field label { font-size: 0.85rem; font-weight: 600; color: var(--c-ink-2); }
.form__field input,
.form__field textarea {
  padding: 12px 14px;
  border: 1px solid var(--c-border-2);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border-color var(--t-fast);
}
.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
}
.form__field textarea { min-height: 80px; resize: vertical; }
.form__honeypot { position: absolute; left: -9999px; opacity: 0; }
.form__consent { font-size: 0.75rem; color: var(--c-ink-3); }
.form__success {
  display: none;
  padding: 16px;
  background: #DCFCE7;
  border-radius: 10px;
  color: #166534;
  font-weight: 600;
}
.form.is-submitted .form__success { display: block; }
.form.is-submitted .form__field,
.form.is-submitted button { display: none; }

/* =========================================================
   Карточки документов (сертификаты / паспорта)
   ========================================================= */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.doc-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.doc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }

.doc-card--feature {
  grid-column: span 2;
  flex-direction: row;
}
@media (max-width: 768px) {
  .doc-card--feature { grid-column: span 1; flex-direction: column; }
}

.doc-card__media {
  position: relative;
  display: block;
  background: var(--c-surface-2);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
}
.doc-card--feature .doc-card__media {
  width: 280px;
  aspect-ratio: auto;
}
@media (max-width: 768px) {
  .doc-card--feature .doc-card__media { width: 100%; aspect-ratio: 3 / 4; }
}
.doc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(.2,.6,.2,1);
}
.doc-card:hover .doc-card__media img { transform: scale(1.04); }

.doc-card__media--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink-3);
  background: linear-gradient(135deg, var(--c-surface-2), #E5E7EB);
}
.doc-card__media--icon svg {
  width: 80px;
  height: 80px;
}

.doc-card__type {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--c-accent);
  color: var(--c-brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
}

.doc-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.doc-card__title {
  font-size: 1.05rem;
  line-height: 1.4;
}
.doc-card__lead {
  color: var(--c-ink-3);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}
.doc-card__meta {
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--c-ink-3);
  font-weight: 500;
}
.doc-card__actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* =========================================================
   SEO-текст (статичный блок описания)
   ========================================================= */
.seo-text {
  padding: 64px 0;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}
.seo-text__inner {
  max-width: 800px;
  margin: 0 auto;
  color: var(--c-ink-2);
  font-size: 1rem;
  line-height: 1.75;
}
.seo-text__inner h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 32px 0 12px;
  color: var(--c-ink);
}
.seo-text__inner h2:first-child { margin-top: 0; }
.seo-text__inner h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--c-ink);
}
.seo-text__inner p { margin: 0 0 14px; }
.seo-text__inner ul,
.seo-text__inner ol {
  padding-left: 24px;
  margin: 0 0 16px;
}
.seo-text__inner li { margin-bottom: 6px; }

/* =========================================================
   Утилиты
   ========================================================= */
.text-accent { color: var(--c-accent-dark); }
.text-muted { color: var(--c-ink-3); }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-32 { margin-top: 32px; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

/* =========================================================
   404 страница
   ========================================================= */
.page-404 { padding: 80px 0 100px; background: var(--c-surface-2); min-height: calc(100vh - 240px); display: flex; align-items: center; }
.page-404__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.page-404__code {
  font-family: var(--ff-display);
  font-size: clamp(120px, 18vw, 220px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}
.page-404__title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 16px; }
.page-404__lead { font-size: 1.1rem; color: var(--c-ink-2); max-width: 560px; margin: 0 auto 32px; line-height: 1.55; }
.page-404__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.page-404__suggest { text-align: left; max-width: 600px; margin: 0 auto 48px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 28px 32px; }
.page-404__suggest h2 { font-size: 1.2rem; margin-bottom: 16px; color: var(--c-ink); }
.page-404__suggest ul { list-style: none; padding: 0; margin: 0; }
.page-404__suggest li { padding: 10px 0; border-bottom: 1px solid var(--c-border); font-size: 0.95rem; color: var(--c-ink-2); }
.page-404__suggest li:last-child { border-bottom: 0; }
.page-404__suggest a { color: var(--c-accent-dark); font-weight: 600; }
.page-404__suggest a:hover { color: var(--c-brand); }
.page-404__contact { font-size: 0.95rem; color: var(--c-ink-2); }
.page-404__contact p { margin-bottom: 14px; }
.page-404__contact-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.page-404__contact-buttons a { display: inline-flex; align-items: center; padding: 10px 18px; background: #fff; border: 1px solid var(--c-border); border-radius: 999px; font-weight: 600; color: var(--c-ink); transition: border-color var(--t-fast), color var(--t-fast); }
.page-404__contact-buttons a:hover { border-color: var(--c-brand); color: var(--c-brand); }

/* =========================================================
   Блог-статья: типографика
   ========================================================= */
.article-page {
  padding: 56px 0 80px;
  background: #fff;
}
.article-page__inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
}
.article-breadcrumbs {
  font-size: 0.85rem;
  color: var(--c-ink-3);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.article-breadcrumbs a { color: var(--c-ink-3); transition: color var(--t-fast); }
.article-breadcrumbs a:hover { color: var(--c-accent-dark); }
.article-breadcrumbs span.sep { color: var(--c-ink-4, #cbd5e1); }
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--c-ink-3);
  margin-bottom: 24px;
}
.article-meta__date::before { content: "📅"; margin-right: 6px; }
.article-meta__reading::before { content: "⏱"; margin-right: 6px; }
.article-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--c-ink);
}
.article-lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--c-ink-2);
  margin: 0 0 32px;
  padding: 18px 22px;
  background: var(--c-surface-2);
  border-left: 4px solid var(--c-accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.article-cover {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin-bottom: 36px;
  display: block;
}

.article-body { font-size: 1.08rem; line-height: 1.8; color: var(--c-ink-2); }
.article-body > * + * { margin-top: 1em; }
.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 48px 0 18px;
  color: var(--c-ink);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.article-body h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
  margin-bottom: 12px;
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 36px 0 14px;
  color: var(--c-ink);
}
.article-body p { margin: 0 0 16px; }
.article-body ul,
.article-body ol { padding-left: 22px; margin: 0 0 20px; }
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c-accent);
  transform: rotate(45deg);
}
.article-body ol li { margin-bottom: 10px; }
.article-body strong { color: var(--c-ink); font-weight: 700; }
.article-body a {
  color: var(--c-accent-dark);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  transition: color var(--t-fast);
}
.article-body a:hover { color: var(--c-brand); }
.article-body blockquote {
  margin: 28px 0;
  padding: 22px 28px;
  background: var(--c-surface-2);
  border-left: 4px solid var(--c-brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.05rem;
  line-height: 1.65;
  font-style: italic;
  color: var(--c-ink);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.95rem;
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.article-body th,
.article-body td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.article-body th { background: var(--c-brand-dark, #0f172a); color: #fff; font-weight: 700; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body tr:hover { background: var(--c-surface-2); }
.article-body img { border-radius: var(--r-md); margin: 28px 0; max-width: 100%; height: auto; }
.article-body hr { border: 0; height: 1px; background: var(--c-border); margin: 40px 0; }
.article-body code {
  background: var(--c-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  color: var(--c-accent-dark);
}

/* CTA блок в конце статьи */
.article-cta {
  margin: 56px 0 0;
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-dark, #0f172a) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  text-align: center;
}
.article-cta h3 { color: #fff; font-size: 1.4rem; margin: 0 0 8px; }
.article-cta p { color: rgba(255,255,255,0.85); margin: 0 0 22px; line-height: 1.6; }

/* Сетка «читайте также» */
.article-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
}
.article-related__title { font-size: 1.4rem; margin-bottom: 24px; }
.article-related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.article-related__card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  color: inherit;
  display: block;
}
.article-related__card:hover { border-color: var(--c-brand); transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
.article-related__card h4 { font-size: 1rem; line-height: 1.35; margin: 0 0 8px; color: var(--c-ink); }
.article-related__card p { font-size: 0.9rem; color: var(--c-ink-3); margin: 0; line-height: 1.5; }

@media (max-width: 640px) {
  .article-page { padding: 32px 0 56px; }
  .article-lead { padding: 14px 16px; font-size: 1.05rem; }
  .article-body { font-size: 1rem; }
  .article-body h2 { margin: 36px 0 14px; }
  .article-cta { padding: 28px 24px; }
}
