/* =========================================
   ANCHOR RESOURCE ARCHIVES
   Custom templates:
   - anchor-podcasts.php
   - anchor-commentaries.php
   ========================================= */

.anchor-resource-page {
  --anchor-green-dark: #1D3A1E;
  --anchor-green: #2C5134;
  --anchor-green-medium: #5B7E51;
  --anchor-green-muted: #ABC18F;
  --anchor-green-soft: #E9F4E6;
  --anchor-orange: #FF9900;
  --anchor-text: #28322B;
  --anchor-muted: #667069;
  --anchor-border: rgba(29, 58, 30, 0.14);
  --anchor-white: #ffffff;

  background: #ffffff;
  color: var(--anchor-text);
  overflow: hidden;
}

.anchor-resource-page *,
.anchor-resource-page *::before,
.anchor-resource-page *::after {
  box-sizing: border-box;
}

.anchor-resource-page a {
  color: inherit;
  text-decoration: none;
}

.anchor-resource-container {
  width: min(1120px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   SHARED HERO
   ========================================= */

.anchor-resource-hero {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbf6 58%, #eef7ec 100%);
  padding: 86px 0 116px;
  border-bottom: 1px solid rgba(29, 58, 30, 0.08);
  overflow: hidden;
}

.anchor-resource-hero .anchor-resource-container {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: center;
}

.anchor-resource-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.anchor-resource-eyebrow {
  margin: 0 0 18px;
  color: var(--anchor-orange);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.anchor-resource-hero h1,
.anchor-resource-hero-title {
  margin: 0;
  color: var(--anchor-green-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(58px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.anchor-resource-dek {
  max-width: 660px;
  margin: 30px 0 0;
  color: var(--anchor-muted);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.65;
}

.anchor-resource-header-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  background: var(--anchor-orange);
  color: #ffffff !important;
  padding: 15px 24px;
  border-radius: 6px;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  box-shadow: 0 10px 22px rgba(255, 153, 0, 0.22);
}

.anchor-resource-header-button:hover {
  transform: translateY(-2px);
  background: #e78900;
  box-shadow: 0 14px 28px rgba(255, 153, 0, 0.26);
}

.anchor-resource-hero-mark {
  position: absolute;
  right: -120px;
  top: 10px;
  width: 620px;
  height: 360px;
  background-image: url("../assets/anchor-mark-full-color-350c.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.075;
  pointer-events: none;
  z-index: 1;
}

/* =========================================
   ARCHIVE SECTION
   ========================================= */

.anchor-resource-archive {
  position: relative;
  padding: 76px 0 96px;
  background: #ffffff;
}

.anchor-resource-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--anchor-border);
}

.anchor-resource-section-header h2,
.anchor-resource-section-title {
  margin: 0;
  color: var(--anchor-green-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.anchor-resource-section-mark {
  width: 46px;
  height: 32px;
  display: block;
  flex: 0 0 auto;
  background-image: url("../assets/anchor-mark-full-color-350c.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

/* =========================================
   GRID + CARDS
   ========================================= */

.anchor-resource-grid {
  display: grid;
  gap: 34px;
}

.anchor-podcast-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.anchor-commentary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.anchor-resource-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid var(--anchor-border);
  box-shadow: 0 14px 34px rgba(29, 58, 30, 0.055);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.anchor-resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29, 58, 30, 0.22);
  box-shadow: 0 20px 44px rgba(29, 58, 30, 0.09);
}

.anchor-resource-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--anchor-green-soft);
}

.anchor-podcast-card .anchor-resource-card-image {
  aspect-ratio: 16 / 9;
}

.anchor-commentary-card .anchor-resource-card-image {
  aspect-ratio: 4 / 3;
}

.anchor-resource-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.anchor-resource-card:hover .anchor-resource-card-image img {
  transform: scale(1.035);
}

.anchor-resource-card-image:empty,
.anchor-resource-image-placeholder {
  min-height: 220px;
  background:
    linear-gradient(rgba(29, 58, 30, 0.1), rgba(29, 58, 30, 0.1)),
    linear-gradient(135deg, var(--anchor-green-soft), var(--anchor-green-muted));
}

.anchor-resource-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 24px 24px;
}

.anchor-resource-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--anchor-green);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.anchor-resource-meta span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--anchor-orange);
  display: inline-block;
}

.anchor-resource-card h3 {
  margin: 0 0 14px;
  color: var(--anchor-green-dark);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.anchor-commentary-card h3 {
  font-size: 21px;
}

.anchor-resource-card h3 a {
  color: var(--anchor-green-dark);
}

.anchor-resource-card h3 a:hover {
  color: var(--anchor-green);
}

.anchor-resource-excerpt {
  margin: 0 0 24px;
  color: var(--anchor-muted);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.anchor-resource-card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: var(--anchor-green-dark) !important;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.anchor-resource-card-link:hover {
  color: var(--anchor-orange) !important;
}

.anchor-resource-card-link span {
  transition: transform 0.2s ease;
}

.anchor-resource-card-link:hover span {
  transform: translateX(4px);
}

/* =========================================
   PAGINATION / EMPTY
   ========================================= */

.anchor-resource-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 54px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--anchor-border);
}

.anchor-resource-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--anchor-border);
  color: var(--anchor-green-dark);
  background: #ffffff;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.anchor-resource-pagination .page-numbers.current {
  background: var(--anchor-green-dark);
  color: #ffffff;
  border-color: var(--anchor-green-dark);
}

.anchor-resource-pagination .page-numbers:hover {
  border-color: var(--anchor-green-dark);
}

.anchor-resource-empty {
  padding: 40px 0;
  color: var(--anchor-muted);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 18px;
}

/* =========================================
   COMMENTARIES: NO-IMAGE PUBLICATION ARCHIVE
   ========================================= */

.anchor-commentary-archive {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}

.anchor-commentary-year-archive {
  display: grid;
  gap: 54px;
}

.anchor-commentary-year-group {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.anchor-commentary-year-heading {
  position: sticky;
  top: 120px;
}

.anchor-commentary-year-heading h3 {
  margin: 0;
  color: var(--anchor-green-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.04em;
}

.anchor-commentary-year-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-top: 18px;
  background: var(--anchor-orange);
}

.anchor-commentary-list {
  display: grid;
  gap: 16px;
}

.anchor-commentary-list-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 148px;
  padding: 26px 28px;
  background: #ffffff;
  border: 1px solid var(--anchor-border);
  box-shadow: 0 12px 30px rgba(29, 58, 30, 0.045);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.anchor-commentary-list-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 58, 30, 0.24);
  box-shadow: 0 18px 40px rgba(29, 58, 30, 0.075);
}

.anchor-commentary-list-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 26px;
  width: 3px;
  background: var(--anchor-orange);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.anchor-commentary-list-card:hover::before {
  opacity: 1;
}

.anchor-commentary-quarter-badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
  padding: 18px 14px;
  background: var(--anchor-green-soft);
  border: 1px solid rgba(29, 58, 30, 0.12);
  text-align: center;
  color: var(--anchor-green-dark) !important;
}

.anchor-commentary-quarter-badge strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.04em;
}

.anchor-commentary-quarter-badge span {
  display: block;
  margin-top: 8px;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--anchor-green);
}

.anchor-commentary-list-content {
  min-width: 0;
}

.anchor-commentary-list-content .anchor-resource-meta {
  margin-bottom: 10px;
}

.anchor-commentary-list-content h4 {
  margin: 0 0 10px;
  color: var(--anchor-green-dark);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.anchor-commentary-list-content h4 a {
  color: var(--anchor-green-dark);
}

.anchor-commentary-list-content h4 a:hover {
  color: var(--anchor-green);
}

.anchor-commentary-list-content .anchor-resource-excerpt {
  max-width: 620px;
  margin-bottom: 0;
}

.anchor-commentary-read-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--anchor-green-dark) !important;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.anchor-commentary-read-link:hover {
  color: var(--anchor-orange) !important;
}

.anchor-commentary-read-link span {
  transition: transform 0.2s ease;
}

.anchor-commentary-read-link:hover span {
  transform: translateX(4px);
}

/* Remove old image-card expectations on the Commentaries template */
.anchor-commentaries-page .anchor-commentary-grid,
.anchor-commentaries-page .anchor-commentary-card,
.anchor-commentaries-page .anchor-resource-card-image {
  display: none;
}

/* =========================================
   PODCASTS: NO-IMAGE EPISODE LIST
   ========================================= */

.anchor-podcast-archive {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}

.anchor-podcast-list {
  display: grid;
  gap: 18px;
}

.anchor-podcast-list-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 142px;
  padding: 28px 30px;
  background: #ffffff;
  border: 1px solid var(--anchor-border);
  box-shadow: 0 12px 30px rgba(29, 58, 30, 0.045);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.anchor-podcast-list-card:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 58, 30, 0.24);
  box-shadow: 0 18px 40px rgba(29, 58, 30, 0.075);
}

.anchor-podcast-list-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 3px;
  background: var(--anchor-orange);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.anchor-podcast-list-card:hover::before {
  opacity: 1;
}

.anchor-podcast-play-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--anchor-green-soft);
  border: 1px solid rgba(29, 58, 30, 0.14);
  color: var(--anchor-green-dark) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.anchor-podcast-play-badge span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  font-size: 0;
  line-height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--anchor-green-dark);
  transition: border-left-color 0.22s ease;
}

.anchor-podcast-list-card:hover .anchor-podcast-play-badge {
  background: var(--anchor-green-dark);
  border-color: var(--anchor-green-dark);
  color: #ffffff !important;
  transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.12);
}

.anchor-podcast-list-card:hover .anchor-podcast-play-badge span {
  border-left-color: #ffffff;
}

.anchor-podcast-list-content {
  min-width: 0;
}

.anchor-podcast-list-content .anchor-resource-meta {
  margin-bottom: 10px;
}

.anchor-podcast-list-content h3 {
  margin: 0 0 10px;
  color: var(--anchor-green-dark);
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.anchor-podcast-list-content h3 a {
  color: var(--anchor-green-dark);
}

.anchor-podcast-list-content h3 a:hover {
  color: var(--anchor-green);
}

.anchor-podcast-list-content .anchor-resource-excerpt {
  max-width: 700px;
  margin-bottom: 0;
}

.anchor-podcast-list-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--anchor-green-dark) !important;
  font-family: "Albert Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.anchor-podcast-list-link:hover {
  color: var(--anchor-orange) !important;
}

.anchor-podcast-list-link span {
  transition: transform 0.2s ease;
}

.anchor-podcast-list-link:hover span {
  transform: translateX(4px);
}

/* Make sure the old podcast image grid is not displayed on this template */
.anchor-podcasts-page .anchor-podcast-grid,
.anchor-podcasts-page .anchor-podcast-card,
.anchor-podcasts-page .anchor-resource-card-image {
  display: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1000px) {
  .anchor-resource-hero {
    padding: 62px 0 98px;
  }

  .anchor-resource-hero .anchor-resource-container {
    min-height: 210px;
  }

  .anchor-resource-hero-mark {
    right: -190px;
    top: 28px;
    width: 560px;
    height: 320px;
    opacity: 0.065;
  }

  .anchor-podcast-grid,
  .anchor-commentary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anchor-commentary-year-group {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .anchor-commentary-year-heading {
    position: relative;
    top: auto;
  }

  .anchor-commentary-year-heading h3 {
    font-size: 46px;
  }

  .anchor-commentary-list-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 24px;
  }

  .anchor-commentary-read-link {
    grid-column: 2;
    justify-self: start;
  }

  .anchor-podcast-list-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 24px;
  }

  .anchor-podcast-play-badge {
    width: 72px;
    height: 72px;
  }

  .anchor-podcast-list-link {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 690px) {
  .anchor-resource-page {
    overflow-x: hidden;
  }

  .anchor-resource-container {
    width: min(100% - 32px, 1120px);
  }

  .anchor-resource-hero {
    padding: 46px 0 70px;
  }

  .anchor-resource-hero .anchor-resource-container {
    display: block;
    min-height: 0;
  }

  .anchor-resource-hero-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .anchor-resource-eyebrow {
    font-size: 11px;
  }

  .anchor-resource-hero h1,
  .anchor-resource-hero-title {
    width: 100%;
    max-width: 100%;
    margin: 0;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    font-size: clamp(42px, 11vw, 48px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0.01em !important;
  }

  .anchor-commentaries-page .anchor-resource-hero h1,
  .anchor-commentaries-page .anchor-resource-hero-title {
    max-width: 350px;
  }

  .anchor-resource-dek {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    font-size: 18px !important;
    line-height: 1.58 !important;
  }

  .anchor-resource-hero-mark {
    right: -250px;
    top: 74px;
    width: 500px;
    height: 300px;
    opacity: 0.045;
  }

  .anchor-resource-archive {
    padding: 52px 0 68px;
  }

  .anchor-resource-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 18px;
    align-items: end;
    margin-bottom: 30px;
    padding-bottom: 22px;
  }

  .anchor-resource-section-header h2,
  .anchor-resource-section-title {
    width: 100%;
    max-width: 330px;
    margin: 0;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    font-size: clamp(38px, 10vw, 44px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0.035em !important;
  }

  .anchor-resource-section-mark {
    width: 42px;
    height: 30px;
  }

  .anchor-podcast-grid,
  .anchor-commentary-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .anchor-resource-card h3,
  .anchor-commentary-card h3 {
    font-size: 23px;
  }

  .anchor-commentary-year-archive {
    gap: 42px;
  }

  .anchor-commentary-year-heading h3 {
    font-size: 40px;
  }

  .anchor-commentary-list-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 22px;
  }

  .anchor-commentary-quarter-badge {
    width: 112px;
    min-height: 86px;
  }

  .anchor-commentary-quarter-badge strong {
    font-size: 34px;
  }

  .anchor-commentary-list-content h4 {
    font-size: 22px;
  }

  .anchor-commentary-read-link {
    grid-column: auto;
  }

  .anchor-podcast-list {
    gap: 16px;
  }

  .anchor-podcast-list-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 22px;
  }

  .anchor-podcast-play-badge {
    width: 64px;
    height: 64px;
  }

  .anchor-podcast-play-badge span {
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 11px;
  }

  .anchor-podcast-list-content h3 {
    font-size: 22px;
  }

  .anchor-podcast-list-link {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .anchor-commentaries-page .anchor-resource-hero h1,
  .anchor-commentaries-page .anchor-resource-hero-title {
    max-width: 330px;
    font-size: clamp(40px, 10.5vw, 45px) !important;
  }

  .anchor-resource-section-header h2,
  .anchor-resource-section-title {
    max-width: 300px;
    font-size: clamp(36px, 9.5vw, 42px) !important;
  }
}