/* === Reset & Dasar === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; /* bg-gray-900 */
    color: #D1D5DB; /* text-gray-300 */
    line-height: 1.6;
}

h2, h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #FFF;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #38BDF8; /* sky-400 */
}
ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
li {
    margin-bottom: 0.5rem;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
hr {
    border: none;
    border-top: 1px solid #374151; /* gray-700 */
    margin: 2rem 0;
}

/* === Kelas Utilitas === */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.hidden {
    display: none;
}
.text-center {
    text-align: center;
}
.text-sky {
    color: #38BDF8; /* sky-400 */
}

/* === Header === */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease-in-out;
}
.main-header.scrolled {
    background-color: #1F2937; /* bg-gray-800 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #374151;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.logo-image {
    height: 2.5rem;
}

/* === Navigasi === */
.nav-desktop { display: none; }
.main-nav a { padding: 0.5rem 0.75rem; }
.main-nav a:hover { color: #38BDF8; }
.nav-mobile-toggle { display: block; color: #D1D5DB; }
.nav-mobile-toggle:hover { color: #38BDF8; }
.nav-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #1F2937;
    border-top: 1px solid #374151;
}
.nav-mobile-menu a { display: block; padding: 1rem 1.5rem; font-size: 0.875rem; }
.nav-mobile-menu a:hover { background-color: #374151; }

/* === Konten Utama & Footer === */
.main-content { padding-top: 3rem; padding-bottom: 3rem; }
.main-footer { background-color: #1F2937; border-top: 1px solid #374151; }
.footer-container { padding: 2rem 0; text-align: center; color: #9CA3AF; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.copyright { font-size: 0.875rem; }

/* === Gaya Halaman Umum === */
.page-header {
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 3rem;
}
.page-title {
    font-size: 3.75rem;
    font-weight: 900;
    color: #FFF;
}
.page-subtitle {
    font-size: 1.25rem;
    color: #38BDF8;
    margin-top: 1rem;
}
.content-box {
    background-color: #1F2937;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border: 1px solid #374151;
}

/* === Halaman Daftar Blog & Arsip === */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.post-card {
    background-color: #374151;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}
.post-card:hover {
    transform: translateY(-0.5rem);
}
.post-card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}
.post-card-content {
    padding: 1.5rem;
}
.post-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 0.75rem;
}
.post-card-excerpt {
    color: #D1D5DB;
    margin-bottom: 1rem;
}
.post-card-readmore {
    font-weight: 600;
    color: #38BDF8;
}

/* === Pagination === */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Menargetkan struktur yang digenerate Laravel */
.pagination nav > div:last-child {
    display: flex;
    justify-content: center;
    width: 100%;
}
.pagination nav ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}
.pagination nav ul li a,
.pagination nav ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    background-color: #374151; /* gray-700 */
    color: #D1D5DB; /* gray-300 */
    transition: all 0.2s ease;
}
.pagination nav ul li a:hover {
    background-color: #0ea5e9; /* sky-500 */
    color: #FFF;
}
.pagination nav ul li.active span {
    background-color: #0ea5e9; /* sky-500 */
    color: #FFF;
    cursor: default;
}
.pagination nav ul li.disabled span {
    background-color: #1F2937; /* gray-800 */
    color: #4b5563; /* gray-600 */
    cursor: not-allowed;
}
/* Sembunyikan text "Showing 1 to 12 of..." di mobile */
.pagination nav > div:first-child {
    display: none;
}


/* === Halaman Single Post === */
.single-post-article {
    max-width: 720px;
    margin: auto;
}
.post-breadcrumb {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-bottom: 1rem;
}
.post-title-single {
    font-size: 3rem;
    font-weight: 900;
    color: #FFF;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #9CA3AF;
}
.post-featured-image {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
.post-content p {
    margin-bottom: 1.5rem;
}

.ads {
  margin: 20px 0;
}

/* === GALERI MASONRY === */
.masonry {
  display: grid;
  grid-gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 200px;
  margin: 2rem 0;
}
.masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgb(0 0 0 / 0.1);
}
.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.masonry-item:hover img {
  transform: scale(1.03);
}
.masonry-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  font-size: 10px;
  text-align: center;
  color: #fff;
  z-index: 2;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  background: linear-gradient(to top, rgb(0 0 0 / 0.7) 0%, transparent);
}
.masonry-item:hover .masonry-caption {
  transform: translateY(0);
}

/* === ARTIKEL TERKAIT === */
.related-articles-list {
    list-style: none;
    padding: 0;
    column-count: 2; /* 1 kolom di mobile */
    column-gap: 2rem;
}
.related-articles-list li {
    margin-bottom: 1rem;
    break-inside: avoid;
}
.related-articles-list a {
    display: block;
    padding: 1rem;
    background-color: #374151;
    border-radius: 0.5rem;
}
.related-articles-list a:hover {
    background-color: #4b5563;
    color: #38BDF8;
}
.related-articles-list h4 {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    color: #FFF;
    margin: 0;
}

/* === GAYA PENCARIAN BARU === */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input {
    background-color: #374151;
    border: 1px solid #4b5563;
    color: #FFF;
    border-radius: 9999px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    width: 200px;
    transition: all 0.2s ease;
}
.search-input::placeholder {
    color: #9CA3AF;
}
.search-input:focus {
    outline: none;
    border-color: #38BDF8;
    width: 250px;
}
.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
}
.search-button:hover {
    color: #FFF;
}
.search-mobile-wrapper {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #374151;
}
.search-mobile-wrapper .search-input {
    width: 100%;
}

/* === Breakpoint Responsif (Desktop) === */
@media (min-width: 768px) {
    .nav-desktop { display: flex; align-items: center; gap: 1rem; }
    .nav-mobile-toggle { display: none; }
    .post-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr 1fr; }
    /* Tampilkan text "Showing 1 to 12 of..." di desktop */
    .pagination nav > div:first-child {
        display: block;
    }
}
@media (min-width: 1024px) {
    .post-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* === Pagination === */
.pagination-container {
  margin: 3rem 0;
  width: 100%;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 3rem;
}
.pagination .page-item {
  margin: 0;
  flex-shrink: 0;
}
.pagination .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pagination .page-item.active .page-link {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #f2f2f2;
}
.pagination .page-link:hover {
  background: #f1f5f9;
  color: #212121;
}
.pagination .page-item.active .page-link:hover {
  background: #4338ca;
}
.pagination .page-item.disabled .page-link {
  background: #f8fafc;
  color: #cbd5e1;
  border-color: #e2e8f0;
}
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  padding: 0 16px;
  font-weight: 600;
}