* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #B8572E;
    --accent-dark: #8F4422;
    --accent-light: #F2E4DA;
    --cream: #FAF6F2;
    --dark: #2B2523;
    --gray: #7A7069;
    --gray-light: #B5AEA8;
    --line: #E8E0D8;
    --white: #FFFFFF;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    font-size: 16px;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

/* Шапка */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
}
.logo { height: 40px; display: block; }
.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-text {
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav { display: flex; gap: 40px; }
.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: all 0.3s;
    transform: translateX(-50%);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.burger span {
    width: 24px;
    height: 1.5px;
    background: var(--dark);
    transition: 0.3s;
}

/* Hero */
.hero {
    padding: 120px 0 100px;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(184, 87, 46, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-subtitle {
    color: var(--accent);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 24px;
}
.hero-title {
    font-size: 64px;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--dark);
    letter-spacing: -0.03em;
}
.hero-text {
    font-size: 18px;
    color: var(--gray);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(184, 87, 46, 0.3);
}
.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* Иконки в кнопках — СТРОГО 16x16 */
.btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    display: block;
}

/* Секции */
.section { padding: 100px 0; position: relative; }
.section-gray { background: var(--cream); }

.section-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    color: var(--dark);
}
.section-title-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
.section-subtitle {
    font-size: 17px;
    color: var(--gray);
    margin-bottom: 60px;
    max-width: 640px;
    line-height: 1.7;
}
.section-subtitle-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-decor {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1140px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--line) 20%, var(--line) 80%, transparent 100%);
    pointer-events: none;
}
.section-decor::before,
.section-decor::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}
.section-decor::before { left: 20%; }
.section-decor::after { right: 20%; }

/* Таймлайн */
.timeline {
    position: relative;
    padding-left: 60px;
    max-width: 900px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--line);
}
.timeline-item {
    position: relative;
    margin-bottom: 64px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 1px var(--accent);
}
.timeline-year {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.timeline-content {
    background: var(--white);
    padding: 32px 36px;
    border-radius: 4px;
    border: 1px solid var(--line);
    transition: all 0.4s ease;
}
.timeline-content:hover {
    border-color: var(--accent-light);
    box-shadow: 0 12px 40px rgba(184, 87, 46, 0.06);
}
.timeline-content h3 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 600;
}
.timeline-content p {
    color: var(--gray);
    font-size: 15.5px;
    line-height: 1.75;
}
.timeline-img {
    width: 100%;
    border-radius: 4px;
    margin-top: 20px;
}

/* Карточки */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.card {
    background: var(--white);
    padding: 40px 36px;
    transition: all 0.4s ease;
    position: relative;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}
.card:hover::before { width: 100%; }
.card:hover { background: var(--cream); }
.card h3 {
    font-size: 19px;
    margin-bottom: 12px;
    font-weight: 600;
}
.card p {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.7;
}

/* Счётчик */
.counter-section {
    text-align: center;
    padding: 120px 0;
}
.counter-label {
    font-size: 13px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 24px;
    font-weight: 500;
}
.counter-number {
    font-family: 'Manrope', sans-serif;
    font-size: 140px;
    font-weight: 500;
    color: var(--dark);
    line-height: 1;
    letter-spacing: -0.05em;
}
.counter-text {
    font-size: 15px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 24px;
}

/* Формы */
.form {
    background: var(--white);
    padding: 48px;
    border-radius: 4px;
    border: 1px solid var(--line);
}
.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 16px;
    font-family: inherit;
    color: var(--dark);
    background: transparent;
    transition: border-color 0.3s;
}
.form-group input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}
.form-group.checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 32px;
}
.form-group.checkbox input {
    margin-top: 4px;
    accent-color: var(--accent);
}
.form-group.checkbox label {
    font-weight: 400;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--gray);
    margin-bottom: 0;
}
.form-group.checkbox a { color: var(--accent); }

/* Тест */
.test-form {
    background: var(--white);
    padding: 48px;
    border-radius: 4px;
    border: 1px solid var(--line);
}
.question {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}
.question:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.question-text {
    font-size: 17px;
    margin-bottom: 20px;
    font-weight: 500;
}
.question-num {
    color: var(--accent);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-right: 12px;
}
.answers label {
    display: block;
    padding: 16px 20px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15.5px;
}
.answers label:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.answers input { margin-right: 14px; accent-color: var(--accent); }

/* Сертификат */
.certificate {
    background: var(--cream);
    padding: 60px 40px;
    border-radius: 4px;
    margin-top: 40px;
}
.certificate-inner {
    border: 1px solid var(--accent);
    padding: 60px 40px;
    border-radius: 2px;
    position: relative;
    background: var(--white);
}
.certificate-inner::before,
.certificate-inner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent);
}
.certificate-inner::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}
.certificate-inner::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}
.cert-logo { height: 70px; margin-bottom: 32px; }
.cert-title {
    font-family: 'Manrope', sans-serif;
    font-size: 42px;
    letter-spacing: 8px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
}
.cert-subtitle {
    font-size: 13px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 48px;
}
.cert-text {
    font-size: 15px;
    color: var(--gray);
    margin-bottom: 20px;
}
.cert-name {
    font-family: 'Manrope', sans-serif;
    font-size: 38px;
    font-weight: 500;
    margin: 32px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    display: inline-block;
    min-width: 60%;
}
.cert-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--gray);
    letter-spacing: 1px;
}

/* Приглашение */
.invitation {
    background: var(--cream);
    padding: 40px;
    border-radius: 4px;
    margin-top: 32px;
    border-left: 3px solid var(--accent);
}
.invitation-title {
    font-family: 'Manrope', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}
.invitation-text {
    color: var(--gray);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.invitation-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.invitation-item {
    background: var(--white);
    padding: 20px 24px;
    border-radius: 4px;
    border: 1px solid var(--line);
}
.invitation-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
    margin-bottom: 8px;
}
.invitation-value {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
}
.invitation-note {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.7;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.cert-note {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
    font-style: italic;
    margin-top: 24px;
    line-height: 1.7;
}

/* Админка */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 4px;
    margin-bottom: 32px;
    overflow: hidden;
}
.stat-card {
    background: var(--white);
    padding: 32px 24px;
    text-align: center;
}
.stat-number {
    font-family: 'Manrope', sans-serif;
    font-size: 42px;
    font-weight: 500;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    font-size: 12px;
    color: var(--gray);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    background: var(--cream);
    color: var(--dark);
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover { background: var(--cream); }

/* Ссылка «Печать» */
.cert-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: 100px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1;
}
.cert-link:hover {
    background: var(--accent);
    color: white;
}
.cert-link svg {
    width: 14px !important;
    height: 14px !important;
    display: block;
}

/* Уведомления */
.alert {
    padding: 18px 24px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-size: 14.5px;
}
.alert-error {
    background: #FDF0EB;
    color: var(--accent-dark);
    border-left: 2px solid var(--accent);
}

/* Футер */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 48px 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
}

/* Скроллбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 100px;
    border: 2px solid var(--cream);
}

/* Мобильная версия */
@media (max-width: 768px) {
    .container { padding: 0 24px; }
    .hero { padding: 80px 0 60px; }
    .hero-title { font-size: 38px; }
    .section { padding: 60px 0; }
    .section-title { font-size: 30px; }
    .counter-number { font-size: 88px; }
    .counter-section { padding: 80px 0; }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 100px 40px;
        box-shadow: -10px 0 40px rgba(0,0,0,0.08);
        transition: right 0.4s ease;
        gap: 28px;
    }
    .nav.open { right: 0; }
    .burger { display: flex; z-index: 110; }
    .burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .burger.open span:nth-child(2) { opacity: 0; }
    .burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .form, .test-form { padding: 32px 24px; }
    .certificate { padding: 32px 20px; }
    .certificate-inner { padding: 40px 24px; }
    .cert-title { font-size: 32px; letter-spacing: 4px; }
    .cert-name { font-size: 26px; }
    .cert-footer { flex-direction: column; gap: 12px; }

    .timeline { padding-left: 40px; }
    .timeline-item::before { left: -32px; }

    .invitation { padding: 28px 24px; }
    .invitation-title { font-size: 20px; }

    .admin-table th, .admin-table td { padding: 10px 12px; font-size: 12px; }
    .logo-text { font-size: 15px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 30px; }
    .section-title { font-size: 26px; }
    .counter-number { font-size: 64px; }
    .btn { padding: 10px 20px; font-size: 13px; }
    .logo-text { display: none; }
}
/* Подзаголовки в админке */
.subsection-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
}

/* Статистика по школам */
.schools-stats {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px 28px;
    margin-bottom: 32px;
}
.schools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.school-item {
    background: var(--cream);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.school-name {
    color: var(--dark);
}
.school-count {
    color: var(--accent);
    font-weight: 600;
}

/* Поиск */
.search-box {
    margin-bottom: 24px;
}
.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.3s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}
.search-box input::placeholder {
    color: var(--gray-light);
}

/* Кнопка «Обнулить» — опасная */
.btn-danger {
    background: transparent;
    color: #C33;
    border-color: #C33;
    transition: all 0.3s;
}
.btn-danger:hover {
    background: #C33;
    color: white;
}

/* Форма обнуления */
.reset-form {
    background: #FDF0EB;
    border: 1px solid #C33;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 32px;
}
.reset-form-inner h3 {
    font-size: 18px;
    color: #C33;
    margin-bottom: 12px;
}
.reset-form-inner p {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 12px;
    line-height: 1.6;
}
.reset-form-inner strong {
    color: #C33;
}
.reset-form-inner input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    margin-top: 8px;
}
.reset-form-inner input:focus {
    outline: none;
    border-color: #C33;
}

/* Успешное уведомление */
.alert-success {
    background: #EBF5EB;
    color: #2D7A2D;
    border-left: 2px solid #2D7A2D;
}