/* ============================================================
   «Своих не бросаем» — стили сайта
   Волонтёрский отряд школы №101 г. Казани
   ============================================================ */

:root {
  --navy:      #0d2c48;   /* основной фирменный цвет (из логотипа) */
  --navy-2:    #16406a;
  --navy-3:    #1e5490;
  --accent:    #b31e2b;   /* акцент — патриотический красный */
  --accent-2:  #d13b48;
  --gold:      #c9a24b;   /* золотой акцент */
  --bg:        #ffffff;
  --bg-soft:   #f4f6f9;
  --bg-soft-2: #eaeef3;
  --text:      #1c2a38;
  --text-soft: #56606c;
  --line:      #dde3ea;
  --white:     #ffffff;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(13, 44, 72, .08);
  --shadow-lg: 0 20px 50px rgba(13, 44, 72, .14);
  --maxw:      1180px;
  --header-h:  76px;
}

/* -------- Base -------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy); color: #eaf1f8; }
.section-navy h2, .section-navy h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.section-navy .eyebrow { color: var(--gold); }
.section-head { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-head p { color: var(--text-soft); margin-top: 14px; font-size: 1.08rem; }
.section-navy .section-head p { color: #b9cbdc; }

.lead { font-size: 1.15rem; color: var(--text-soft); }

/* -------- Buttons -------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 100px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 2px solid transparent; transition: .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(179,30,43,.32); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-light:hover { background: #fff; color: var(--navy); }
.btn-lg { padding: 17px 36px; font-size: 1.06rem; }

/* -------- Header / Nav -------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; }
.brand-text b { display: block; font-size: 1.02rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.brand-text span { font-size: .72rem; color: var(--text-soft); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: .94rem;
  color: var(--text); transition: .18s; white-space: nowrap;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--navy); }
.nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: none; background: transparent;
  cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 10px;
}
.nav-toggle span { height: 2.5px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* -------- Hero -------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(120deg, rgba(9,28,48,.94), rgba(13,44,72,.80)), var(--navy);
  overflow: hidden;
}
.hero.hero-img::before {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center; z-index: 0;
}
.hero--home::before {
  background-image: linear-gradient(115deg, rgba(9,28,48,.93) 40%, rgba(13,44,72,.50)),
                    url('../assets/images/loading-1.jpg');
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { padding: 88px 0 96px; max-width: 760px; }
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,75,.18); color: var(--gold);
  border: 1px solid rgba(201,162,75,.4);
  padding: 7px 16px; border-radius: 100px; font-weight: 700;
  font-size: .82rem; letter-spacing: .06em; margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 .accent { color: var(--gold); }
.hero p { font-size: 1.2rem; color: #cdddec; max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-strip {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 30px 48px;
  padding: 24px 0 40px; border-top: 1px solid rgba(255,255,255,.14);
}
.hero-strip .item b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--gold); }
.hero-strip .item span { font-size: .9rem; color: #b9cbdc; }

/* -------- Stats -------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; box-shadow: var(--shadow);
}
.stat-card .stat-ic { font-size: 1.9rem; line-height: 1; margin-bottom: 10px; }
.stat-card .num { font-size: 2.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-card .num .suffix { font-size: 1.3rem; color: var(--accent); }
.stat-card .label { margin-top: 10px; font-size: .96rem; color: var(--text-soft); }

/* -------- Cards / Feature grid -------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: .22s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ic {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff;
  font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .98rem; }

/* -------- Split (image + text) -------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.split-body h2 { margin-bottom: 18px; }
.split-body p { color: var(--text-soft); margin-bottom: 16px; }
.check-list li { position: relative; padding-left: 34px; margin-bottom: 12px; color: var(--text); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: .8rem; font-weight: 800; display: grid; place-items: center;
}

/* -------- Deeds (work) list -------- */
.deed-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.deed {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; gap: 18px; align-items: flex-start;
}
.deed .qty { font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1; white-space: nowrap; }
.deed h4 { color: var(--navy); font-size: 1.02rem; margin-bottom: 4px; }
.deed p { font-size: .88rem; color: var(--text-soft); }

/* -------- Gallery -------- */
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.gallery figure { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { width: 100%; height: 260px; object-fit: cover; transition: .4s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 18px 14px; color: #fff; font-size: .92rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(9,28,48,.85));
}

/* -------- Donate / Help -------- */
.donate-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 36px; border: 1px solid var(--line);
}
.donate-card h3 { margin-bottom: 8px; }
.req-list { margin-top: 6px; }
.req-list li {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: .96rem;
}
.req-list li:last-child { border-bottom: none; }
.req-list .k { color: var(--text-soft); }
.req-list .v { font-weight: 700; color: var(--navy); text-align: right; word-break: break-word; }
.note { font-size: .86rem; color: var(--text-soft); margin-top: 14px; }

/* -------- FAQ -------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 24px; font-size: 1.05rem; font-weight: 700; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit;
}
.faq-q .chev { transition: .25s; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 24px 20px; color: var(--text-soft); }

/* -------- CTA band -------- */
.cta-band {
  background: linear-gradient(120deg, var(--accent), #8f1622);
  color: #fff; border-radius: var(--radius); padding: 52px 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #ffdfe2; margin-top: 8px; max-width: 560px; }

/* -------- Partners -------- */
.partner-list { columns: 2; column-gap: 40px; }
.partner-list li { break-inside: avoid; padding: 11px 0 11px 28px; position: relative; color: var(--text); border-bottom: 1px solid var(--line); }
.partner-list li::before { content: "★"; position: absolute; left: 0; color: var(--gold); }

/* -------- Contacts -------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.contact-item .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-soft); color: var(--navy); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.contact-item b { display: block; color: var(--navy); }
.contact-item span { color: var(--text-soft); font-size: .96rem; }

/* -------- Footer -------- */
.footer { background: var(--navy); color: #b9cbdc; padding: 56px 0 26px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer .brand-text b { color: #fff; }
.footer .brand-text span { color: #8fa6bd; }
.footer p { color: #9fb4c9; font-size: .94rem; margin-top: 16px; max-width: 340px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; color: #b9cbdc; font-size: .95rem; transition: .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .86rem; color: #7f97ae;
}

/* -------- Page hero (inner pages) -------- */
.page-hero { background: var(--navy); color: #fff; padding: 60px 0; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { color: #b9cbdc; max-width: 640px; margin: 0 auto; }
.crumbs { font-size: .86rem; color: #8fa6bd; margin-bottom: 18px; }
.crumbs a:hover { color: #fff; }

/* -------- Что требуется — таблица -------- */
.needs-empty, .reports-empty { text-align: center; color: var(--text-soft); padding: 40px 0; }
.reports-empty a { color: var(--accent); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.needs-table { width: 100%; border-collapse: collapse; background: #fff; min-width: 560px; }
.needs-table thead th {
  text-align: left; background: var(--navy); color: #fff; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .04em; padding: 15px 20px; font-weight: 700;
}
.needs-table thead th:last-child { width: 34%; }
.needs-table td { padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.needs-table tbody tr:last-child td { border-bottom: none; }
.needs-table tbody tr:hover { background: var(--bg-soft); }
.needs-table b { color: var(--navy); font-size: 1.02rem; display: block; }
.needs-table small { color: var(--text-soft); font-size: .85rem; display: block; margin-top: 2px; }
.pcell { display: flex; align-items: center; gap: 12px; }
.pcell .progress { flex: 1; height: 10px; background: var(--bg-soft-2); border-radius: 6px; overflow: hidden; }
.pcell .progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 6px; transition: width .8s ease; }
.pcell .pnum { font-weight: 800; color: var(--accent); min-width: 44px; text-align: right; }
.needs-table tr.done .progress > span { background: linear-gradient(90deg, #1c7a3e, #37a860); }
.needs-table tr.done .pnum { color: #1c7a3e; }

/* -------- Отчёты — блог-карточки -------- */
.report-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.report-card {
  display: flex; flex-direction: column; background: #fff; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .22s;
}
.report-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.rc-cover { height: 190px; background-size: cover; background-position: center; background-color: var(--bg-soft-2); }
.rc-cover--empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), var(--navy-3)); }
.rc-cover--empty span { color: rgba(255,255,255,.65); font-weight: 800; letter-spacing: .05em; font-size: .9rem; }
.rc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.rc-body .date { font-size: .76rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rc-body h3 { margin: 8px 0; font-size: 1.2rem; line-height: 1.25; }
.rc-body p { color: var(--text-soft); font-size: .95rem; flex: 1; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
.rc-more { color: var(--accent); font-weight: 700; font-size: .92rem; }
.rc-meta { color: var(--text-soft); font-size: .85rem; white-space: nowrap; }

/* -------- Один отчёт -------- */
.report-single { max-width: 820px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; margin-bottom: 6px; }
.back-link:hover { color: var(--accent); }
.report-text { font-size: 1.08rem; line-height: 1.8; color: var(--text); white-space: pre-line; }
.block-title { margin: 34px 0 16px; font-size: 1.3rem; color: var(--navy); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-grid figure { margin: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gallery-grid figure:hover img { transform: scale(1.06); }
.report-videos .video-frame { margin-bottom: 16px; }

/* Видео */
.video-frame { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { display: inline-flex; align-items: center; gap: 10px; }

/* Лайтбокс с перелистыванием */
.lightbox { position: fixed; inset: 0; background: rgba(9,20,33,.94); display: none; place-items: center; z-index: 200; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox button { background: none; border: none; color: #fff; cursor: pointer; line-height: 1; opacity: .82; transition: .15s; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 14px; right: 22px; font-size: 2.6rem; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 3.4rem; width: 64px; height: 90px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 600; font-size: .95rem; }

/* -------- Utilities -------- */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.reveal { opacity: 0; transform: translateY(24px); transition: .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Адаптив под планшеты и телефоны
   ============================================================ */
@media (max-width: 960px) {
  .stats-grid, .grid-4, .deed-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid, .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .report-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Меню из 7 пунктов широкое — прячем в «бургер» уже на планшетах */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 16px 20px; box-shadow: var(--shadow);
    transform: translateY(-140%); transition: transform .3s ease; z-index: 90;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 12px; border-radius: 8px; border-bottom: 1px solid var(--bg-soft); white-space: normal; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta.btn { display: flex; justify-content: center; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 54px 0; }
  .grid-2, .grid-3, .grid-4, .stats-grid, .deed-grid, .gallery { grid-template-columns: 1fr; }
  .report-cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-list { columns: 1; }
  .hero-inner { padding: 60px 0 68px; }
  .hero p { font-size: 1.08rem; }
  .cta-band { padding: 36px 26px; text-align: center; justify-content: center; }
  .cta-band .btn { margin: 0 auto; }
  .card, .donate-card { padding: 24px; }
  .footer-bottom { flex-direction: column; }
}

/* Таблица нужд → карточки на телефоне */
@media (max-width: 640px) {
  .needs-table { min-width: 0; }
  .needs-table thead { display: none; }
  .needs-table, .needs-table tbody, .needs-table tr, .needs-table td { display: block; width: 100%; }
  .needs-table tr { border-bottom: 8px solid var(--bg-soft); padding: 8px 0; }
  .needs-table tr:last-child { border-bottom: none; }
  .needs-table td { border: none; padding: 6px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  .needs-table td[data-l]::before { content: attr(data-l); color: var(--text-soft); font-weight: 600; font-size: .85rem; }
  .needs-table td[data-l="Позиция"] { display: block; padding-top: 12px; }
  .needs-table td[data-l="Позиция"]::before { display: none; }
  .pcell { width: 62%; }
}
