/* Разводящие страницы stomatologam.pro. Стиль — по слайдам РАО. */

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/montserrat-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/montserrat-italic-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/montserrat-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #1c2710;
    --muted: #5d6b4f;
    --line: #d7dfcd;
    --page: #f1f4f0;
    --white: #ffffff;
    --forest: #2d5410;
    --green: #4f8a14;
    --lime: #8fcf1f;
    --lime-soft: #eaf6d2;
    --brand-gradient: linear-gradient(90deg, #060a02 0%, #1d360a 28%, #4a7e12 62%, #96d520 100%);
    --pill-gradient: linear-gradient(90deg, #0c1405 0%, #284a0d 42%, #6fae16 78%, #94d31f 100%);
    --button-gradient: linear-gradient(90deg, #2d5410 0%, #5f9d17 100%);
    --radius: 22px;
    --shadow: 0 14px 34px rgba(36, 64, 10, 0.10), 0 2px 6px rgba(36, 64, 10, 0.06);
    --shadow-hover: 0 20px 44px rgba(36, 64, 10, 0.16), 0 4px 10px rgba(36, 64, 10, 0.08);
    --font: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--green); }
a:hover { color: var(--forest); }
img { max-width: 100%; }

:focus-visible {
    outline: 3px solid #b7e35d;
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Шапка ---------- */

.site-header {
    position: relative;
    overflow: hidden;
    background: var(--brand-gradient);
    color: var(--white);
}

/* Диагональный срез в левом верхнем углу, как на слайдах */
.site-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 64px; height: 100%;
    background: linear-gradient(160deg, #8fcf1f 0%, #2d5410 55%, rgba(6, 10, 2, 0) 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0.85;
}

.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.brand:hover { color: var(--white); }

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 800;
    font-size: 14px;
}
.brand__name small {
    display: block;
    font-weight: 500;
    font-size: 12px;
    opacity: 0.8;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.hero {
    position: relative;
    padding: 18px 0 40px;
    text-align: center;
}
.hero h1 {
    margin: 0;
    font-size: clamp(26px, 3.7vw, 48px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    text-wrap: balance;
}
.hero h1 span { display: block; }
.hero p {
    margin: 14px auto 0;
    max-width: 760px;
    font-size: 16px;
    opacity: 0.9;
}

.page-section { padding-bottom: 64px; }

/* ---------- Главная: карта образовательной платформы ----------
   Порядок в HTML: группа → её карточки (так читается на мобильном).
   На десктопе: группы в первой строке, карточки под своей группой (--col, --span). */

.edu-map {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    column-gap: 22px;
    margin-top: 34px;
}
.edu-map > .pill { grid-row: 1; grid-column: var(--col) / span var(--span); }
.edu-map > .tile { grid-row: 2; grid-column: var(--col); }

.pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 16px 28px;
    border-radius: 28px;
    background: var(--pill-gradient);
    box-shadow: var(--shadow);
    color: var(--white);
    font-size: clamp(17px, 1.7vw, 23px);
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
a.pill:hover { color: var(--white); box-shadow: var(--shadow-hover); }

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 64px;
    min-height: 236px;
    padding: 26px 18px 74px;
    border-radius: var(--radius);
    background:
        radial-gradient(120% 75% at 50% 105%, rgba(166, 222, 58, 0.55) 0%, rgba(206, 238, 140, 0.32) 38%, rgba(255, 255, 255, 0) 72%),
        var(--white);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-align: center;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* Стрелка от заголовка группы к карточке */
.tile::before {
    content: '';
    position: absolute;
    left: 50%; top: -58px;
    width: 2px; height: 50px;
    background: #2b4614;
}
.tile::after {
    content: '';
    position: absolute;
    left: calc(50% - 6px); top: -12px;
    border: 6px solid transparent;
    border-top: 8px solid #2b4614;
}
a.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--ink);
}

.tile__title {
    margin: 0;
    font-size: clamp(15px, 1.25vw, 18px);
    font-weight: 500;
    line-height: 1.45;
}
.tile__title b { font-weight: 700; }
.tile__note {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}
.tile__icon {
    position: absolute;
    right: -14px; bottom: -34px;
    width: 128px; height: auto;
    filter: drop-shadow(0 8px 12px rgba(20, 40, 5, 0.18));
    pointer-events: none;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--lime-soft);
    color: var(--forest);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.tile .badge { margin: -8px 0 12px; }
.tile--soon { opacity: 0.92; }

/* Фигурная скобка «объединения» под карточками */
.edu-brace {
    display: block;
    width: 100%;
    height: 96px;
    margin-top: 28px;
    color: #4b6f1d;
}

.goal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 6px auto 0;
    max-width: 1160px;
    min-height: 104px;
    padding: 24px 34px;
    border-radius: 54px;
    background: var(--white);
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: clamp(18px, 2.1vw, 28px);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
a.goal:hover { color: var(--ink); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.goal__arrow {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--button-gradient);
    color: var(--white);
    font-size: 22px;
}

/* ---------- Шкалы: «Безопасная стоматологическая клиника» ---------- */

.clinic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 42px;
    margin-top: 34px;
}
.clinic-col { display: flex; flex-direction: column; gap: 22px; }

.module {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 118px;
    padding: 18px 24px 18px 18px;
    border-radius: 20px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.module:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: var(--ink); }
.module__icon {
    flex: 0 0 82px;
    width: 82px; height: 82px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 6px 14px rgba(60, 100, 10, 0.18);
}
.module__body { min-width: 0; }
.module__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
.module__text {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.45;
}
.module__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.module .badge { margin-top: 10px; }

.goal-bar {
    margin-top: 34px;
    padding: 26px 30px;
    border-radius: 20px;
    background: linear-gradient(90deg, #2b5a0d 0%, #4f8a14 45%, #7cbd1d 100%);
    box-shadow: var(--shadow);
    color: var(--white);
    font-size: clamp(17px, 2.3vw, 30px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-weight: 600;
    text-decoration: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--button-gradient);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { color: var(--white); filter: brightness(1.06); box-shadow: 0 6px 16px rgba(45, 84, 16, 0.25); }

.site-footer {
    padding: 26px 20px 36px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.site-footer p { margin: 14px 0 0; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    max-width: 960px;
    margin: 0 auto;
}
.footer-links a {
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}
.footer-links a:hover { color: var(--forest); text-decoration: underline; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
    .tile__icon { width: 104px; }
}

@media (max-width: 900px) {
    .edu-map { display: flex; flex-direction: column; }
    .edu-map > .pill { margin-top: 28px; }
    .edu-map > .pill:first-child { margin-top: 0; }
    .tile { margin-top: 44px; }
    .tile::before { top: -40px; height: 32px; }
    .clinic-grid { grid-template-columns: 1fr; }
    .clinic-col + .clinic-col { margin-top: 22px; }
    .edu-brace { height: 60px; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .topbar { flex-wrap: wrap; padding: 10px 0; }
    .nav { justify-content: flex-start; }
    .tile { min-height: 0; padding: 26px 20px 64px; }
    .tile__icon { width: 92px; right: -6px; bottom: -22px; }
    .goal { border-radius: 28px; padding: 20px; }
    .goal__arrow { width: 38px; height: 38px; font-size: 18px; }
    .module { align-items: flex-start; padding: 16px; gap: 14px; }
    .module__icon { flex-basis: 64px; width: 64px; height: 64px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
