/* ============================================================
   NEWS PAGE — news.css
   ============================================================ */

.news-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 6% 80px;
}

/* ============================================================
   FEATURED SECTION
   Structure: .news-featured
                .news-featured-heading
                .news-featured-card
                  .news-featured-card__image > img
                  .news-featured-card__body
                    .news-featured-card__title
                    .news-featured-card__excerpt
                    .news-featured-card__date
   ============================================================ */

.news-featured {
  margin-bottom: 60px;
}

.news-featured-heading {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: #d4a017;
  margin-bottom: 30px;
}

.news-featured-card {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 40px;
}

/* Large image (left) */
.news-featured-card__image {
  flex: 0 0 54%;
  max-width: 54%;
  border-radius: 4px;
  overflow: hidden;
}

.news-featured-card__image img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* Text (right) */
.news-featured-card__body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
}

.news-featured-card__title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: #222;
  margin: 0;
}

.news-featured-card__excerpt {
  font-size: clamp(0.88rem, 1.3vw, 0.98rem);
  line-height: 1.75;
  color: #555;
  margin: 0;
}

.news-featured-card__date {
  font-size: 0.82rem;
  color: #999;
}

/* ============================================================
   OLDER POSTS SECTION
   Structure: .news-older
                .news-older-heading
                .news-older-list
                  .news-older-item (li)
                    .news-older-item__image > img
                    .news-older-item__body
                      .news-older-item__title
                      .news-older-item__excerpt
                      .news-older-item__date
                    .news-older-item__action
                      .btn-view
   ============================================================ */

.news-older-heading {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.news-older-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Each post row */
.news-older-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid #e8e8e8;
}

.news-older-item:first-child {
  border-top: 1px solid #e8e8e8;
}

/* Thumbnail (left) */
.news-older-item__image {
  flex: 0 0 120px;
  width: 120px;
  height: 90px;
  border-radius: 4px;
  overflow: hidden;
  background: #f0f0f0;
}

.news-older-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body (middle) */
.news-older-item__body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-older-item__title {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 600;
  color: #d4a017;
  margin: 0;
}

.news-older-item__excerpt {
  font-size: clamp(0.82rem, 1.2vw, 0.92rem);
  line-height: 1.65;
  color: #555;
  margin: 0;

  /* clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-older-item__date {
  font-size: 0.78rem;
  color: #999;
}

/* View button (right) */
.news-older-item__action {
  flex: 0 0 auto;
  margin-left: auto;
}

.btn-view {
  display: inline-block;
  padding: 12px 36px;
  background-color: #5c1a5a;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-view:hover {
  background-color: #7a2278;
  transform: translateY(-1px);
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */

.btn-back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #5c1a5a;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.btn-back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-back-top:hover {
  background-color: #7a2278;
  transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet portrait */
@media (max-width: 768px) {
  .news-main {
    padding: 40px 5% 60px;
  }

  .news-featured-card {
    flex-direction: column;
    gap: 24px;
  }

  .news-featured-card__image {
    flex: unset;
    max-width: 100%;
    width: 100%;
  }

  .news-featured-card__image img {
    max-height: 300px;
  }

  .news-older-item {
    gap: 16px;
  }

  .news-older-item__image {
    flex: 0 0 100px;
    width: 100px;
    height: 76px;
  }
}

/* Mobile */
@media (max-width: 560px) {
  .news-main {
    padding: 30px 4% 50px;
  }

  /* Stack older post items vertically on small screens */
  .news-older-item {
    flex-wrap: wrap;
    gap: 12px;
  }

  .news-older-item__image {
    flex: 0 0 80px;
    width: 80px;
    height: 64px;
  }

  .news-older-item__action {
    margin-left: 0;
    width: 100%;
  }

  .btn-view {
    width: 100%;
    text-align: center;
  }

  .btn-back-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}