/* article.css — part of NAOMI TOFU design system */

/* --------------------------------------------------------------------------
   25. News article page
   -------------------------------------------------------------------------- */

.article {
  max-width: 48rem;
  margin-inline: auto;
}

.article__hero {
  position: relative;
  /* Center the image and limit its size so it doesn't dominate the screen.
     The image keeps its natural aspect ratio (no cropping), but is capped
     at max-width: 32rem and max-height: 60vh for a balanced layout. */
  text-align: center;
  margin-bottom: 2rem;
}
.article__hero img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  display: inline-block;
}
@media (min-width: 768px) {
  .article__hero img {
    max-width: 32rem;
  }
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--mute);
}

.article__title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-wrap: balance;
}
@media (min-width: 768px) {
  .article__title { font-size: 2.5rem; }
}

.article__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .article__body { font-size: 1.125rem; line-height: 1.8; }
}
.article__body p { white-space: pre-line; }

/* Gallery grid for multi-image articles */
.article__gallery-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.article__gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .article__gallery { grid-template-columns: repeat(2, 1fr); }
}

.article__gallery-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream);
}
.article__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* For portrait photos of people, focus on the top (faces) so we don't
     crop heads when the container is slightly narrower than the image. */
  object-position: center 20%;
  transition: transform 0.5s ease;
}
.article__gallery-item:hover img { transform: scale(1.03); }

.article__source {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--mute);
  margin-bottom: 2rem;
}
.article__source a {
  color: var(--naomi-greentea-text);
  word-break: break-all;
}
.article__source a:hover { text-decoration: underline; }

.article__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
  margin-bottom: 3rem;
}
@media (min-width: 640px) {
  .article__cta { flex-direction: row; padding: 2rem; }
}
.article__cta-text {
  flex: 1;
}
.article__cta-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.article__cta-text p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.article__cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 14rem;
}
@media (min-width: 640px) {
  .article__cta-buttons { min-width: 16rem; }
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--mute);
  transition: color 0.2s ease;
  margin-bottom: 1.5rem;
}
.article__back:hover { color: var(--ink); }
.article__back svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}
.article__back:hover svg { transform: translateX(-3px); }

/* Other news section on article page */
.other-news { margin-top: 3rem; }
@media (min-width: 768px) { .other-news { margin-top: 4rem; } }
.other-news__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .other-news__title { font-size: 1.875rem; }
}


/* --------------------------------------------------------------------------
   29.9 News article page on small screens
   -------------------------------------------------------------------------- */

@media (max-width: 639px) {
  .article__title {
    font-size: 1.5rem;
  }
  .article__body {
    font-size: 1rem;
    line-height: 1.7;
  }
  .article__cta {
    padding: 1.25rem;
  }
  .article__cta-text h3 {
    font-size: 1.125rem;
  }
  .article__hero img {
    max-height: 50vh;
  }
  .article__gallery {
    gap: 0.625rem;
  }
}

