:root {
    --bg: #f3efe7;
    --surface: rgba(255, 252, 246, 0.95);
    --text: #1f1a17;
    --muted: #62574e;
    --line: #d9ccbd;
    --primary: #6e4b2a;
    --primary-dark: #52361d;
    --accent-gold: #b78a3f;
    --accent-ink: #23313b;
    --accent-olive: #6f7b5b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 12%, rgba(183, 138, 63, 0.14), transparent 30%),
        radial-gradient(circle at 90% 18%, rgba(35, 49, 59, 0.1), transparent 30%),
        radial-gradient(circle at 78% 82%, rgba(111, 123, 91, 0.12), transparent 34%),
        linear-gradient(180deg, #f7f1e8 0%, #eee6d8 100%);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
}

body::before {
    width: 340px;
    height: 340px;
    top: -90px;
    left: -110px;
    background: radial-gradient(circle at 35% 35%, rgba(183, 138, 63, 0.22), rgba(255, 245, 225, 0.1) 65%, transparent 75%);
}

body::after {
    width: 400px;
    height: 400px;
    right: -140px;
    bottom: -130px;
    background: radial-gradient(circle at 45% 40%, rgba(35, 49, 59, 0.18), rgba(111, 123, 91, 0.14) 65%, transparent 76%);
}

body.has-page-background {
    background-image:
        linear-gradient(rgba(247, 241, 232, 0.84), rgba(238, 230, 216, 0.86)),
        var(--page-background-url);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.site-header {
    background: linear-gradient(90deg, rgba(252, 248, 241, 0.96), rgba(246, 239, 228, 0.96));
    border-bottom: 1px solid #d9c7b0;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.18rem;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.logo-badge {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 250, 242, 0.9);
    box-shadow: 0 4px 10px rgba(82, 54, 29, 0.12);
    background: linear-gradient(145deg, #fff8ee, #f4eadb);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
    color: var(--accent-ink);
    background: rgba(183, 138, 63, 0.1);
}

.site-main {
    padding: 2rem 0 3rem;
    animation: fade-slide-in 0.55s ease both;
}

.content-card {
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(250, 245, 237, 0.97));
    border: 1px solid #d9ccbd;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 14px 32px rgba(64, 46, 28, 0.1);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 8% 12%, rgba(183, 138, 63, 0.1), transparent 26%),
        radial-gradient(circle at 92% 10%, rgba(35, 49, 59, 0.08), transparent 24%),
        radial-gradient(circle at 90% 90%, rgba(111, 123, 91, 0.08), transparent 26%);
}

h1 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    line-height: 1.15;
    color: var(--primary-dark);
}

h2 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
    color: var(--accent-ink);
}

h3 {
    color: var(--accent-ink);
    margin-top: 0;
}

p {
    margin-top: 0;
    color: var(--muted);
}

.lang-switcher {
    display: flex;
    gap: 0.45rem;
}

.lang-btn {
    border: 1px solid #d8c6af;
    background: #fbf5ec;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    color: var(--muted);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--accent-gold);
    color: var(--primary-dark);
}

.lang-btn.is-active {
    background: linear-gradient(90deg, #7b5731, #b78a3f);
    border-color: transparent;
    color: #fff;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 0.9rem;
}

.hero-block {
    max-width: 760px;
    padding-bottom: 0.6rem;
}

.hero-lead,
.section-intro {
    font-size: 1.08rem;
    max-width: 60ch;
}

.feature-section + .feature-section {
    margin-top: 2.25rem;
}

.feature-grid,
.story-grid,
.highlight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-card,
.story-card,
.highlight-item,
.team-member-card,
.course-card,
.contact-card {
    border: 1px solid #ddd0c0;
    border-radius: 14px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.95), rgba(246, 238, 227, 0.92));
    box-shadow: 0 10px 22px rgba(64, 46, 28, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover,
.story-card:hover,
.highlight-item:hover,
.team-member-card:hover,
.course-card:hover,
.contact-card:hover,
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(64, 46, 28, 0.14);
}

.team-grid,
.courses-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.course-meta {
    display: grid;
    gap: 0.25rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.schedule-wrap {
    margin-top: 1rem;
    overflow-x: auto;
    animation: card-pop 0.45s ease both;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--line);
    padding: 0.7rem;
    text-align: left;
}

.schedule-table th {
    background: linear-gradient(90deg, #f2e6d4, #fbf5ea);
    color: var(--primary-dark);
}

.gallery-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.gallery-item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ddd0c0;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.team-member-card {
    text-align: center;
}

.team-member-card img {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
    border: 2px solid #e7ddcf;
}

.team-member-card h3 {
    margin: 0.4rem 0;
    font-size: 1.05rem;
}

.team-member-card .role {
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.site-footer {
    border-top: 1px solid #d9c7b0;
    background: linear-gradient(90deg, #fbf6ee, #f3eadc);
}

.footer-content {
    padding: 1.1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 0.4rem;
}

.feature-card,
.story-card,
.highlight-item,
.team-member-card,
.course-card,
.contact-card,
.gallery-item {
    animation: card-pop 0.45s ease both;
}

.feature-card:nth-child(2),
.story-card:nth-child(2),
.highlight-item:nth-child(2),
.team-member-card:nth-child(2),
.course-card:nth-child(2),
.contact-card:nth-child(2),
.gallery-item:nth-child(2) { animation-delay: 0.05s; }

.feature-card:nth-child(3),
.story-card:nth-child(3),
.highlight-item:nth-child(3),
.team-member-card:nth-child(3),
.course-card:nth-child(3),
.contact-card:nth-child(3),
.gallery-item:nth-child(3) { animation-delay: 0.1s; }

.feature-card:nth-child(4),
.team-member-card:nth-child(4),
.course-card:nth-child(4),
.contact-card:nth-child(4),
.gallery-item:nth-child(4) { animation-delay: 0.15s; }

@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-main,
    .feature-card,
    .story-card,
    .highlight-item,
    .team-member-card,
    .course-card,
    .contact-card,
    .gallery-item,
    .schedule-wrap {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .header-inner {
        min-height: auto;
        padding: 0.85rem 0;
        flex-wrap: wrap;
    }

    nav ul {
        gap: 0.1rem;
    }

    .site-main {
        padding-top: 1.2rem;
    }

    .content-card {
        padding: 1.3rem;
    }
}

@media (max-width: 560px) {
    .logo {
        width: 100%;
    }

    .lang-switcher {
        width: 100%;
    }

    .lang-btn {
        flex: 1;
    }
}
