.blog-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding-block: clamp(3rem, 6vw, 5rem);
  padding-left: clamp(3.2rem, 7vw, 4.8rem);
  padding-right: clamp(50rem, 24px, 24rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  border-radius: 0;
  background: #dbeafe;
  color: #0b2c6a;
  background-size: cover;
  background-position: center;
}
.blog-hero--blog {
  background-image: url("/images/cover/blog.webp");
}
.blog-hero--berita {
  background-image: url("/images/cover/berita.webp");
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start;
  text-align: left;
  max-width: 960px;
  width: 100%;
  margin: 0;
  transform: translateX(0);
}

@media (max-width: 1200px) {
  .blog-hero {
    padding-right: clamp(1.5rem, 6vw, 4.5rem);
    background-position: center;
  }

  .blog-hero-content {
    max-width: 640px;
  }

  .blog-hero-subtitle {
    max-width: 560px;
  }

  .blog-layout-inner {
    gap: clamp(1.5rem, 3vw, 2.4rem);
  }

  .blog-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 860px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tablet (<= 900px) */
@media (max-width: 900px) {
  .blog-hero {
    padding-left: clamp(0.8rem, 3vw, 1.2rem);   /* geser kiri lagi */
    padding-right: clamp(17rem, 5vw, 1.8rem);
    padding-block: clamp(2.5rem, 6vw, 4rem);
    background-position: center; /* fokus tengah, teks aman */
  }
  .blog-hero-content {
    margin-left: clamp(-4px, -0.3vw, -8px);     /* dorong sedikit ke kiri */
    transform: translateX(-6px);
    max-width: 520px;
  }
}

/* Mobile (<= 640px) */
@media (max-width: 640px) {
  .blog-hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-block: 2.25rem;
    border-radius: 0;
    background-position: center top; /* gambar tetap tampil tanpa memotong teks */
  }
  .blog-hero-content {
    max-width: 480px;
    gap: 0.9rem;
  }
  .blog-hero-title {
    font-size: clamp(1.8rem, 6vw, 2.1rem);
  }
  .blog-hero-subtitle {
    font-size: clamp(1rem, 3.8vw, 1.05rem);
    line-height: 1.6;
  }
}

/* Small mobile (<= 480px) */
@media (max-width: 480px) {
  .blog-hero {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-block: 2rem;
  }
  .blog-hero-content {
    max-width: 100%;
  }
}

.blog-hero-tag {
  display: inline-flex;
  align-self: center;
  padding: 0.4rem 1.35rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.blog-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.blog-hero-subtitle {
  max-width: 620px;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: #ffffff;
  line-height: 1.7;
}

.blog-layout-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  max-width: 1560px; /* tambah lebar area isi */
  margin-inline: auto;
}

.blog-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.toolbar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e3a8a;
}

.blog-grid {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  justify-content: flex-start;
}

/* 3 kolom hanya untuk layar sangat lebar (>= 1440px) */
@media (min-width: 1440px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    justify-content: flex-start;
  }
}

.blog-layout {
  padding-inline: clamp(1rem, 3vw, 1.75rem);
}

/* override Tailwind .container supaya kontainer blog full width */
.blog-layout.container {
  max-width: 100%;
}

.blog-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 0.15rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  cursor: pointer; /* kartu bisa diklik */
   border-top: 1px solid rgba(226, 232, 240, 0.95); /* garis tipis atas */
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 55px rgba(30, 64, 175, 0.26);
}

.blog-card figure {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
}

.blog-card figure img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 10px 25px rgba(29, 78, 216, 0.35);
}

.blog-card-content {
  padding: clamp(1.35rem, 2.6vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}

/* Typography khusus kartu Blog & Berita */
/* Body card = Inter, Heading = Signika */

.blog-card,
.blog-card-excerpt,
.blog-card-footer,
.sidebar-list-link,
.sidebar-meta {
  font-family: 'InterLocal', 'Inter', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Arial, sans-serif;
}

.blog-card-title {
  font-family: 'SignikaLocal', 'Signika', 'InterLocal', 'Inter',
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(1rem, 1.3vw, 1.25rem); /* sedikit lebih kecil */
  font-weight: 650;
  line-height: 1.35;
  color: #1e3a8a;
  letter-spacing: -0.012em;
  display: -webkit-box;
  line-clamp: 5;             /* lebih banyak baris supaya tidak cepat terpotong */
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Wrapper judul + excerpt */
.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}
.blog-card-excerpt {
  color: #475569;
  line-height: 1.65;
  font-size: 0.97rem;
  display: -webkit-box;
  line-clamp: 3;           /* tepat 3 baris */
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.65em * 3);
  margin-top: auto;        /* dorong excerpt ke bawah dalam body -> seragam */
}

.blog-card-footer-separator {
  margin-top: auto;            /* dorong garis + footer ke bawah, seragam */
  margin-bottom: 0.75rem;
  border-top: 1px solid #e2e8f0;
  width: 100%;
  align-self: stretch;         /* paksa garis mentok kiri–kanan di dalam card */
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.blog-card-footer span {
  display: inline-flex;
  align-items: center;
  color: #0f172a;
  font-weight: 500;
  font-size: 0.85rem;        /* lebih kecil supaya muat satu baris */
  white-space: nowrap;       /* author + tanggal diusahakan satu baris */
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  -o-object-fit: cover;
     object-fit: cover;
  flex-shrink: 0;
}

.blog-card-author {
  font-weight: 600;
  flex-shrink: 1;
  min-width: 0;
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.blog-card-author:hover,
.blog-card-author:focus {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-card-date {
  opacity: 0.8;
  font-weight: 500;
  margin-left: auto;   /* tanggal tetap mepet kanan */
  flex-shrink: 0;
}

.blog-card-footer a {
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.blog-card-footer a:hover {
  gap: 0.55rem;
}

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.75rem;
  padding: 1.6rem;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.sidebar-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 1.1rem;
}

.sidebar-card--latest {
  padding: 1.25rem 1.25rem 0.95rem;
  border-radius: 1.5rem;
  box-shadow: 0 14px 26px rgba(148, 163, 184, 0.18);
}

.sidebar-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.sidebar-card-underline {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-list--card .sidebar-list-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.15rem 0;
  border-radius: 0.75rem;
  transition: transform 0.25s ease;
}

.sidebar-list--card .sidebar-list-item:hover {
  transform: translateX(6px);
}

.sidebar-thumbnail {
  width: 110px;
  height: 75px;
  border-radius: 0.75rem;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  background: #e2e8f0;
  flex-shrink: 0;
}

.sidebar-list-link {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sidebar-list-link > span:first-child {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.28;
  text-transform: capitalize;
}

.sidebar-list-link:hover {
  color: #2563eb;
}

.sidebar-meta {
  font-size: 0.75rem;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.sidebar-card.spotlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.16));
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: #0f172a;
}

.sidebar-card.spotlight p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #0f172a;
}

.sidebar-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #1d4ed8;
  font-weight: 600;
}

.sidebar-cta::after {
  content: "→";
  transition: transform 0.2s ease;
}

.sidebar-cta:hover::after {
  transform: translateX(4px);
}

.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.blog-pagination.is-hidden {
  display: none;
}

.blog-pagination-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.blog-pagination-button:hover:not(.is-active):not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(30, 64, 175, 0.15);
  border-color: rgba(37, 99, 235, 0.6);
}

.blog-pagination-button.is-active {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.blog-pagination-button.is-disabled,
.blog-pagination-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.blog-pagination-ellipsis {
  color: #64748b;
  font-weight: 600;
  margin: 0 0.2rem;
}

.blog-card-skeleton {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
  animation: pulse 1.8s ease-in-out infinite;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1.1rem;
  background: linear-gradient(120deg, #e2e8f0 30%, #f8fafc 50%, #e2e8f0 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.skeleton-badge,
.skeleton-title,
.skeleton-text {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, #e2e8f0 30%, #f8fafc 50%, #e2e8f0 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}

.skeleton-title {
  width: 75%;
  height: 18px;
}

.skeleton-text {
  width: 95%;
}

.skeleton-text.short {
  width: 55%;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: -200% 50%;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

@media (min-width: 960px) {
  .blog-hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .blog-hero-figure {
    display: flex;
  }

  /* HANYA layout yang memang punya sidebar */
  .blog-layout-inner--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 768px) {
  .toolbar-tags {
    justify-content: flex-start;
  }

  .blog-sidebar {
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-card {
    min-width: 260px;
  }
}

.blog-category-sections {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: stretch;
}

/* SECTION KATEGORI */
.blog-category-section {
  width: 100%;
  padding: 0;
  border: 0;
}

/* HEADER: TITLE + READ MORE + GARIS */
.blog-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0 0.75rem;
  margin: 0 0 1.5rem;    /* JARAK ANTARA GARIS DAN CARD DIBESARKAN */
  border-bottom: 2px solid #cbd5e1;
  box-sizing: border-box;
}

.blog-category-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  padding: 0;
}

.blog-category-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;              /* jarak teks dengan ikon panah */
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e3a8a;
  text-decoration: none;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  margin-left: auto; /* dorong ke pojok kanan header */
}

/* Ikon panah di sebelah teks READ MORE */
.blog-category-readmore::after {
  content: "→";
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

/* Sedikit animasi saat hover */
.blog-category-readmore:hover::after {
  transform: translateX(2px);
}

.blog-category-readmore.is-hidden {
  display: none;
}

.blog-category-nav {
  display: none !important;
}

/* WRAPPER ROW CARD */
.blog-category-rows {
  width: 100%;
  box-sizing: border-box;
}

/* GRID CARD: fleksibel, max 4 kolom, tidak overflow */
.blog-category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.blog-category-row.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .blog-category-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .blog-category-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.author-blog-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1280px) {
  .author-blog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .author-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .author-blog-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Desktop-mode di mobile (touch device) */
@media (hover: none) and (pointer: coarse) and (min-width: 900px) {
  .blog-hero {
    justify-content: flex-start;
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .blog-hero-content {
    align-items: flex-start;
    text-align: left;
    max-width: 760px;
  }
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .blog-category-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}