/* Resources page.
   Backgrounds reuse the shared palette (cream page gradient, white cards,
   --soft-2 tints) so the page sits alongside the rest of the site. */

.resources-page main {
  padding-bottom: clamp(30px, 4vw, 56px);
}

/* --- Hero: heading left, search + filters right ---------------------------- */

.resources-hero {
  width: min(1508px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(28px, 3.4vw, 52px) 0 clamp(20px, 2.4vw, 32px);
}

.resources-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
}

.resources-intro h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 3.5vw, 55px);
  font-weight: 760;
  line-height: 1.04;
}

/* Short accent rule under the heading, echoing .eyebrow::after. */
.resources-intro h1::after {
  content: "";
  display: block;
  width: 62px;
  height: 3px;
  margin-top: 18px;
  background: var(--red);
  border-radius: 3px;
}

.resources-lede {
  max-width: 470px;
  margin: 18px 0 0;
  color: #303642;
  font-size: 16.5px;
  line-height: 1.6;
}

.resources-controls {
  padding-top: clamp(4px, 1vw, 14px);
}

.resource-search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  min-height: 62px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.resource-search:focus-within {
  border-color: rgba(215, 25, 32, 0.4);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.1), var(--shadow-soft);
}

.resource-search svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #6b7280;
}

.resource-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

.resource-search input::placeholder {
  color: #8b9099;
}

.resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  color: #353b45;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 680;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.resource-chip:hover {
  border-color: rgba(215, 25, 32, 0.35);
  color: var(--red);
}

.resource-chip[aria-pressed="true"] {
  color: var(--red);
  background: rgba(215, 25, 32, 0.05);
  border-color: rgba(215, 25, 32, 0.45);
}

.resource-chip svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

/* --- Featured + list row --------------------------------------------------- */

.resources-main {
  width: min(1508px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px);
  align-items: start;
}

.featured-resource {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.featured-media {
  position: relative;
  min-height: 340px;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-badge {
  position: absolute;
  top: 18px;
  left: 0;
  z-index: 2;
  padding: 7px 14px;
  color: #fff;
  background: var(--red);
  border-radius: 0 5px 5px 0;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.featured-body {
  padding: clamp(22px, 2.4vw, 36px);
  align-self: center;
}

.resource-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.resource-kicker svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.featured-body h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(27px, 2.1vw, 33px);
  font-weight: 760;
  line-height: 1.1;
}

.featured-body > p {
  margin: 0 0 clamp(18px, 2vw, 26px);
  color: #3d4450;
  font-size: 15.5px;
  line-height: 1.55;
}

.featured-cta svg {
  width: 19px;
  height: 19px;
  margin: 0 0 0 10px;
}

/* --- Resource list --------------------------------------------------------- */

.resource-list {
  display: grid;
  gap: clamp(10px, 1.2vw, 15px);
}

.resource-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  padding: 12px 20px 12px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.resource-item:hover {
  transform: translateY(-1px);
  border-color: rgba(215, 25, 32, 0.28);
  box-shadow: var(--shadow);
}

.resource-item[hidden] {
  display: none;
}

.resource-thumb {
  display: block;
  width: 118px;
  height: 74px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft-2);
}

.resource-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-item-body {
  display: block;
  min-width: 0;
}

.resource-item .resource-kicker {
  margin-bottom: 7px;
  font-size: 11px;
}

.resource-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(19px, 1.5vw, 23px);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
}

.resource-chevron {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: #9aa0a8;
  transition: color 0.16s ease, transform 0.16s ease;
}

.resource-item:hover .resource-chevron {
  color: var(--red);
  transform: translateX(2px);
}

.resource-empty {
  margin: 16px 0 0;
  padding: 22px;
  color: #4a515c;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 15px;
  text-align: center;
}

.resource-empty[hidden] {
  display: none;
}

/* --- Quick tools ----------------------------------------------------------- */

.quick-tools {
  width: min(1508px, calc(100% - 64px));
  margin: clamp(20px, 2.4vw, 32px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 26px);
  align-items: start;
  padding: clamp(20px, 2.2vw, 30px) clamp(20px, 2.4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.quick-tools-head {
  padding-right: clamp(10px, 1.4vw, 22px);
  border-right: 1px solid rgba(20, 25, 35, 0.09);
}

.quick-tools-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12.5px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.quick-tools-label svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.quick-tools-head > p:not(.quick-tools-label) {
  margin: 0;
  color: #4a515c;
  font-size: 14px;
  line-height: 1.5;
}

.quick-tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  text-decoration: none;
  color: inherit;
}

.quick-tool-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  color: var(--red);
  background: rgba(215, 25, 32, 0.07);
  border-radius: 10px;
  transition: background 0.16s ease;
}

.quick-tool:hover .quick-tool-icon {
  background: rgba(215, 25, 32, 0.13);
}

.quick-tool-icon svg {
  width: 25px;
  height: 25px;
}

.quick-tool-body {
  display: block;
  min-width: 0;
}

.quick-tool-title {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 770;
  line-height: 1.25;
}

.quick-tool-copy {
  display: block;
  color: #4a515c;
  font-size: 13px;
  line-height: 1.45;
}

.quick-tool-arrow {
  width: 19px;
  height: 19px;
  margin-top: 12px;
  color: var(--red);
  transition: transform 0.16s ease;
}

.quick-tool:hover .quick-tool-arrow {
  transform: translateX(3px);
}

/* --- Icon defaults --------------------------------------------------------- */

.resource-search svg,
.resource-chip svg,
.resource-kicker svg,
.resource-chevron,
.featured-cta svg,
.quick-tools-label svg,
.quick-tool-icon svg,
.quick-tool-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.featured-cta svg,
.resource-chevron,
.quick-tool-arrow {
  stroke-width: 2.2;
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 1180px) {
  .resources-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .resources-lede {
    max-width: 640px;
  }

  .resources-main {
    grid-template-columns: 1fr;
  }

  .quick-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-tools-head {
    grid-column: 1 / -1;
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(20, 25, 35, 0.09);
  }
}

@media (max-width: 900px) {
  .resources-hero,
  .resources-main,
  .quick-tools {
    width: calc(100% - 40px);
  }

  .featured-resource {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 220px;
  }
}

@media (max-width: 680px) {
  .resource-chips {
    gap: 9px;
  }

  .resource-chip {
    min-height: 42px;
    padding: 0 15px;
    font-size: 13.5px;
  }

  .resource-item {
    padding: 10px 14px 10px 10px;
    gap: 13px;
  }

  .resource-thumb {
    width: 84px;
    height: 60px;
  }

  .quick-tools {
    grid-template-columns: 1fr;
  }
}

/* Reveals the rest of the library when the list is showing its capped preview. */
.resource-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  margin-top: clamp(10px, 1.2vw, 15px);
  padding: 0 20px;
  color: #353b45;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.resource-more:hover {
  color: var(--red);
  border-color: rgba(215, 25, 32, 0.3);
}

.resource-more[hidden] {
  display: none;
}

.resource-more svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.resource-more.is-expanded svg {
  transform: rotate(180deg);
}

/* One line saying what each resource actually contains. Without it the list is
   nine titles and a category chip, which is neither useful nor indexable. */
.resource-summary {
  display: block;
  margin-top: 5px;
  color: var(--muted, #4d525a);
  font-size: 13.5px;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .resource-summary {
    font-size: 13px;
  }
}
