/* blocks/topic-grid/topic-grid.css */

/* -----------------------------------
   Wrapper
----------------------------------- */
.topic-grid.section-wrap {
  padding: 0;
}

.topic-grid.section-wrap .section-wrap {
  padding: 3rem 1.5rem 3rem 1.5rem;
}

.topic-grid .section-wrap.section-width-full {
  max-width: 100%;
  /* padding: 0; */
}

.topic-grid.section-wrap .grid-background-light-gray {
  background-color: #f6f6f6;
}

.topic-grid.section-wrap .grid-background-maroon {
  background-color: #500000;
  color: #fff;
}

.topic-grid.section-wrap .grid-background-charcoal {
  background-color: #202020;
  color: #fff;
}

.topic-grid.section-wrap .grid-background-maroon h2,
.topic-grid.section-wrap .grid-background-charcoal h2 {
  color: #d6d3c4;
}

.topic-grid.section-wrap h2 {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 400;
  font-size: 2rem;
  text-transform: none;
}
  
/* Keep the inner wrapper to constrain width if your theme uses a container */
.topic-grid__inner {
  width: min(100%, var(--container-max, 1200px));
  margin-inline: auto;
  padding-inline: var(--container-pad, 1rem);
}
  
/* -----------------------------------
    Section Intro
----------------------------------- */
.topic-grid .section-intro__container {
  display: flex;
}

.topic-grid .section-intro-centered .section-intro__content {
  margin: 0px auto;
}

.topic-grid .section-intro-featured h2 {
  font-family: "Work Sans", Arial, sans-serif;
  font-weight: 700;
  color: #500000;
  font-size: 2.625rem;
  text-transform: uppercase;
}

  
/* -----------------------------------
    Grid
----------------------------------- */
.topic-grid .card-container {
  display: block;
}

.topic-grid .card-container__topics .card--topic {
  width: 100%;
}
 
.topic-grid .card-container__topics .card--topic .card__content {
  padding: 1rem;
}

/* -----------------------------------
    Card
----------------------------------- */
.topic-grid .card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 0;
  overflow: hidden;
}

.topic-grid article {
  background: #faf7f3;
  padding: 0;
}

.topic-grid .card-group--on-dark article {
  background-color: #3c0000;
}
  
/* -----------------------------------
    Headings & Text
----------------------------------- */
.topic-grid .heading-group {
  display: grid;
  gap: 0.35rem;
}

.topic-grid .heading-group p {
  margin-bottom: 0;
}

/* .topic-grid .h5,
.topic-grid h3.h5 {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.25;
  margin: 0;
} */

/* .topic-grid .h5 a {
  color: var(--link-color, inherit);
  text-decoration: none;
  outline: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.topic-grid .h5 a:hover {
  color: var(--link-hover, #0f766e);
  border-bottom-color: currentColor;
}

.topic-grid .h5 a:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 30%, transparent);
  border-radius: 6px;
} */

.topic-grid .subhead {
  margin: 0;
  color: var(--muted-fg, #4b5563);
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.45;
}
  
/* -----------------------------------
     Topic Grid
  ----------------------------------- */
  
.topic-grid .card-container__topics {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
}

/* Image area */
.topic-grid .card__image {
  display: block;
  aspect-ratio: 7 / 5;
  margin-bottom: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.topic-grid .card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When images are off */
.topic-grid.no-images .card__image { display: none; }

/* Base: small screens = 1 col */
.topic-grid .card-container__topics {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* ≥768px: medium screens = 2 cols */
@media (min-width: 768px) {
  .topic-grid .card__image {
    aspect-ratio: 1 / 1;
  }

  .topic-grid .card-container__topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≥1024px: large+ use the cols-* class selection */
@media (min-width: 1100px) {
  .topic-grid .card__image {
    aspect-ratio: 5 / 7;
  }

  .topic-grid .cols-1 .card-container__topics { grid-template-columns: repeat(1, minmax(0,1fr)); }
  .topic-grid .cols-2 .card-container__topics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topic-grid .cols-3 .card-container__topics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .topic-grid .cols-4 .card-container__topics { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
