/* ============================================================
   Тема «Balaqai» — палитра из логотипа:
   синий (ведущий) + жёлтый (яркий акцент)
   Имена переменных сохранены от базовой темы:
     --magenta* = ведущий СИНИЙ, --blue* = акцентный ЖЁЛТЫЙ
   ============================================================ */
:root {
    --magenta: #1f80d8;        /* ведущий синий */
    --magenta-dark: #145fa6;
    --magenta-soft: #e7f2fd;
    --blue: #f7b500;           /* акцентный жёлтый (для плашек/декора) */
    --blue-dark: #c98a00;      /* тёмно-золотой */
    --blue-soft: #fff4d6;      /* бледно-жёлтый фон */
    --ink: #1f2b45;            /* тёмно-синий текст */
    --muted: #6b7793;
    --bg: #f9fbff;
    --white: #ffffff;
    --radius: 22px;
    --shadow: 0 10px 30px rgba(20, 95, 166, 0.12);
    --shadow-sm: 0 4px 14px rgba(20, 95, 166, 0.10);
    --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--magenta-dark); text-decoration: none; }

/* ---------- Контейнер ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.center { text-align: center; margin-top: 34px; }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 26px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 58px; width: 58px; border-radius: 50%; display: block; }
.footer-logo { height: 50px; width: 50px; border-radius: 50%; }
.brand-name {
    font-weight: 900; font-size: 24px; letter-spacing: .04em;
    color: var(--magenta); line-height: 1; display: flex; flex-direction: column;
}
.brand-name small { font-size: 11px; font-weight: 700; color: var(--magenta); letter-spacing: .12em; text-transform: lowercase; }
.main-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.main-nav a {
    color: var(--ink); font-weight: 700; font-size: 15.5px;
    padding: 9px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--magenta-soft); color: var(--magenta); }
.main-nav a.nav-cta { background: var(--blue); color: var(--ink); }
.main-nav a.nav-cta:hover { background: var(--blue-dark); color: #fff; }
.header-right { display: flex; align-items: center; gap: 14px; }
.burger { display: none; border: 0; background: transparent; cursor: pointer; width: 42px; height: 42px; }
.burger span { display: block; width: 24px; height: 3px; background: var(--magenta); margin: 5px auto; border-radius: 3px; transition: .25s; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block; padding: 13px 30px; border-radius: 999px;
    font-weight: 800; font-size: 16px; border: 0; cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--magenta); color: #fff; box-shadow: 0 8px 20px rgba(156, 43, 142, .3); }
.btn-primary:hover { background: var(--magenta-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--magenta-dark); border: 2px solid var(--magenta); }
.btn-ghost:hover { background: var(--magenta-soft); }
.btn-light { background: #fff; color: var(--magenta); }
.btn-outline { background: transparent; color: var(--magenta); border: 2px solid var(--magenta); padding: 9px 22px; font-size: 15px; white-space: nowrap; }
.btn-outline:hover { background: var(--magenta); color: #fff; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--magenta-soft) 0%, var(--blue-soft) 100%);
    padding: 90px 0 130px;
}
.hero-inner { display: flex; align-items: center; gap: 50px; position: relative; z-index: 2; }
.hero-text { max-width: 620px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1.12; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--magenta); }
.hero-sub { font-size: 21px; color: var(--magenta-dark); font-weight: 700; margin: 18px 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge {
    margin-left: auto; flex-shrink: 0;
    width: 320px; height: 320px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 14px 34px rgba(20, 95, 166, 0.18));
    animation: bob 6s ease-in-out infinite;
}
.hero-badge img { width: 100%; height: 100%; object-fit: contain; }
.hero-decor { position: absolute; inset: 0; pointer-events: none; }
.hero-decor .float { position: absolute; opacity: .35; }
.f1 { width: 90px; color: var(--magenta); top: 12%; left: 4%; animation: bob 7s ease-in-out infinite; }
.f2 { width: 56px; color: var(--blue); top: 62%; left: 12%; animation: bob 5.5s ease-in-out 1s infinite; }
.f3 { width: 110px; color: var(--blue); top: 8%; right: 6%; animation: spin 30s linear infinite; }
.f4 { width: 46px; color: var(--magenta); bottom: 22%; right: 16%; animation: bob 6.5s ease-in-out .5s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; z-index: 1; }

/* ---------- Секции ---------- */
.section { padding: 84px 0; background: #fff; }
.section-tint { background: var(--bg); }
.section-head { text-align: center; margin-bottom: 46px; }
.eyebrow {
    display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .18em;
    text-transform: uppercase; color: var(--magenta-dark);
    background: var(--blue-soft); padding: 6px 16px; border-radius: 999px; margin-bottom: 14px;
}
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; color: var(--ink); line-height: 1.2; }

/* ---------- Карточки ---------- */
.cards-grid { display: grid; gap: 26px; }
.card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-body { padding: 24px; }

/* Новости */
.news-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.news-img { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 3/2; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-date { font-size: 13px; font-weight: 800; color: var(--magenta); }
.news-card h3 { font-size: 20px; margin: 6px 0 8px; }
.news-excerpt { color: var(--muted); font-size: 15px; }
.link-more {
    border: 0; background: none; cursor: pointer; margin-top: 12px;
    font: 800 15px var(--font); color: var(--magenta);
}
.link-more:hover { text-decoration: underline; }

/* О нас */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.about-text .eyebrow { margin-bottom: 12px; }
.about-text p { margin: 18px 0 24px; color: var(--muted); font-size: 17.5px; }
.groups-list { list-style: none; display: grid; gap: 12px; }
.groups-list li {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border-radius: 14px; padding: 13px 18px;
    box-shadow: var(--shadow-sm); font-weight: 700;
}
.groups-list .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--magenta), var(--blue)); flex-shrink: 0; }
.about-photo img, .photo-placeholder {
    border-radius: 30px; box-shadow: var(--shadow); width: 100%;
}
.photo-placeholder { background: var(--magenta-soft); padding: 60px; display: flex; justify-content: center; }
.photo-placeholder img { max-width: 260px; border-radius: 50%; box-shadow: none; }

/* Команда */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.staff-card { text-align: center; }
.staff-photo {
    width: 170px; height: 170px; margin: 0 auto 16px; border-radius: 50%;
    overflow: hidden; box-shadow: var(--shadow-sm);
    border: 5px solid var(--magenta-soft); transition: border-color .2s, transform .2s;
}
.staff-card:hover .staff-photo { border-color: var(--blue-soft); transform: scale(1.04); }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.staff-card h3 { font-size: 18.5px; }
.staff-role { color: var(--magenta); font-weight: 700; font-size: 14.5px; margin-top: 4px; }

/* Развитие и здоровье */
.features-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature-card, .contact-card { padding: 30px 26px; text-align: center; }
.feature-icon {
    display: inline-flex; width: 66px; height: 66px; align-items: center; justify-content: center;
    font-size: 30px; border-radius: 20px; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--magenta-soft), var(--blue-soft));
}
.feature-card h3, .contact-card h3 { font-size: 19px; margin-bottom: 8px; }
.feature-card p, .contact-card p { color: var(--muted); font-size: 15.5px; }
.contact-card a { font-weight: 800; color: var(--magenta-dark); }

/* Галерея превью */
.gallery-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gp-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.gp-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gp-item:hover img { transform: scale(1.05); }

/* Instagram */
.insta-band { background: linear-gradient(120deg, var(--magenta), var(--blue)); color: #fff; padding: 60px 0; }
.insta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.insta-handle { color: #fff; font-size: 30px; }
.insta-band p { opacity: .9; font-weight: 600; }

/* Контакты */
.contacts-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---------- Внутренние страницы ---------- */
.page-hero {
    position: relative; text-align: center; padding: 76px 0 110px; overflow: hidden;
    background: linear-gradient(120deg, var(--magenta-soft), var(--blue-soft));
}
.page-hero h1 { font-size: clamp(34px, 4.5vw, 52px); font-weight: 900; color: var(--ink); }
.page-hero p { color: var(--magenta-dark); font-weight: 700; font-size: 19px; margin-top: 10px; }

/* ---------- Аттестация ---------- */
.attestation .container { max-width: 980px; }
.year-block {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    margin-bottom: 22px; overflow: hidden; border: 2px solid transparent;
    transition: border-color .25s;
}
.year-block.open { border-color: var(--magenta-soft); }
.year-toggle {
    width: 100%; display: flex; align-items: center; gap: 16px;
    padding: 22px 26px; border: 0; background: none; cursor: pointer;
    font: 900 22px var(--font); color: var(--ink); text-align: left;
}
.year-toggle:hover .year-title { color: var(--magenta); }
.year-icon { width: 40px; height: 40px; color: var(--magenta); flex-shrink: 0; }
.year-icon svg { width: 100%; height: 100%; }
.year-title { transition: color .2s; }
.year-count {
    margin-left: auto; font-size: 13.5px; font-weight: 800; color: var(--magenta-dark);
    background: var(--blue-soft); padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.chevron {
    width: 12px; height: 12px; flex-shrink: 0;
    border-right: 3px solid var(--magenta); border-bottom: 3px solid var(--magenta);
    transform: rotate(45deg); transition: transform .3s; margin-top: -6px;
}
.year-block.open .chevron { transform: rotate(225deg); margin-top: 6px; }
.year-body {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .38s ease;
}
.year-block.open .year-body { grid-template-rows: 1fr; }
.year-body-inner { overflow: hidden; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 26px 26px; }
.doc-card {
    display: flex; align-items: center; gap: 15px;
    background: var(--bg); border-radius: 16px; padding: 16px 18px;
    transition: box-shadow .2s, transform .2s;
}
.doc-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.doc-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.doc-icon svg { width: 26px; height: 26px; }
.doc-pdf { background: #fdeaea; color: #d64545; }
.doc-xlsx { background: #e6f6ec; color: #2e9e5b; }
.doc-link { background: var(--magenta-soft); color: var(--magenta-dark); }
.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: 15.5px; line-height: 1.35; }
.doc-type { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.empty-note { text-align: center; color: var(--muted); font-weight: 600; padding: 26px; }

/* ---------- Галерея ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.gallery-item { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); position: relative; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.06); }
.gi-actions { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 8px; }
.gi-btn {
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .94); color: var(--magenta);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); transition: background .2s, color .2s, transform .15s;
}
.gi-btn svg { width: 20px; height: 20px; }
.gi-btn:hover { background: var(--magenta); color: #fff; transform: translateY(-2px); }

/* ---------- Модалка и лайтбокс ---------- */
.modal[hidden], .lightbox[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(59, 36, 64, .55); }
.modal-window {
    position: relative; background: #fff; border-radius: var(--radius);
    max-width: 620px; width: 100%; max-height: 86vh; overflow: auto; padding: 30px;
    box-shadow: var(--shadow);
}
.modal-window img { border-radius: 14px; margin-bottom: 18px; width: 100%; }
.modal-window h3 { font-size: 24px; margin-bottom: 10px; }
.modal-window p { color: var(--muted); white-space: pre-line; }
.modal-close {
    position: absolute; top: 14px; right: 16px; z-index: 2;
    width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--magenta-soft); color: var(--magenta); font-size: 22px; font-weight: 800;
}
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(30, 15, 33, .9); display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 14px; }
.lightbox .modal-close { position: fixed; top: 22px; right: 26px; }

/* ---------- Футер ---------- */
.site-footer { background: var(--ink); color: #fff; padding: 34px 0; }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .06em; }
.footer-copy { margin-left: auto; opacity: .75; font-size: 14.5px; }

.content-page h2, .content-page h3 { margin: 24px 0 10px; }
.content-page p { margin-bottom: 14px; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .hero-badge { display: none; }
    .about-grid { grid-template-columns: 1fr; gap: 34px; }
    .docs-grid { grid-template-columns: 1fr; }
    .main-nav {
        position: fixed; top: 78px; left: 0; right: 0; z-index: 99;
        background: #fff; flex-direction: column; align-items: stretch;
        padding: 14px 20px 22px; gap: 6px; box-shadow: var(--shadow);
        transform: translateY(-130%); transition: transform .3s; margin-left: 0;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a { text-align: center; padding: 13px; }
    .burger { display: block; }
    .burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger.active span:nth-child(2) { opacity: 0; }
    .burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
@media (max-width: 640px) {
    .hero { padding: 60px 0 110px; }
    .section { padding: 60px 0; }
    .gallery-preview-grid { grid-template-columns: 1fr; }
    .year-toggle { font-size: 18px; padding: 18px; gap: 12px; }
    .year-count { display: none; }
    .doc-card { flex-wrap: wrap; }
    .doc-btn { width: 100%; text-align: center; }
    .footer-copy { margin-left: 0; }
}

/* ---------- Доступность ---------- */
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
