/* ==========================================================================
   13_news.css — What's News Section & Modal
   ========================================================================== */

/* ---------- Section ---------- */

.news-section {
  background-color: var(--color-bg-light);
  padding: 6rem 1rem;
}

.news-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.news-section-heading {
  text-align: center;
  margin-bottom: 4rem;
}

.news-section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text-main);
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.news-section-subtitle {
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---------- Grid ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ---------- Card ---------- */

.news-card {
  background: #fff;
  overflow: hidden;
}

/* ---------- Thumbnail ---------- */

.news-thumbnail {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}

.news-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-thumbnail:hover img,
.news-thumbnail:focus img {
  transform: scale(1.05);
}

.news-thumbnail:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.news-zoom-icon {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.news-thumbnail:hover .news-zoom-icon,
.news-thumbnail:focus .news-zoom-icon {
  opacity: 1;
}

/* ---------- Text ---------- */

.news-body {
  padding: 1.25rem 1rem;
}

.news-date {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.news-title {
  font-family: var(--font-japanese);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-main);
  line-height: 1.6;
  margin: 0;
}

.news-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.news-content {
  font-family: var(--font-japanese);
  font-size: 0.9rem;
  color: var(--color-text-main);
  line-height: 1.7;
}

.news-content p {
  margin: 0 0 0.5rem;
}

.news-content p:last-child {
  margin-bottom: 0;
}

.news-content a {
  color: var(--color-primary);
  text-decoration: underline;
  word-break: break-word;
}

.news-content a:hover,
.news-content a:focus {
  opacity: 0.75;
}

/* ---------- Modal ---------- */

.news-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.news-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.news-modal-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
}

.news-modal-image {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.news-modal-close {
  position: absolute;
  top: -2.5rem;
  right: -0.5rem;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.news-modal-close:hover {
  opacity: 0.7;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-section {
    padding: 4rem 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ---------- Accessibility: Reduced Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .news-thumbnail img {
    transition: none;
  }

  .news-modal {
    transition: none;
  }
}
