/* ============================================
   HOME PAGE ENHANCED STYLES
   Modern, mature UI for RelaxAdviser
   ============================================ */

/* ========== HERO SECTION ========== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100dvh;
  padding-top: var(--header-height);
  overflow: hidden;
  margin-bottom: 0;
}

.hero-section__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-section__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-section__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(24, 24, 24, 0.3) 0%,
    rgba(24, 24, 24, 0.7) 60%,
    rgba(24, 24, 24, 0.95) 100%
  );
}

.hero-section__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  color: var(--color-white);
}

.hero-section__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-section__category {
  display: inline-flex;
  padding: 0.3750rem 0.7500rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.0312rem;
  transition: background-color 0.3s ease;
}

.hero-section__category:hover {
  background-color: var(--color-primary-hover);
}

.hero-section__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.2500rem;
  padding: 0.3750rem 0.7500rem;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(0.6250rem);
  border-radius: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.hero-section__rating .material-icons {
  font-size: var(--fs-1125);
  color: #ffd700;
}

.hero-section__title {
  font-size: clamp(1.5rem, 4.2vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  max-width: 56.2500rem;
}

.hero-section__title a {
  color: var(--color-white);
  transition: color 0.3s ease;
}

.hero-section__title a:hover {
  color: var(--color-primary);
}

.hero-section__description {
  font-size: clamp(var(--fs-sm), 2.2vw, var(--fs-lg));
  line-height: 1.5;
  margin-bottom: 1.7500rem;
  max-width: 43.7500rem;
  opacity: 0.95;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-section__footer {
  display: flex;
  align-items: center;
  gap: 1.5000rem;
  flex-wrap: wrap;
}

.btn--large {
  height: 3rem;
  padding: 0 1.7500rem;
  font-size: var(--fs-base);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5000rem;
}

.hero-section__info {
  display: flex;
  align-items: center;
  gap: 1.5000rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-section__date,
.hero-section__read-time {
  display: flex;
  align-items: center;
  gap: 0.3750rem;
  font-size: var(--fs-sm);
}

.hero-section__date .material-icons,
.hero-section__read-time .material-icons {
  font-size: var(--fs-1125);
}

/* ========== TRENDING BAR ========== */
.trending-section {
  padding: 2.5000rem 0;
  background-color: var(--color-bg-tertiary);
}

.trending-bar__header {
  margin-bottom: var(--section-header-margin-bottom);
}

.trending-section .content__title-icon {
  color: var(--color-primary);
}


.trending-rank {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 18, 18, 0.3);
}

/* Trending section specific styles */
.trending-section .article-card--enhanced {
  position: relative;
}

.trending-section .article-card--enhanced .article-card__poster {
  position: relative;
}

.trending-section .article-card--enhanced .article-card__description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

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



/* ========== SECTION HEADERS ========== */
.content__section--featured {
  background-color: var(--color-bg);
}

.content__section--list {
  background: linear-gradient(
    180deg,
    var(--color-bg-tertiary) 0%,
    var(--color-bg) 50%,
    var(--color-bg-tertiary) 100%
  );
  position: relative;
  overflow: hidden;
}

.content__section--list::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 20% 50%,
    rgba(255, 18, 18, 0.03) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 50%,
    rgba(255, 18, 18, 0.02) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
}

.content__section--list > .container {
  position: relative;
  z-index: 1;
}

.content__section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--section-header-margin-bottom);
}

.content__title {
  display: flex;
  align-items: center;
  gap: 0.7500rem;
  position: relative;
  padding-left: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.content__title:after {
  display: none;
}

.content__title-icon {
  font-size: var(--fs-2xl);
}

.content__section__header .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3750rem;
}

/* ========== FEATURED GRID LAYOUT ========== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5000rem;
}

.featured-grid .article-card--large {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

/* ========== ARTICLE LIST LAYOUT ========== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.article-list > * {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.article-list > *:nth-child(1) {
  animation-delay: 0.1s;
}

.article-list > *:nth-child(2) {
  animation-delay: 0.2s;
}

.article-list > *:nth-child(3) {
  animation-delay: 0.3s;
}

.article-list > *:nth-child(4) {
  animation-delay: 0.4s;
}

.article-list > *:nth-child(5) {
  animation-delay: 0.5s;
}

.article-list > *:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== ARTICLE GRID LAYOUT ========== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5000rem;
}

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

/* Large Desktop (75rem+) */
@media (min-width: 75rem) {
  .container {
    max-width: 87.5000rem;
  }

}

/* Desktop to Tablet (62rem - 75rem) */
@media (max-width: 75rem) {
  .featured-grid {
    gap: 1.2500rem;
  }

  .trending-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet (48rem - 62rem) */
@media (max-width: 62rem) {
  .hero-section__content {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 3.5000rem;
  }

  .hero-section__title {
    margin-bottom: 1.1250rem;
  }

  .hero-section__description {
    margin-bottom: 1.7500rem;
  }

  .hero-section__meta {
    margin-bottom: 1.25rem;
  }

  .btn--large {
    height: 2.7500rem;
    padding: 0 1.5000rem;
    font-size: 0.9375rem;
  }

  .trending-section {
    padding: 2rem 0;
  }

  .trending-grid {
    grid-template-columns: 1fr;
    gap: 1.2500rem;
  }

  .trending-rank {
    padding: 0.2rem 0.4rem;
    font-size: var(--fs-sm);
  }

  :root {
    --section-padding-vertical: 3.7500rem;
  }

  .content__section {
    padding: var(--section-padding-vertical) 0;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .featured-grid .article-card--large {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.2500rem;
  }
}

/* Mobile Large (36rem - 48rem) */
@media (max-width: 48rem) {
  .hero-section__content {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 3rem;
  }

  .hero-section__title {
    margin-bottom: 1rem;
  }

  .hero-section__description {
    line-height: 1.5;
    margin-bottom: 1.5000rem;
  }

  .btn--large {
    height: 2.7500rem;
    padding: 0 1.5000rem;
    font-size: 0.9375rem;
  }

  .hero-section__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .trending-section {
    padding: 1.5rem 0;
  }

  .trending-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .trending-rank {
    padding: 0.2rem 0.4rem;
    font-size: var(--fs-xs);
  }

  .article-card--v2 .article-card__title {
    font-size: var(--fs-base);
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  :root {
    --section-header-margin-bottom: 1.5000rem;
    --section-padding-vertical: 2.5000rem;
  }


  .content__section__header {
    margin-bottom: var(--section-header-margin-bottom);
  }

  .content__section {
    padding: var(--section-padding-vertical) 0;
  }

  .content__title {
    font-size: 1.5rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1.2500rem;
  }

  .featured-grid .article-card--large {
    grid-column: 1;
  }

  .article-list {
    gap: 1.5000rem;
  }

  .article-list > * {
    animation-delay: 0s !important;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 1.2500rem;
  }
}

/* Mobile Small (< 36rem) */
@media (max-width: 36rem) {
  .hero-section__content {
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 2.5000rem;
  }

  .hero-section__title {
    margin-bottom: 0.8750rem;
  }

  .hero-section__description {
    line-height: 1.5;
    margin-bottom: 1.3750rem;
  }

  .btn--large {
    height: 2.6250rem;
    padding: 0 1.2500rem;
    font-size: 0.875rem;
  }

  .hero-section__meta {
    gap: 0.5000rem;
    flex-wrap: wrap;
  }

  .hero-section__info {
    gap: 1rem;
    font-size: 0.875rem;
  }

  .trending-grid {
    gap: 0.75rem;
  }

  .trending-rank {
    padding: 0.15rem 0.3rem;
    font-size: 0.75rem;
  }

  .content__title {
    font-size: 1.25rem;
  }

  .content__title-icon {
    font-size: 1.5rem;
  }
}

/* ========== UTILITY CLASSES ========== */
.home-page {
  background-color: var(--color-bg);
}




/* ========== IMAGE LOADING ANIMATIONS ========== */
img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded,
img:not([data-src]) {
  opacity: 1;
}

/* ========== ARTICLE CARD ANIMATIONS ========== */
.article-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.article-card.animate-in,
.article-card:not([data-animate]) {
  opacity: 1;
  transform: translateY(0);
}

