/* ===== 符正校（阿校）对外网站 — 莫兰迪温柔治愈风 — 移动优先 ===== */

:root {
  --primary: #8BA89A;
  --bg: #FAF8F5;
  --card-bg: #F0EDE8;
  --accent: #E8926A;
  --brand-blue: #588BAE;
  --text: #3D3535;
  --text-secondary: #5D5A54;
  --border: #E5E0DA;
  --btn-primary: #4A7C64;
  --btn-primary-hover: #3D6B55;
}

/* ===== Base ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
p, li, .text-body {
  font-size: 18px;
  line-height: 1.8;
}

h1, h2, h3 {
  line-height: 1.5;
}

/* Shared heading classes */
.page-heading {
  color: var(--primary);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: bold;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-heading {
  color: var(--text);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: bold;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Supplementary / footnote text — use sparingly (service hours, copyright, etc.) */
.text-note {
  font-size: 14px;
  line-height: 1.6;
}

/* Badge adjustments for readability */
.badge {
  font-size: 0.75rem;
  font-weight: normal;
}

/* ===== Links ===== */
a {
  color: var(--primary);
}

@media (hover: hover) {
  a:hover {
    color: #6B8A7B;
  }
}
a:active {
  color: #5A7A6B;
}

/* ===== Navbar ===== */
.navbar .nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (hover: hover) {
  .navbar .nav-link:hover {
    color: var(--primary) !important;
  }
}
.navbar .nav-link:active {
  color: var(--primary) !important;
}

/* ===== Component classes ===== */
.card-panel {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.card-panel-sm {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

.section-tint-sage {
  background-color: rgba(124, 157, 142, 0.07);
}

.section-tint-tea {
  background-color: rgba(194, 162, 123, 0.07);
}

/* Index page tools teaser */
.index-tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.index-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.index-tool-icon {
  font-size: 32px;
  line-height: 1.2;
}
.index-tool-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Cards ===== */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
  }
}
.card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1) !important;
}

/* ===== Accordion ===== */
.accordion-button:not(.collapsed) {
  background-color: rgba(139, 168, 154, 0.1);
  color: var(--primary);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(139, 168, 154, 0.25);
}

/* ===== Buttons ===== */
@media (hover: hover) {
  .btn:hover {
    opacity: 0.9;
  }
}
.btn:active {
  opacity: 0.85;
}

/* Enrollment / CTA button */
.enroll-btn {
  font-size: 18px;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background-color: var(--btn-primary);
  color: #fff;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.enroll-btn:hover {
  opacity: 0.9;
  color: #fff;
}
.enroll-btn:active {
  opacity: 0.8;
}

/* "View all" outline button */
.btn-view-all {
  font-size: 18px;
  padding: 0.6rem 2rem;
  border-radius: 8px;
  min-height: 44px;
  color: var(--text);
  border: 2px solid var(--primary);
  background: transparent;
}
.btn-view-all:hover {
  background-color: rgba(139, 168, 154, 0.08);
  color: var(--text);
}

/* Featured badge */
.badge-featured {
  background-color: var(--accent);
  font-size: 12px;
}

/* Section subtitle */
.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer-brand {
  color: var(--primary);
  font-size: 18px;
}
.footer-heading {
  color: #fff;
  font-size: 16px;
}
.footer-text {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  line-height: 1.6;
}
.footer-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  display: block;
  min-height: 32px;
  line-height: 2.2;
}
.footer-link:hover {
  color: rgba(255,255,255,0.9);
}
.footer-copyright {
  font-size: 13px;
}

/* ===== Hero ===== */
.hero-title {
  animation: fadeInUp 0.8s ease;
}

/* Hero: emoji flow line */
.hero-flow {
  animation: fadeInUp 0.8s ease 0.15s both;
}

/* ===== Persona grid (about page) ===== */
.persona-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .persona-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.persona-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.persona-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.persona-icon {
  font-size: 32px;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.persona-card h3 {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.persona-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

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

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
  .card { transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Responsive ===== */
@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ===== Detail pages (story / work / course) ===== */
.detail-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.detail-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-platform-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 14px;
  padding: 3px 12px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.detail-watch-btn {
  font-size: 18px;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  min-height: 48px;
  color: #fff;
  background-color: var(--btn-primary);
  border: none;
  transition: opacity 0.2s;
}
.detail-watch-btn:hover {
  background-color: var(--btn-primary) !important;
  opacity: 0.85;
  color: #fff !important;
}
/* Bootstrap ratio extension: 9:16 vertical video */
.ratio-9x16 {
  --bs-aspect-ratio: 177.78%;
}
.detail-enroll-btn {
  font-size: 18px;
  padding: 0.75rem 2.5rem;
  border-radius: 8px;
  min-height: 48px;
  color: #fff;
  background-color: var(--btn-primary);
  border: none;
  transition: opacity 0.2s;
}
.detail-enroll-btn:hover {
  background-color: var(--btn-primary) !important;
  opacity: 0.85;
  color: #fff !important;
}

/* ===== Story/Work cards (list & index) ===== */
.story-card, .work-card {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.story-card:hover, .work-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.work-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.work-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}

.story-cover, .work-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--card-bg);
  overflow: hidden;
}
.story-cover-img, .work-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.story-card:hover .story-cover-img,
.work-card:hover .work-cover-img {
  transform: scale(1.04);
}

.story-cover-gradient, .work-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.18) 0%, transparent 35%);
  pointer-events: none;
}
.work-cover-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.20) 0%, transparent 35%);
}

.work-platform-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

/* ===== Category tabs ===== */
.category-tab {
  display: inline-block;
  padding: 8px 20px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card-bg);
  border-radius: 24px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
  min-height: 44px;
  line-height: 28px;
}
.category-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}
.category-tab.active {
  color: #fff;
  background: #A7B5A4;
  border-color: #A7B5A4;
}

/* ===== Category badge on cards ===== */
.work-category-badge {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
}

/* ===== Outline ===== */
.outline-lesson {
  font-size: 18px;
  line-height: 2.2;
  color: var(--text);
}
.outline-num {
  font-weight: bold;
}
.outline-section {
  font-weight: bold;
  font-size: 1.05em;
  margin-top: 0.8em;
  padding-top: 0.4em;
}
.outline-section:first-child {
  margin-top: 0;
}

/* ===== Print ===== */
@media print {
  footer, .navbar { display: none !important; }
}
