/* ---------- Общие переменные ---------- */
:root {
    --blue: #1e3a5f;
    --orange: #f59e0b;
    --light-bg: #f9fafb;
    --text: #333;
    --font-body: 'Nunito', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

::placeholder {
    color: #a0aec0;
    opacity: 1;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.form-group label {
    display: block;
    text-align: left;
    margin-bottom: 6px;
}

h1, h2, h3 { font-family: var(--font-heading); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---------- Шапка ---------- */
header.site-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue);
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.main-nav a {
    font-weight: 600;
    transition: color 0.3s;
}
.main-nav a:hover { color: var(--orange); }
.main-nav form { margin: 0; }
.main-nav button {
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    text-decoration: underline;
    font-size: 1rem;
}
.main-nav button:hover { color: var(--orange); }

/* ---------- Основной контент ---------- */
.site-content { padding: 40px 0; min-height: 70vh; }

/* ---------- Подвал ---------- */
.site-footer {
    background: var(--blue);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.social-links a {
    color: white;
    margin-left: 10px;
    font-size: 1.2rem;
}

/* ---------- Секции ---------- */
.section { margin: 60px 0; }

.hero {
    background: linear-gradient(135deg, var(--blue), #2c5282);
    color: white;
    padding: 80px 20px;
    border-radius: 12px;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; }
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--orange);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}
.btn:hover { background: #e08c00; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; padding: 14px; font-size: 1.1rem; }

.about-grid {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 30px;
}
.about-image img {
    width: 250px;
    border-radius: 50%;
    border: 4px solid var(--orange);
}
.stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}
.stats div span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}
.card i {
    font-size: 2rem;
    color: var(--orange);
    margin-bottom: 15px;
}
.price {
    font-weight: 700;
    color: var(--blue);
    margin-top: 10px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.step {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.step-icon {
    width: 40px;
    height: 40px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: 700;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.testimonial {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-style: italic;
}
.testimonial strong {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: var(--blue);
}

/* ---------- Календарь ---------- */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.calendar-table th {
    background: var(--blue);
    color: white;
    padding: 10px;
}
.calendar-table td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
    height: 100px;
    width: 14.28%;
}
.calendar-table .other-month { opacity: 0.4; }
.day-number { font-weight: 700; margin-bottom: 5px; }
.lesson-scheduled { background-color: #e6f7e6; }  /* зелёный – запланировано */
.lesson-cancelled { background-color: #fee2e2; text-decoration: line-through; }
.lesson-postponed { background-color: #fef3c7; }  /* жёлтый – перенесено */
.lesson-completed { background-color: #e0f0ff; }  /* голубой – проведено */

/* ---------- Формы (регистрация / вход) ---------- */
.register-form {
    max-width: 520px;
    margin: 20px auto;
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    box-sizing: border-box;
}
.register-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3a5f;
    font-size: 1.8rem;
}

/* Горизонтальная группа: label слева, input справа */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}
.form-group label {
    width: 140px;          
    flex-shrink: 0;
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Поля ввода занимают всё оставшееся место и выравниваются правым краем */
.form-control {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #ffffff;
    color: #333;
    box-sizing: border-box;
    min-width: 0;
}
.form-control:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
    outline: none;
}

/* Блок с чекбоксом – оставляем в той же строке, но не ломаем вертикаль */
.privacy-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
    flex-wrap: wrap;
}
.privacy-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    flex-shrink: 0;
}
.privacy-section label {
    font-weight: normal;
    flex: 1;
    margin-bottom: 0;
    line-height: 1.3;
    width: auto;
}
.read-agreement-btn {
    background: none;
    border: none;
    color: #1e3a5f;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0;
    white-space: nowrap;
}
.read-agreement-btn:hover { color: #f59e0b; }

/* ---------- Модальное окно ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    width: 100%;
}
.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
}
.modal-close:hover { color: #333; }

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
    .header-container { flex-direction: column; text-align: center; }
    .main-nav { margin-top: 10px; justify-content: center; }
    .about-grid { flex-direction: column; }
    .stats { justify-content: center; }
    .register-form { padding: 25px 20px; }
    .hero h1 { font-size: 1.8rem; }
}

/* ---------- 404 ---------- */
.error-page {
    text-align: center;
    padding: 80px 20px;
}
.error-page h1 {
    font-size: 120px;
    font-weight: 700;
    color: var(--blue);
    margin: 0;
    line-height: 1;
}
.error-page h2 {
    font-size: 28px;
    margin: 20px 0 10px;
    color: #333;
}
.error-page p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* ---------- Календарь (стиль и инлайн из calendar.html) ---------- */
.calendar-nav select, .calendar-nav button { margin: 0 5px; }
.calendar-table td.today { background-color: #e0f0ff; }
.calendar-table td.has-lessons { background-color: #e6f7e6; }
.slot-badge {
    display: block;
    background: #1e3a5f;
    color: white;
    padding: 8px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    position: relative;
}
.slot-time { font-weight: bold; }
.slot-meta { font-size: 0.8rem; opacity: 0.9; margin-top: 4px; }

/* Бейджи */
.badge-free, .badge-full, .badge-level, .badge-lessons {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.badge-free { background: #28a745; color: white; margin-left: 5px; }
.badge-full { background: #dc3545; color: white; margin-left: 5px; }
.badge-level { background: #f59e0b; color: white; margin-left: 5px; }
.badge-lessons { background: #6f42c1; color: white; margin-left: 10px; }

.slot-badge.lesson-cancelled {
    background: #dc3545;
    text-decoration: line-through;
    opacity: 0.7;
}
.slot-badge.lesson-postponed { background: #ffc107; color: #333; }
.slot-badge.lesson-completed { background: #17a2b8; }
.no-lessons { color: #999; font-style: italic; font-size: 0.85rem; }

/* Статистика пользователя (инлайн стили из calendar.html) */
.user-stats { text-align: center; margin-bottom: 15px; font-size: 0.95rem; }
.level-not-set { color: #666; }

/* ---------- Inline styles, перенесённые из base.html ---------- */
.nav-user-name {
    margin-left: 15px;
}
.btn-logout {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    font-size: 1rem;
    padding: 0;
}
.btn-logout:hover {
    color: var(--orange);
}

/* ---------- Inline styles, перенесённые из login.html ---------- */
.login-link {
    text-align: center;
    margin-top: 15px;
}

/* ---------- Inline styles, перенесённые из register.html ---------- */
.privacy-checkbox {
    flex-shrink: 0;
}
.privacy-label {
    font-weight: normal;
    flex: 1;
    margin-bottom: 0;
    line-height: 1.3;
}
.privacy-text {
    text-align: center;
    margin-top: 15px;
}

/* ---------- Inline styles, перенесённые из calendar.html ---------- */
.calendar-nav {
    text-align: center;
    margin-bottom: 20px;
}
.calendar-nav select {
    padding: 5px;
    margin: 0 5px;
}
.calendar-nav .btn {
    margin: 0 5px;
}
