@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Noto+Serif+TC:wght@500;700&display=swap");
@import url("base.css");

:root {
  --header: #ffffff;
  --bg: #f2fafc; /* middle block from color.png */
  --footer: #21818f; /* bottom block from color.png */
  --text: #0f1115;
  --muted: #354257;
  --border: #d8e6ee;
  --accent: #121826;
  --accent-2: #f3c86b;
  --container: 1180px;
  --shadow: 0 12px 30px rgba(18, 24, 38, 0.08);
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: var(--header);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(18, 24, 38, 0.05);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--text);
}

.logo-img {
  width: 220px;
  height: 80px;
  margin-left: -25px;
  object-fit: contain;
  display: block;
  padding-top: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-title {
  font-size: 16px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--muted);
}

.menu {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 16px;
  color: var(--text);
}

.menu a {
  padding: 10px 14px;
  border-radius: 10px;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: #16a34a;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-links img {
  width: 26px;
  height: 26px;
  display: block;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.social-links a:hover {
  background: rgba(18, 24, 38, 0.06);
}

.hero {
  position: relative;
  min-height: 64vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80")
      center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.86), rgba(242, 250, 252, 0.92));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  max-width: 740px;
  color: var(--text);
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.6px;
  background: rgba(18, 24, 38, 0.06);
  color: var(--accent);
  text-transform: uppercase;
}

h1 {
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-size: clamp(32px, 4vw, 46px);
  margin: 18px 0 14px;
  line-height: 1.2;
}

.hero p {
  margin: 0 0 24px;
  color: #202733;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.intro-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.intro-header {
  justify-self: flex-start;
  text-align: left;
}

.intro-cards {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.intro-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(18, 24, 38, 0.08);
  color: var(--text);
}

.intro-card h3 {
  margin: 0 0 4px;
}

.intro-card p {
  margin: 0;
  color: var(--muted);
}

.intro-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #ffffff;
}

.intro-blue .intro-icon {
  background: #2f6cea;
}

.intro-green .intro-icon {
  background: #229f85;
}

.intro-purple .intro-icon {
  background: #8b5cf6;
}

.intro-pink .intro-icon {
  background: #d94681;
}

.intro-orange .intro-icon {
  background: #f59e0b;
}

.intro-visual {
  justify-self: center;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  padding: 12px;
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(18, 24, 38, 0.12);
}

.intro-visual img {
  width: 100%;
  display: block;
  border-radius: 18px;
}

.intro-plan-card {
  margin-top: 24px;
  padding: 20px 22px;
  background: #e7f0f5;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(18, 24, 38, 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.intro-plan-text h3 {
  margin: 0 0 8px;
  text-align: center;
}

.intro-plan-text p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.intro-plan-card .btn.primary {
  background: #2f6cea;
  color: #ffffff;
  white-space: nowrap;
  align-self: center;
}

.slogan {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
  text-align: center;
}

.slogan-text {
  font-size: 20px;
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  margin: 0;
  color: var(--text);
}

.slogan-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-main {
  padding: 0;
  background: var(--bg);
}

:where(.hero, .slogan, .section) {
  scroll-margin-top: 77px; /* offset sticky nav;微調縮小預留 */
}

.section {
  padding: 75px 0;
  background: var(--bg);
}

.section-header {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin-bottom: 28px;
  text-align: center;
  justify-self: center;
}

.section-header.tight {
  margin-bottom: 18px;
}

.section h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.6px;
}

.section p {
  margin: 0;
  color: var(--muted);
}

.article-section {
  padding: 0 0 40px;
}

.article-header {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto 32px;
}

.article-top-back {
  color: #2b9a7f;
  font-weight: 700;
  width: fit-content;
  font-size: clamp(16px, 1.9vw, 18px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: clamp(13px, 1.8vw, 15px);
  color: #f7f9fb;
  background: var(--accent);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.article-section .article-kicker {
  color: #f7f9fb;
}

.article-section h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: 0.4px;
}

.article-separator {
  height: 1px;
  width: 100%;
  margin: 18px 0 6px;
  background: linear-gradient(90deg, rgba(16, 24, 40, 0), rgba(16, 24, 40, 0.2), rgba(16, 24, 40, 0));
}

.article-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 2.5vw, 22px);
  line-height: 1.7;
}

.article-body {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.article-image {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: 16px;
  margin: 6px auto 12px;
}

.article-body h2 {
  margin: 26px 0 6px;
  font-size: clamp(24px, 3vw, 28px);
  letter-spacing: 0.3px;
}

.article-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: clamp(17px, 2.1vw, 19px);
}

.article-teacher {
  display: grid;
  gap: 18px;
}

.article-video {
  width: 100%;
  max-width: 100%;
}

.article-video iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
}

@media (min-width: 900px) {
  .article-teacher {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 28px;
  }

  .article-teacher h2 {
    line-height: 1.25;
  }

  .article-teacher .article-video {
    padding-top: calc(26px + 1.25em + 6px);
  }
}

.article-footer {
  max-width: 820px;
  margin: 28px auto 0;
  display: grid;
  gap: 14px;
}

.article-footer hr {
  border: 0;
  border-top: 1px solid var(--border);
}

.article-back {
  color: #2b9a7f;
  font-weight: 700;
  width: fit-content;
  font-size: clamp(16px, 1.9vw, 18px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-top-back svg,
.article-back svg {
  width: 20px;
  height: 20px;
}

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

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  color: var(--text);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(18, 24, 38, 0.06);
  color: var(--accent);
  font-weight: 700;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resource-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.resource-tabs {
  position: relative;
}

.resource-tab {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.resource-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  width: min(100%, 500px);
  margin: 0 auto;
}

.switch-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.switch-btn:hover {
  color: #1fa38c;
}

.switch-btn.is-default {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(18, 24, 38, 0.18);
  border-color: transparent;
}

.resource-panels {
  position: relative;
  margin-top: 60px;
}

.resource-panel {
  display: none;
  padding: 6px 0;
}

.resource-panel-header {
  text-align: center;
  margin: 0 0 24px;
}

.resource-panel-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.resource-panel-header p {
  margin: 0;
  color: var(--muted);
}

.panel-video .case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-article .case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-graphic .case-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-video {
  display: block;
}

#tab-video:checked ~ .resource-panels .resource-panel,
#tab-article:checked ~ .resource-panels .resource-panel,
#tab-graphic:checked ~ .resource-panels .resource-panel {
  display: none;
}

#tab-video:checked ~ .resource-panels .panel-video,
#tab-article:checked ~ .resource-panels .panel-article,
#tab-graphic:checked ~ .resource-panels .panel-graphic {
  display: block;
}

#tab-video:checked ~ .resource-switch label[for="tab-video"],
#tab-article:checked ~ .resource-switch label[for="tab-article"],
#tab-graphic:checked ~ .resource-switch label[for="tab-graphic"] {
  background: #1fa38c;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(18, 24, 38, 0.18);
  border-color: transparent;
}

.case-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--text);
}

.case-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f7f9fb;
  background: var(--accent);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.case-card h3 {
  margin: 12px 0 6px;
}

.case-card p {
  margin: 0;
  color: var(--muted);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.resource-video-card .video-thumb {
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: #e7eef6;
  display: block;
  position: relative;
  cursor: pointer;
}

.resource-video-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.resource-video-card .video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.resource-video-card .video-body {
  padding: 16px 18px 18px;
}

.resource-video-card h3 {
  margin: 0 0 10px;
}

.resource-video-card .case-actions {
  justify-content: center;
}

.resource-watch {
  background: #1fa38c;
  border-color: #1fa38c;
  color: #ffffff;
  width: 100%;
  justify-content: center;
  padding: 13px 18px;
}

.resource-watch:hover {
  background: #188a76;
  border-color: #188a76;
}

.resource-article-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: stretch;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.resource-article-card .article-thumb {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e7eef6;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.resource-article-card .article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resource-article-card .article-thumb--placeholder {
  background: #e7eef6;
}

.resource-article-card .article-body {
  padding: 16px 18px;
}

.resource-article-card .article-body h3 {
  margin: 0 0 8px;
}

.resource-article-card .article-body p {
  margin: 0;
  color: var(--muted);
}

.resource-article-card .case-actions {
  margin-top: 10px;
}

.article-link {
  border-color: #1fa38c;
  color: #1fa38c;
  background: transparent;
  box-shadow: none;
}

.article-link:hover {
  background: rgba(31, 163, 140, 0.08);
  color: #188a76;
}

.resource-graphic-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.resource-graphic-card .graphic-thumb {
  width: 100%;
  padding-top: 56.25%;
  position: relative;
  background: #e7eef6;
  overflow: hidden;
}

.resource-graphic-card .graphic-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.resource-graphic-card .graphic-thumb--placeholder {
  background: #e7eef6;
}

.resource-graphic-card .graphic-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.resource-graphic-card h3 {
  margin: 0;
}

.resource-graphic-card p {
  margin: 0;
  color: var(--muted);
}

.resource-graphic-card .case-actions {
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
}

.resource-download {
  background: #1fa38c;
  border-color: #1fa38c;
  color: #ffffff;
  box-shadow: none;
}

.resource-download:hover {
  background: #188a76;
  border-color: #188a76;
}

.resource-view {
  border-color: #1fa38c;
  color: #1fa38c;
  background: transparent;
  box-shadow: none;
}

.resource-view:hover {
  background: rgba(31, 163, 140, 0.08);
  color: #188a76;
}

.resource-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 31, 0.64);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99;
}

.resource-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.resource-modal {
  position: relative;
  width: min(1100px, 92vw);
  height: min(88vh, 800px);
  background: #000;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.resource-modal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.resource-modal-close {
  position: absolute;
  top: -38px;
  right: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.resource-modal-close:hover {
  color: #e5e7eb;
}

.resource-modal-open {
  overflow: hidden;
}

.course-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}

.course-image {
  background: #f5f9fd;
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.course-content {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.course-label {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f7f9fb;
  background: var(--accent);
  font-weight: 700;
  letter-spacing: 0.4px;
  width: fit-content;
}

.course-card h3 {
  margin: 0;
  font-size: 18px;
}

.course-card p {
  margin: 0;
  color: var(--muted);
}

.timeline-root {
  position: relative;
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding: 6px 0;
}

.timeline-root::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #e0ecf7 0%, #c6d9ed 100%);
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  align-items: center;
  gap: 18px;
}

.timeline-axis {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.timeline-dot {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f8cd6 0%, #4bb4ff 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(18, 24, 38, 0.18);
}

.timeline-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(18, 24, 38, 0.12);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  position: relative;
}

.timeline-card.is-left::after,
.timeline-card.is-right::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.timeline-card.is-left::after {
  right: -20px;
  border-left-color: #ffffff;
}

.timeline-card.is-right::after {
  left: -20px;
  border-right-color: #ffffff;
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.timeline-tag.tw {
  background: #e8f5e9;
  color: #1b8c50;
}

.timeline-tag.global {
  background: #e3eefb;
  color: #1f6fbf;
}

.timeline-tag::before {
  content: "•";
  font-size: 16px;
  line-height: 1;
}

.timeline-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.timeline-card li {
  line-height: 1.6;
}

.timeline-empty {
  min-height: 1px;
}

@media (max-width: 960px) {
  .timeline-root {
    gap: 20px;
  }

  .timeline-root::before {
    left: 24px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-axis {
    justify-self: start;
  }

  .timeline-dot {
    width: 64px;
    height: 64px;
  }

  .timeline-card {
    order: 1;
  }

  .timeline-card.is-left::after,
  .timeline-card.is-right::after {
    display: none;
  }
}

/* Override case-grid defaults for timeline root */
#timeline-root {
  display: grid;
  grid-template-columns: 1fr;
}

.timeline-source {
  display: block;
  margin: 50px auto 0 !important;
  color: #4b5563;
  font-size: 14px;
  text-align: center;
}

.stories-carousel {
  position: relative;
  padding: 0 72px;
}

.stories-track-mask {
  overflow: hidden;
  width: 100%;
  padding: 6px 0;
}

.stories-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  transition: transform 0.5s ease;
}

.story-card {
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 280px;
  max-width: 360px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 44px rgba(18, 24, 38, 0.14);
  overflow: hidden;
  display: grid;
  grid-template-rows: 220px 1fr;
  min-height: 520px;
}

.story-photo {
  background: #dfe8f5;
  position: relative;
}

.story-photo[data-video] {
  cursor: pointer;
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-photo--placeholder {
  background: linear-gradient(120deg, #e7ecf5 0%, #f5f8fc 100%);
}

.story-photo .ytp-large-play-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.story-photo .ytp-button {
  border: none;
}

.story-photo .ytp-large-play-button-red-bg {
  background: #ff0000;
}

.story-photo .ytp-large-play-button::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent #ffffff;
}

.story-card-body {
  padding: 18px 18px 20px;
  display: grid;
  gap: 12px;
  align-content: space-between;
}

.story-header {
  display: grid;
  gap: 6px;
}

.story-name {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.4px;
}

.story-role {
  color: #2b9a7f;
  font-weight: 700;
}

.story-history {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
  line-height: 1.5;
}

.story-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.story-actions .btn {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  box-shadow: 0 14px 28px rgba(18, 24, 38, 0.12);
}

.story-actions .btn.primary {
  background: #1f8cd6;
}

.story-actions .btn.ghost {
  background: #ffffff;
}

.stories-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(18, 24, 38, 0.12);
  display: grid;
  place-items: center;
  color: #1f8cd6;
  font-size: 26px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  transform: translateY(-50%);
  z-index: 2;
}

.stories-nav[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  transform: translateY(-50%);
}

.stories-nav:hover {
  background: #1f8cd6;
  color: #ffffff;
  transform: translateY(calc(-50% - 2px));
}

.story-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 31, 0.64);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 99;
}

.story-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.story-modal {
  position: relative;
  width: min(900px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.story-modal-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.story-modal-close {
  position: absolute;
  top: -46px;
  right: 0;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.story-modal-close:hover {
  color: #f2f6ff;
}

.story-modal-open {
  overflow: hidden;
}

.stories-nav:focus-visible {
  outline: 2px solid #1f8cd6;
  outline-offset: 2px;
}

.stories-nav.prev {
  left: 16px;
}

.stories-nav.next {
  right: 16px;
}

@media (max-width: 1024px) {
  .stories-carousel {
    padding: 0 48px;
  }

  .story-card {
    flex-basis: calc((100% - 16px) / 2);
    min-width: 260px;
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .stories-carousel {
    padding: 0 16px;
  }

  .stories-nav {
    width: 40px;
    height: 40px;
    font-size: 22px;
    transform: translateY(-50%);
  }

  .stories-nav.prev {
    left: 4px;
  }

  .stories-nav.next {
    right: 4px;
  }

  .story-card {
    flex-basis: 100%;
    max-width: none;
    grid-template-rows: 200px 1fr;
  }

  .story-actions {
    grid-template-columns: 1fr;
  }
}

.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.about-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.about-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  color: var(--text);
}

.about-card ol {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.about-card strong {
  color: var(--text);
}

.about-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(18, 24, 38, 0.06);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  width: fit-content;
}

.site-footer {
  background: #21818f;
  color: #e8edf7;
  padding: 20px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 32px 60px;
  align-items: start;
}

.footer-left {
  display: grid;
  gap: 18px;
  align-content: start;
}

.footer-copy {
  color: #e8edf7;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2px;
  white-space: nowrap;
  margin-left: 100px;
}

.footer-logo {
  height: 50px;
  width: auto;
  display: block;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
}

.footer-inner > .footer-social {
  align-self: center;
  transform: none;
}

.footer-social a {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-social a:hover {
  transform: translateY(-1px);
  opacity: 0.8;
}

.footer-social img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.footer-phone {
  color: #d7dbe3;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 24px 30px;
  align-items: start;
}

.footer-col {
  display: grid;
  gap: 12px;
}

.footer-col h4 {
  margin: 0;
  font-size: 18px;
  color: #f9fafb;
  letter-spacing: 0.4px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}

.footer-col a {
  color: rgba(232, 237, 247, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 32px;
  color: rgba(232, 237, 247, 0.7);
  font-size: 13px;
  text-align: center;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1f6fbf;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(16, 41, 85, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    opacity 0.2s ease;
  z-index: 1000;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(16, 41, 85, 0.28);
  background: #195fb0;
}

.back-to-top:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 960px) {
  .panel-video .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .panel-graphic .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-logo,
  .footer-social {
    display: none;
  }

  .footer-copy {
    margin-left: 0;
    text-align: center;
  }

  .footer-inner > .footer-social {
    transform: none;
  }

  .footer-social a {
    width: 44px;
    height: 44px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .resource-switch {
    width: 100%;
  }

  .panel-video .case-grid {
    grid-template-columns: 1fr;
  }

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

  .panel-graphic .case-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .menu {
    gap: 12px;
  }

  .hero {
    min-height: 60vh;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .intro-layout {
    grid-template-columns: 1fr;
  }

  .intro-visual {
    max-width: 100%;
    order: -1;
  }

  .intro-plan-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: auto;
    padding: 12px 0;
  }

  .nav-right {
    flex-direction: column;
    gap: 12px;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-content {
    padding: 64px 0;
  }

  .hero-actions {
    flex-wrap: wrap;
  }
}

/* Shared compact footer (used in course & article pages) */
.page-footer {
  background: #21818f;
  color: #e1f2ef;
  text-align: center;
  padding: 20px 14px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.page-footer__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.page-footer--dark {
  background: #21818f;
  color: #e5e7eb;
}

@media (max-width: 900px) {
  .page-footer {
    position: static;
    display: block;
    margin: 20px auto 0;
    text-align: center;
  }
}
