/* ===================================================================
   БФ «Полина» — лендинг. Реализация Figma-макета (node 124:107).
   Шрифты: Lato (Google Fonts) — основной текст;
   Philosopher (Google Fonts) — заголовки (замена дизайнерского Gatchina).
   =================================================================== */

:root {
  --red: #c13229;
  --dark: #3d3946;
  --beige-btn: #ceab7c;
  --brown-card: #b58e60;
  --footer-bg: #997447;
  --beige-bg: #f4eee6;
  --eyebrow: #b08756;
  --muted: #88878c;
  --green: #6c733a;
  --grey-btn: #ebebeb;
  --track: #ededed;
  --marker: #ccb7b3;

  --font-body: "Lato", "Segoe UI", Arial, sans-serif;
  --font-display: "Philosopher", Georgia, serif;

  --content: 1530px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* Single content width for every section. Full-bleed sections keep their
   background at 100% (the <section> itself), while this centered container
   holds the content — so all rows share the same left edge and 1530px width. */
.container {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

/* ---------- Shared typography blocks ---------- */
.eyebrow {
  font-style: italic;
  font-size: 16px;
  line-height: 14px;
  color: var(--eyebrow);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 34px;
  text-transform: uppercase;
  color: var(--dark);
  overflow-wrap: break-word;
}
.h2-block { display: flex; flex-direction: column; gap: 5px; }
.h2-block--center { align-items: center; text-align: center; }

.section { padding-block: 80px; }
.section__lead { font-size: 16px; color: var(--dark); }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-style: italic;
  font-size: 16px;
  line-height: normal;
  border-radius: 100px;
  padding: 10px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s ease, background-color .15s ease, color .15s ease;
}
.btn--lg { padding: 15px 25px; font-size: 18px; }
.btn--xl { padding: 20px 25px; font-size: 18px; }
.btn--red { background: var(--red); color: #fff; }
.btn--beige { background: var(--beige-btn); color: #fff; }
.btn--grey { background: var(--grey-btn); color: var(--dark); padding: 10px 15px; }
.btn--outline { background: transparent; border-color: var(--red); color: var(--red); }
.btn:hover { filter: brightness(0.95); }
.btn--outline:hover { background: var(--red); color: #fff; filter: none; }
.btn__icon { width: 13px; height: 16px; }

/* ============================ HEADER ============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 15px;
}
.header__logo img { width: 200px; height: 50px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 15px; }
.nav__item {
  font-style: italic;
  font-size: 16px;
  color: var(--dark);
  padding: 10px 20px;
  border-radius: 100px;
  transition: background-color .15s ease;
}
.nav__item:hover { background: var(--grey-btn); }
.nav__buttons { display: flex; align-items: center; gap: 10px; }
.nav__contacts { display: none; } /* only shown inside the open mobile/tablet menu */

/* burger — hidden on desktop, shown on tablet/mobile */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  background: #fff;
  overflow: hidden;
}
/* soft gradient glow — stretched over white at 85% opacity, matching the design */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-banner.png") center / 100% 100% no-repeat;
  opacity: 0.85;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 60px;
}
.hero__girl { flex: 0 0 auto; width: 703px; max-width: 46%; margin-right: -40px; }
.hero__girl img { width: 100%; height: auto; object-fit: contain; }
.hero__title { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.hero__eyebrow { font-style: italic; font-size: 18px; line-height: 26px; color: var(--dark); }
.hero__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 52px;
  text-transform: uppercase;
  color: var(--dark);
}
.hero__lead { font-style: italic; font-size: 18px; line-height: 26px; color: var(--dark); max-width: 614px; }
.hero__buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stack title as one group with 30px gaps */
.hero__title > .hero__eyebrow,
.hero__title > .hero__heading,
.hero__title > .hero__lead { margin: 0; }

/* ======================= КОМУ ВЫ ПОМОГЛИ ======================= */
.helped .container { display: flex; flex-direction: column; gap: 40px; }
.helped__sorting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.pill-group {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: var(--track);
  border-radius: 100px;
}
.pill {
  font-style: italic;
  font-size: 16px;
  color: var(--dark);
  background: transparent;
  border: none;
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
}
.pill--active { background: var(--dark); color: #fff; }

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

/* Person card */
.p-card { display: flex; flex-direction: column; gap: 20px; }
.p-card__photo {
  position: relative;
  height: 240px;
  overflow: hidden;
}
.p-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.status {
  position: absolute;
  top: 0;
  left: 0;
  color: #fff;
  font-style: italic;
  font-size: 16px;
  padding: 13px 25px 13px 15px;
  border-bottom-right-radius: 30px;
}
.status--open { background: var(--beige-btn); }
.status--done { background: var(--green); }

.p-card__body { display: flex; flex-direction: column; gap: 10px; padding-inline: 20px; }
.p-card__head { display: flex; flex-direction: column; gap: 10px; }
.p-card__name { font-weight: 900; font-size: 18px; color: var(--dark); }
.p-card__sub { font-size: 16px; color: var(--muted); }

.progbar { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; width: 100%; }
.progbar__track {
  width: 100%;
  height: 10px;
  background: var(--track);
  border-radius: 100px;
  padding: 1px;
  display: flex;
  align-items: center;
}
.progbar__fill { display: block; height: 8px; background: var(--beige-btn); border-radius: 100px; }
.progbar__fill--done { background: var(--green); }
.progbar__pct { font-weight: 900; font-size: 16px; color: var(--eyebrow); }
.progbar__pct--done { color: var(--green); }

.amounts { font-size: 16px; color: var(--dark); display: flex; flex-direction: column; gap: 3px; }
.amounts strong { font-weight: 900; }

/* ======================= НАПРАВЛЕНИЯ ПОМОЩИ ======================= */
.directions { background: var(--beige-bg); padding-block: 120px; position: relative; }
.directions__inner { display: flex; flex-direction: column; gap: 40px; }
.directions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
  z-index: 1;
}
.direction {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 30px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.direction__title { font-weight: 900; font-size: 18px; color: var(--dark); }
.direction__text { font-size: 16px; color: var(--dark); }

/* Decor positioned relative to the full-bleed section, aligned to the
   1530px content box so it matches the 1920px frame at wide viewports:
   heart — top-right, above the cards; bear — bottom-left, below the cards. */
.directions__heart {
  position: absolute;
  width: 295px;
  height: auto;
  top: -68px;
  right: max(16px, calc((100% - 1530px) / 2 + 40px));
  pointer-events: none;
  z-index: 3;
}
.directions__bear {
  position: absolute;
  width: 300px;
  height: auto;
  bottom: -175px;
  left: max(16px, calc((100% - 1530px) / 2 + 66px));
  pointer-events: none;
  z-index: 3;
}

/* ======================= МАРАФОН ДОБРЫХ ДЕЛ ======================= */
.projects .container { display: flex; flex-direction: column; gap: 40px; }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.project {
  background: var(--brown-card);
  border-radius: 8px;
  padding: 30px;
  min-height: 188px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.project__icon { width: 60px; height: 60px; flex: 0 0 auto; }
.project__text { display: flex; flex-direction: column; gap: 10px; }
.project__title { font-weight: 900; font-size: 18px; color: #fff; }
.project__sub { font-size: 16px; color: rgba(255, 255, 255, 0.6); }

/* ======================= БАННЕР — CTA ======================= */
.banner-cta { padding-block: 40px; }
.banner-cta__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
}
.banner-cta__text { display: flex; flex-direction: column; gap: 5px; }
.banner-cta__sub { font-style: italic; font-size: 18px; color: var(--dark); }

/* ======================= БЛАГОДАРСТВЕННЫЕ ПИСЬМА ======================= */
.scans { background: var(--beige-bg); padding-block: 100px; }
.scans .container { display: flex; flex-direction: column; gap: 40px; }
/* horizontal slider — 6 letters per view on desktop, paginated by arrows */
.scans__grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scans__grid::-webkit-scrollbar { display: none; }
.scan {
  margin: 0;
  flex: 0 0 calc((100% - 50px) / 6);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.scan__img {
  width: 100%;
  aspect-ratio: 242 / 338;
  border-radius: 8px;
  overflow: hidden;
}
.scan__img img { width: 100%; height: 100%; object-fit: cover; }
.scan figcaption { font-size: 16px; color: var(--dark); text-align: center; }

/* ---------- carousel nav (arrows + markers) ---------- */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.arrow {
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.arrow img { width: 100%; height: 100%; }
.arrow--left img { transform: scaleX(-1); }
.markers { display: flex; align-items: center; gap: 20px; }
.marker { width: 6px; height: 6px; border-radius: 100px; background: var(--marker); opacity: 0.5; }
.marker--active { width: 12px; height: 12px; opacity: 1; }

/* ============================ НОВОСТИ ============================ */
.news .container { display: flex; flex-direction: column; gap: 40px; }
.news__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
/* horizontal slider — 4 news per view on desktop, paginated by arrows */
.news__grid {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.news__grid::-webkit-scrollbar { display: none; }
.news-card {
  flex: 0 0 25%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
}
.news-card__img {
  height: 180px;
  overflow: hidden;
}
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__date { font-size: 14px; color: var(--muted); padding: 5px 15px 0; }
.news-card__title { font-weight: 900; font-size: 16px; color: var(--dark); padding: 5px 15px 0; }
.news-card__text { font-size: 16px; color: var(--dark); padding-inline: 15px; }

/* ============================ FOOTER ============================ */
.footer {
  position: relative;
  background: var(--footer-bg);
  padding-block: 100px;
  color: #fff;
}
.footer__boats {
  position: absolute;
  width: 420px;
  height: auto;
  left: calc(50% - 600px);
  top: -105px;
  pointer-events: none;
}
.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.footer__logo img { width: 220px; height: 55px; object-fit: contain; }
.footer__contacts { display: flex; flex-direction: column; gap: 10px; }
.footer__contact { display: flex; align-items: center; gap: 10px; font-size: 20px; color: #fff; }
.footer__contact img { width: 32px; height: 32px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.footer__links a { color: #fff; }
.footer__links a:hover { text-decoration: underline; }
.footer__col { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

/* ============================================================
   RESPONSIVE
   Desktop (base, ≥1025px): 1530px content, side nav.
   Tablet  (768–1024px): burger, 3-col cards, 4-col scans, 3-col news.
   Mobile  (≤767px): single column, stacked hero, 2-col scans.
   ============================================================ */

/* ---------- TABLET & MOBILE shared (≤1024px) ---------- */
@media (max-width: 1024px) {
  :root { --gutter: 20px; }

  /* header → burger menu */
  .burger { display: flex; }
  /* open menu — grey panel: buttons on top, nav items, contacts (per design) */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #ebebeb;
    padding: 15px 20px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav.open { display: flex; }

  /* buttons first */
  .nav__buttons { order: -1; width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .nav__buttons .btn { width: 100%; justify-content: center; }
  .nav .btn--grey { background: #d9d9d9; } /* Личный кабинет / Выйти — visible on grey panel */

  /* nav items — white pills with bottom divider */
  .nav__item {
    width: 100%;
    text-align: center;
    background: #fff;
    border-radius: 100px;
    border-bottom: 1px solid #d1d1d1;
    padding: 10px 20px;
  }
  .nav__item:hover { background: #fff; }

  /* contacts at the bottom */
  .nav__contacts { order: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 5px; }
  .nav__contact { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--red); word-break: break-word; }
  .nav__contact img { width: 30px; height: 30px; flex: 0 0 30px; }

  .section { padding-block: 60px; }
  .directions, .scans { padding-block: 60px; }
  .hero__inner { padding-block: 40px; }

  /* hero stays side-by-side, smaller heading */
  .hero__heading { font-size: 40px; line-height: 44px; }
  .hero__girl { max-width: 50%; margin-right: -20px; }

  /* sliders: 4 letters / 3 news per view (rest scroll via arrows) */
  .scans .scan { flex-basis: calc((100% - 30px) / 4); }
  .news .news-card { flex-basis: calc(100% / 3); }

  /* CTA stacks: text over centered button */
  .banner-cta__inner { flex-direction: column; align-items: center; gap: 20px; text-align: center; }

  /* projects: icon on top, text below (per tablet design) */
  .project { flex-direction: column; align-items: flex-start; gap: 15px; }

  /* decor: smaller, anchored to edges */
  .directions__heart { width: 171px; top: -40px; }
  .directions__bear { width: 217px; bottom: -150px; }

  .footer__boats { display: none; }
  .footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
}

/* ---------- MOBILE only (≤767px) ---------- */
@media (max-width: 767px) {
  :root { --gutter: 15px; }

  .header__logo img { width: 150px; height: auto; }

  .h2 { font-size: 28px; line-height: 32px; }

  /* more breathing room between blocks */
  .section { padding-block: 56px; }
  .directions, .scans { padding-block: 56px; }

  /* hero: no coloured glow (white background, per design) */
  .hero::before { display: none; }
  /* hero stacks: photo on top, text below, full-width buttons */
  .hero__inner { flex-direction: column; align-items: stretch; padding-block: 30px; }
  .hero__girl { width: 100%; max-width: 100%; margin-right: 0; }
  .hero__title { gap: 24px; }
  .hero__heading { font-size: 32px; line-height: 36px; }
  .hero__lead { font-size: 16px; }
  .hero__buttons { flex-direction: column; }
  .hero__buttons .btn { width: 100%; }

  /* everything single column; add gap so cards don't touch each other */
  .cards-3,
  .directions__grid,
  .projects__grid { grid-template-columns: 1fr; }
  .cards-3 { gap: 20px; }

  /* tighter card containers on mobile (content unchanged, just less padding/height) */
  .direction { min-height: 0; padding: 20px; }
  /* mobile keeps icon LEFT + text RIGHT (reset tablet's column layout) */
  .project { min-height: 0; padding: 20px; gap: 20px; flex-direction: row; align-items: center; }

  /* sorting: two separate pills — dark active + grey inactive, NO grey wrapper */
  .helped__sorting { flex-direction: column; align-items: stretch; gap: 15px; }
  .pill-group { width: 100%; flex-direction: column; background: transparent; padding: 0; gap: 10px; }
  .pill { width: 100%; background: var(--track); }
  .pill--active { background: var(--dark); }
  .helped__sorting > .btn { display: none; }

  /* CTA full-width button */
  .banner-cta .btn { width: 100%; }

  /* no decorative figures on mobile */
  .directions__heart,
  .directions__bear { display: none; }

  /* sliders per view: 1 news / 2 letters (base styles already make them scroll) */
  .news .news-card { flex-basis: 100%; }
  .scans .scan { flex-basis: calc((100% - 10px) / 2); }

  /* ----- footer per mobile design: centered, with boats ----- */
  .footer { padding-top: 90px; padding-bottom: 40px; }
  .footer__boats {
    display: block;
    width: 240px;
    left: 50%;
    transform: translateX(-50%);
    top: -60px;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
    text-align: center;
  }
  .footer__contacts,
  .footer__links,
  .footer__col { align-items: center; }
  .footer__contact { font-size: 16px; word-break: break-word; justify-content: center; }
  .footer__col { width: 100%; }
  .footer__col .btn { width: 100%; }
}

/* ===================================================================
   HELP PAGE (pomoch.html) — донат-форма. Node 228:288.
   =================================================================== */
/* bottom padding leaves room for the footer's boats decoration (pokes ~105px up) */
.help { padding: 40px 0 160px; }
.help__inner { display: flex; flex-direction: column; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--grey, #7e7c83);
  margin-bottom: 20px;
}
.breadcrumbs a { color: var(--grey, #7e7c83); text-decoration: underline; }
.breadcrumbs a:hover { color: var(--dark); }
.breadcrumbs__sep { color: var(--grey, #7e7c83); }

.help__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 40px;
}

.help__layout {
  display: flex;
  align-items: center;
  gap: 160px;
}
.help__bear { flex: 1 1 0; min-width: 0; }
.help__bear img { width: 100%; height: auto; object-fit: contain; }

/* ----- donation form ----- */
.donate {
  flex: 0 0 620px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.donate__intro { font-weight: 900; font-size: 22px; color: var(--dark); }

.field { display: flex; flex-direction: column; gap: 20px; }
.field__label { font-weight: 900; font-size: 18px; color: var(--dark); }

/* segmented toggle (Разовое / Ежемесячно) */
.toggle {
  display: flex;
  gap: 5px;
  padding: 5px;
  background: var(--grey-btn);
  border-radius: 100px;
}
.toggle__btn {
  flex: 1 1 0;
  border: none;
  background: transparent;
  border-radius: 100px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--dark);
  cursor: pointer;
}
.toggle__btn--active { background: var(--dark); color: #fff; }

/* amount pills */
.amounts-row { display: flex; gap: 5px; }
.amount {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: var(--grey-btn);
  border-radius: 100px;
  padding: 15px 25px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
}
.amount--active { background: var(--dark); color: #fff; }

.donate__input,
.auth__input {
  width: 100%;
  border: 1px solid var(--grey, #7e7c83);
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--dark);
}
.donate__input::placeholder,
.auth__input::placeholder { color: var(--grey, #7e7c83); }
.donate__input:focus,
.auth__input:focus { outline: none; border-color: var(--dark); }

/* payment methods */
.pay-row { display: flex; gap: 5px; }
.pay {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  border: none;
  background: var(--grey-btn);
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--dark);
}
/* unified selected state for ALL payment methods (incl. «Карта»):
   light bg + dark outline, so coloured logos stay visible */
.pay--active { background: #fff; border: 2px solid var(--dark); color: var(--dark); }
.pay--icon img { height: 28px; width: auto; max-width: 85%; object-fit: contain; }

.donate__submit { width: 100%; padding: 15px 25px; font-size: 18px; }

.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent__box {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px solid var(--grey, #7e7c83);
  border-radius: 4px;
  accent-color: var(--red);
  cursor: pointer;
}
.consent span { font-size: 16px; color: #868686; line-height: 1.3; }

/* ----- login / account form (lk.html) ----- */
.auth {
  flex: 0 0 620px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.auth__intro { font-weight: 900; font-size: 22px; line-height: 1.3; color: var(--dark); }
.field--sm { gap: 10px; }
.auth__actions { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.auth__submit { width: 100%; padding: 15px 25px; font-size: 18px; }
.auth__sms { width: 100%; }
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--grey, #7e7c83);
  font-size: 16px;
}
.or::before,
.or::after { content: ""; flex: 1 1 0; height: 1px; background: #d9d9d9; }
.auth__register { width: 100%; text-align: center; font-size: 16px; color: var(--dark); }
.auth__register strong { font-weight: 700; }

/* ----- help / auth page responsive ----- */
@media (max-width: 1024px) {
  .help__bear { display: none; }
  .donate,
  .auth { flex-basis: auto; max-width: none; width: 100%; }
  .help__title { font-size: 34px; }
}
@media (max-width: 767px) {
  .help { padding: 32px 0 90px; } /* room so footer boats don't overlap the consent text */
  .help__title { font-size: 28px; margin-bottom: 28px; }
  /* payment methods stack full-width on mobile, with taller containers.
     flex:none so the column layout doesn't collapse the fixed height */
  .pay-row { flex-direction: column; gap: 10px; }
  .pay { flex: none; width: 100%; height: 64px; }
  .pay--icon img { height: 32px; }
}

/* ===================================================================
   ALL WARDS PAGE (podopechnye.html) — tabs + card grids.
   =================================================================== */
.wards__inner { display: flex; flex-direction: column; }

/* tabs (Открытые сборы / Регулярная помощь / Детские дома) */
.tabs {
  display: inline-flex;
  align-self: flex-start;
  gap: 5px;
  padding: 5px;
  background: #ededed;
  border-radius: 100px;
  margin-bottom: 20px;
}
.tab {
  border: none;
  background: transparent;
  border-radius: 100px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
}
.tab--active { background: var(--dark); color: #fff; }
.tab-panel.is-hidden { display: none; }

/* person cards grid (open collections / regular help) — reuses .p-card */
.wards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 0;
  row-gap: 30px;
}

/* orphanage cards (horizontal: photo left + text right) */
.orph-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 10px;
  row-gap: 20px;
}
.orph-card {
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
}
.orph-card__photo { flex: 0 0 300px; height: 240px; }
.orph-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.orph-card__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  padding: 20px;
}
.orph-card__head { display: flex; flex-direction: column; gap: 10px; }
.orph-card__type { font-size: 16px; color: var(--grey, #7e7c83); }
.orph-card__name { font-weight: 900; font-size: 18px; color: var(--dark); }
.orph-card__addr { font-size: 16px; color: var(--dark); }
.orph-card__more { align-self: flex-start; }

/* ----- wards responsive ----- */
@media (max-width: 1024px) {
  .orph-card__photo { flex-basis: 169px; height: auto; }
}
@media (max-width: 767px) {
  /* tabs become separate full-width pills (grey inactive / dark active) */
  .tabs { display: flex; flex-direction: column; align-self: stretch; width: 100%; background: transparent; padding: 0; gap: 10px; }
  .tab { width: 100%; background: #ededed; }
  .tab--active { background: var(--dark); color: #fff; } /* keep active highlighted */
  .wards-grid { grid-template-columns: 1fr; row-gap: 20px; }
  .orph-grid { grid-template-columns: 1fr; }
  .orph-card { flex-direction: column; align-items: stretch; }
  .orph-card__photo { flex-basis: auto; width: 100%; height: 180px; }
  .orph-card__more { align-self: stretch; width: 100%; }
}

/* ===================================================================
   PERSONAL ACCOUNT (kabinet.html) — dashboard. Node 237:595.
   =================================================================== */
/* greeting / user block */
.acc-user { display: flex; align-items: flex-start; gap: 30px; margin-bottom: 40px; }
.acc-user__avatar { flex: 0 0 100px; width: 100px; height: 100px; border-radius: 50%; overflow: hidden; }
.acc-user__avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-user__info { display: flex; flex-direction: column; gap: 10px; }
.acc-user__namerow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.acc-user__name { font-weight: 900; font-size: 28px; color: var(--dark); }
.acc-link { font-size: 14px; color: #0068b0; text-decoration: underline; text-decoration-style: dotted; }
.acc-user__contacts { display: flex; flex-direction: column; gap: 5px; }
.acc-contact { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--dark); }
.acc-contact img { width: 26px; height: 26px; flex: 0 0 26px; }

/* stat cards */
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat { background: var(--grey-btn); border-radius: 8px; padding: 20px 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.stat--brown { background: var(--brown-card); }
.stat__text { display: flex; flex-direction: column; min-width: 0; }
.stat__label { font-size: 16px; color: var(--dark); margin-bottom: 10px; }
.stat__value { font-size: 50px; line-height: 1; color: var(--dark); }
.stat__value small { font-size: 20px; }
.stat--brown .stat__label { color: rgba(255,255,255,0.6); }
.stat--brown .stat__value { color: #fff; }
.stat__reglink { align-self: flex-end; }

/* main two-column area */
.acc-main { display: flex; align-items: flex-start; gap: 20px; }
.acc-history { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.acc-block-title { font-weight: 900; font-size: 22px; color: #000; margin-bottom: 20px; }

/* donation history table */
.acc-table { width: 100%; border-collapse: collapse; }
.acc-table th { background: var(--grey-btn); text-align: left; font-weight: 400; font-size: 14px; color: var(--dark); padding: 10px; white-space: nowrap; }
.acc-table td { border: 1px solid #e0e0e0; padding: 10px; font-size: 14px; color: var(--dark); }
.acc-table td.muted { color: var(--grey, #7e7c83); }
.acc-table a { color: #0068b0; text-decoration: underline; }

/* thanks letters */
.acc-letters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.letter { background: var(--grey-btn); border-radius: 8px; padding: 15px 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.letter__from { font-size: 16px; color: var(--grey, #7e7c83); }
.letter__title { font-weight: 900; font-size: 16px; color: var(--dark); margin: 10px 0; }
.letter__desc { font-size: 16px; color: var(--dark); }
.letter__buttons { display: flex; gap: 10px; }
.letter__buttons .btn { flex: 1 1 0; min-width: 0; }

/* continue helping (sticky sidebar) */
.acc-pay { flex: 0 0 493px; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.acc-pay__lead { font-size: 16px; color: #000; }
.acc-pay__buttons { display: flex; flex-direction: column; gap: 10px; }
.acc-pay__buttons .btn { width: 100%; }

/* ----- account responsive ----- */
@media (max-width: 1024px) {
  .acc-main { flex-direction: column; }
  .acc-history { width: 100%; }
  .acc-pay { flex-basis: auto; width: 100%; position: static; }
  .acc-letters { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .acc-user { flex-direction: column; }
  .acc-stats { grid-template-columns: 1fr; }
  .acc-letters { grid-template-columns: 1fr; }
  .acc-user__name { font-size: 24px; }
  .stat__value { font-size: 40px; }

  /* table → stacked cards with labels */
  .acc-table thead { display: none; }
  .acc-table, .acc-table tbody, .acc-table tr, .acc-table td { display: block; width: 100%; }
  .acc-table tr { border-bottom: 1px solid #e0e0e0; padding: 10px 0; }
  .acc-table td { border: none; padding: 4px 0; font-size: 16px; }
  .acc-table td::before { content: attr(data-label); display: block; font-size: 14px; color: var(--grey, #7e7c83); text-transform: lowercase; margin-bottom: 2px; }
  .acc-table td.cell-check { padding-top: 10px; }
  .acc-table td.cell-check::before { display: none; }
}

/* ===================================================================
   EDIT PROFILE (izmenit-dannye.html) — form extras. Reuses .auth/.help.
   =================================================================== */
.form-subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--dark);
  margin-top: 4px;
}
.avatar-edit { display: flex; align-items: center; gap: 20px; }
.avatar-edit__img { flex: 0 0 90px; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; }
.avatar-edit__img img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit__btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.avatar-edit__upload { cursor: pointer; }
.avatar-edit__upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.link-muted {
  background: none; border: none; padding: 0;
  font-size: 14px; color: var(--grey, #7e7c83);
  text-decoration: underline; cursor: pointer;
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1 1 0; min-width: 0; }
@media (max-width: 480px) { .field-row { flex-direction: column; } }

/* breadcrumbs on mobile: each segment stays whole (no word-splitting);
   a segment that doesn't fit moves to the next line as a single block */
@media (max-width: 767px) {
  .breadcrumbs { flex-wrap: wrap; align-items: flex-start; }
  .breadcrumbs > * { white-space: nowrap; flex: 0 0 auto; }
}

/* ===================================================================
   ABOUT PAGE (o-fonde.html). Node 293:1575.
   =================================================================== */
.about-inner { display: flex; flex-direction: column; }
.about-section { margin-bottom: 50px; }
.about-section:last-child { margin-bottom: 0; }

/* founder: photo left + text right */
.founder-block { display: flex; align-items: flex-start; gap: 30px; }
.founder-block__photo { flex: 0 0 620px; height: 435px; border-radius: 8px; overflow: hidden; }
.founder-block__photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-block__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.founder-block__body { display: flex; flex-direction: column; gap: 20px; }
.founder-block__body p { font-size: 16px; color: var(--dark); }
.founder-block__sign { display: flex; flex-direction: column; gap: 5px; }
.founder-block__sign-name { font-weight: 900; font-size: 18px; color: var(--dark); }
.founder-block__quote { font-style: italic; font-size: 16px; color: var(--dark); }

/* about: directions | contacts | partners */
.about-cols3 { display: flex; align-items: flex-start; gap: 30px; margin-bottom: 30px; }
.about-directions { flex: 0 0 620px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about-directions p { font-size: 16px; color: var(--dark); }
.about-directions b { font-weight: 700; }
.about-contacts-col, .about-partners-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.about-contacts { display: flex; flex-direction: column; gap: 5px; }
.about-contact { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--dark); }
.about-contact img { width: 26px; height: 26px; flex: 0 0 26px; }

.about-partners { display: flex; flex-direction: column; gap: 15px; align-items: flex-start; }
.partner-logo { width: 190px; height: auto; object-fit: contain; }
.partner-fk { display: flex; align-items: center; gap: 10px; }
.partner-fk img { width: 60px; height: 60px; flex: 0 0 60px; }
.partner-fk span { font-weight: 900; font-size: 18px; color: var(--dark); }

/* benefactors logo grid */
.benefactors__grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.benefactor {
  background: #fff; height: 80px; border: 1px solid #f0f0f0; border-radius: 8px;
  display: grid; place-items: center; padding: 15px 20px; overflow: hidden;
  transition: background-color .2s ease;
}
.benefactor:hover { background: var(--grey-btn); }
.benefactor img {
  grid-area: 1 / 1; max-width: 100%; max-height: 100%; object-fit: contain;
  transition: opacity .2s ease;
}
.benefactor__color { opacity: 0; }
.benefactor:hover .benefactor__grey { opacity: 0; }
.benefactor:hover .benefactor__color { opacity: 1; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.worker { display: flex; align-items: stretch; background: var(--grey-btn); border-radius: 8px; overflow: hidden; min-height: 200px; }
.worker__photo { flex: 1 1 0; min-width: 0; }
.worker__photo img { width: 100%; height: 100%; object-fit: cover; }
.worker__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 20px; }
.worker__name { font-weight: 900; font-size: 18px; color: var(--dark); }
.worker__role { font-size: 16px; color: var(--muted); }

/* ----- about responsive ----- */
@media (max-width: 1024px) {
  .founder-block { flex-direction: column; align-items: stretch; }
  .founder-block__photo { flex-basis: auto; width: 100%; height: auto; aspect-ratio: 620 / 435; }
  /* directions on its own row, contacts + partners share a row */
  .about-cols3 { flex-wrap: wrap; }
  .about-directions { flex-basis: 100%; }
  .benefactors__grid { grid-template-columns: repeat(4, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .about-contacts-col, .about-partners-col { flex-basis: 100%; }
  .benefactors__grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .about-section { margin-bottom: 40px; }
}

/* ===================================================================
   REPORTING PAGE (otchetnost.html). Node 304:884.
   =================================================================== */
.reports { display: flex; flex-direction: column; margin-bottom: 40px; }
.report {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}
.report__text { flex: 1 1 0; min-width: 0; }
.report__title { font-weight: 900; font-size: 16px; color: var(--dark); }
.report__sub { font-size: 16px; color: var(--grey, #7e7c83); }
.report__btn { flex: 0 0 auto; }

/* reporting table: equal columns + coloured statuses */
.report-table { table-layout: fixed; }
.acc-table td.st-done { color: var(--green); }
.acc-table td.st-progress { color: var(--brown-card); }
.report-fulltable { width: 100%; margin-top: 10px; }

@media (max-width: 767px) {
  .report { flex-direction: column; align-items: stretch; gap: 12px; }
  .report__btn { width: 100%; }
}

/* ===================================================================
   NEWS LIST (novosti.html) + NEWS DETAIL (novost.html). Nodes 312:1205 / 318:1464
   =================================================================== */
.news-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 0;
  row-gap: 10px;
  margin-bottom: 40px;
}

/* paginator */
.paginator { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pg-pages { display: flex; align-items: center; gap: 3px; }
.pg-num {
  width: 34px; height: 34px; border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #1d1d1b; background: none; border: none; cursor: pointer;
}
.pg-num--active { background: var(--dark); color: #fff; font-weight: 900; }

/* ---- news detail ---- */
.article-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.article-head__title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 38px; line-height: 1.1;
  text-transform: uppercase; color: var(--dark);
}
.article-head .btn { flex: 0 0 auto; }

.article { display: flex; align-items: flex-start; gap: 30px; margin-bottom: 60px; }
.gallery { flex: 0 0 620px; display: flex; flex-direction: column; gap: 15px; }
.gallery__main { width: 100%; height: 292px; border-radius: 8px; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; align-items: center; justify-content: center; gap: 10px; }
.gallery__strip { display: flex; gap: 5px; overflow: hidden; }
.gallery__thumb {
  flex: 0 0 100px; width: 100px; height: 47px; border-radius: 4px; overflow: hidden;
  opacity: 0.3; cursor: pointer; border: none; padding: 0; background: none;
  transition: opacity .15s ease;
}
.gallery__thumb.is-active { opacity: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__arrow {
  flex: 0 0 40px; width: 40px; height: 40px; border: none; background: none; padding: 0; cursor: pointer;
}
.gallery__arrow img { width: 100%; height: 100%; }
.gallery__arrow--left img { transform: scaleX(-1); }

.article__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.article__text p { font-size: 16px; color: var(--dark); }

/* similar news slider */
.similar__title { font-weight: 900; font-size: 28px; color: var(--dark); margin-bottom: 40px; }
.similar__track {
  display: flex; gap: 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin-bottom: 40px;
}
.similar__track::-webkit-scrollbar { display: none; }
.similar__track .news-card { flex: 0 0 25%; scroll-snap-align: start; }

/* ---- news responsive ---- */
@media (max-width: 1024px) {
  .news-list-grid { grid-template-columns: repeat(3, 1fr); }
  .article { flex-direction: column; align-items: stretch; }
  .gallery { flex-basis: auto; width: 100%; }
  .gallery__main { height: auto; aspect-ratio: 620 / 292; }
  .article-head { flex-direction: column; align-items: flex-start; }
  .similar__track .news-card { flex-basis: calc(100% / 3); }
}
@media (max-width: 767px) {
  .news-list-grid { grid-template-columns: 1fr; }
  .paginator { flex-direction: column; align-items: stretch; gap: 20px; }
  .pg-pages { justify-content: space-between; }
  .paginator .btn { width: 100%; }
  .article-head__title { font-size: 28px; }
  .article-head .btn { width: 100%; }
  .similar__track .news-card { flex-basis: 100%; }
}

/* ===================================================================
   PROJECTS LIST (proekty.html) + PROJECT DETAIL (proekt.html).
   Nodes 318:1740 / 335:901
   =================================================================== */
/* two promo banners */
.proj-banners { display: flex; gap: 10px; align-items: stretch; margin-top: 40px; }
.f-banner {
  flex: 1 1 0; min-width: 0;
  background: var(--beige-bg); border-radius: 8px; padding: 30px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
}
.f-banner__head { display: flex; flex-direction: column; gap: 10px; }
.f-banner__title {
  font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 34px;
  text-transform: uppercase; color: var(--dark);
}
.f-banner__text { font-style: italic; font-size: 18px; color: var(--dark); }
.f-banner .btn { width: 247px; max-width: 100%; padding: 20px 25px; font-size: 18px; }

/* ---- project detail ---- */
.proj-desc { display: flex; align-items: flex-start; gap: 30px; margin-bottom: 60px; }
.proj-desc .gallery { flex: 0 0 620px; }
.proj-desc__text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 30px; }
.proj-desc__lead { font-size: 16px; color: var(--dark); }
.proj-h4 { font-weight: 900; font-size: 22px; color: var(--dark); }

.need-list { display: flex; flex-direction: column; gap: 15px; }
.need-items { display: flex; flex-direction: column; gap: 5px; }
.need-item { display: flex; align-items: center; gap: 10px; }
.need-num {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 100px;
  background: var(--beige-btn); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.need-item p { font-size: 16px; color: var(--dark); }

.proj-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.proj-buttons .btn { padding: 20px 25px; font-size: 18px; min-width: 247px; }

.how-list { display: flex; flex-direction: column; gap: 15px; }
.how-steps { display: flex; gap: 10px; }
.how-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.how-step__num {
  width: 50px; height: 50px; border-radius: 100px;
  background: var(--beige-btn); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.how-step__title { font-weight: 900; font-size: 16px; color: var(--dark); }
.how-step__text { font-size: 16px; color: var(--dark); }

/* ---- projects responsive ---- */
@media (max-width: 1024px) {
  .proj-banners { flex-direction: column; }
  .proj-desc { flex-direction: column; align-items: stretch; }
  .proj-desc .gallery { flex-basis: auto; width: 100%; }
  .proj-buttons .btn { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 767px) {
  .f-banner .btn { width: 100%; }
  .how-steps { flex-direction: column; }
  .proj-buttons { flex-direction: column; }
  .proj-buttons .btn { width: 100%; }
}

/* ===================================================================
   ORPHANAGE DETAIL (detskiy-dom.html). Nodes 279:1330 / 394:1785 / 394:1854
   =================================================================== */
.proj-desc--dd { margin-bottom: 20px; }
.dd-text { display: flex; flex-direction: column; gap: 10px; }
.dd-text p { font-size: 16px; color: var(--dark); }
.dd-help-btn { align-self: flex-start; padding: 15px 20px; }
.dd-contacts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 60px; }
.dd-contacts .about-contacts { gap: 10px; }
.dd-social { display: inline-flex; align-self: flex-start; margin-top: 5px; }
.dd-social img { height: 40px; width: auto; display: block; }
.dd-news__head { margin-bottom: 40px; }
@media (max-width: 767px) {
  .dd-help-btn { align-self: stretch; width: 100%; }
}

/* ===================================================================
   WARD DETAIL (rebenok.html). Nodes 508:3182 / 508:3280 / 508:3374
   =================================================================== */
.child-info { gap: 20px; }
.child-help { display: flex; flex-direction: column; gap: 30px; width: 100%; }
.child-help__main { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; width: 100%; }
.child-help__goal { font-weight: 900; font-size: 28px; color: var(--dark); }
.child-help__period { font-weight: 400; font-size: 18px; color: var(--muted); }
.child-progress { display: flex; flex-direction: column; gap: 10px; width: 372px; max-width: 100%; }
.child-help__btn { align-self: flex-start; padding: 15px 25px; font-size: 18px; }
.child-accent {
  border-left: 1px solid var(--beige-btn); padding-left: 15px; margin: 0;
  font-style: italic; font-size: 16px; color: #a6773f;
}
.child-others { margin-top: 20px; }
.child-others__title { font-weight: 900; font-size: 24px; line-height: 26px; color: var(--dark); margin-bottom: 30px; }
/* clickable ward card (used as link) */
a.p-card { text-decoration: none; color: inherit; }
@media (max-width: 1024px) {
  .child-progress { width: 100%; }
}
@media (max-width: 767px) {
  .child-help__btn { align-self: stretch; width: 100%; }
}

/* ===== Лайтбокс: благодарственные письма ===== */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(43, 40, 49, 0.9); padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(1100px, 92vw); max-height: 82vh; border-radius: 8px; background: #fff; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45); }
.lightbox__caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: 28px; color: #fff; font-size: 18px; margin: 0; }
.lightbox__counter { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.8); font-size: 15px; margin: 0; }
.lightbox__close { position: absolute; top: 14px; right: 28px; background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); cursor: pointer; font-size: 20px; color: var(--dark); }
.lightbox__nav:hover { background: #fff; }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.scans .scan__img img { cursor: zoom-in; }
@media (max-width: 767px) {
  .lightbox { padding: 12px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__caption { font-size: 14px; bottom: 14px; }
}

/* табы «Кому вы помогли» на главной */
.helped .home-panel.is-hidden { display: none; }
