/* =========================================================
   TheSpaceLaunches · Education resource page styles
   Reference: Education_1791789725067_6u41.png
   ========================================================= */

/* —— Page-level variables —— */
.edu-page {
  --edu-sidebar-w: 260px;
  --edu-gap: 24px;
}

/* —— Resource hero region (boxed within 1440px, matching the site-wide .container behavior) —— */
.edu-resource-hero {
  position: relative;
  width: 100%;
  max-width: var(--container-max);   /* 1440px, aligned with the site-wide .container spec */
  margin: 0 auto;                    /* centered with symmetric left/right whitespace on wide viewports */
  padding: 24px 40px 0;
  background: transparent;
  overflow: visible;
}
.edu-resource-hero__inner {
  position: relative;
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-radius: var(--radius-lg);
  border: var(--border-glow);
  background:
    linear-gradient(90deg, rgba(4,7,15,0.92) 0%, rgba(4,7,15,0.55) 55%, rgba(4,7,15,0.25) 100%),
    url('https://img.thespacelaunches.cn/thespacelaunches/edu/thumb/hero.webp') center right / cover no-repeat;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 32px 40px 40px;
}
.edu-resource-hero__content {
  flex: 1 1 auto;
  min-width: 0;
}
.edu-resource-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}
.edu-resource-hero__crumbs a { color: var(--text-2); transition: color .15s ease; }
.edu-resource-hero__crumbs a:hover { color: var(--accent-blue); }
.edu-resource-hero__crumbs .sep { color: var(--text-3); }
.edu-resource-hero__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 8px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.55);
}
.edu-resource-hero__sub {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  max-width: 560px;
}

/* —— Resource two-column layout —— */
.edu-resource-body {
  display: flex;
  gap: var(--edu-gap);
  padding: 28px 40px 64px;
  max-width: var(--container-max);   /* 1440px, aligned with the site-wide .container spec */
  margin: 0 auto;                    /* centered with symmetric left/right whitespace on wide viewports */
  align-items: flex-start;
}

/* —— Right resource main content —— */
.edu-resource-main {
  flex: 1;
  min-width: 0;
}
.edu-resource-main .edu-section { margin-bottom: 32px; }
.edu-resource-main .edu-section:last-child { margin-bottom: 0; }

/* —— Resource article body (long-form content like NGSS mapping, FAQ, etc.) —— */
.edu-resource-article {
  background: var(--glass-bg-strong);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.edu-resource-article__content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-1);
}
.edu-resource-article__content h2,
.edu-resource-article__content h3,
.edu-resource-article__content h4 {
  font-family: var(--font-display);
  color: #fff;
  letter-spacing: 0.02em;
  margin: 24px 0 12px;
}
.edu-resource-article__content h2 { font-size: 22px; }
.edu-resource-article__content h3 { font-size: 17px; }
.edu-resource-article__content h4 { font-size: 15px; }
.edu-resource-article__content p { margin: 0 0 12px; }
.edu-resource-article__content ul,
.edu-resource-article__content ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
.edu-resource-article__content li { margin-bottom: 6px; }
.edu-resource-article__content blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent-blue);
  background: rgba(76, 201, 255, 0.08);
  color: var(--text-1);
  border-radius: 0 8px 8px 0;
}
.edu-resource-article__content blockquote p { margin: 0; }
.edu-resource-article__content hr {
  border: none;
  border-top: 1px solid rgba(76, 201, 255, 0.15);
  margin: 22px 0;
}
.edu-resource-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 13px;
  background: rgba(4, 7, 15, 0.4);
  border-radius: 8px;
  overflow: hidden;
}
.edu-resource-article__content th,
.edu-resource-article__content td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(76, 201, 255, 0.12);
  vertical-align: top;
}
.edu-resource-article__content th {
  background: rgba(76, 201, 255, 0.12);
  color: var(--accent-blue);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
.edu-resource-article__content tr:last-child td { border-bottom: none; }
.edu-resource-article__content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(76, 201, 255, 0.10);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-blue);
}
.edu-resource-article__content strong { color: #fff; font-weight: 600; }
.edu-resource-article__content a { color: var(--accent-blue); text-decoration: none; }
.edu-resource-article__content a:hover { color: var(--accent-orange); text-decoration: underline; }

/* —— Resource FAQ block —— */
.edu-resource-faq {
  background: var(--glass-bg);
  border: var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
  margin-bottom: 24px;
}
.edu-resource-faq__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 14px;
}
.edu-resource-faq__list {
  margin: 0;
  display: grid;
  gap: 12px;
}
.edu-resource-faq__list dt {
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.edu-resource-faq__list dd {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-1);
}

/* —— Resource back link container —— */
.edu-resource-back {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(76, 201, 255, 0.12);
  text-align: center;
}

/* —— Resource page body hook (scoped overrides if any) —— */
.edu-resource-page .edu-sidebar__quote { font-size: 12px; color: var(--text-1); margin-bottom: 12px; }
.edu-resource-page .edu-sidebar__btn { width: 100%; justify-content: center; }

/* —— Materials 3-column photo grid (1:1 image + label + description) —— */
.edu-materials-grid {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.edu-materials-item { margin: 0; }
.edu-materials-item figure {
  margin: 0;
  border: var(--border-glow);
  border-radius: var(--radius-lg);
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.edu-materials-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.edu-materials-item figcaption {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edu-materials-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.edu-materials-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .edu-materials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  /* Per mobile plan §2.4: long markdown tables in resource
     articles must scroll horizontally instead of breaking
     the body width. The .edu-resource-article__content parent
     stays 100% wide; the table element itself becomes the
     scroll context. We don't wrap in a new DOM container —
     the table turns into display:block and its own
     overflow-x becomes the scroll surface. */
  .edu-materials-grid { grid-template-columns: 1fr; }
  .edu-resource-article__content { padding: 0; }
  .edu-resource-article__content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 560px;
  }
  .edu-resource-article__content figure { margin: 16px 0; }
  .edu-resource-hero { padding: 22px 0 14px; }
  .edu-resource-hero__inner { padding: 0 18px; }
  .edu-resource-hero__title { font-size: 26px; }
  .edu-resource-hero__sub { font-size: 14px; }
  .edu-resource-body { padding: 18px 18px 56px; display: block; }
  .edu-resource-body .edu-sidebar {
    position: static;
    width: 100%;
    margin-bottom: 18px;
  }
}
@media (max-width: 600px) {
  .edu-materials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .edu-resource-hero__title { font-size: 22px; }
  .edu-resource-article__content table { min-width: 480px; }
  .edu-resource-article__content th,
  .edu-resource-article__content td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* Hero image moved to end of article body (per haige instruction) */
.edu-resource-article__content figure.edu-resource-figure {
  margin: 24px 0 4px;
}
.edu-resource-article__content figure.edu-resource-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: var(--border-glow);
  box-shadow: var(--shadow-card);
}
