/*
Theme Name: Samai Premium School
Theme URI: https://example.com/samai-premium-school
Author: ChatGPT
Description: Лёгкая премиальная тема для Алматинской математико-лингвистической школы «САМАЙ» с главной страницей, новостями и картой 2GIS.
Version: 1.1
Text Domain: samai-school
*/

:root {
    --samai-primary: #2D6CDF;
    --samai-primary-soft: #60A5FA;
    --samai-accent: #10B981;
    --samai-bg: #F3F6FC;
    --samai-bg-soft: #EDF2FD;
    --samai-card-bg: #FFFFFF;
    --samai-text: #0F172A;
    --samai-muted: #6B7280;
    --samai-border-subtle: rgba(148, 163, 184, 0.45);
    --samai-shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
    --samai-radius-lg: 24px;
    --samai-radius-md: 18px;
    --samai-radius-pill: 999px;
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0 0, rgba(96, 165, 250, 0.28), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.22), transparent 55%),
        linear-gradient(to bottom, #F3F7FF 0%, #FFFFFF 42%, #F9FAFB 100%);
    color: var(--samai-text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
}

/* Лёгкая сетка-фон */
.page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(203, 213, 225, 0.35) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(203, 213, 225, 0.35) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.25;
    z-index: -2;
}

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

/* Прогресс-бар при скролле */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 60;
    background: linear-gradient(90deg, #2D6CDF, #22C55E);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
    transform-origin: left center;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
}

.logo-block {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.95) 0, transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(96, 165, 250, 0.9) 0, transparent 55%),
        linear-gradient(135deg, #2563EB, #4F46E5);
    box-shadow:
        0 12px 26px rgba(37, 99, 235, 0.6),
        0 0 0 1px rgba(148, 163, 184, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
}

.logo-text-main {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.logo-text-sub {
    font-size: 11px;
    color: #6B7280;
    line-height: 1.3;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 780px;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

.nav-link,
.main-menu a {
    position: relative;
    color: #4B5563;
    font-weight: 500;
    white-space: nowrap;
}

.nav-link::after,
.main-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2D6CDF, #22C55E);
    transition: width 160ms ease-out;
}

.nav-link:hover,
.main-menu a:hover {
    color: #111827;
}

.nav-link:hover::after,
.main-menu a:hover::after {
    width: 100%;
}

/* WordPress menu container */
.main-menu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.main-menu li {
    position: relative;
}

.main-menu .current-menu-item > a {
    color: #111827;
}

.main-menu .current-menu-item > a::after {
    width: 100%;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: #EEF2FF;
    border: 1px solid rgba(129, 140, 248, 0.5);
}

.lang-pill {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #4B5563;
    cursor: pointer;
    transition: all 140ms ease-out;
}

.lang-pill.is-active {
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--samai-radius-pill);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out, background 150ms ease-out, opacity 150ms ease-out;
    white-space: nowrap;
}

.btn-primary {
    color: #FFFFFF;
    background:
        radial-gradient(circle at 0 0, rgba(129, 140, 248, 0.95) 0, transparent 55%),
        linear-gradient(135deg, #2563EB, #4F46E5);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.6);
}

.btn-ghost {
    background: #F3F4F6;
    color: #111827;
    border: 1px solid rgba(209, 213, 219, 0.9);
}

.btn-ghost:hover {
    background: #E5E7EB;
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon-circle {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    background:
        radial-gradient(circle at 0 0, rgba(96, 165, 250, 0.95) 0, transparent 55%),
        #1E293B;
    color: #E5E7EB;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.btn-icon-circle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
}

/* HERO */

.hero {
    position: relative;
    padding: 60px 0 56px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -10% -5% auto;
    background:
        radial-gradient(circle at 0 0, rgba(191, 219,254, 0.9), transparent 60%),
        radial-gradient(circle at 90% 10%, rgba(221, 239, 253, 0.9), transparent 60%);
    opacity: 0.8;
    z-index: -1;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
}

.hero-left {
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--samai-radius-pill);
    background: rgba(219, 234, 254, 0.9);
    color: #1D4ED8;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(129, 140, 248, 0.4);
    margin-bottom: 14px;
}

.hero-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22C55E;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35);
}

.hero-title {
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin: 0 0 14px;
}

.hero-title span {
    color: var(--samai-primary);
}

.hero-subtitle {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--samai-muted);
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--samai-muted);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(209, 213, 219, 0.9);
    box-shadow: 0 10px 26px rgba(148, 163, 184, 0.25);
}

.hero-badge strong {
    color: #111827;
}

.hero-right {
    position: relative;
    z-index: 1;
}

.hero-card {
    position: relative;
    border-radius: 26px;
    padding: 20px 20px 18px;
    background:
        radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.95), transparent 60%),
        radial-gradient(circle at 110% 0, rgba(219, 234, 254, 0.95), transparent 60%),
        linear-gradient(145deg, #FFFFFF, #F3F4F6);
    box-shadow:
        0 22px 60px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(209, 213, 219, 0.9);
    overflow: hidden;
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hero-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1F2937;
}

.hero-card-pill {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #EEF2FF;
    color: #3730A3;
    border: 1px solid rgba(129, 140, 248, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-card-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #FACC15;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.4);
}

.hero-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    border-radius: 18px;
    padding: 10px 10px 9px;
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 30px rgba(148, 163, 184, 0.28);
}

.stat-label {
    font-size: 10px;
    color: #6B7280;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-suffix {
    font-size: 11px;
    color: #6B7280;
}

.stat-meta {
    font-size: 10px;
    color: #9CA3AF;
    margin-top: 2px;
}

.hero-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #6B7280;
}

.hero-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: #EFF6FF;
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #1D4ED8;
}

.hero-card-meta {
    text-align: right;
}

.hero-card-meta strong {
    color: #111827;
}

/* Математические орбиты / абстракции */

.hero-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, 0.5);
}

.hero-orbit-1 {
    width: 260px;
    height: 260px;
    top: -40px;
    right: -80px;
}

.hero-orbit-2 {
    width: 190px;
    height: 190px;
    bottom: -60px;
    left: -40px;
}

.hero-orbit-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2D6CDF;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.5);
}

.hero-orbit-1 .hero-orbit-dot {
    top: 24%;
    left: 8%;
}

.hero-orbit-2 .hero-orbit-dot {
    right: 14%;
    bottom: 12%;
}

.hero-gradient-ball {
    position: absolute;
    width: 80px;
    height: 80px;
    right: 18%;
    bottom: 12%;
    border-radius: 999px;
    background:
        radial-gradient(circle at 18% 0, rgba(255, 255, 255, 0.95) 0, transparent 55%),
        radial-gradient(circle at 80% 100%, rgba(96, 165, 250, 0.9) 0, transparent 55%),
        linear-gradient(135deg, #2563EB, #4F46E5);
    box-shadow:
        0 14px 36px rgba(37, 99, 235, 0.6),
        0 -10px 26px rgba(148, 163, 184, 0.5) inset;
}

/* ОБЩИЕ СЕКЦИИ */

.samai-section {
    padding: 60px 0;
}

.section-header {
    margin-bottom: 26px;
}

.section-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 6px;
}

.section-title {
    font-size: 22px;
    margin: 0 0 6px;
}

.section-description {
    margin: 0;
    font-size: 13px;
    color: var(--samai-muted);
    max-width: 560px;
}

.samai-card {
    border-radius: var(--samai-radius-lg);
    background: var(--samai-card-bg);
    border: 1px solid var(--samai-border-subtle);
    box-shadow: var(--samai-shadow-soft);
}

/* СЕКЦИЯ: О ШКОЛЕ, СТАТИСТИКА И ФАКТЫ */

.stats-section {
    background:
        radial-gradient(circle at 0 0, rgba(219, 234, 254, 0.9), transparent 65%),
        linear-gradient(180deg, rgba(239, 246, 255, 0.96), #FFFFFF);
}

.stats-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stats-card {
    border-radius: var(--samai-radius-md);
    padding: 14px 14px 12px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.9);
    box-shadow: 0 18px 40px rgba(148, 163, 184, 0.2);
}

.stats-card-label {
    font-size: 11px;
    color: #6B7280;
    margin-bottom: 3px;
}

.stats-card-value {
    font-size: 21px;
    font-weight: 600;
}

.stats-card-meta {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 3px;
}

.facts-card {
    padding: 20px 20px 18px;
}

.facts-title {
    font-size: 16px;
    margin: 0 0 6px;
}

.facts-text {
    font-size: 13px;
    color: var(--samai-muted);
    margin: 0 0 12px;
}

.facts-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.fact-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #EFF6FF;
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #1D4ED8;
    white-space: nowrap;
}

.facts-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    margin: 10px 0 6px;
}

.facts-list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: var(--samai-text);
    display: grid;
    gap: 6px;
}

/* ПРОГРАММЫ */

.programs-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.program-card {
    border-radius: var(--samai-radius-lg);
    padding: 18px 18px 16px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 20px 44px rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 60px rgba(148, 163, 184, 0.35);
    border-color: rgba(129, 140, 248, 0.7);
}

.program-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #EEF2FF;
    color: #3730A3;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(129, 140, 248, 0.6);
}

.program-title {
    font-size: 15px;
    margin: 4px 0 0;
}

.program-range {
    font-size: 12px;
    color: var(--samai-muted);
}

.program-text {
    font-size: 13px;
    color: var(--samai-muted);
}

.program-list {
    margin: 6px 0 10px;
    padding-left: 16px;
    font-size: 13px;
    color: var(--samai-text);
}

.program-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    font-size: 12px;
    color: var(--samai-muted);
}

.program-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.6);
}

/* ПРЕПОДАВАТЕЛИ */

.teachers-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #EFF6FF 100%);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.teacher-card {
    border-radius: 20px;
    padding: 14px 14px 12px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 18px 42px rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

.teacher-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(148, 163, 184, 0.4);
}

.teacher-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.teacher-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 20% 0, rgba(255, 255, 255, 1) 0, transparent 50%),
        conic-gradient(from 210deg, #38BDF8, #6366F1, #22C55E, #38BDF8);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    font-size: 18px;
    font-weight: 600;
}

.teacher-name {
    font-size: 13px;
    font-weight: 600;
}

.teacher-role {
    font-size: 11px;
    color: var(--samai-muted);
}

.teacher-pill {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    color: #0369A1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.teacher-text {
    font-size: 12px;
    color: var(--samai-muted);
}

/* НОВОСТИ */

.news-section {
    background:
        radial-gradient(circle at 0 0, rgba(191, 219, 254, 0.9), transparent 60%),
        linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
}

.news-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.news-filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}

.news-filter-pill {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #6B7280;
    cursor: pointer;
}

.news-filter-pill.is-active {
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.4);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.news-card {
    border-radius: 18px;
    padding: 12px 12px 10px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 18px 44px rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #111827;
}

.news-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1D4ED8;
    background: #DBEAFE;
    padding: 3px 8px;
    border-radius: 999px;
    align-self: flex-start;
}

.news-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: #6B7280;
}

.news-link {
    margin-top: 4px;
    font-size: 11px;
    color: #2563EB;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* INSTAGRAM */

.instagram-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
}

.instagram-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: stretch;
}

.instagram-panel {
    border-radius: var(--samai-radius-lg);
    padding: 20px 20px 18px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 20px 44px rgba(148, 163, 184, 0.3);
}

.instagram-title {
    font-size: 16px;
    margin: 0 0 8px;
}

.instagram-text {
    font-size: 13px;
    color: var(--samai-muted);
    margin: 0 0 14px;
}

.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(219, 39, 119, 0.45);
    background:
        radial-gradient(circle at 0 0, #FDE68A 0, transparent 55%),
        linear-gradient(135deg, #EC4899, #6366F1);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 20px 48px rgba(236, 72, 153, 0.6);
}

.btn-instagram:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 60px rgba(236, 72, 153, 0.75);
}

.instagram-note {
    font-size: 11px;
    color: var(--samai-muted);
    margin-top: 10px;
}

.instagram-feed {
    border-radius: var(--samai-radius-lg);
    padding: 16px;
    background: #0F172A;
    border: 1px dashed rgba(148, 163, 184, 0.9);
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 6px;
    color: #E5E7EB;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.7);
}

.instagram-feed-title {
    font-size: 13px;
    font-weight: 600;
}

.instagram-feed-hint {
    font-size: 11px;
    color: #9CA3AF;
    max-width: 420px;
}

/* КОНТАКТЫ + КАРТА */

.contacts-section {
    background:
        radial-gradient(circle at 100% 0, rgba(219, 234, 254, 0.9), transparent 60%),
        linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
}

.contacts-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 20px;
}

.contacts-card {
    padding: 20px 20px 18px;
}

.contacts-title {
    font-size: 18px;
    margin: 0 0 6px;
}

.contacts-subtitle {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--samai-muted);
}

.contacts-group-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6B7280;
    margin: 10px 0 4px;
}

.contacts-list {
    display: grid;
    gap: 8px;
    font-size: 13px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.contact-tag {
    padding: 3px 7px;
    border-radius: 999px;
    background: #E5E7EB;
    font-size: 11px;
    color: #4B5563;
}

.contact-value a {
    color: #111827;
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

.contacts-extra {
    margin-top: 10px;
    font-size: 12px;
    color: var(--samai-muted);
}

.infra-grid {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
}

.infra-pill {
    padding: 4px 9px;
    border-radius: 999px;
    background: #ECFEFF;
    border: 1px solid rgba(45, 212, 191, 0.6);
    color: #065F46;
}

.contact-map-card {
    padding: 18px 18px 16px;
    background: #FFFFFF;
    border-radius: var(--samai-radius-lg);
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 22px 60px rgba(148, 163, 184, 0.32);
}

.contact-map-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 12px;
}

.contact-map-title {
    font-weight: 600;
}

.contact-map-link {
    font-size: 11px;
    color: #2563EB;
}

.contact-map-link:hover {
    text-decoration: underline;
}

.contact-map {
    width: 100%;
    height: 280px;
    border-radius: 18px;
    overflow: hidden;
    background: #E5E7EB;
}

/* FOOTER */

.site-footer {
    border-top: 1px solid rgba(209, 213, 219, 0.9);
    background: #FFFFFF;
    margin-top: 40px;
}

.site-footer-inner {
    padding: 16px 20px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #6B7280;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-link {
    color: #6B7280;
}

.footer-link:hover {
    color: #111827;
}

/* КНОПКА "ВВЕРХ" */

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    background:
        radial-gradient(circle at 0 0, rgba(191, 219, 254, 0.95) 0, transparent 55%),
        linear-gradient(135deg, #2563EB, #4F46E5);
    color: #FFFFFF;
    box-shadow:
        0 18px 36px rgba(37, 99, 235, 0.65),
        0 0 0 1px rgba(148, 163, 184, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition:
        opacity 180ms ease-out,
        transform 180ms ease-out,
        visibility 180ms ease-out,
        box-shadow 150ms ease-out,
        background 150ms ease-out;
}

.back-to-top svg {
    width: 18px;
    height: 18px;
}

.back-to-top:hover {
    box-shadow:
        0 22px 48px rgba(37, 99, 235, 0.75),
        0 0 0 1px rgba(129, 140, 248, 0.8);
    transform: translateY(10px) scale(0.96);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* АНИМАЦИЯ ПОЯВЛЕНИЯ */

[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 420ms ease-out, transform 420ms ease-out;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* НОВОСТИ АРХИВ НА ОТДЕЛЬНОЙ СТРАНИЦЕ */

.news-archive-header {
    margin-bottom: 24px;
}

.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.news-archive-card {
    border-radius: 18px;
    padding: 12px 12px 10px;
    background: #FFFFFF;
    border: 1px solid rgba(209, 213, 219, 0.95);
    box-shadow: 0 18px 44px rgba(148, 163, 184, 0.3);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #111827;
}

.news-archive-thumb {
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
}

.news-archive-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.news-archive-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: #6B7280;
    flex-wrap: wrap;
}

.news-archive-excerpt {
    font-size: 12px;
    color: #6B7280;
}

.news-archive-more {
    margin-top: 6px;
    font-size: 11px;
    color: #2563EB;
}

.news-archive-pagination {
    margin-top: 22px;
    font-size: 12px;
}

/* АДАПТИВ */

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 28px;
    }

    .programs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teachers-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stats-grid,
    .instagram-layout,
    .contacts-layout,
    .news-archive-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-right {
        order: -1;
    }

    .hero-title {
        font-size: 26px;
    }

    .samai-section {
        padding: 46px 0;
    }

    .programs-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .teachers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .instagram-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .contacts-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-map {
        height: 240px;
    }

    .section-title {
        font-size: 20px;
    }

    .news-archive-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .teachers-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        padding: 16px 16px 14px;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
