/* 杏林元真中医馆 - public website styles */
:root {
  --ink: #20352d;
  --pine: #28563a;
  --leaf: #5f7f52;
  --rice: #f7f3ea;
  --mist: #eef4f0;
  --clay: #b56f45;
  --gold: #c8a76a;
  --paper: rgba(255, 255, 255, 0.88);
  --line: rgba(32, 53, 45, 0.13);
  --shadow: 0 20px 55px rgba(32, 53, 45, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: #26382f !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Microsoft YaHei", sans-serif !important;
  background:
    radial-gradient(circle at top left, rgba(200, 167, 106, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 12%, rgba(40, 86, 58, 0.15), transparent 28rem),
    linear-gradient(180deg, #fbf7ee 0%, #f3efe4 42%, #eef4f0 100%) !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.font-serif {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", serif !important;
  letter-spacing: 0.02em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(32, 53, 45, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 53, 45, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

header {
  box-shadow: 0 12px 30px rgba(32, 53, 45, 0.06);
}

header .rounded.bg-pine {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 12px 24px rgba(40, 86, 58, 0.18);
}

header .rounded.bg-pine::after {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.18rem;
  content: "";
}

a {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
  transform: translateY(-1px);
}

main > section:first-child {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(238, 244, 240, 0.96), rgba(247, 243, 234, 0.86)),
    radial-gradient(circle at 16% 26%, rgba(181, 111, 69, 0.18), transparent 22rem) !important;
}

main > section:first-child::before,
main > section:first-child::after {
  position: absolute;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  content: "";
  border: 1px solid rgba(181, 111, 69, 0.22);
  transform: rotate(45deg);
}

main > section:first-child::before {
  right: -8rem;
  top: -9rem;
}

main > section:first-child::after {
  bottom: -12rem;
  left: -10rem;
}

main > section:first-child h1 {
  text-shadow: 0 10px 28px rgba(32, 53, 45, 0.12);
}

.bg-white {
  background-color: var(--paper) !important;
}

.shadow-sm,
.shadow-md,
.shadow-lg {
  box-shadow: var(--shadow) !important;
}

.rounded {
  border-radius: 0.85rem !important;
}

.rounded.bg-white,
article.rounded,
section.rounded {
  border: 1px solid rgba(32, 53, 45, 0.1);
}

article.rounded,
.rounded.bg-white {
  backdrop-filter: blur(8px);
}

article.rounded:hover,
a.block.rounded:hover {
  box-shadow: 0 24px 70px rgba(32, 53, 45, 0.16) !important;
}

.bg-clay {
  background: linear-gradient(135deg, #b56f45, #9f5436) !important;
  box-shadow: 0 12px 28px rgba(181, 111, 69, 0.22);
}

.bg-clay:hover {
  background: linear-gradient(135deg, #28563a, #20352d) !important;
}

.border-pine {
  border-color: rgba(40, 86, 58, 0.55) !important;
}

.text-pine {
  color: var(--pine) !important;
}

.text-clay {
  color: #a45e3b !important;
}

.bg-mist {
  background-color: rgba(238, 244, 240, 0.86) !important;
}

.bg-rice {
  background-color: rgba(247, 243, 234, 0.95) !important;
}

.text-ink {
  color: var(--ink) !important;
}

img[alt*="二维码"] {
  border: 1px solid rgba(32, 53, 45, 0.12);
  box-shadow: 0 14px 34px rgba(32, 53, 45, 0.1);
}

img[alt*="医师"] {
  border: 1px solid rgba(32, 53, 45, 0.1);
  background: #f4eee1;
}

footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  position: absolute;
  right: -7rem;
  top: -8rem;
  width: 19rem;
  height: 19rem;
  content: "";
  border: 1px solid rgba(200, 167, 106, 0.28);
  transform: rotate(45deg);
}

.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 82% 18%, rgba(111, 176, 128, 0.26), transparent 18rem),
    radial-gradient(circle at 18% 72%, rgba(181, 111, 69, 0.16), transparent 24rem),
    linear-gradient(135deg, #fff8ea 0%, #f4f0e8 48%, #e8f3ee 100%);
}

.home-hero::before {
  position: absolute;
  left: clamp(1rem, 4vw, 4rem);
  top: clamp(1rem, 4vw, 4rem);
  width: clamp(10rem, 22vw, 18rem);
  height: clamp(10rem, 22vw, 18rem);
  pointer-events: none;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  filter: blur(18px);
}

.home-hero::after {
  position: absolute;
  right: clamp(1rem, 6vw, 7rem);
  bottom: clamp(1rem, 5vw, 4rem);
  z-index: 0;
  width: clamp(13rem, 30vw, 26rem);
  height: clamp(13rem, 30vw, 26rem);
  content: "";
  border: 1px solid rgba(32, 53, 45, 0.08);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
    radial-gradient(circle, rgba(181, 111, 69, 0.12), transparent 58%);
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.72fr);
  gap: clamp(2rem, 7vw, 6rem);
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(3.6rem, 7vw, 6rem);
  z-index: 1;
}

.home-badge-row,
.home-section-title p,
.home-closing p {
  color: #9f5436;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  letter-spacing: 0;
}

.home-badge-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(181, 111, 69, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: #8d553f;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.home-hero-copy h1 {
  max-width: 7.8em;
  margin-top: 1.4rem;
  color: #16352a;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-size: clamp(3.05rem, 7.5vw, 6.5rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.045em;
  text-shadow: none;
}

.home-hero-copy h1 span {
  display: block;
}

.home-lead {
  max-width: 38rem;
  margin-top: 1.7rem;
  color: #3e5148;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  line-height: 2.05;
}

.home-actions .mt-8 {
  margin-top: 2rem !important;
}

.home-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  max-width: 36rem;
  margin-top: 2.2rem;
}

.home-hero-tags span {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(32, 53, 45, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: #385247;
  font-size: 0.92rem;
}

.home-namecard {
  position: relative;
  align-self: end;
  overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid rgba(32, 53, 45, 0.1);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 100% 0, rgba(181, 111, 69, 0.16), transparent 15rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 246, 238, 0.78));
  box-shadow: 0 30px 90px rgba(32, 53, 45, 0.14);
  backdrop-filter: blur(16px);
}

.home-namecard > p {
  position: relative;
  color: #9f5436;
  font-size: 0.95rem;
  font-weight: 800;
}

.home-namecard h2 {
  position: relative;
  margin-top: 0.7rem;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
}

.home-qr-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 1.3rem;
  background: rgba(255, 255, 255, 0.7);
}

.home-qr-row img {
  width: 8.5rem;
  height: 8.5rem;
  padding: 0.45rem;
  border-radius: 1rem;
  background: #fff;
}

.home-qr-row span {
  color: #22392f;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}

.home-namecard dl {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.home-namecard dt {
  color: rgba(32, 53, 45, 0.5);
  font-size: 0.78rem;
}

.home-namecard dd {
  margin-top: 0.18rem;
  color: #293f34;
  line-height: 1.65;
}

.home-section {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(3.8rem, 7vw, 6.2rem) 0;
}

.home-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.home-section-title h2,
.home-closing h2 {
  max-width: 15em;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.home-section-title a {
  color: var(--pine);
  font-weight: 800;
}

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

.home-intro-grid article {
  min-height: 13rem;
  padding: 1.55rem;
  border: 1px solid rgba(32, 53, 45, 0.1);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 20px 60px rgba(32, 53, 45, 0.07);
}

.home-intro-grid strong {
  color: #9f5436;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
}

.home-intro-grid h3 {
  margin-top: 1.4rem;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif !important;
  font-size: 1.45rem;
  font-weight: 800;
}

.home-intro-grid p {
  margin-top: 1rem;
  color: #566a60;
  line-height: 1.8;
}

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

.home-service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 16rem;
  padding: 1.5rem;
  border: 1px solid rgba(32, 53, 45, 0.09);
  border-radius: 1.55rem;
  background:
    radial-gradient(circle at 90% 0, rgba(181, 111, 69, 0.14), transparent 9rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 243, 234, 0.78));
  box-shadow: 0 18px 55px rgba(32, 53, 45, 0.09);
}

.home-service-card::after {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  content: "";
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(40, 86, 58, 0.14);
  border-radius: 999px;
}

.home-service-card em {
  display: block;
  margin-bottom: 3.6rem;
  color: rgba(181, 111, 69, 0.74);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.16em;
}

.home-service-card span {
  display: block;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.28;
}

.home-service-card small {
  display: block;
  margin-top: 1rem;
  color: #566a60;
  line-height: 1.7;
}

.home-service-card b {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(40, 86, 58, 0.08);
  color: #28563a;
  font-size: 0.82rem;
}

.home-doctors {
  width: 100%;
  padding-inline: max(1rem, calc((100vw - 78rem) / 2));
  background:
    linear-gradient(180deg, rgba(238, 244, 240, 0.84), rgba(247, 243, 234, 0.82));
}

.home-doctor-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.home-doctor-strip article {
  overflow: hidden;
  border: 1px solid rgba(32, 53, 45, 0.1);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.home-doctor-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0.65rem 0.65rem 0;
  background: #fff;
  object-fit: contain;
  object-position: center;
}

.home-doctor-strip div {
  padding: 1rem 1.15rem 1.25rem;
}

.home-doctor-strip h3 {
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 1.32rem;
  font-weight: 800;
}

.home-doctor-strip p {
  margin-top: 0.25rem;
  color: #a45e3b;
  font-weight: 800;
}

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

.home-article-list a {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(32, 53, 45, 0.1);
  background: rgba(255, 255, 255, 0.38);
}

.home-article-list span {
  color: #a45e3b;
  font-size: 0.86rem;
  font-weight: 800;
}

.home-article-list strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
}

.home-closing {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 1.8rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(181, 111, 69, 0.34), transparent 16rem),
    linear-gradient(135deg, rgba(32, 53, 45, 0.96), rgba(34, 76, 52, 0.94));
  box-shadow: 0 26px 70px rgba(32, 53, 45, 0.2);
}

.home-closing h2 {
  margin-top: 0.8rem;
  color: #fffaf0;
}

.home-closing .border-pine {
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
}

.health-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.health-article {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.article-hero-card,
.article-card,
.sidebar-card {
  border: 1px solid rgba(32, 53, 45, 0.1);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.article-hero-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 240, 0.88)),
    radial-gradient(circle at 90% 0%, rgba(181, 111, 69, 0.12), transparent 18rem);
}

.article-eyebrow,
.sidebar-label {
  margin-bottom: 0.75rem;
  color: #a45e3b;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.article-hero-card h1 {
  max-width: 12em;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.16;
}

.article-hero-card > p {
  max-width: 68ch;
  margin-top: 1.4rem;
  color: #42544b;
  font-size: 1.08rem;
  line-height: 1.9;
}

.article-note {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid rgba(181, 111, 69, 0.72);
  border-radius: 0.8rem;
  color: #52645b;
  background: rgba(247, 243, 234, 0.76);
  line-height: 1.75;
}

.article-card,
.sidebar-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.article-card h2,
.sidebar-card h2 {
  color: var(--ink);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1.25;
}

.article-card p,
.article-card li,
.sidebar-card p,
.sidebar-card li {
  color: #42544b;
  line-height: 1.88;
}

.article-card p {
  margin-top: 1rem;
}

.article-list,
.article-checklist {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.article-list li,
.article-checklist li {
  position: relative;
  padding-left: 1.35rem;
}

.article-list li::before,
.article-checklist li::before {
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.45rem;
  height: 0.45rem;
  content: "";
  border-radius: 999px;
  background: var(--clay);
}

.article-checklist li::before {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--pine);
}

.article-warning {
  border-color: rgba(181, 111, 69, 0.32);
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.95), rgba(255, 255, 255, 0.92));
}

.article-service {
  background: linear-gradient(135deg, rgba(238, 244, 240, 0.98), rgba(255, 255, 255, 0.92));
}

.article-service a,
.related-card a,
.toc-card a {
  color: var(--pine);
  font-weight: 700;
}

.article-service a {
  display: inline-block;
  margin-top: 1rem;
}

.article-faq {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.faq-block {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(32, 53, 45, 0.09);
  border-radius: 0.85rem;
  background: rgba(247, 243, 234, 0.52);
}

.faq-block h3 {
  color: var(--ink);
  font-weight: 800;
}

.faq-block p {
  margin-top: 0.5rem;
}

.article-sidebar {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 1rem;
}

.consult-card img {
  width: 9rem;
  height: 9rem;
  margin-top: 1rem;
}

.consult-card .mt-8 {
  margin-top: 1.25rem !important;
}

.toc-card {
  display: grid;
  gap: 0.8rem;
}

.toc-card h2,
.related-card h2 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
}

.toc-card a {
  display: block;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(32, 53, 45, 0.08);
  font-size: 0.95rem;
}

.related-card ul {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0.88;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main section,
main article {
  animation: fadeInUp 0.32s ease-out both;
}

@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(200, 167, 106, 0.16), transparent 22rem),
      linear-gradient(180deg, #fbf7ee 0%, #eef4f0 100%) !important;
  }

  header .mx-auto {
    gap: 0.75rem;
  }

  header a[aria-label="杏林元真首页"] span:last-child span {
    display: none;
  }

  main > section:first-child::before,
  main > section:first-child::after {
    opacity: 0.42;
  }

  .home-hero::before {
    inset: 0.8rem;
    border-radius: 1.2rem;
  }

  .home-hero-inner,
  .home-intro-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-inner {
    padding: 3.5rem 0;
  }

  .home-hero-copy h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .home-namecard {
    padding: 1.35rem;
  }

  .home-card-mark {
    font-size: 6rem;
  }

  .home-qr-row {
    align-items: center;
  }

  .home-qr-row span {
    writing-mode: initial;
  }

  .home-section-title {
    display: grid;
    gap: 0.8rem;
  }

  .home-intro-grid,
  .home-service-grid,
  .home-doctor-strip,
  .home-article-list {
    grid-template-columns: 1fr;
  }

  .home-service-card {
    min-height: auto;
  }

  .home-service-card small {
    margin-top: 1rem;
  }

  .health-article-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .article-hero-card,
  .article-card,
  .sidebar-card {
    border-radius: 0.95rem;
  }
}
