/* Shabyt — стили сайта. Палитра: зелёный #447f47, коричневый #694d35, белый. */
:root {
    --green: #447f47;
    --green-dark: #2f5d32;
    --green-darker: #244a27;
    --green-50: #f1f7f1;
    --green-100: #dcebdc;
    --green-200: #b9d6ba;
    --brown: #694d35;
    --brown-dark: #4e3826;
    --brown-50: #f7f2ed;
    --brown-100: #eadfd4;
    --white: #ffffff;
    --text: #2e241b;
    --muted: #6c5e52;
    --line: #e6ddd3;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(78, 56, 38, .06), 0 8px 24px rgba(78, 56, 38, .07);
    --shadow-hover: 0 2px 4px rgba(78, 56, 38, .08), 0 16px 36px rgba(78, 56, 38, .12);
    --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --container: 1180px;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* «Уменьшить движение» в системе не учитывается — анимации для всех (см. motion.css). */

body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--white); }
img { max-width: 100%; display: block; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green); }
h1, h2, h3 { color: var(--brown-dark); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
code { background: var(--brown-50); padding: .1em .4em; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brown); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .9rem; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-outline { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-outline:hover { background: var(--brown); color: #fff; }
.btn-light { background: #fff; color: var(--green-dark); }
.btn-light:hover { background: var(--brown-50); color: var(--brown-dark); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-danger { background: #fff; color: #a3322a; border-color: #e3b8b4; }
.btn-danger:hover { background: #a3322a; color: #fff; border-color: #a3322a; }
.link-more { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; color: var(--green-dark); text-decoration: none; }
.link-more:hover .icon { transform: translateX(3px); }
.link-more .icon { transition: transform .2s; }
.link-back { display: inline-block; margin-bottom: 20px; font-weight: 700; text-decoration: none; color: var(--brown); }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brown-dark); }
.logo-mark { width: 46px; height: 46px; flex: none; }
.logo-img { display: block; height: 64px; width: auto; flex: none; }
@media (max-width: 520px) { .logo-img { height: 48px; } }
.brand-light .logo-img { height: 84px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; color: var(--brown-dark); }
.brand-text small { font-size: .78rem; font-weight: 700; color: var(--green-dark); text-transform: lowercase; }
.brand-light strong, .brand-light small { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .95rem; color: var(--brown-dark); text-decoration: none; }
.site-nav ul a:hover { background: var(--green-50); color: var(--green-dark); }
.site-nav ul a[aria-current="page"] { background: var(--green-100); color: var(--green-darker); }
.nav-cta { margin-left: 6px; }
.nav-cta[aria-current="page"] { background: var(--green-dark); }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 38px; padding: 0 10px; border-radius: 999px; border: 2px solid var(--brown-100); color: var(--brown); font-weight: 800; font-size: .85rem; text-decoration: none; }
.lang-switch:hover { border-color: var(--brown); color: var(--brown-dark); }
.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--green-50); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: var(--green-dark); margin: 0 auto; position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1199px) {
    .nav-toggle { display: block; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 20px 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(78, 56, 38, .1); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
    .nav-open .site-nav { display: flex; }
    .site-nav ul { flex-direction: column; }
    .site-nav ul a { padding: 12px 14px; font-size: 1.05rem; }
    .nav-cta { margin: 0; }
    .lang-switch { align-self: flex-start; }
}

/* ---------- Герой ---------- */
.hero { position: relative; background: radial-gradient(1200px 500px at 85% 0%, #5a965d 0%, transparent 60%), var(--green); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding-top: 64px; padding-bottom: 110px; position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; margin-bottom: .3em; }
.hero-text { font-size: 1.2rem; max-width: 34ch; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.hero-stats div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: 18px; padding: 12px 20px; min-width: 120px; }
.hero-stats dt { font-size: 2rem; font-weight: 900; line-height: 1; }
.hero-stats dd { margin: 4px 0 0; font-weight: 700; opacity: .9; font-size: .92rem; }
.hero-art { width: 100%; max-width: 540px; justify-self: end; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .12)); }
.hero-photo { margin: 0; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; justify-self: end; border-radius: 32px; overflow: hidden; border: 6px solid rgba(255, 255, 255, .2); box-shadow: 0 24px 50px rgba(0, 0, 0, .22); background: var(--green-dark); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; color: #fff; z-index: 0; pointer-events: none; }
.kicker { display: inline-block; margin: 0 0 .6em; font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.kicker-light { color: #fff; background: rgba(255, 255, 255, .14); padding: 6px 14px; border-radius: 999px; letter-spacing: .08em; }

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 90px; gap: 10px; }
    .hero-art { justify-self: center; max-width: 420px; order: -1; }
    .hero-photo { justify-self: center; max-width: 360px; order: -1; margin-bottom: 18px; border-radius: 26px; }
}

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 24px 0; }
.section-tint { background: var(--green-50); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }
.empty { display: flex; align-items: center; gap: 10px; padding: 28px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: #fff; }
.note { margin-top: 28px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--brown-50); color: var(--brown-dark); }

.page-head { position: relative; background: var(--green); color: #fff; padding: 44px 0 76px; }
.page-head h1 { color: #fff; margin: 8px 0 .2em; }
.page-head .lead { font-size: 1.15rem; max-width: 60ch; opacity: .95; margin: 0; }
.page-head-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 44px; color: #fff; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; font-weight: 700; }
.breadcrumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; text-decoration: underline; }
.breadcrumbs span { opacity: .6; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Плитки на главной */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 26px 26px; min-height: 210px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--green-200); color: var(--text); }
.tile-num { position: absolute; top: 22px; right: 24px; font-weight: 900; color: var(--brown-100); font-size: 1.6rem; }
.tile-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--green-50); color: var(--green); margin-bottom: 10px; }
.tile-icon .icon { width: 28px; height: 28px; }
.tile:nth-child(even) .tile-icon { background: var(--brown-50); color: var(--brown); }
.tile-title { font-size: 1.25rem; font-weight: 800; color: var(--brown-dark); }
.tile-desc { color: var(--muted); }
.tile-arrow { margin-top: auto; padding-top: 12px; color: var(--green); }
@media (max-width: 900px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tile-grid { grid-template-columns: 1fr; } .tile { min-height: 0; } }

/* Группы */
.group-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
.group-chip { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.group-chip-name { font-weight: 900; font-size: 1.2rem; color: var(--brown-dark); }
.group-chip-cap { font-weight: 700; color: var(--green-dark); }
.group-c0 { border-top: 5px solid var(--green); }
.group-c1 { border-top: 5px solid var(--brown); }
.group-c2 { border-top: 5px solid var(--green-200); }
@media (max-width: 900px) { .group-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .group-strip { grid-template-columns: 1fr; } }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.group-card.has-photo { overflow: hidden; padding-top: 0; }
.group-photo { margin: 0 -28px 20px; aspect-ratio: 16 / 10; background: var(--green-50); overflow: hidden; }
.group-photo a, .group-photo img { display: block; width: 100%; height: 100%; }
.group-photo img { object-fit: cover; transition: transform .4s ease; }
.group-photo a:hover img { transform: scale(1.03); }
.group-card { padding: 28px; }
.group-card h2 { font-size: 1.35rem; }
.group-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--green-50); color: var(--green); margin-bottom: 16px; }
.group-c1 .group-badge { background: var(--brown-50); color: var(--brown); }
.group-cap { margin: 0; color: var(--muted); font-weight: 700; }
.group-cap strong { font-size: 2rem; color: var(--green-dark); font-weight: 900; margin-right: 4px; }

/* Новости */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }
.news-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.news-card-media { display: block; aspect-ratio: 16 / 10; background: var(--green-50); }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--green-200); }
.media-placeholder .icon { width: 56px; height: 56px; }
.news-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-card-body time { font-size: .85rem; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: .05em; }
.news-card-body h3 { margin: 6px 0 8px; }
.news-card-body h3 a { color: var(--brown-dark); text-decoration: none; }
.news-card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card { position: relative; }
.news-card-body p { color: var(--muted); flex: 1; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pager a { display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; font-weight: 800; }
.pager a[aria-current="page"] { background: var(--green); color: #fff; border-color: var(--green); }
.article-date { display: block; font-weight: 800; color: var(--green); margin-bottom: 18px; }
.article-image { border-radius: var(--radius); margin-bottom: 28px; width: 100%; }
.prose { font-size: 1.07rem; }
.prose p { max-width: 70ch; }

/* Призыв «Аттестация» */
.cta-band { display: flex; align-items: center; gap: 28px; padding: 36px 40px; border-radius: 28px; background: var(--brown); color: #fff; }
.cta-band h2 { color: #fff; margin-bottom: .25em; font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.cta-band p { margin: 0; opacity: .9; }
.cta-copy { flex: 1; }
.cta-icon { display: grid; place-items: center; width: 72px; height: 72px; flex: none; border-radius: 22px; background: rgba(255, 255, 255, .14); }
.cta-icon .icon { width: 36px; height: 36px; }
.cta-band .btn-light { color: var(--brown-dark); }
@media (max-width: 720px) { .cta-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; } }

/* Контакты */
.contact-strip { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 22px 36px; }
.contact-item, .contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .icon, .contact-list .icon { width: 26px; height: 26px; color: var(--green); margin-top: 2px; }
.contact-item div, .contact-list div { display: flex; flex-direction: column; }
.contact-item strong, .contact-list strong { color: var(--brown-dark); }
.contact-strip .btn { justify-self: end; white-space: nowrap; }
@media (max-width: 1000px) { .contact-strip { grid-template-columns: 1fr 1fr; } .contact-strip .btn { justify-self: start; } }
@media (max-width: 600px) { .contact-strip { grid-template-columns: 1fr; } .contact-strip .btn { justify-self: stretch; justify-content: center; } }
.contact-card { padding: 32px; }
.contact-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 22px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* О нас */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.facts { padding: 28px 30px; }
.facts dl { margin: 0; display: grid; gap: 14px; }
.facts dl div { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: .85rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 700; color: var(--brown-dark); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.feature p { color: var(--muted); margin: 0; }
.feature-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--green-50); color: var(--green); margin-bottom: 14px; }
.feature-icon .icon { width: 26px; height: 26px; }
.feature:nth-child(even) .feature-icon { background: var(--brown-50); color: var(--brown); }

/* Инфраструктура */
.room-list { display: grid; gap: 22px; }
.room { padding: 26px 28px; }
.room-head { display: flex; gap: 18px; align-items: flex-start; }
.room-head p { margin: 0; color: var(--muted); }
.room-head .feature-icon { margin: 0; }
.room .photo-grid { margin-top: 20px; }
.photo-soon { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: .95rem; }

/* Родителям */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: step; position: relative; padding: 70px 26px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 22px; left: 26px; font-weight: 900; font-size: 1.5rem; color: var(--green); }
.steps p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Коллектив */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.staff-card { overflow: hidden; }
.staff-photo { aspect-ratio: 4 / 4.4; background: var(--green-50); }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-body { padding: 20px 22px 24px; }
.staff-body h2 { margin-bottom: 4px; }
.staff-pos { font-weight: 800; color: var(--green-dark); margin-bottom: 12px; }
.staff-meta { margin: 0; display: grid; gap: 6px; font-size: .93rem; }
.staff-meta dt { display: inline; color: var(--muted); font-weight: 700; }
.staff-meta dt::after { content: ": "; }
.staff-meta dd { display: inline; margin: 0; }

/* Галерея */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 700; color: var(--brown-dark); font-size: .95rem; }
.chips a:hover { border-color: var(--green-200); }
.chips a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.photo-grid a { display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--green-50); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-grid a:hover img { transform: scale(1.04); }
/* Ровные ряды (partials/photo_grid.php, параметр even): c* — компьютер, cm* — планшет, cs* — телефон. */
.photo-grid.is-even { gap: 10px; }
.photo-grid.is-even a { border-radius: 10px; }
.photo-grid.is-even img { object-position: 50% 25%; }
.photo-grid.c8 { grid-template-columns: repeat(8, 1fr); }
.photo-grid.c6 { grid-template-columns: repeat(6, 1fr); }
.photo-grid.c5 { grid-template-columns: repeat(5, 1fr); }
.photo-grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .photo-grid.cm4 { grid-template-columns: repeat(4, 1fr); } .photo-grid.cm3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .photo-grid.is-even { gap: 8px; } .photo-grid.cs2 { grid-template-columns: repeat(2, 1fr); } .photo-grid.cs3 { grid-template-columns: repeat(3, 1fr); } }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(36, 26, 18, .9); }
.lightbox figure { margin: 0; max-width: 100%; text-align: center; color: #fff; }
.lightbox img { max-height: 82vh; max-width: 100%; border-radius: 12px; margin: 0 auto; }
.lightbox figcaption { margin-top: 12px; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 12px; top: 50%; }
.lightbox .lb-next { right: 12px; top: 50%; }

/* ---------- Аттестация ---------- */
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.att-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; padding: 20px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; }
.att-item:hover { transform: translateX(4px); border-color: var(--green-200); box-shadow: var(--shadow-hover); color: var(--text); }
.att-num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: #fff; font-weight: 900; font-size: 1.15rem; }
.att-item:nth-child(even) .att-num, li:nth-child(even) > .att-item .att-num { background: var(--brown); }
.att-name { font-weight: 800; font-size: 1.12rem; color: var(--brown-dark); }
.att-count { font-weight: 800; font-size: .9rem; color: var(--green-dark); background: var(--green-50); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.att-count.is-empty { color: var(--muted); background: var(--brown-50); }
.att-arrow { color: var(--green); }
@media (max-width: 600px) {
    .att-item { grid-template-columns: auto 1fr; gap: 6px 14px; padding: 16px; }
    .att-num { grid-row: span 2; }
    .att-count { justify-self: start; }
    .att-arrow { display: none; }
}
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 14px; border: 2px solid var(--line); background: #fff; text-decoration: none; color: var(--brown-dark); font-weight: 800; }
.tabs a small { font-weight: 600; color: var(--muted); }
.tabs a:hover { border-color: var(--green-200); }
.tabs a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }
.tabs a[aria-current="page"] small { color: rgba(255, 255, 255, .85); }
.tab-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--brown-50); color: var(--brown); font-size: .8rem; font-weight: 800; }
.tabs a[aria-current="page"] .tab-count { background: rgba(255, 255, 255, .2); color: #fff; }
.doc-groups { display: grid; gap: 16px; }
.doc-folder { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.doc-folder summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; font-weight: 800; color: var(--brown-dark); list-style: none; }
.doc-folder summary::-webkit-details-marker { display: none; }
.doc-folder summary > span:first-of-type { flex: 1; }
.doc-folder summary .icon { color: var(--brown); }
.doc-folder summary::after { content: ""; width: 10px; height: 10px; border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(45deg); transition: transform .2s; margin: 0 4px 4px; }
.doc-folder[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.doc-folder[open] summary { border-bottom: 1px solid var(--line); background: var(--brown-50); }
.doc-folder .doc-list { padding: 10px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-groups > .doc-list { gap: 10px; }
.doc-groups > .doc-list .doc { border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--text); }
.doc:hover { background: var(--green-50); color: var(--text); }
.doc-ext { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--brown); color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .03em; }
.doc-ext-pdf { background: var(--green); }
.doc-ext-jpg, .doc-ext-jpeg, .doc-ext-png, .doc-ext-webp { background: var(--brown); }
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-info strong { font-weight: 700; overflow-wrap: anywhere; }
.doc-info small { color: var(--muted); }
.doc-open { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--green-dark); white-space: nowrap; font-size: .92rem; }
@media (max-width: 520px) { .doc-open { font-size: 0; gap: 0; } .doc-open .icon { font-size: 17px; } }

/* ---------- Подвал ---------- */
.site-footer { background: var(--brown-dark); color: rgba(255, 255, 255, .86); padding: 60px 0 0; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin: 16px 0 0; }
.footer-legal { font-size: .92rem; opacity: .85; }
.footer-title { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-links, .footer-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; padding-bottom: 26px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; }
.footer-bottom a { opacity: .75; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Ошибки */
.error-page { text-align: center; }
.error-code { font-size: 5rem; font-weight: 900; color: var(--green-100); line-height: 1; margin-bottom: 10px; }

@media (max-width: 600px) {
    body { font-size: 16px; }
    .section { padding: 52px 0; }
    .container { padding-left: 16px; padding-right: 16px; } /* только бока — верх/низ не трогаем (иначе волна в шапке накрывала цифры) */
}

@media print {
    .site-header, .site-footer, .hero-wave, .page-head-wave { display: none; }
    .page-head { background: none; color: var(--text); padding: 0; }
    .page-head h1 { color: var(--text); }
}
.room-more { margin: 14px 0 0; }
/* Пункты меню и подпись логотипа не переносятся: либо помещаются целиком, либо меню сворачивается в ☰ (< 1200px) */
.site-nav ul a, .brand-text strong, .brand-text small, .nav-cta, .lang-switch { white-space: nowrap; }
.brand { flex: none; }
/* Основатель */
.founder { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 36px; padding: 32px; align-items: center; }
.founder-photo { aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: #ececea; box-shadow: var(--shadow); }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.founder-body h2 { margin-bottom: 4px; }
.founder-quote { margin: 18px 0 0; padding: 18px 22px; border-left: 4px solid var(--green); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--green-50); font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 800; line-height: 1.35; color: var(--brown-dark); }
.founder-bio { margin-top: 22px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--brown-50); }
.founder-bio .feature-icon { background: #fff; color: var(--brown); }
.founder-bio .prose p:last-child { margin-bottom: 0; }
.founder-blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.founder-blocks.has-side .founder-block-facts { grid-row: span 2; }
@media (max-width: 860px) { .founder-blocks { grid-template-columns: 1fr; } .founder-blocks.has-side .founder-block-facts { grid-row: auto; } }
.founder-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.founder-block:nth-child(even) .feature-icon { background: var(--brown-50); color: var(--brown); }
.founder-block-head { display: flex; align-items: center; gap: 14px; font-size: 1.35rem; margin-bottom: 18px; }
.founder-block-head .feature-icon { margin: 0; width: 46px; height: 46px; border-radius: 14px; }
.founder-facts, .founder-timeline, .founder-awards { list-style: none; margin: 0; padding: 0; }
.founder-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; }
.founder-facts li + li { border-top: 1px dashed var(--line); }
.founder-facts .icon { flex: none; width: 20px; height: 20px; margin-top: 4px; color: var(--green); }
.founder-year { position: relative; z-index: 1; flex: none; display: inline-block; min-width: 58px; padding: 2px 10px; border-radius: 999px; background: var(--green); color: #fff; font-weight: 800; font-size: .9rem; text-align: center; line-height: 1.6; }
.founder-timeline li, .founder-awards li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 8px 0; }
.founder-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 28px; top: 24px; bottom: -10px; width: 2px; background: var(--green-100); }
.founder-timeline li > span:last-child, .founder-awards li > span:last-child { padding-top: 1px; }
.founder-awards li + li { border-top: 1px dashed var(--line); }
.founder-awards .founder-year { background: var(--brown); }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; padding: 22px; gap: 22px; } .founder-photo { max-width: 340px; } }
.group-chip-age { font-size: .92rem; color: var(--muted); font-weight: 700; }
