/*
 * Homepage "Our Special Collections" (inc/special-collections.php).
 * Two promotional banners per row, each with rounded corners and its label underneath;
 * one per row on phones.
 */

.chf-spc {
  background: var(--bg-2, #F7F8FA);
  padding: 48px 0 56px;
}

.chf-spc-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Title between two rules */
.chf-spc-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.chf-spc-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink, #1A202C);
  text-align: center;
}

.chf-spc-rule {
  flex: 1;
  height: 1px;
  background: var(--line-2, #D9E1EA);
}

.chf-spc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 40px;
}

/* An odd number of cards: the last one sits centred instead of leaving a hole. */
.chf-spc-grid--odd > .chf-spc-card:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 20px);
}

.chf-spc-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.chf-spc-banner {
  display: block;
  aspect-ratio: 9 / 5;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-3, #EDF1F5);
  box-shadow: 0 1px 3px rgba(15, 39, 71, .08);
  transition: box-shadow .25s ease, transform .25s ease;
}

.chf-spc-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.chf-spc-label {
  display: block;
  padding: 14px 8px 0;
  text-align: center;
}

.chf-spc-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--ink, #1A202C);
  transition: color .15s;
}

.chf-spc-button {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--chf-orange, #E87722);
}

/* A card with a button text but no title: the button text is the label. */
.chf-spc-label > .chf-spc-button:first-child {
  margin-top: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
}

a.chf-spc-card:hover .chf-spc-banner,
a.chf-spc-card:focus-visible .chf-spc-banner {
  box-shadow: 0 12px 28px rgba(15, 39, 71, .16);
  transform: translateY(-3px);
}

a.chf-spc-card:hover .chf-spc-banner img { transform: scale(1.04); }
a.chf-spc-card:hover .chf-spc-title { color: var(--chf-blue, #1B4F8C); }

a.chf-spc-card:focus-visible {
  outline: 2px solid var(--chf-blue, #1B4F8C);
  outline-offset: 6px;
  border-radius: 16px;
}

@media (max-width: 1024px) {
  .chf-spc-grid { gap: 28px 24px; }
  .chf-spc-grid--odd > .chf-spc-card:last-child { width: calc(50% - 12px); }
}

@media (max-width: 700px) {
  .chf-spc { padding: 32px 0 40px; }
  .chf-spc-heading { gap: 12px; margin-bottom: 22px; }
  .chf-spc-heading h2 { font-size: 13px; letter-spacing: .14em; }
  .chf-spc-grid { grid-template-columns: 1fr; gap: 26px; }
  .chf-spc-grid--odd > .chf-spc-card:last-child { width: 100%; }
  .chf-spc-banner { border-radius: 14px; }
  .chf-spc-label { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .chf-spc-banner, .chf-spc-banner img { transition: none; }
  a.chf-spc-card:hover .chf-spc-banner { transform: none; }
  a.chf-spc-card:hover .chf-spc-banner img { transform: none; }
}
