/* =========================================================================
   Homepage — News section (Tin Tức & Sự Kiện)
   ========================================================================= */

.hp-news {
  padding: 96px 0;
}

/* --- Head: title + view-all ------------------------------------------------ */
.hp-news__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.hp-news__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-news__title-section {
  margin: 0;
  color: #293948;
  font-family: var(--font-hn);
  font-weight: 700;
  font-size: 30px;
  line-height: 136%;
  letter-spacing: 0.01em;
}

.hp-news__desc-section {
  margin: 0;
  color: #616161;
  font-family: var(--font-hn);
  font-weight: 300;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.01em;
}

.hp-news__view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  color: #9E9E9E;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.hp-news__view-all svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.hp-news__view-all:hover,
.hp-news__view-all:focus {
  color: #D85401;
}

/* --- Grid: 3 columns ------------------------------------------------------- */
.hp-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

/* --- Carousel (variant hp-news--home) ------------------------------------- */
.hp-news__carousel {
  position: relative;
}

.hp-news__swiper {
  width: 100%;
  overflow: hidden;
}

.hp-news__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hp-news__prev,
.hp-news__next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.hp-news__prev:hover,
.hp-news__next:hover {
  opacity: 0.7;
}

.hp-news__prev.swiper-button-disabled,
.hp-news__next.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.hp-news__prev svg,
.hp-news__next svg {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}

@media screen and (max-width: 767px) {
  .hp-news__nav {
    margin-top: 24px;
  }

  .hp-news__prev,
  .hp-news__next {
    width: 40px;
    height: 40px;
  }

  .hp-news__prev svg,
  .hp-news__next svg {
    width: 40px;
    height: 40px;
  }
}

/* --- Article card (default — clinic & reuse) ------------------------------- */
.hp-news__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-news__image-link {
  display: block;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.hp-news__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hp-news__image-link:hover .hp-news__img {
  transform: scale(1.04);
}

.hp-news__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-news__date {
  color: #BDBDBD;
  font-family: var(--font-hn);
  font-weight: 300;
  font-size: 14px;
  line-height: 145%;
  letter-spacing: 0.01em;
}

.hp-news__title {
  margin: 0;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 20px;
  line-height: 138%;
  letter-spacing: 0.01em;
}

.hp-news__title a {
  color: #293948;
  text-decoration: none;
  transition: color 0.25s ease;
}

.hp-news__title a:hover,
.hp-news__title a:focus {
  color: #D85401;
}

.hp-news__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #BDBDBD;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.hp-news__more svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.hp-news__more:hover,
.hp-news__more:focus {
  color: #D85401;
}

.hp-news__more:hover svg,
.hp-news__more:focus svg {
  transform: translateX(3px);
}

/* =========================================================================
   Homepage variant (.hp-news--home)
   — white card box, ellipse bg, 1-line title
   ========================================================================= */

.hp-news--home {
  position: relative;
  overflow: hidden;
}

/* --- Background ellipses --------------------------------------------------- */
.hp-news__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hp-news__ellipse {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
}

.hp-news__ellipse--4 {
  width: 727px;
  height: 403px;
  top: 387px;
  left: 27.5%;
  background: #293948;
}

.hp-news__ellipse--5 {
  width: 727px;
  height: 399px;
  top: 296px;
  left: 55.5%;
  background: #D85401;
  opacity: 0.25;
}

.hp-news__ellipse--6 {
  width: 727px;
  height: 399px;
  top: 438px;
  left: 61%;
  background: #293948;
}

.hp-news__ellipse--7 {
  width: 727px;
  height: 399px;
  top: 517px;
  left: -14.5%;
  background: #84ADD3;
}

.hp-news--home > .container {
  position: relative;
  z-index: 1;
}

/* --- Card: white box variant ----------------------------------------------- */
.hp-news--home .hp-news__card {
  border-radius: 20px;
  overflow: hidden;
  background: #FFFFFF;
  gap: 0;
}

.hp-news--home .hp-news__image-link {
  border-radius: 0;
}

.hp-news--home .hp-news__meta {
  padding: 20px 20px 0;
}

.hp-news--home .hp-news__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-news--home .hp-news__more {
  padding: 0 20px 20px;
  margin-top: 12px;
}

/* --- Responsive ------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .hp-news {
    padding: 64px 0;
  }

  .hp-news__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 640px) {
  .hp-news {
    padding: 48px 0;
  }

  .hp-news__head {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .hp-news__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hp-news__title-section {
    font-size: 24px;
  }
}
