.resources-page-redesign {
  background:
    radial-gradient(circle at top left, rgba(143, 209, 177, 0.14), transparent 22%),
    radial-gradient(circle at top right, rgba(216, 185, 124, 0.1), transparent 20%),
    linear-gradient(180deg, #071410 0%, #0d2018 100%);
}

.resources-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.resources-hero {
  position: relative;
  padding: 1.6rem 0 1.25rem;
  overflow: clip;
}

.resources-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(6, 18, 14, 0.94) 10%, rgba(6, 18, 14, 0.54) 48%, rgba(6, 18, 14, 0.92) 100%),
    url("../images/ai_tools.jpg") center/cover no-repeat;
  opacity: 0.18;
  z-index: -2;
}

.resources-hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -12rem auto;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 209, 177, 0.14), transparent 66%);
  z-index: -1;
}

.resources-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 2rem;
  align-items: start;
}

.resources-kicker {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.resources-hero-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-family: "Fraunces", serif;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.resources-summary {
  margin: 1.2rem 0 0;
  max-width: 42rem;
  color: rgba(245, 241, 232, 0.78);
  line-height: 1.8;
  font-size: 1.03rem;
}

.resources-hero-panel {
  display: grid;
  gap: 1rem;
  padding-top: 0.5rem;
}

.resources-hero-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  border-radius: 22px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.resources-hero-card span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 241, 232, 0.56);
}

.resources-hero-card strong {
  font-size: 1rem;
  line-height: 1.5;
}

.resources-section {
  padding: 0.5rem 0 4rem;
}

.resources-section-heading {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.8rem;
}

.resources-section-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.resources-section-heading p:last-child {
  margin: 0;
  max-width: 52rem;
  color: rgba(245, 241, 232, 0.74);
  line-height: 1.8;
}

.resource-groups {
  display: grid;
  gap: 1rem;
}

.resource-group,
.resources-video-feature {
  display: grid;
  gap: 1.2rem;
  padding: 1.4rem;
  border-radius: 28px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.resource-group-head {
  display: grid;
  gap: 0.5rem;
  max-width: 48rem;
}

.resource-group-head h3,
.resources-video-feature-copy h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.05;
}

.resource-group-head p,
.resources-video-feature-copy p {
  margin: 0;
  color: rgba(245, 241, 232, 0.74);
  line-height: 1.72;
}

.resource-links,
.popup-language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.resource-link,
.popup-language-btn,
.pdf-modal-open-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.resource-link:hover,
.popup-language-btn:hover,
.pdf-modal-open-new:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(143, 209, 177, 0.28);
}

.resources-video-note {
  margin: 0 0 1rem;
}

.resources-video-note p {
  margin: 0;
  color: rgba(245, 241, 232, 0.74);
  line-height: 1.75;
}

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

.video-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background:
    linear-gradient(180deg, rgba(10, 30, 24, 0.9), rgba(8, 22, 17, 0.92)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.24);
}

.video-card p {
  margin: 0;
  color: rgba(245, 241, 232, 0.78);
  line-height: 1.6;
}

.media-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 17, 13, 0.82);
  backdrop-filter: blur(10px);
}

.media-modal.is-open {
  display: flex;
}

.media-modal-dialog {
  position: relative;
  width: min(960px, 96vw);
  max-height: min(92vh, 900px);
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 28px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  background: linear-gradient(180deg, rgba(10, 30, 24, 0.98), rgba(8, 22, 17, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  overflow: auto;
}

.media-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
}

.media-modal-header {
  display: grid;
  gap: 0.35rem;
  padding-right: 3rem;
}

.media-modal-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
}

.media-modal-video-wrap video {
  width: 100%;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.26);
}

.pdf-modal-dialog {
  width: min(1100px, 96vw);
}

.pdf-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pdf-modal-frame-wrap {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  min-height: 420px;
}

.pdf-modal-frame {
  width: 100%;
  height: min(76vh, 760px);
  border: 0;
  background: #f2f5f8;
}

@media (max-width: 1120px) {
  .resources-hero-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .resources-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .resources-hero {
    padding-top: 1rem;
  }

  .resource-group,
  .resources-video-feature,
  .media-modal-dialog {
    padding: 1rem;
  }

  .pdf-modal-heading {
    display: grid;
    align-items: start;
  }

  .pdf-modal-open-new {
    width: 100%;
  }

  .pdf-modal-frame {
    height: 68vh;
  }
}
