/* 2026 visual redesign: image-led community learning */
:root {
    --primary: #ff6b3d;
    --primary-light: #ff8b66;
    --primary-dark: #df4b22;
    --primary-bg: #fff0ea;
    --secondary: #0d2d31;
    --ink: #102c32;
    --muted: #627579;
    --canvas: #f4f1ea;
    --paper: #fffdf8;
    --mint: #d8eee8;
    --line: rgba(16, 44, 50, 0.12);
    --radius: 22px;
    --shadow: 0 12px 34px rgba(13, 45, 49, 0.08);
    --shadow-hover: 0 22px 52px rgba(13, 45, 49, 0.16);
    --transition: .28s cubic-bezier(.2,.8,.2,1);
    --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
    background: radial-gradient(circle at 2% 6%, rgba(216, 238, 232, .8), transparent 28rem), var(--canvas);
    color: var(--ink);
}
button, input, select { font-family: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid rgba(255, 107, 61, .28);
    outline-offset: 3px;
}
.container { max-width: 1240px; padding: 0 28px; }

.header {
    background: rgba(244, 241, 234, .88);
    border-bottom: 1px solid rgba(16, 44, 50, .08);
    backdrop-filter: blur(18px);
}
.header-inner { height: 76px; }
.logo { gap: 12px; color: var(--ink); font-size: 20px; letter-spacing: -.5px; }
.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: var(--secondary);
    box-shadow: 5px 5px 0 var(--primary);
    transform: rotate(-3deg);
}
.logo-mark i { padding: 0; background: transparent; font-size: 20px; transform: rotate(3deg); }
.logo-copy { display: flex; flex-direction: column; line-height: 1.08; }
.logo-copy small { color: var(--muted); font-size: 10px; letter-spacing: 2.6px; font-weight: 700; margin-top: 5px; }
.nav { gap: 4px; padding: 5px; background: rgba(255,255,255,.62); border: 1px solid rgba(16,44,50,.08); border-radius: 999px; }
.nav a { padding: 9px 18px; border-radius: 999px; color: #496065; font-size: 14px; }
.nav a.active { background: var(--secondary); color: white; box-shadow: none; }
.nav a.active:hover { background: #174247; }
.nav .badge { min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; background: var(--primary); }

.location-bar { padding: 9px 0; color: #dceae8; background: var(--secondary); border: 0; }
.location-bar .inner { color: #dceae8; font-size: 13px; }
.location-bar strong { color: white; }
.location-bar .inner i { color: #ff9b7d; }
.btn-locate { margin-left: 10px; color: white; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.btn-locate:hover { color: white; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }

.main { padding: 30px 0 70px; }
.hero {
    min-height: 430px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    position: relative;
    border-radius: 34px;
    background: var(--secondary);
    box-shadow: 0 28px 70px rgba(13, 45, 49, .18);
    margin-bottom: 26px;
}
.hero::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    left: -180px;
    bottom: -230px;
    border: 70px solid rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero-copy { padding: 58px 44px 48px; position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #a9d7ce; font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--primary); border-radius: 9px; }
.hero h1 { max-width: 520px; margin: 20px 0 16px; color: white; font-size: clamp(40px, 5vw, 64px); line-height: 1.06; letter-spacing: -3px; }
.hero h1 em { color: #ff9878; font-style: normal; }
.hero-copy > p { max-width: 500px; color: #bad0cf; font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 800; transition: var(--transition); }
.hero-btn.primary { color: white; background: var(--primary); box-shadow: 0 10px 25px rgba(255,107,61,.25); }
.hero-btn.primary:hover { background: #ff815c; transform: translateY(-2px); }
.hero-btn.ghost { color: white; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.06); }
.hero-btn.ghost:hover { background: rgba(255,255,255,.13); }
.hero-stats { display: flex; gap: 26px; margin-top: 36px; color: white; }
.hero-stat { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.22); }
.hero-stat strong { display: block; font-size: 21px; line-height: 1.1; }
.hero-stat span { display: block; color: #9fbcbb; font-size: 11px; margin-top: 6px; }
.hero-media { min-height: 430px; position: relative; overflow: hidden; }
.hero-media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--secondary) 0%, transparent 35%), linear-gradient(0deg, rgba(13,45,49,.52), transparent 45%); }
.hero-note { position: absolute; z-index: 2; right: 24px; bottom: 24px; max-width: 270px; color: var(--ink); background: rgba(255,253,248,.93); backdrop-filter: blur(12px); padding: 15px 17px; border-radius: 17px; box-shadow: 0 14px 34px rgba(0,0,0,.2); cursor: pointer; transition: var(--transition); }
.hero-note:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(0,0,0,.26); }
.hero-note .note-row { display: flex; align-items: center; gap: 10px; }
.hero-note .note-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: white; background: var(--primary); }
.hero-note strong { display: block; font-size: 14px; }
.hero-note small { color: var(--muted); font-size: 11px; }

.benefit-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin: 0 0 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.benefit { display: flex; align-items: center; gap: 12px; padding: 15px 18px; background: rgba(255,253,248,.8); }
.benefit i { color: var(--primary); font-size: 18px; }
.benefit strong { display: block; font-size: 13px; }
.benefit span { color: var(--muted); font-size: 11px; }

.tabs { width: max-content; padding: 5px; margin: 0 0 22px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.65); box-shadow: none; }
.tabs .tab { padding: 10px 20px; border-radius: 999px; color: var(--muted); }
.tabs .tab.active { color: white; background: var(--secondary); }
.tabs .tab.active:hover { background: #174247; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { color: var(--ink); font-size: 30px; line-height: 1.2; letter-spacing: -1px; }
.section-heading p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.category-chips::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; color: #496065; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.8); transition: var(--transition); }
.category-chip i { color: var(--primary); }
.category-chip:hover, .category-chip.active { color: white; border-color: var(--secondary); background: var(--secondary); transform: translateY(-1px); }
.category-chip.active i { color: #ff9b7d; }

.filter-bar { margin: 8px 0 20px; padding: 12px; gap: 10px 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.88); box-shadow: none; }
.filter-bar .search-box { min-width: 260px; padding: 0 15px; border: 0; border-radius: 13px; background: #eef1ec; }
.filter-bar .search-box input { padding: 11px 10px; }
.filter-group label { color: var(--muted); font-size: 12px; }
.filter-group select, .filter-group .sort-btn { min-height: 40px; color: #41565a; border-color: var(--line); border-radius: 12px; background-color: white; }
.filter-group .sort-btn.active { color: white; border-color: var(--secondary); background: var(--secondary); }
.stats-row { margin-bottom: 16px; color: var(--muted); }
.stats-row strong { color: var(--ink); }

.course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.course-card { overflow: hidden; padding: 0; border: 1px solid rgba(16,44,50,.08); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.course-card:hover { transform: translateY(-7px); border-color: rgba(16,44,50,.14); box-shadow: var(--shadow-hover); }
.course-card .course-media { height: 210px; position: relative; overflow: hidden; background: #dce8e5; }
.course-card .course-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.course-card:hover .course-media img { transform: scale(1.055); }
.course-card .course-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,28,31,.45), transparent 48%); pointer-events: none; }
.media-badges { position: absolute; z-index: 2; inset: 13px 13px auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.category-badge, .distance-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 5px 10px; border-radius: 999px; color: var(--ink); background: rgba(255,253,248,.9); backdrop-filter: blur(10px); font-size: 11px; font-weight: 800; }
.category-badge.featured { color: white; background: rgba(255,107,61,.94); box-shadow: 0 6px 18px rgba(255,107,61,.28); }
.distance-badge { color: white; background: rgba(13,45,49,.78); }
.course-card .status-badge { position: absolute; z-index: 2; right: 13px; bottom: 13px; padding: 5px 10px; font-size: 11px; background: #1d8e6c; box-shadow: 0 5px 15px rgba(0,0,0,.15); }
.course-card .status-badge.full { background: #5b6668; }
.course-card .status-badge.ended { background: #6b7273; }
.card-body { padding: 20px 20px 18px; }
.course-card .card-top { display: block; margin: 0; }
.course-card .card-title { font-size: 20px; letter-spacing: -.4px; }
.course-card .card-title a:hover { color: var(--primary-dark); }
.course-card .course-desc { min-height: 42px; margin: 8px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .card-meta { display: grid; gap: 9px; margin: 0; font-size: 12px; }
.course-card .card-meta .meta-item { min-width: 0; gap: 8px; color: #52676b; }
.course-card .card-meta .meta-item i { width: 15px; color: var(--primary); }
.course-card .card-meta .meta-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(16,44,50,.08); }
.teacher-profile { display: flex; align-items: center; gap: 9px; min-width: 0; }
.teacher-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: white; border-radius: 50%; background: var(--secondary); font-size: 12px; font-weight: 800; }
.teacher-profile strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.teacher-profile small { display: block; color: var(--muted); font-size: 10px; }
.seat-info { min-width: 92px; text-align: right; color: var(--muted); font-size: 10px; }
.seat-info strong { color: var(--primary-dark); font-size: 12px; }
.seat-info .bar-wrap { width: 92px; height: 4px; margin: 6px 0 0 auto; background: #e4e8e3; }
.seat-info .bar-fill { height: 100%; border-radius: 99px; background: var(--primary); }
.course-card .card-footer { margin: 16px 0 0; padding: 15px 0 0; border-top: 1px dashed rgba(16,44,50,.14); }
.course-card .price { color: var(--ink); font-size: 24px; letter-spacing: -1px; }
.course-card .price small { color: var(--muted); font-size: 11px; }
.course-card .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border-radius: 12px; background: var(--secondary); font-size: 12px; }
.course-card .btn-primary:hover { background: var(--primary); transform: translateY(-1px); }
.course-card .btn-primary.outline { color: #1d8e6c; border-color: #1d8e6c; background: #e5f5ef; }

.pagination-wrap { margin-top: 34px; }
.pagination-wrap button { border-color: var(--line); border-radius: 12px; background: var(--paper); }
.pagination-wrap button.active { border-color: var(--secondary); background: var(--secondary); }

.enroll-item { padding: 14px; border: 1px solid var(--line); border-left: 0; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.enroll-thumb { width: 112px; height: 86px; flex: 0 0 auto; overflow: hidden; border-radius: 14px; background: #dce8e5; }
.enroll-thumb img { width: 100%; height: 100%; object-fit: cover; }
.enroll-item .actions .btn-sm { border-radius: 11px; }

.modal-overlay { background: rgba(5, 24, 27, .7); backdrop-filter: blur(10px); }
.modal { max-width: 650px; padding: 0 34px 30px; overflow-x: hidden; border-radius: 26px; background: var(--paper); }
.modal .close-btn { z-index: 5; top: 15px; right: 15px; color: white; border: 1px solid rgba(255,255,255,.3); background: rgba(13,45,49,.55); backdrop-filter: blur(8px); }
.detail-hero { height: 270px; position: relative; margin: 0 -34px 25px; overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,34,38,.72), transparent 60%); }
.detail-hero-copy { position: absolute; z-index: 2; right: 28px; bottom: 23px; left: 28px; color: white; }
.detail-hero-copy h2 { color: white; font-size: 27px; margin: 5px 0 0; }
.detail-hero-copy .subtitle { color: rgba(255,255,255,.76); margin: 4px 0 0; }
.modal .detail-row { border-bottom-color: rgba(16,44,50,.08); }
.modal .status-badge {
    min-width: 56px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}
.modal .btn-primary {
    min-width: 132px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 22px !important;
    color: white;
    background: var(--secondary);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}
.modal .btn-primary.outline:disabled {
    color: #17795f !important;
    border: 1px solid #9dd8c6;
    background: #e5f5ef !important;
    opacity: 1;
}
.btn-pay { background: var(--secondary); }
.modal .btn-primary:hover, .btn-pay:hover { background: var(--primary); }
.pay-section { border-radius: 18px; background: #eef3ef; }

.empty-state { border: 1px dashed rgba(16,44,50,.18); border-radius: 22px; background: rgba(255,253,248,.65); }
.toast { border-radius: 14px; }

@media (max-width: 1050px) {
    .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-copy { padding: 48px 34px; }
    .hero h1 { font-size: 48px; }
}
@media (max-width: 800px) {
    .container { padding: 0 18px; }
    .header-inner { flex-wrap: nowrap; }
    .logo-copy small { display: none; }
    .hero { grid-template-columns: 1fr; }
    .hero-copy { padding: 42px 28px 32px; }
    .hero-media { min-height: 300px; }
    .hero-media::after { background: linear-gradient(0deg, rgba(13,45,49,.56), transparent 50%); }
    .benefit-strip { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .course-grid { grid-template-columns: 1fr; }
    .course-card .course-media { height: 250px; }
}
@media (max-width: 540px) {
    .container { padding: 0 14px; }
    .header-inner { height: 66px; padding: 0; }
    .logo-mark { width: 36px; height: 36px; border-radius: 12px; }
    .logo-copy { font-size: 15px; }
    .nav { background: transparent; border: 0; padding: 0; }
    .nav a { padding: 8px 10px; font-size: 0; }
    .nav a i { font-size: 16px; }
    .nav .badge { font-size: 9px; }
    .location-bar .inner { align-items: stretch; }
    .location-summary { display: none; }
    .hero { border-radius: 24px; min-height: 0; }
    .hero-copy { padding: 34px 22px 28px; }
    .hero h1 { margin-top: 16px; font-size: 38px; letter-spacing: -2px; }
    .hero-copy > p { font-size: 14px; }
    .hero-actions { margin-top: 22px; }
    .hero-btn { flex: 1; padding: 12px 14px; }
    .hero-stats { gap: 14px; margin-top: 28px; }
    .hero-stat { padding-left: 10px; }
    .hero-stat strong { font-size: 17px; }
    .hero-media { min-height: 240px; }
    .hero-note { right: 14px; bottom: 14px; left: 14px; max-width: none; }
    .benefit { padding: 13px 15px; }
    .tabs { width: 100%; }
    .filter-bar { align-items: stretch; }
    .filter-group { overflow-x: auto; flex-wrap: nowrap; }
    .filter-group label { display: none; }
    .filter-group select { max-width: 125px; }
    .course-card .course-media { height: 215px; }
    .card-body { padding: 18px 17px 16px; }
    .course-card .card-top { align-items: initial; }
    .course-card .card-footer { flex-direction: row; align-items: center; }
    .enroll-thumb { width: 100%; height: 150px; }
    .modal { padding: 0 20px 24px; }
    .detail-hero { height: 220px; margin: 0 -20px 22px; }
    .detail-hero-copy { left: 20px; right: 20px; }
}
