/* ============================================================
   智愈补习中心 Pusat Tuisyen Intelek Jiwa
   site style - 清爽薄荷绿 + 白，教育机构气质
   ============================================================ */

:root {
  --mint: #7fd1c0;
  --mint-dark: #4fa593;
  --mint-pale: #eaf7f3;
  --blue: #8fb9e8;
  --blue-pale: #eef4fb;
  --ink: #22333b;
  --ink-soft: #5a6b72;
  --line: #e2ece8;
  --white: #ffffff;
  --shadow: 0 10px 28px rgba(79, 165, 147, 0.10);
  --radius: 18px;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, sans-serif;
  --font-serif: Georgia, "Songti SC", "SimSun", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-name {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-name small {
  display: block;
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover { color: var(--mint-dark); border-color: var(--mint); }

.nav-cta {
  background: var(--mint);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 999px;
  border-bottom: none !important;
  font-weight: 600;
  transition: background 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.25s;
}

.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.nav.open .nav-toggle span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(143, 185, 232, 0.25), transparent 60%),
    radial-gradient(760px 380px at 5% 10%, rgba(127, 209, 192, 0.28), transparent 55%),
    linear-gradient(180deg, #fbfdfc, #ffffff);
  padding: 96px 0 72px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.25;
  margin-bottom: 14px;
}

.hero .en-tag {
  color: var(--mint-dark);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.hero p {
  max-width: 640px;
  margin: 0 auto 30px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--mint); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--mint-dark); }

.btn-outline {
  background: transparent;
  color: var(--mint-dark);
  border: 1.5px solid var(--mint);
}

.btn-outline:hover { background: var(--mint-pale); }

/* ---------------- 区块通用 ---------------- */
.section { padding: 78px 0; }

.section-head { text-align: center; margin-bottom: 46px; }

.section-head .eyebrow {
  color: var(--mint-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin-bottom: 10px;
}

.section-head p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }

/* ---------------- 痛点 / 为什么选我们 ---------------- */
.pains { background: var(--mint-pale); }

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.pain-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.pain-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  background: var(--mint-pale);
}

.pain-card:nth-child(2) .icon { background: var(--blue-pale); }
.pain-card:nth-child(3) .icon { background: var(--mint-pale); }

.pain-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.pain-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------------- 课程时间表 ---------------- */
.schedule-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 30px;
}

.schedule-filters select {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  min-width: 150px;
  transition: border-color 0.2s;
}

.schedule-filters select:focus { outline: none; border-color: var(--mint); }

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

table.schedule {
  width: 100%;
  border-collapse: separate;
  border-spacing: 8px;
  min-width: 760px;
}

table.schedule th {
  background: var(--mint);
  color: #fff;
  font-weight: 600;
  padding: 13px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

table.schedule td {
  background: var(--blue-pale);
  border-radius: 10px;
  padding: 10px 12px;
  vertical-align: top;
  min-width: 120px;
  height: 86px;
}

table.schedule td .time-slot {
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
  margin-bottom: 4px;
}

table.schedule td .lesson {
  background: var(--white);
  border-left: 4px solid var(--mint);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  box-shadow: 0 3px 10px rgba(79, 165, 147, 0.08);
  font-size: 0.88rem;
}

table.schedule td .lesson .subj { font-weight: 700; color: var(--ink); }
table.schedule td .lesson .meta { color: var(--ink-soft); font-size: 0.8rem; }

table.schedule td.dimmed {
  opacity: 0.28;
  pointer-events: none;
}

.schedule-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
  display: none;
}

/* ---------------- 师资 ---------------- */
.teachers { background: var(--blue-pale); }

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.teacher-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.teacher-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 auto 14px;
}

.teacher-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.teacher-card .subj { color: var(--mint-dark); font-size: 0.88rem; margin-bottom: 10px; }
.teacher-card p { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------------- FAQ ---------------- */
.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  background: var(--white);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q .mark {
  color: var(--mint-dark);
  font-size: 1.3rem;
  transition: transform 0.25s;
  flex-shrink: 0;
}

.faq-item.open .mark { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-a p { padding: 0 22px 18px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------- 安亲班 ---------------- */
.afterschool { background: linear-gradient(180deg, #ffffff, var(--blue-pale)); }

.after-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 30px;
}

.after-intro {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.after-intro h3 { margin-bottom: 12px; font-size: 1.15rem; }
.after-intro p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 14px; }

.after-list { margin-bottom: 20px; }

.after-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.after-list li:last-child { border-bottom: none; }

.after-list .mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mint-pale);
  color: var(--mint-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* 时间线 */
.timeline {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
}

.timeline h3 { margin-bottom: 18px; font-size: 1.15rem; }

.tl-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 18px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: -2px;
  width: 2px;
  background: var(--mint-pale);
}

.tl-item:last-child::before { display: none; }

.tl-dot {
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--mint);
}

.tl-item .tl-time {
  font-size: 0.8rem;
  color: var(--mint-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tl-item .tl-title { font-weight: 700; color: var(--ink); }

.tl-item .tl-desc { color: var(--ink-soft); font-size: 0.88rem; }

/* 补习 vs 安亲 */
.vs-card {
  background: var(--mint-pale);
  border: 1px solid var(--mint);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.vs-card b { color: var(--ink); }

/* 老师头像 */
.teacher-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}

.mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mint-pale);
  color: var(--mint-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  vertical-align: middle;
}

.mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------- 地图与联系 ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: start;
}

.map-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--mint-pale);
}

.map-box iframe { display: block; width: 100%; height: 340px; border: 0; }

.contact-info {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}

.contact-info h3 { margin-bottom: 14px; }

.contact-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.contact-row .c-icon { font-size: 1.15rem; }

.contact-row a { color: var(--mint-dark); font-weight: 600; }
.contact-row a:hover { text-decoration: underline; }

.map-btn {
  display: inline-block;
  margin-top: 8px;
  color: var(--mint-dark);
  font-weight: 600;
  font-size: 0.92rem;
}

.map-btn:hover { text-decoration: underline; }

/* ---------------- 咨询表单 ---------------- */
.form-section { background: var(--mint-pale); }

.enroll-form {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }

.form-field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.form-field label em { color: #d26d6d; font-style: normal; }

.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  background: #fcfefd;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(127, 209, 192, 0.18);
}

.form-field textarea { resize: vertical; min-height: 88px; }

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 14px;
  text-align: center;
}

.form-msg {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.95rem;
}

.form-msg.ok { background: var(--mint-pale); color: var(--mint-dark); display: block; }
.form-msg.err { background: #fdecec; color: #c25757; display: block; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: 40px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-grid li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--mint); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------------- WhatsApp 悬浮按钮 ---------------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}

.wa-float:hover { transform: translateY(-3px) scale(1.04); }

/* ---------------- 管理后台页样式 ---------------- */
.admin-body { background: #f6faf8; }

.admin-header {
  background: var(--ink);
  color: #fff;
  padding: 18px 0;
}

.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header h1 { font-size: 1.2rem; }
.admin-header .logout-btn { color: rgba(255,255,255,0.85); font-size: 0.9rem; cursor: pointer; }
.admin-header .logout-btn:hover { color: var(--mint); }

.admin-main { padding: 34px 0 60px; }

.login-card {
  max-width: 380px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 26px;
  text-align: center;
}

.login-card h2 { margin-bottom: 6px; font-family: var(--font-serif); }
.login-card p { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 20px; }

.login-card input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.login-card input:focus { outline: none; border-color: var(--mint); }

.login-msg { font-size: 0.88rem; margin-top: 10px; color: #c25757; min-height: 1.2em; }

.admin-panel { display: none; }

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 11px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: 0.2s;
}

.tab-btn.active { color: var(--mint-dark); border-color: var(--mint); }
.tab-btn:hover { color: var(--mint-dark); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  margin-bottom: 22px;
}

.panel-card h3 { margin-bottom: 16px; font-size: 1.05rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; justify-content: space-between; align-items: center; }

.toolbar .hint { font-size: 0.85rem; color: var(--ink-soft); }

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

table.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

table.data-table th {
  background: var(--mint-pale);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  padding: 11px 12px;
  font-size: 0.88rem;
  border-bottom: 2px solid var(--mint);
  white-space: nowrap;
}

table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: middle;
}

table.data-table tr:hover td { background: #f9fcfa; }

.row-actions button {
  border: none;
  background: none;
  cursor: pointer;
  margin-right: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 4px 8px;
  border-radius: 6px;
}

.row-actions button:hover { background: var(--mint-pale); color: var(--mint-dark); }
.row-actions button.danger:hover { background: #fdecec; color: #c25757; }

.empty-hint { color: var(--ink-soft); font-size: 0.9rem; text-align: center; padding: 22px 0; }

/* 课程表编辑表单 */
.course-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

.course-form .form-field { margin-bottom: 0; }
.course-form .form-field.full { grid-column: 1 / -1; }

.admin-msg {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.admin-msg.ok { background: var(--mint-pale); color: var(--mint-dark); display: block; }
.admin-msg.err { background: #fdecec; color: #c25757; display: block; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .after-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: var(--shadow);
  }

  .nav.open .nav-links { display: flex; }

  .nav-toggle { display: block; }

  .hero { padding: 66px 0 52px; }
  .section { padding: 56px 0; }
}
