@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@500;700&display=swap');

:root {
  --bg: #e8f1ef;
  --bg-deep: #d5e6e2;
  --ink: #1a2e2a;
  --muted: #526965;
  --brand: #1f6f61;
  --brand-deep: #145247;
  --accent: #c46b3a;
  --surface: rgba(255, 255, 255, 0.72);
  --line: rgba(26, 46, 42, 0.12);
  --danger: #a33b3b;
  --ok: #1f6f61;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(20, 60, 52, 0.08);
  --font-sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #f7fffc 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #dceee9 0%, transparent 45%),
    linear-gradient(180deg, var(--bg), #f4f8f7 40%, #eef5f2);
  min-height: 100vh;
  line-height: 1.65;
}
a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(232, 241, 239, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 0;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 700; color: var(--ink);
  letter-spacing: 0.04em;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; border: 0; cursor: pointer;
  border-radius: 999px; padding: 0.7rem 1.25rem;
  font: inherit; font-weight: 500; transition: .2s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-contact {
  border-radius: 8px;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, #2f8f7d, #1f6f61);
  color: #fff;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 18px rgba(31, 111, 97, 0.28);
}
.btn-contact:hover {
  background: linear-gradient(135deg, #257a6b, #145247);
  color: #fff;
  transform: translateY(-1px);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.88rem; }
.nav-links .btn-contact { color: #fff; }

.hero {
  position: relative; min-height: calc(100vh - 72px);
  display: grid; align-items: end;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,50,45,0.15), rgba(20,45,40,0.55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='900' viewBox='0 0 1600 900'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%2379a89d'/%3E%3Cstop offset='1' stop-color='%233d6f66'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='900' fill='url(%23g)'/%3E%3Ccircle cx='1200' cy='180' r='220' fill='%23cfe8e1' opacity='.25'/%3E%3Ccircle cx='320' cy='680' r='280' fill='%231b4f46' opacity='.28'/%3E%3Cpath d='M0 620 C 260 540 420 740 710 680 C 980 620 1180 500 1600 560 L1600 900 L0 900 Z' fill='%2316332e' opacity='.35'/%3E%3C/svg%3E") center/cover no-repeat;
  animation: slowZoom 18s ease-in-out infinite alternate;
}
@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero-content {
  position: relative; z-index: 1; color: #f6fffc;
  padding: 4.5rem 0 3.5rem;
  animation: riseIn .9s ease both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1.05; margin: 0 0 1rem;
  letter-spacing: 0.06em;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500; margin: 0 0 0.75rem;
}
.hero p { max-width: 34rem; color: rgba(246,255,252,.88); margin: 0 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero .btn-primary { background: #f4fffb; color: var(--brand-deep); }
.hero .btn-primary:hover { background: #fff; color: var(--brand-deep); }
.hero .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }

.section { padding: 4.5rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.6rem;
}
.section-head p { margin: 0; color: var(--muted); }

.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; inset: 64px 1rem auto; flex-direction: column;
    background: #f4faf8; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
  .menu-toggle { display: inline-flex; }
}
.menu-toggle { display: none; }

.list-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.list-item h3 { margin: 0 0 0.4rem; font-size: 1.15rem; font-family: var(--font-display); }
.list-item p { margin: 0; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.9rem; }

.contact-section {
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent),
    radial-gradient(700px 280px at 0% 0%, rgba(31,111,97,.08), transparent 70%);
}
.contact-ways { max-width: 36rem; }
.contact-way {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 1.25rem;
  padding: 1.4rem 0 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.contact-label {
  font-size: 0.85rem; letter-spacing: 0.12em; color: var(--muted); text-transform: none;
}
.contact-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.08em;
  color: var(--brand-deep);
}
.contact-hint { margin: 1rem 0 0; color: var(--muted); font-size: 0.92rem; }
.footer-contact { margin: 0.6rem 0 0; }

.avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(31,111,97,.18);
  background: var(--bg-deep);
}
.avatar-lg { width: 112px; height: 112px; }
.counselor-row {
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.counselor-row:hover { color: inherit; }
.counselor-row:hover h3 { color: var(--brand); }
.counselor-row h3 {
  margin: 0 0 0.35rem; font-size: 1.15rem; font-family: var(--font-display);
}
.counselor-row p { margin: 0; color: var(--muted); }
.counselor-hero {
  display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}
.panel + .panel { margin-top: 1rem; }
.panel h3 { margin-top: 0; font-family: var(--font-display); }

.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table th, .table td { padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.92rem; }
.form-control, input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.85rem; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.alert {
  padding: 0.85rem 1rem; border-radius: 10px; margin-bottom: 1rem;
  border: 1px solid var(--line); background: #fff;
}
.alert-success { border-color: rgba(31,111,97,.35); color: var(--ok); }
.alert-error { border-color: rgba(163,59,59,.35); color: var(--danger); }

.badge {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  background: rgba(31,111,97,.12); color: var(--brand-deep); font-size: 0.8rem;
}
.badge-warn { background: rgba(196,107,58,.15); color: #8a4a24; }
.badge-muted { background: rgba(0,0,0,.06); color: var(--muted); }

.site-footer {
  margin-top: 3rem; padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem;
}
.crisis-box {
  margin-top: 1rem; padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.55);
}

.app-shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 0px); }
.sidebar {
  background: #16332e; color: #e8f5f1; padding: 1.4rem 1rem;
}
.sidebar .brand { color: #fff; display: block; margin-bottom: 1.5rem; }
.sidebar a { display: block; color: rgba(232,245,241,.8); padding: 0.55rem 0.7rem; border-radius: 8px; margin-bottom: 0.25rem; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.app-main { padding: 1.5rem; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
  .sidebar .brand { margin: 0 1rem 0 0; }
  .sidebar a { margin: 0; }
}

.chat-layout { display: grid; grid-template-rows: auto 1fr auto; height: min(78vh, 720px); }
.chat-messages { overflow: auto; padding: 1rem; background: rgba(255,255,255,.55); border-radius: 12px; border: 1px solid var(--line); }
.bubble { max-width: 78%; margin-bottom: 0.8rem; padding: 0.7rem 0.9rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.bubble.mine { margin-left: auto; background: #dff0ea; border-color: rgba(31,111,97,.2); }
.bubble .who { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.25rem; }
.chat-form { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.chat-form textarea { min-height: 54px; }

.fade-up { animation: riseIn .7s ease both; }
.page-title { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 1rem; }
.pagination { display:flex; gap:.4rem; list-style:none; padding:0; flex-wrap:wrap; }
.pagination .page-link { display:inline-block; padding:.4rem .7rem; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; }
.pagination .active .page-link { background:var(--brand); color:#fff; border-color:var(--brand); }
.pagination .disabled .page-link { opacity:.45; pointer-events:none; }
