/**
 * @file
 * Article component styles.
 *
 * Provides styling for the Article content type template including
 * the Hero Small / No Headline header, metadata display, and footer sections.
 * Matches the Figma spec at node 6495:12910.
 */

/* ==========================================================================
   ARTICLE LAYOUT
   ========================================================================== */

.article {
  width: 100%;
}

/* ==========================================================================
   ARTICLE HERO — No Headline Variant
   
   The hero container is in normal flow and grows to fit its children.
   The background bar (maroon + pattern) is absolutely positioned at a 
   fixed height. The image is in normal flow so the container expands
   naturally, preventing overlap with the title below.
   ========================================================================== */

.article-hero {
  position: relative;
  width: 100%;
  min-height: 363px;
  padding-top: 56px;
  margin-bottom: 2rem;
}

/* Background layer: solid maroon bar + pattern (fixed height) */
.article-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 363px;
  background-color: #500617;
  overflow: hidden;
  z-index: 0;
}

/* Diagonal red pattern — left edge */
.article-hero__pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 63px;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Image — in normal flow, centered, with top padding from bar top */
.article-hero__image {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: calc(48.125rem + var(--gs-margin) * 2);
  padding: 0 var(--gs-margin);
  box-sizing: border-box;
  margin: 0 auto;
}

/* Let the image scale its height naturally */
.article-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Drupal media entity wrappers — strip margin/padding so image fills area */
.article-hero__image .field,
.article-hero__image .field__item,
.article-hero__image article.media,
.article-hero__image .media .field,
.article-hero__image .media .field__item {
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   ARTICLE HEADER (Title + Meta below hero)
   ========================================================================== */

.article__header {
  padding-bottom: var(--space-4, 1rem);
}

/* ==========================================================================
   ARTICLE TITLE
   ========================================================================== */

.article__title {
  font-family: 'Gelasio', serif;
  font-weight: 700;
  font-size: 3rem;
  color: #840029;
  line-height: 1.333;
  margin: 0;
}

/* ==========================================================================
   ARTICLE META (Date)
   ========================================================================== */

.article-meta-top {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding-block: 0 2.5rem;
}

.article__meta {
  margin-top: 10px;
}

.article__date {
  font-family: 'Gotham', sans-serif;
  font-weight: 700;
  font-size: 1rem; /* 16px */
  line-height: 1.18;
  color: #500617;
  display: block;
  text-align: right;
}

.article-back-btn-link {
  text-align: left;
  text-decoration: none;
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */

.article__content {
  width: 100%;
}

/* ==========================================================================
   ARTICLE FOOTER (Tags)
   ========================================================================== */

.article__footer {
  max-width: 60rem;
  margin: var(--space-6) auto;
  padding: 0 var(--space-4);
  border-top: 1px solid #e5e5e5;
  padding-top: var(--space-4);
}

.article__tags .field__label {
  font-family: 'Gelasio', serif;
  font-weight: 700;
  color: #840029;
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.article__tags .field__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.article__tags .field__item a {
  font-family: 'Gelasio', serif;
  font-size: 0.875rem;
  color: #500617;
  background-color: #f5f5f5;
  padding: var(--space-1) var(--space-3);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.article__tags .field__item a:hover,
.article__tags .field__item a:focus {
  background-color: #840029;
  color: #fff;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 1024px) {
  .article__title {
    font-size: 2.5rem;
  }

  .article-hero__bg {
    height: 300px;
  }

  .article-hero {
    min-height: 300px;
    padding-top: 45px;
  }

  .article-hero__bg {
    height: 250px;
  }

  .article-hero {
    min-height: 250px;
    padding-top: 35px;
    margin-bottom: 1.5rem;
  }

  .article__footer {
    padding: 0 var(--space-3);
    padding-top: var(--space-4);
  }
}

@media (max-width: 567px) {
  .article__title {
    font-size: 1.5rem;
  }

  .article-hero__bg {
    height: 180px;
  }

  .article-hero {
    min-height: 180px;
    padding-top: 25px;
    margin-bottom: 1rem;
  }



  .article__date {
    font-size: 0.875rem;
  }
}
