/* ==== Пастельная палитра ==== */
:root {
    --color-bg:        #fdf7f2;   /* основной фон — тёплый кремовый */
    --color-text:      #3a3a4a;   /* мягкий тёмно-серый, не чёрный */
    --color-muted:     #6f6f80;
    --color-border:    #e7dfd5;

    --color-blue:      #d6e6f2;   /* пастельно-голубой */
    --color-mint:      #e1f1e7;   /* пастельно-мятный */
    --color-peach:     #fde2d4;   /* пастельно-персиковый */
    --color-pink:      #f7d8d8;   /* пастельно-розовый */
    --color-lavender:  #e6e1f0;   /* пастельная лаванда */
    --color-cream:     #fff4e6;

    --color-accent:    #c8a2c8;   /* приглушённая лаванда — для акцентов */
    --color-accent-2:  #a8c8e1;

    --shadow-soft: 0 8px 24px rgba(60, 60, 90, 0.08);
    --radius:      18px;
}

/* ==== Сброс ==== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    font-family: 'Helvetica Neue', 'Arial', 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    margin: 0;
    padding: 0 0 0 1.2em;
}

button {
    font: inherit;
    cursor: pointer;
}

/* ==== Layout ==== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section--mint     { background: var(--color-mint); }
.section--peach    { background: var(--color-peach); }
.section--lavender { background: var(--color-lavender); }
.section--blue     { background: var(--color-blue); }
.section--photo    { padding: 0; }

.section__title {
    font-size: 34px;
    margin: 0 0 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section__lead {
    font-size: 18px;
    color: var(--color-muted);
    max-width: 720px;
    margin: 0 0 32px;
}

/* ==== Hero ==== */
.hero {
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-pink) 100%);
    padding: 96px 0 80px;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 13px;
    color: var(--color-muted);
    margin: 0 0 16px;
}

.hero__title {
    font-size: 48px;
    line-height: 1.15;
    margin: 0 0 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    max-width: 880px;
}

.hero__subtitle {
    font-size: 19px;
    color: var(--color-muted);
    margin: 0 0 40px;
    max-width: 680px;
}

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

.meta-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-card__label {
    font-size: 13px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.meta-card__value {
    font-size: 18px;
    font-weight: 600;
}

/* ==== Программа ==== */
.program {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.program__day {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 28px 24px;
    box-shadow: var(--shadow-soft);
}

.program__day-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.program__list li {
    margin-bottom: 6px;
}

/* ==== Карточки видов травм ==== */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-soft);
}

.card__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
}

.card__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* ==== Юридический блок ==== */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.legal-list li {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-soft);
}

.legal-list strong {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text);
}

/* ==== Яркое фото ==== */
.photo {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 420px;
    max-height: 640px;
    overflow: hidden;
    background: #1a1a1a;
}

.photo__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    font-size: 18px;
    text-align: center;
}

/* ==== Инструкторы ==== */
.instructors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.instructor {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 26px 24px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.instructor__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.04em;
}

.instructor__avatar--1 { background: linear-gradient(135deg, #c8a2c8, #a8c8e1); }
.instructor__avatar--2 { background: linear-gradient(135deg, #f7c5a3, #f7b1b1); }
.instructor__avatar--3 { background: linear-gradient(135deg, #b9d8c4, #a8c8e1); }

.instructor__name {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
}

.instructor__role {
    margin: 0 0 14px;
    color: var(--color-muted);
    font-size: 15px;
}

.instructor__credits {
    text-align: left;
    color: var(--color-text);
    font-size: 15px;
    padding-left: 1.1em;
}

.instructor__credits li {
    margin-bottom: 6px;
}

/* ==== Тарифы ==== */
.tariffs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.tariff {
    background: #fff;
    border-radius: var(--radius);
    padding: 30px 26px 26px;
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
}

.tariff--featured {
    background: linear-gradient(160deg, #fff 0%, var(--color-cream) 100%);
    transform: translateY(-8px);
    border: 1px solid var(--color-border);
}

.tariff__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.tariff__name {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 600;
}

.tariff__price {
    margin: 0 0 18px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tariff__list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    flex: 1;
}

.tariff__list li {
    padding: 6px 0 6px 22px;
    position: relative;
    color: var(--color-text);
    font-size: 15px;
}

.tariff__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--color-accent);
    font-weight: 700;
}

/* ==== CTA ==== */
.cta {
    text-align: center;
    margin-top: 48px;
}

.cta__note {
    margin: 16px 0 0;
    color: var(--color-muted);
    font-size: 15px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 16px 36px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(200, 162, 200, 0.45);
}

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

.btn--primary:active {
    transform: translateY(0);
}

/* ==== Footer ==== */
.footer {
    padding: 28px 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 14px;
    background: var(--color-bg);
}

/* ==== Модалка ==== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal.is-open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(40, 40, 60, 0.55);
    backdrop-filter: blur(2px);
}

.modal__dialog {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: var(--color-muted);
    border-radius: 50%;
}

.modal__close:hover {
    background: var(--color-bg);
}

.modal__title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
}

.modal__subtitle {
    margin: 0 0 22px;
    color: var(--color-muted);
    font-size: 15px;
}

/* ==== Форма ==== */
.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form__label {
    font-size: 14px;
    color: var(--color-muted);
}

.form__input {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200, 162, 200, 0.25);
}

.form__input.is-invalid {
    border-color: #d97a7a;
    box-shadow: 0 0 0 3px rgba(217, 122, 122, 0.18);
}

.form__error {
    color: #b14b4b;
    font-size: 13px;
    min-height: 16px;
}

.form__submit {
    margin-top: 8px;
    width: 100%;
}

.form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form__status {
    margin: 8px 0 0;
    text-align: center;
    font-size: 14px;
    min-height: 18px;
}

.form__status.is-success { color: #3f8a4d; }
.form__status.is-error   { color: #b14b4b; }

/* ==== Адаптив ==== */
@media (max-width: 900px) {
    .hero__title       { font-size: 36px; }
    .hero__meta        { grid-template-columns: 1fr; }
    .program           { grid-template-columns: 1fr; }
    .cards             { grid-template-columns: repeat(2, 1fr); }
    .legal-list        { grid-template-columns: 1fr; }
    .instructors       { grid-template-columns: 1fr; }
    .tariffs           { grid-template-columns: 1fr; }
    .tariff--featured  { transform: none; }
    .section           { padding: 56px 0; }
    .section__title    { font-size: 28px; }
}

@media (max-width: 480px) {
    .hero              { padding: 64px 0 56px; }
    .hero__title       { font-size: 28px; }
    .hero__subtitle    { font-size: 17px; }
    .cards             { grid-template-columns: 1fr; }
}

/* ==== Админ-страница (используется в admin.php) ==== */
.admin {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 24px;
}

.admin h1 {
    margin: 0 0 24px;
    font-size: 28px;
}

.admin table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.admin th, .admin td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
}

.admin th {
    background: var(--color-lavender);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text);
}

.admin tr:last-child td {
    border-bottom: 0;
}

.admin .login {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.admin .login h1 {
    margin-bottom: 16px;
}
