/* News Archive Styles */
.news-archive {
  width: 100%;
  min-height: 100vh;
  padding: 2rem 0;
  background: var(--Tertiary-40, #FBF3F2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2.5rem;
}

.news-archive-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header Styles */
.news-archive-header {
  width: 100%;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2rem; /* gap-8 = 2rem = 32px */
  margin-bottom: 2.5rem;
}

.news-archive-header-line {
  flex: 1;
  height: 0;
  outline: 1.5px solid var(--Primary-100, #680144);
  outline-offset: -0.75px;
}

.news-archive-header-text {
  justify-content: flex-start;
  color: var(--Primary-100, #680144);
  font-family: "Calluna", serif;
  font-size: 52px;
  font-style: italic;
  font-weight: 400;
  line-height: 110%; /* 57.2px */
  letter-spacing: -1.04px;
  white-space: nowrap;
}

.news-archive-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  column-gap: 1rem; /* Horizontal spacing only */
  row-gap: 0; /* Vertical spacing handled by card margin-bottom */
}

/* Cards in odd rows (3 per row) */
.news-archive-card-odd-row {
  flex: 0 0 calc(33.333% - 0.667rem);
  max-width: calc(33.333% - 0.667rem);
}

/* Cards in even rows (4 per row) */
.news-archive-card-even-row {
  flex: 0 0 calc(25% - 0.75rem);
  max-width: calc(25% - 0.75rem);
}

/* News Card */
.news-archive-card {
  height: 504px;
  padding-bottom: 99px; /* Reserve space for hover expansion (603px - 504px) to prevent section height change */
  box-sizing: content-box; /* Padding adds to height */
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  overflow: hidden;
  text-decoration: none;
  transition: height 0.3s ease, padding-bottom 0.3s ease;
  gap: 0;
}

.news-archive-card:hover {
  height: 603px;
  padding-bottom: 0; /* Remove padding when expanded since height now includes the space */
}

/* Image Wrapper */
.news-archive-card-image-wrapper {
  width: 100%;
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  overflow: hidden;
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.news-archive-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: aspect-ratio 0.3s ease;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: top;
}

.news-archive-card:hover .news-archive-card-image {
  aspect-ratio: 4 / 3;
}

.news-archive-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--Primary-100, #680144);
  opacity: 0.1;
}

/* Content Section */
.news-archive-card-content {
  width: 100%;
  padding: 1.5rem;
  border-left: 1.5px solid var(--Primary-100, #680144);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 1rem;
  overflow: hidden;
  position: relative;
  background: transparent;
  transition: all 0.3s ease;
}

/* Category */
.news-archive-card-category {
  width: 100%;
  color: var(--Primary-60, #A0638B);
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Title */
.news-archive-card-title {
  width: 100%;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 120%;
  letter-spacing: -1.2px;
  margin: 0;
  padding: 0;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Description */
.news-archive-card-description {
  width: 100%;
  overflow: hidden;
  color: var(--Primary-100, #680144);
  text-overflow: ellipsis;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: -0.32px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Hover Background Effect */
.news-archive-card-hover-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--Primary-100, #680144);
  transition: width 0.3s ease;
  z-index: 1;
}

.news-archive-card:hover .news-archive-card-hover-bg {
  width: 100%;
}

.news-archive-card:hover .news-archive-card-category,
.news-archive-card:hover .news-archive-card-title,
.news-archive-card:hover .news-archive-card-description {
  color: #ffffff;
}

/* Load More Button Wrapper */
.news-archive-load-more-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  padding: 0 2rem;
}

/* Load More Button */
.news-archive-load-more-btn {
  width: 192px; /* w-48 = 12rem = 192px */
  padding: 1rem; /* p-4 = 1rem = 16px */
  border-radius: 0.5rem; /* rounded-lg = 0.5rem = 8px */
  outline: 1px solid var(--Primary-100, #680144);
  outline-offset: -0.5px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem; /* gap-2.5 = 0.625rem = 10px */
  transition: all 0.3s ease;
}

.news-archive-load-more-btn:hover {
  background: var(--Primary-100, #680144);
}

.news-archive-load-more-btn:hover .news-archive-load-more-text {
  color: #ffffff;
}

.news-archive-load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.news-archive-load-more-text {
  flex: 1;
  text-align: center;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 18px; /* text-lg = 1.125rem = 18px */
  font-weight: 400;
  line-height: 24px; /* leading-6 = 1.5rem = 24px */
  transition: color 0.3s ease;
}

/* Responsive - Desktop/Laptop (1024px+) */
@media (min-width: 1024px) {
  .news-archive {
    padding: 2rem 0;
  }
  
  .news-archive-container {
    padding: 0 2rem;
  }
  
  .news-archive-grid {
    gap: 1rem;
  }
  
  /* Grid uses flexbox with classes to determine width */
  .news-archive-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Responsive - Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .news-archive {
    min-height: auto;
    padding: 3rem 0;
    gap: 2rem;
  }
  
  .news-archive-container {
    padding: 0 2rem;
  }
  
  .news-archive-header {
    gap: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .news-archive-header-text {
    font-size: 42px;
    line-height: 110%;
    letter-spacing: -0.84px;
  }
  
  .news-archive-grid {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  
  .news-archive-card {
    flex: 0 0 calc(50% - 0.75rem);
    height: 500px;
    padding-bottom: 103px; /* Reserve space for hover expansion (603px - 500px) to prevent section height change */
  }
  
  .news-archive-card:hover {
    height: 603px;
    padding-bottom: 0; /* Remove padding when expanded */
  }
  
  .news-archive-card-odd-row,
  .news-archive-card-even-row {
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
  }
}

/* Responsive - Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .news-archive {
    min-height: auto;
    padding: 3rem 0;
    gap: 2rem;
  }
  
  .news-archive-container {
    padding: 0 1rem;
  }
  
  .news-archive-header {
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .news-archive-header-text {
    font-size: 32px;
    line-height: 110%;
    letter-spacing: -0.64px;
  }
  
  .news-archive-grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .news-archive-card {
    width: 100%;
    height: auto;
    min-height: 400px;
    margin-bottom: 0; /* No margin needed on mobile (single column layout) */
  }
  
  .news-archive-card-odd-row,
  .news-archive-card-even-row {
    width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .news-archive-card-image-wrapper {
    min-height: 250px;
  }
  
  .news-archive-card-title {
    font-size: 20px;
    letter-spacing: -0.8px;
  }
  
  .news-archive-card-category,
  .news-archive-card-description {
    font-size: 14px;
  }
  
  .news-archive-load-more-wrapper {
    padding: 0 1rem;
  }
  
  .news-archive-load-more-btn {
    width: 100%;
    max-width: 192px;
  }
}
