/**
 * CU Stella Maris – Blog / Berita Styles
 * Mencakup: Archive (home.php), Single (single.php), Sidebar (sidebar.php)
 */

/* ============================================================
   LAYOUT UTAMA – konten + sidebar
   ============================================================ */
#main-content { background: #f0f4f8; }
#content-area {
  display: flex;
  gap: 32px;
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 0 60px;
  align-items: flex-start;
}
#left-area { flex: 1; min-width: 0; }
.cu-sidebar { width: 300px; flex-shrink: 0; }

/* ============================================================
   HERO BANNER – halaman arsip berita
   ============================================================ */
.cu-archive-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2b7cb5 100%);
  border-radius: 12px;
  padding: 36px 40px;
  margin-bottom: 28px;
}
.cu-archive-hero__title {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.cu-archive-hero__sub {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin: 0;
}

/* ============================================================
   GRID ARTIKEL – 3 kolom kartu
   ============================================================ */
.cu-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.cu-post-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30,58,95,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.cu-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(43,124,181,0.16);
}
.cu-post-card__thumb {
  display: block;
  overflow: hidden;
}
.cu-post-card__thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.cu-post-card:hover .cu-post-card__thumb img { transform: scale(1.04); }
.cu-post-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cu-post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cu-post-card__cat {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #fff !important;
  background: #2b7cb5;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cu-post-card__cat:hover { background: #1e6096; }
.cu-post-card__date {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: #5a6a80;
}
.cu-post-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}
.cu-post-card__title a { color: #1e3a5f !important; text-decoration: none !important; }
.cu-post-card__title a:hover { color: #2b7cb5 !important; }
.cu-post-card__excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5a6a80;
  line-height: 1.65;
  margin: 0 0 14px;
  flex: 1;
}
.cu-post-card__readmore {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #2b7cb5 !important;
  text-decoration: none !important;
  align-self: flex-start;
}
.cu-post-card__readmore:hover { color: #1e3a5f !important; }

/* ============================================================
   PAGINATION
   ============================================================ */
.cu-pagination { margin-top: 8px; }
.cu-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cu-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2b7cb5 !important;
  background: #fff;
  text-decoration: none !important;
  border: 1px solid #c0cfdf;
  transition: background 0.2s, color 0.2s;
}
.cu-pagination .page-numbers:hover,
.cu-pagination .page-numbers.current {
  background: #2b7cb5;
  color: #fff !important;
  border-color: #2b7cb5;
}
.cu-no-posts {
  font-family: 'Inter', sans-serif;
  color: #5a6a80;
  padding: 40px 0;
  text-align: center;
}

/* ============================================================
   SINGLE ARTIKEL
   ============================================================ */
.cu-breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5a6a80;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 8px;
  border-left: 3px solid #2b7cb5;
}
.cu-breadcrumb a { color: #2b7cb5 !important; text-decoration: none !important; }

.cu-single__hero-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.cu-single__hero-img img,
.cu-single__hero-img-el {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

.cu-single-post {
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 2px 10px rgba(30,58,95,0.07);
}
.cu-single__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cu-single__date,
.cu-single__author {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5a6a80;
}
.cu-single__title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  color: #1e3a5f;
  line-height: 1.3;
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid #d8e4ef;
}
.cu-single__content {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.85;
  color: #334155;
}
.cu-single__content h2,
.cu-single__content h3 {
  color: #1e3a5f;
  font-weight: 700;
  margin-top: 28px;
}
.cu-single__content img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
  display: block;
}

/* Paragraf — beri jarak konsisten dan justify untuk koran-style */
.cu-single__content p {
  margin: 0 0 18px;
  text-align: justify;
  hyphens: auto;
}
.cu-single__content p:last-child { margin-bottom: 0; }

/* Setelah elemen float (gambar), paragraf berikutnya tetap mengalir, namun
   kita pastikan tidak ada float yang lolos ke akhir artikel */
.cu-single__content::after {
  content: '';
  display: block;
  clear: both;
}

/* === SEMUA GAMBAR DI ARTIKEL: BARIS SENDIRI, TERPUSAT === */
.cu-single__content img,
.cu-single__content img.alignleft,
.cu-single__content img.alignright,
.cu-single__content img.aligncenter,
.cu-single__content img.alignnone,
.cu-single__content .alignleft,
.cu-single__content .alignright,
.cu-single__content .aligncenter,
.cu-single__content .alignnone,
.cu-single__content .wp-caption {
  display: block !important;
  float: none !important;
  clear: both !important;
  margin: 22px auto !important;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Caption (wp-caption / figure) */
.cu-single__content .wp-caption {
  max-width: 100%;
  margin-bottom: 18px;
}
.cu-single__content .wp-caption-text,
.cu-single__content figcaption {
  font-size: 12px;
  color: #5a6a80;
  text-align: center;
  padding: 8px 4px 0;
  font-style: italic;
  line-height: 1.5;
}

/* Heading — kasih clear agar tidak tertumpuk dengan float gambar */
.cu-single__content h2,
.cu-single__content h3,
.cu-single__content h4 {
  clear: both;
}

/* Hover gambar – sedikit shadow agar terlihat */
.cu-single__content img:not([class*="emoji"]) {
  box-shadow: 0 4px 14px rgba(30,58,95,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}
.cu-single__content img:not([class*="emoji"]):hover {
  box-shadow: 0 6px 20px rgba(30,58,95,0.18);
  transform: translateY(-2px);
}

/* Responsive: mobile */
@media (max-width: 600px) {
  .cu-single__content img { margin: 16px auto !important; }
  .cu-single__content p { text-align: left; }
}

.cu-single__content a { color: #2b7cb5; }
.cu-single__content blockquote {
  border-left: 4px solid #2b7cb5;
  padding: 12px 20px;
  margin: 20px 0;
  background: #d8e4ef;
  border-radius: 0 8px 8px 0;
  color: #1e3a5f;
  font-style: italic;
}

/* Tags */
.cu-single__tags {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #d8e4ef;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5a6a80;
}
.cu-tag {
  display: inline-block;
  padding: 4px 12px;
  background: #d8e4ef;
  color: #1e3a5f !important;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}
.cu-tag:hover { background: #2b7cb5; color: #fff !important; }

/* Prev/Next */
.cu-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #d8e4ef;
}
.cu-post-nav__prev { flex: 1; }
.cu-post-nav__next { flex: 1; text-align: right; }
.cu-post-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #2b7cb5 !important;
  text-decoration: none !important;
  line-height: 1.5;
}
.cu-post-nav a:hover { color: #1e3a5f !important; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.cu-widget {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(30,58,95,0.07);
  margin-bottom: 20px;
}
.cu-widget__title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a5f;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2b7cb5;
}
.cu-widget .search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.cu-widget .search-form label {
  display: flex;
  width: 100%;
}
.cu-widget .search-field {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #c0cfdf;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.cu-widget .search-field:focus { border-color: #2b7cb5; }
.cu-widget .search-submit {
  width: 100%;
  padding: 9px 14px;
  background: #2b7cb5;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
}
.cu-widget .search-submit:hover { background: #1e6096; }
.cu-widget ul { list-style: none; margin: 0; padding: 0; }
.cu-widget ul li { border-bottom: 1px solid #d8e4ef; }
.cu-widget ul li:last-child { border-bottom: none; }
.cu-widget ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #2b7cb5 !important;
  text-decoration: none !important;
  line-height: 1.4;
}
.cu-widget ul li a::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 2px solid #2b7cb5;
  border-bottom: 2px solid #2b7cb5;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.cu-widget ul li a:hover { color: #1e3a5f !important; }
.cu-widget ul li small { color: #5a6a80; font-size: 11px; display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  #content-area { flex-direction: column; gap: 24px; }
  .cu-sidebar { width: 100%; }
  .cu-blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cu-blog-grid { grid-template-columns: 1fr; }
  .cu-single-post { padding: 20px 18px; }
  .cu-archive-hero { padding: 24px 20px; }
  #content-area { width: 95%; padding: 24px 0 40px; }
}
