.pagenation {
  margin-top: 2rem;
  text-align: center;
  width: 100%;
}

.pagenation ul {
  list-style: none;
  padding: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.pagenation ul li {
  display: inline;
}

.pagenation ul li a,
.pagenation ul li span {
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  background: #f2f2f2;
  border-radius: 4px;
  color: #333;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  transition: 0.2s;
}

.pagenation ul li a:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.pagenation ul li span.current {
  background: #007bff;
  color: #fff;
  font-weight: bold;
  border-color: #007bff;
}



/* Grid layout ala majalah */

.berita-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
}

.card-berita {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  width: calc(33.333% - 1rem);
  min-width: 280px;
  min-height: 100%;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem;
}


.card-berita:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}
.card-title {
  font-size: 1.1rem;
  margin: 0;
}

.card-title a {
  text-decoration: none;
  color: #222;
}

.card-title a:hover {
  color: #007bff;
}

.excerpt {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #555;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  align-self: start;
}

.card-body .excerpt {
  flex-grow: 1; /* isi teks memenuhi tinggi kosong */
}

@media (max-width: 991px) {
  .card-berita { width: calc(50% - 1rem); }
}
@media (max-width: 600px) {
  .card-berita { width: 100%; }
}



/* Sidebar */
.news-sidebar,
aside {
  flex: 1 1 30%;
  max-width: 400px;
}

/* Post Layout */
.post {
  display: block;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.post img.news-img {
  max-width: 100%;
  height: auto;
  margin-bottom: 0.6rem;
  border-radius: 8px;
}

/* Wrapper untuk teks di dalam .post */
.wrapper {
  padding: 0.2rem 0;
}

.heading h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.heading-line {
  height: 3px;
  width: 60px;
  background: #007bff;
  margin-bottom: 1rem;
}

.info {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.btn.btn-primary {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.btn.btn-primary:hover {
  background: #0056b3;
}

/* Clearfix helper (untuk #sidebar jika dipakai) */
.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

/* Layout horizontal untuk setiap item berita */
.post-horizontal {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
  align-items: flex-start;
}

.post-horizontal img.news-img-thumb {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.post-horizontal .wrapper {
  flex: 1;
  padding-top: 0.3rem;
}

.post-horizontal h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
}

.post-horizontal p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.post-horizontal .btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .post-horizontal {
    flex-direction: column;
  }

  .post-horizontal img.news-img-thumb {
    width: 100%;
    height: auto;
  }
}


.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid #e0e0e0;
  padding-top: 1.5rem;
  flex-wrap: wrap;
}

.post-navigation .post-previous,
.post-navigation .post-next {
  flex: 1 1 45%;
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 130px;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}

.post-navigation a:hover {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.post-navigation span {
  font-weight: bold;
  color: #555;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}


/* === RESPONSIF: Tampilan detail berita mobile === */

@media (max-width: 600px) {
  .content-section .container {
    flex-direction: column;
  }

  main,
  .news-main,
  aside,
  .news-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .berita-detail h1,
  .berita-detail p,
  .post-content,
  .post-meta,
  .post-navigation,
  .card-body {
    padding: 0 1rem;
    word-wrap: break-word;
  }

  .post-image img,
  .card-img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  iframe {
    max-width: 100%;
    height: auto;
  }

  .post-navigation a {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}


.grid-guru {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card-guru {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card-guru:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transform: translateY(-3px);
  transition: 0.3s;
}

.guru-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.8rem;
}

.guru-nama {
  font-size: 1rem;
  margin: 0;
}

.guru-nama a {
  text-decoration: none;
  color: #333;
}

.guru-nama a:hover {
  color: #007bff;
}


.artikel-lainnya-box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.artikel-box {
  background: #f9f9f9;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: 0.3s ease;
}
.artikel-box:hover {
  background: #fff;
  border-color: #ccc;
}
.artikel-box h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.artikel-box h3 a {
  text-decoration: none;
  color: #00498E;
}
.artikel-box p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}





.opini-wrapper {
  background: #fdfdfd;
}

/* HEADER */
.heading-opini h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #cc0000;
}

.heading-opini .subheading {
  font-size: 1rem;
  color: #777;
  margin-bottom: 1rem;
}

.heading-line-opini {
  height: 4px;
  width: 60px;
  background: #cc0000;
  border-radius: 2px;
  margin-bottom: 2rem;
}

/* GRID */
.opini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* CARD */
.card-opini {
  background: #fff;
  border: 1px solid #dde6f2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;

  opacity: 0;
  transform: translateY(30px) scale(0.97);
  animation: fadeUpZoom 0.6s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.08s);
}

.card-opini:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* ANIMASI */
@keyframes fadeUpZoom {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* BADGE POPULER */
.populer-badge {
  position: absolute;
  top: 10px;
  left: -15px;
  background: crimson;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  transform: rotate(-15deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 2;
}

/* KATEGORI */
.kategori-tag {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: #eee;
  color: #444;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kategori-tag i {
  color: #cc0000;
}

/* IMAGE */
.opini-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* BODY */
.opini-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.opini-body .judul {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #cc0000;
}

.opini-body .judul a {
  color: inherit;
  text-decoration: none;
}

.opini-body .judul a:hover {
  color: #e00000;
}

.opini-body .tanggal {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.6rem;
}

.opini-body .ringkasan {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* TOMBOL */
.btn-baca {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: auto;
  transition: background 0.3s;
}

.btn-baca:hover {
  background: #a80000;
  color: #fff;
}

/* PAGINATION */
.pagination-wrapper {
  margin-top: 2rem;
  text-align: center;
}

ul.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.pagination li a,
ul.pagination li span {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  border-radius: 30px;
  background: #f4f6fb;
  color: #555;
  border: 1px solid #d1d1d1;
  text-decoration: none;
  transition: all 0.3s ease;
}

ul.pagination li a:hover {
  background-color: #cc0000;
  color: #fff;
  border-color: #cc0000;
  transform: scale(1.05);
}

ul.pagination li span.current {
  background-color: #cc0000;
  color: #fff;
  font-weight: 600;
  border-color: #cc0000;
}