﻿:root {
    --bg: #f6f2e8;
    --surface: #fff9f1;
    --surface-2: #f0e8dc;
    --accent: #2e5a43;
    --accent-2: #6f4f3b;
    --text: #2e352f;
    --muted: #5e665e;
    --line: #d8cfbf;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -2;
    opacity: 0.35;
}

.bg-shape-one {
    width: 340px;
    height: 340px;
    left: -80px;
    top: -100px;
    background: #acc5a6;
}

.bg-shape-two {
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -100px;
    background: #d8c1a8;
}

.shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.brand {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.brand-admin {
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-link,
.link-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    font-size: 0.9rem;
}

.link-button {
    cursor: pointer;
}

.main-content {
    display: grid;
    gap: 1.2rem;
}

.section {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.5rem;
    padding: 1.4rem;
    box-shadow: 0 16px 36px rgba(69, 59, 44, 0.09);
}

.hero {
    background: linear-gradient(160deg, rgba(220, 233, 216, 0.88), rgba(243, 233, 218, 0.94));
}

.hero h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

.hero p,
.section p {
    color: var(--muted);
    line-height: 1.7;
}

.switcher {
    display: grid;
    gap: 0.8rem;
}

.switcher a {
    display: block;
    border-radius: 1.1rem;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 1rem;
    text-decoration: none;
}

.switcher .title {
    font-size: 1.2rem;
    font-weight: 700;
}

.switcher .desc {
    margin-top: 0.3rem;
    color: var(--muted);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

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

.course-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.6rem;
}

.course-card {
    min-width: 280px;
    max-width: 320px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    padding: 1rem;
}

.course-card h3 {
    margin: 0.45rem 0 0.35rem;
}

.course-card .button {
    margin-top: 0.65rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.course-type {
    background: #e8e4db;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
}

.course-place,
.course-price {
    font-size: 0.92rem;
    color: var(--muted);
    margin-top: 0.2rem;
}

.button {
    display: inline-block;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    border: 1px solid transparent;
    margin-top: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.button-primary {
    background: var(--accent);
    color: white;
}

.button-secondary {
    background: transparent;
    border-color: var(--line);
}

.filter-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-pill {
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    text-decoration: none;
    background: #fff;
}

.filter-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.form-grid {
    display: grid;
    gap: 0.6rem;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    padding: 0.65rem 0.8rem;
    font-size: 0.96rem;
    background: #fff;
}

.form-grid textarea {
    min-height: 130px;
    resize: vertical;
}

.field-error {
    color: #8f2f2f;
    font-size: 0.86rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flash {
    border-radius: 0.9rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.8rem;
}

.flash-success {
    background: #d7f0de;
    color: #255333;
}

.flash-error {
    background: #f7dddd;
    color: #7f2a2a;
}

.flash-info {
    background: #e8edf5;
    color: #32435c;
}

.footer {
    margin-top: 1.2rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
    display: grid;
    gap: 0.5rem;
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.footer-brand {
    font-weight: 700;
}

.footer-admin-link {
    margin-left: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.page-back-link {
    align-self: start;
    width: fit-content;
    margin-top: 0.2rem;
    margin-bottom: -0.3rem;
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0.62rem 0.95rem;
    box-shadow: 0 10px 24px rgba(29, 62, 47, 0.25);
    cursor: pointer;
    display: none;
}

.back-to-top.visible {
    display: inline-block;
}

.hidden-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.82rem;
    margin-bottom: 0.6rem;
}

.status-published { background: #d7f0de; color: #255333; }
.status-draft { background: #e8edf5; color: #32435c; }
.status-canceled { background: #f7dddd; color: #7f2a2a; }

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0.4rem;
    vertical-align: top;
}

.inline-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.inline-actions form {
    margin: 0;
}

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

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

    .brand {
        font-size: 1.6rem;
    }

    .footer-main {
        flex-direction: column;
        align-items: flex-start;
    }
}
