/* ==============================================
   homeartikel.css — Ringlock Indonesia Blog Index
   Custom styles yang melengkapi Tailwind CSS.
   ============================================== */

/* -----------------------------------------------
   BASE
----------------------------------------------- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -----------------------------------------------
   NAVBAR — Mobile Menu transition
----------------------------------------------- */
#mobile-menu {
  transition: max-height 0.35s ease, opacity 0.3s ease;
}
#mobile-menu.open {
  max-height: 360px;
  opacity: 1;
}

/* -----------------------------------------------
   NAVBAR — Nav link underline hover effect
----------------------------------------------- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: rgb(0, 35, 111);
  transition: width 0.25s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* -----------------------------------------------
   NAVBAR — Stronger shadow on scroll
----------------------------------------------- */
#navbar {
  transition: box-shadow 0.2s ease;
}

/* -----------------------------------------------
   HERO BANNER — Responsive height
   Desktop tall, mobile more compact.
----------------------------------------------- */
.hero-banner-height {
  min-height: 300px;
  height: 360px;
}

@media (min-width: 640px) {
  .hero-banner-height {
    height: 420px;
  }
}

@media (min-width: 1024px) {
  .hero-banner-height {
    height: 440px;
  }
}

/* -----------------------------------------------
   ARTICLE CARDS — hover lift
----------------------------------------------- */
.article-card {
  transition: transform 0.25s ease;
}
.article-card:hover {
  transform: translateY(-3px);
}

/* -----------------------------------------------
   ARTICLE CARDS — line clamp for excerpt
   (Tailwind CDN may not have line-clamp plugin)
----------------------------------------------- */
/* .line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
} */

/* -----------------------------------------------
   FILTER BUTTONS — active state managed by JS
----------------------------------------------- */
.filter-btn {
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.filter-btn.active-filter {
  background-color: rgb(0, 35, 111) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 35, 111, 0.25);
}

/* -----------------------------------------------
   ARTICLE CARD — image zoom container
   Ensures rounded corners are not broken on zoom
----------------------------------------------- */
.article-card a.block {
  display: block;
}
.article-card a.block img {
  will-change: transform;
}

/* -----------------------------------------------
   FOOTER — link transitions
----------------------------------------------- */
footer a {
  transition: color 0.2s ease;
}

/* -----------------------------------------------
   READING PROGRESS BAR
----------------------------------------------- */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, rgb(0, 35, 111), rgb(59, 130, 246));
  z-index: 100;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* -----------------------------------------------
   SCROLL-TO-TOP button
----------------------------------------------- */
#scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(0, 35, 111);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 49;
  box-shadow: 0 4px 14px rgba(0, 35, 111, 0.35);
}
#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#scroll-top:hover {
  transform: translateY(-2px);
  background: rgb(30, 64, 175);
}

/* -----------------------------------------------
   EMPTY STATE fade animation
----------------------------------------------- */
#empty-state {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------
   Card grid — fade-in on filter change
----------------------------------------------- */
.article-card {
  animation: cardFadeIn 0.3s ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.article-card.hiding {
  display: none;
}