/* =========================================================
   CoddyKids — статический сайт-прикрытие
   Минимализм, без сторонних шрифтов, адаптив
   ========================================================= */

:root {
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-accent: #f59e0b;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --max-width: 1120px;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

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

h1, h2, h3, h4 {
    line-height: 1.25;
    color: var(--color-text);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1em;
}

/* =========================================================
   Layout
   ========================================================= */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-cta {
    background-color: var(--color-primary);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
}

.nav-cta:hover {
    background-color: var(--color-primary-dark);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    background: linear-gradient(135deg, #eef2ff 0%, #fef3c7 100%);
    padding: 80px 0 64px;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    margin-bottom: 16px;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.hero-cta:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
}

/* =========================================================
   Sections
   ========================================================= */

.section {
    padding: 64px 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    margin-top: 0;
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto;
}

/* =========================================================
   Cards / Grid
   ========================================================= */

.grid {
    display: grid;
    gap: 24px;
}

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

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

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* =========================================================
   Course cards (для courses.html)
   ========================================================= */

.course-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.course-card .course-tag {
    display: inline-block;
    background-color: #eef2ff;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.course-card h3 {
    margin-top: 0;
}

.course-card .course-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.course-card .course-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: auto;
}

.course-card .course-price span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* =========================================================
   Teacher cards
   ========================================================= */

.teacher-card {
    text-align: center;
}

.teacher-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 16px;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow-sm);
}

.teacher-card h3 {
    margin-top: 0;
    margin-bottom: 4px;
}

.teacher-card .teacher-role {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.teacher-contacts {
    list-style: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    text-align: left;
}

.teacher-contacts li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.teacher-contacts a {
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.teacher-contacts a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.teacher-contacts svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* =========================================================
   Article (blog post)
   ========================================================= */

.article {
    max-width: 720px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.article-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.article h2 {
    margin-top: 2rem;
}

.article ul, .article ol {
    margin: 1em 0 1em 1.5em;
}

.article li {
    margin-bottom: 0.4em;
}

.article blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: 16px;
    margin: 1.5em 0;
    color: var(--color-text-muted);
    font-style: italic;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* =========================================================
   Contacts
   ========================================================= */

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contacts-list {
    list-style: none;
}

.contacts-list li {
    margin-bottom: 16px;
    padding-left: 28px;
    position: relative;
}

.contacts-list li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 0.7rem;
    top: 7px;
}

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

.map-placeholder {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* =========================================================
   Stats
   ========================================================= */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
    margin: 32px 0;
}

.stat-item .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
}

.stat-item .stat-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 48px 0 24px;
    margin-top: 64px;
}

.site-footer .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.site-footer h4 {
    color: #ffffff;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    margin-top: 0;
}

.site-footer a {
    color: #d1d5db;
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 32px;
    padding-top: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    grid-column: 1 / -1;
}

/* =========================================================
   Buttons / Utilities
   ========================================================= */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .site-footer .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 48px 0;
    }

    .section {
        padding: 40px 0;
    }

    .nav {
        gap: 16px;
    }

    .nav a:not(.nav-cta) {
        display: none;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .site-footer .container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
