/* ═══════════════════════════════════════════════════════════
   MELIORAS · RESOURCES PAGE
   Premium minimal Scandinavian library. Built on top of styles.css
   tokens: --ink --paper --paper-light --paper-dark --sage-deep
           --muted --milk --line --font-display --font-body
═══════════════════════════════════════════════════════════ */

.resources-page main {
  display: block;
  background: var(--paper);
}

/* ── Shared scroll-reveal ───────────────────────────────── */
.r-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.r-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .r-reveal { opacity: 1; transform: none; transition: none; }
}

/* ════════════════════════════════════════════════════════
   SECTION 1 · HERO
═══════════════════════════════════════════════════════════ */
.res-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(140px, 18vh, 220px) clamp(20px, 6vw, 86px) clamp(70px, 9vw, 120px);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(176, 188, 160, 0.18), rgba(176, 188, 160, 0) 60%),
    linear-gradient(180deg, var(--paper-light) 0%, var(--paper) 100%);
  text-align: center;
}
.res-hero__glow {
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(760px, 90vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(38, 64, 52, 0.05), rgba(38, 64, 52, 0) 70%);
  pointer-events: none;
}
.res-hero__inner {
  position: relative;
  width: min(780px, 100%);
  margin: 0 auto;
}
.res-hero__title {
  margin: 6px auto 0 !important;
  color: var(--ink);
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(2.6rem, 5.4vw, 4.2rem) !important;
  line-height: 1.08 !important;
}
.res-hero__lead {
  width: min(560px, 100%);
  margin: clamp(22px, 3vw, 30px) auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════
   SECTION 2 · RESOURCE LIBRARY
═══════════════════════════════════════════════════════════ */
.res-library {
  padding: clamp(40px, 6vw, 80px) clamp(20px, 6vw, 86px) clamp(70px, 9vw, 120px);
  width: min(1200px, 100%);
  margin: 0 auto;
}
.res-library__head {
  margin-bottom: clamp(34px, 4vw, 54px);
}
.res-library__head h2 {
  margin: 0 !important;
  color: var(--ink);
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(1.9rem, 3vw, 2.6rem) !important;
  line-height: 1.15 !important;
}

.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}

.res-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper-light);
  box-shadow: 0 14px 40px rgba(30, 47, 36, 0.05);
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 360ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 360ms ease;
}
.res-card:hover {
  transform: translateY(-8px);
  border-color: rgba(31, 51, 40, 0.16);
  box-shadow: 0 30px 70px rgba(30, 47, 36, 0.13);
}

.res-card__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.res-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}
.res-card:hover .res-card__media img {
  transform: scale(1.06);
}

/* Price badge */
.res-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.res-badge--free {
  background: rgba(253, 252, 244, 0.82);
  border: 1px solid rgba(31, 51, 40, 0.16);
  color: var(--sage-deep);
}
.res-badge--premium {
  background: var(--sage-deep);
  border: 1px solid var(--sage-deep);
  color: var(--milk);
}

.res-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: clamp(22px, 2vw, 28px);
}
.res-card__type {
  margin: 0 0 12px;
  color: var(--sage-deep);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.78;
}
.res-card__title {
  margin: 0 !important;
  color: var(--ink);
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: 1.42rem !important;
  line-height: 1.25 !important;
}
.res-card__desc {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}
.res-card__btn {
  width: 100%;
  margin-top: clamp(22px, 2.2vw, 28px);
}

/* ════════════════════════════════════════════════════════
   SECTION 3 · FEATURED RESOURCE
═══════════════════════════════════════════════════════════ */
.res-featured {
  padding: 0 clamp(20px, 6vw, 86px) clamp(70px, 9vw, 120px);
  width: min(1200px, 100%);
  margin: 0 auto;
}
.res-featured__card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--paper-light);
  box-shadow: 0 30px 80px rgba(30, 47, 36, 0.08);
}
.res-featured__media {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
}
.res-featured__media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.res-featured__card:hover .res-featured__media img {
  transform: scale(1.04);
}
.res-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(36px, 5vw, 72px);
}
.res-featured__title {
  margin: 4px 0 0 !important;
  color: var(--ink);
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(2.1rem, 3.6vw, 3rem) !important;
  line-height: 1.1 !important;
}
.res-featured__desc {
  max-width: 440px;
  margin: clamp(18px, 2vw, 24px) 0 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.2vw, 1.05rem);
  line-height: 1.72;
}
.res-featured__btn {
  margin-top: clamp(26px, 3vw, 36px);
}

/* ════════════════════════════════════════════════════════
   SECTION 4 · SIMPLE CTA
═══════════════════════════════════════════════════════════ */
.res-cta {
  padding: clamp(80px, 11vw, 150px) clamp(20px, 6vw, 86px);
  background:
    radial-gradient(110% 80% at 50% 120%, rgba(176, 188, 160, 0.16), rgba(176, 188, 160, 0) 60%),
    var(--paper-dark);
  text-align: center;
}
.res-cta__inner {
  width: min(620px, 100%);
  margin: 0 auto;
}
.res-cta__title {
  margin: 6px auto 0 !important;
  color: var(--ink);
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  line-height: 1.12 !important;
}
.res-cta__lead {
  width: min(500px, 100%);
  margin: clamp(18px, 2vw, 24px) auto 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.2vw, 1.05rem);
  line-height: 1.7;
}
.res-cta__btn {
  margin-top: clamp(28px, 3vw, 38px);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .res-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .res-featured__card {
    grid-template-columns: 1fr;
  }
  .res-featured__media img {
    min-height: 280px;
  }
}

@media (max-width: 600px) {
  .res-grid {
    grid-template-columns: 1fr;
  }
  .res-hero {
    padding-top: clamp(120px, 16vh, 160px);
  }
}

/* ── Featured guide image slider ── */
.res-slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
}
.res-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1000ms ease;
}
.res-slider img.is-active {
  opacity: 1;
}
