/* ==========================================================================
   REVISINEWS - BERANDA: HERO GRID & GRID BERITA TERBARU
   ========================================================================== */

/* 1. HERO SECTION --------------------------------------------------------- */
.rn-hero-section {
  margin-bottom: 32px;
}

.rn-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* 1a. KARTU HERO UTAMA (KIRI) */
.rn-hero-main-box {
  position: relative;
  height: 400px;
  min-width: 0;
}

.rn-hero-main-box .wp-block-query,
.rn-hero-main-box .rn-hero-post-template,
.rn-hero-main-box .rn-hero-post-template > li {
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rn-hero-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--rn-radius);
  background-color: var(--rn-heading);
  box-shadow: var(--rn-shadow-sm);
}

.rn-hero-img-wrap {
  position: absolute;
  inset: 0;
}

.rn-hero-img-wrap .wp-block-post-featured-image,
.rn-hero-img-wrap a {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.rn-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.rn-hero-card:hover .rn-hero-img-wrap img {
  transform: scale(1.04);
}

.rn-hero-overlay-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(
    to top,
    rgba(9, 14, 24, 0.95) 0%,
    rgba(9, 14, 24, 0.6) 45%,
    rgba(9, 14, 24, 0.05) 100%
  );
}

.rn-hero-badge {
  margin-bottom: 8px;
}

.rn-hero-badge .wp-block-post-terms {
  display: inline-block;
}

.rn-hero-badge a,
.rn-card-badge-small a,
.rn-card-img-badge a {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--rn-radius-xs);
  background-color: var(--rn-accent);
  color: var(--rn-on-accent);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rn-hero-badge a:hover,
.rn-card-badge-small a:hover,
.rn-card-img-badge a:hover {
  background-color: var(--rn-accent-hover);
  color: var(--rn-on-accent);
}

.rn-hero-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
}

.rn-hero-title a {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rn-hero-title a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--rn-accent);
  text-underline-offset: 3px;
}

.rn-hero-meta {
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
}

.rn-hero-meta time {
  color: inherit;
}

/* 1b. EMPAT KARTU HERO KECIL (KANAN) */
.rn-hero-sub {
  height: 400px;
  min-width: 0;
}

.rn-hero-sub .wp-block-query,
.rn-hero-sub .rn-sub-grid {
  height: 100%;
}

.rn-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rn-sub-grid > li {
  display: flex;
  min-height: 0;
}

.rn-sub-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-sm);
  background-color: var(--rn-surface);
  box-shadow: var(--rn-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rn-sub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rn-shadow-md);
}

.rn-sub-img {
  flex-shrink: 0;
  height: 108px;
  overflow: hidden;
}

.rn-sub-img .wp-block-post-featured-image,
.rn-sub-img a {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.rn-sub-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rn-sub-card:hover .rn-sub-img img {
  transform: scale(1.06);
}

.rn-sub-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 9px 11px 11px;
}

.rn-card-badge-small {
  margin: 0;
}

.rn-card-badge-small a {
  font-size: 9px;
  padding: 2px 6px;
}

.rn-sub-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.32;
}

.rn-sub-title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--rn-heading);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rn-sub-title a:hover {
  color: var(--rn-accent);
}

/* 2. GRID BERITA TERBARU ------------------------------------------------- */
.rn-latest-section {
  margin-top: 12px;
}

.rn-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.rn-latest-grid > li {
  display: flex;
  min-height: 0;
}

.rn-news-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-sm);
  background-color: var(--rn-surface);
  box-shadow: var(--rn-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rn-news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rn-shadow-md);
}

.rn-card-img {
  position: relative;
  height: 158px;
  overflow: hidden;
}

.rn-card-img a {
  display: block;
  width: 100%;
  height: 100%;
}

.rn-card-img img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rn-news-card:hover .rn-card-img img {
  transform: scale(1.06);
}

.rn-card-img-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.rn-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px 15px;
}

.rn-card-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--rn-text-muted);
}

.rn-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
}

.rn-card-title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--rn-heading);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rn-card-title a:hover {
  color: var(--rn-accent);
}

.rn-card-excerpt p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--rn-text-muted);
  font-size: 12.5px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 3. RESPONSIF ----------------------------------------------------------- */
@media screen and (max-width: 900px) {
  .rn-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rn-hero-main-box {
    height: 300px;
  }

  .rn-hero-sub {
    height: auto;
  }

  .rn-sub-grid {
    grid-auto-rows: 170px;
  }

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

@media screen and (max-width: 640px) {
  .rn-hero-main-box {
    height: 250px;
  }

  .rn-hero-overlay-content {
    padding: 14px;
  }

  .rn-hero-title {
    font-size: 16px;
  }

  .rn-sub-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 10px;
  }

  .rn-sub-grid > li {
    display: flex;
  }

  .rn-sub-card {
    flex-direction: row;
    align-items: center;
    padding: 8px;
    gap: 11px;
  }

  .rn-sub-img {
    width: 104px;
    height: 76px;
    border-radius: 6px;
  }

  .rn-sub-content {
    padding: 0;
  }

  .rn-latest-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .rn-card-img,
  .rn-card-img img {
    height: 172px;
  }
}
