:root {
  --color-magenta-dark: #880D4F;
  --color-pink-hot: #FF2BAB;
  --color-pink-light: #FFBECD;
  --color-text-dark: #111111;
  --color-white: #FFFFFF;
}

/* 
  Container Setup & Visual Reordering 
  Maps the HTML DOM order to the visual layout
*/
.dftg-stories {
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
}

.dftg-featured-story { order: 1; }
.dftg-stories__header { order: 2; }
.dftg-stories__grid { order: 3; }
.pagination { order: 4; }
.dftg-cta { order: 5; }

/* --- Featured Story --- */
.dftg-featured-story {
  background-color: var(--color-magenta-dark);
  color: var(--color-white);
  display: grid;
  grid-template-columns: 1fr; /* Stacks image and text on mobile */
  padding: 0; /* Removes the 4rem 2vw padding causing the magenta border */
}

/* Switches to the 50/50 split on desktop */
@media (min-width: 900px) {
  .dftg-featured-story {
    grid-template-columns: 1fr 1fr; 
  }
}

/* Forces the link wrapper to fill the entire left grid cell */
.dftg-featured-story__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* Forces the image to cover the cell completely without stretching */
.dftg-featured-story__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dftg-featured-story__content {
  max-width: 600px;
  width: 100%;
  margin: 0 auto; /* Horizontally centers the text block inside the right half */
  padding: 4rem 3rem; /* Adjusts padding to match the design */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center; /* Vertically centers the text block */
  gap: 1.5rem;
  box-sizing: border-box;
}

.dftg-featured-story__eyebrow {
  color: var(--color-pink-light);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
  font-family: alternate-gothic-condensed-a, sans-serif;
  color: #ffbecd;
  font-size: 3rem;
  font-weight: 600;
}

.dftg-featured-story__quote {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
  font-family: alternate-gothic-condensed-a, sans-serif;
}

/* Automatically adds the quotation marks seen in the intended design */
.dftg-featured-story__quote::before {
  content: "“";
}
.dftg-featured-story__quote::after {
  content: "”";
}

/* --- Pink Intro Banner --- */
.dftg-stories__header {
  background-color: var(--color-pink-hot);
  color: var(--color-white);
  text-align: center;
  padding: 4rem 2rem;
}

/* Visually hide the H1 since it is excluded from the banner in the mockup[cite: 1] */
.dftg-stories__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dftg-stories__intro {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.4;
}

/* --- Grid & Cards --- */
.dftg-stories__grid {
    display: grid;
    grid-template-columns: 1fr; /* Forces 1 column on mobile screens */
    gap: 2.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Optional: Adds a 2-column layout for tablets */
@media (min-width: 600px) {
    .dftg-stories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Switches to 3 columns on desktop */
@media (min-width: 900px) {
    .dftg-stories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dftg-story-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.dftg-story-card__image-link {
  width: 100%;
  display: block;
}

.dftg-story-card__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.dftg-story-card:hover .dftg-story-card__image {
  filter: grayscale(0%);
}

.dftg-story-card__title {
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 0;
}

.dftg-story-card__title a {
  color: var(--color-magenta-dark);
  text-decoration: none;
  font-size: 25px;
}

/* --- Buttons --- */
.dftg-featured-story__link,
.dftg-story-card__link,
.dftg-cta__link {
  background-color: var(--color-pink-light);
  color: var(--color-magenta-dark);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  font-family: alternate-gothic-condensed-a, sans-serif;
  border-radius: 6px;
}

.dftg-featured-story__link,
.dftg-cta__link {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
}

.dftg-story-card__link {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.dftg-featured-story__link:hover,
.dftg-story-card__link:hover,
.dftg-cta__link:hover {
  /* background-color: var(--color-white);
  transform: translateY(-2px);*/
}

/* Story Card Quote Excerpt */
.dftg-story-card__quote {
    color: #880D4F;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 1.5rem 0;
    font-family: system-ui, -apple-system, sans-serif;
}

/* --- Bottom CTA --- */
.dftg-cta {
  background-color: var(--color-magenta-dark);
  color: var(--color-white);
  text-align: center;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.dftg-cta__title {
  font-size: clamp(2rem, 5vw, 4rem);
  text-transform: uppercase;
  color: var(--color-pink-light);
  line-height: 1;
  margin: 0;
  font-family: 'alternate-gothic-atf', sans-serif;
  font-weight: 900;
}

.dftg-cta__title a {
    font-family: 'alternate-gothic-atf', sans-serif;
    font-size: 28px;
}

.dftg-cta__copy {
  max-width: 600px;
  line-height: 1.6;
  font-size: 1.125rem;
  margin: 0 0 1rem 0;
}

/* --- Pagination Base --- */
.navigation.pagination {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

/* 1. Make the card a flex container stacked vertically */
.dftg-story-card {
    display: flex;
    flex-direction: column;
    height: 100%; 
}

/* 2. Push the button to the bottom of the available space */
.dftg-story-card__link {
    margin-top: auto;
}

@media (max-width: 390px) {
    article {
        margin-bottom: 0;
    }
}

@media (min-width: 1146px) and (max-width: 1440px) {
    .dftg-featured-story__eyebrow {
        font-size: 2rem;
    }
}