@charset "UTF-8";

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
  position: relative;
  height: 40vh;
  min-height: 300px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
}

.page-header__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
  z-index: -1;
}

.page-header__content {
  position: relative;
  z-index: 10;
}

.page-header__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
  .page-header__title {
    font-size: 3rem;
  }
}

.page-header__subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* ==========================================================================
   News Intro
   ========================================================================== */
.news-intro__container {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.news-intro__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .news-intro__title {
    font-size: 1.875rem;
  }
}

.news-intro__text {
  color: rgba(74, 64, 58, 0.8);
  line-height: 2;
  text-align: left;
}

/* ==========================================================================
   News List & Filter
   ========================================================================== */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.news-filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-family: var(--font-serif);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: 1px solid rgba(74, 64, 58, 0.2);
  color: rgba(74, 64, 58, 0.6);
  background-color: transparent;
  transition: all 0.3s ease;
}

@media screen and (min-width : 500px) {
  .news-filter-btn {
    padding: 0.5rem 1.5rem;
  }
}

.news-filter-btn:hover,
.news-filter-btn.is-active {
  border-color: var(--color-text);
  background-color: var(--color-text);
  color: var(--color-white);
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.news-card {
  height: 100%;
}

/* Hidden by default for filtering */
.news-card.is-hidden {
  display: none;
}

.news-card__inner {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-card__inner:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.news-card__img-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: #f0f0f0;
  overflow: hidden;
}

.news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.news-card__inner:hover .news-card__img {
  transform: scale(1.1);
}

.news-card__no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(74, 64, 58, 0.2);
  font-family: var(--font-serif);
  font-style: italic;
}

.news-card__cat {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
  background-color: rgba(255, 255, 255, 0.9);
}

.news-card__cat--new {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.news-card__cat--event {
  border-color: var(--color-secondary);
  color: var(--color-text);
}

.news-card__cat--info {
  border-color: rgba(74, 64, 58, 0.2);
  color: rgba(74, 64, 58, 0.6);
}

.news-card__body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: rgba(74, 64, 58, 0.5);
  margin-bottom: 0.75rem;
}

.news-card__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.news-card__inner:hover .news-card__title {
  color: var(--color-primary);
}

.news-card__footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.news-card__more {
  font-size: 0.75rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: all 0.3s ease;
}

.news-card__inner:hover .news-card__more {
  opacity: 1;
  transform: translateX(0);
}

/* Hidden Content Container */
.news-content-hidden {
  display: none;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.news-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

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

.news-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.news-modal__container {
  position: relative;
  background-color: var(--color-white);
  width: 100%;
  max-width: 48rem; /* max-w-3xl */
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 2px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  z-index: 10;
}

.news-modal.is-open .news-modal__container {
  transform: translateY(0);
}

.news-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius: 50%;
  color: var(--color-text);
  transition: background-color 0.3s ease;
}

.news-modal__close:hover {
  background-color: #f3f4f6;
}

.news-modal__img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f0f0f0;
}

.news-modal__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-modal__body {
  padding: 2rem;
}

@media (min-width: 768px) {
  .news-modal__body {
    padding: 3rem;
  }
}

.news-modal__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.news-modal__cat {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-text); /* Fallback */
}

/* Specific modal cat colors handled via JS copying classes */

.news-modal__date {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: rgba(74, 64, 58, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-modal__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .news-modal__title {
    font-size: 1.875rem;
  }
}

.news-modal__text {
  font-size: 1rem;
  color: rgba(74, 64, 58, 0.8);
  line-height: 2;
}

.news-modal__text p {
  margin-bottom: 1.5rem;
}

.news-modal__footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(74, 64, 58, 0.1);
  text-align: center;
}

.news-modal__back {
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 0.25rem;
  transition: all 0.3s ease;
}

.news-modal__back:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}
