/* ===================================
   GLOBAL STYLES
   =================================== */
body {
    position: relative;
    background-color: #0a0a0b;
    font-family: "IBM Plex Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Overlay gelap di atas background utama (gambar/warna dari pengaturan
   admin), supaya teks tetap kebaca apa pun background yang dipilih. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 9, 0.62);
    pointer-events: none;
    z-index: -1;
}

/* ===================================
   HEADER SECTION
   =================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 16px 32px;
    background: rgba(10, 10, 11, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.header .logo {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffd700;
}

.header .search-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Tombol ikon toggle — cuma dipakai di mobile (lihat mobile.css).
   Disembunyikan by default supaya desktop tetap pakai search bar biasa. */
.search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #ffd700;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.search-toggle:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.08);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field i {
    position: absolute;
    left: 14px;
    color: rgba(245, 245, 245, 0.45);
    font-size: 13px;
    pointer-events: none;
}

.search-box input {
    width: 220px;
    max-width: 100%;
    padding: 7px 12px 7px 34px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f5;
    outline: none;
    transition: 0.3s;
}

.search-box input::placeholder {
    color: rgba(245, 245, 245, 0.5);
}

.search-box input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.35);
}

/* ===================================
   SECTION TITLE
   =================================== */
.section-title {
    text-align: center;
    margin: 30px 0 20px;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffd700;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 100%;
    margin: 15px auto 0;
    border-bottom: 2px dashed #ffd700;
}

/* ===================================
   RUNNING TEXT (MARQUEE)
   =================================== */
.marquee-bar {
    overflow: hidden;
    border-radius: 10px;
    padding: 11px 0;
    margin: 0 0 24px;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    white-space: nowrap;
    animation: marquee-scroll 22s linear infinite;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-left: 24px;
}

.marquee-track .marquee-dot {
    opacity: 0.6;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
}

/* ===================================
   CARD GRID & CARD STYLES
   =================================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

/* Ditampilkan lewat ajax-search.php saat pencarian tidak menemukan hasil.
   grid-column: 1/-1 supaya melebar penuh di dalam grid, bukan jadi satu
   sel kecil di kolom pertama. */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 20px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.empty-state-icon {
    color: rgba(255, 215, 0, 0.6);
}

.empty-state-title {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f5f5f5;
}

.empty-state-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.55);
}

.card-modern {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 5px;
    position: relative;
}

.card-modern:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 12px 28px rgba(255, 215, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.3);
}

.card-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-img-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.card-modern:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h5 {
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Warna diwarisi dari .card-modern (diatur lewat admin/theme.php ->
   "Warna Teks Kartu"), bukan di-hardcode — supaya tetap kebaca berapa pun
   warna kartu yang dipilih admin. .card-meta sedikit diredupkan lewat
   opacity, bukan warna tetap, biar tetap "sekunder" di tema manapun. */
.card-content small.card-meta {
    display: block;
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.7;
}

.card-content p {
    font-size: 0.95rem;
    color: inherit;
}

/* margin-top: auto mendorong footer ini nempel di bagian bawah
   .card-content (flex column) — jadi tombol "Baca" sejajar rata di semua
   kartu satu baris, berapa pun panjang deskripsinya. */
.card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.card-content a.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

/* ===================================
   PAGINATION
   =================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    padding: 20px 0;
}

.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #c9c9c9;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.pagination .page-item:not(.nav-item):not(.dots) .page-link:hover {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.4);
}

.pagination .page-item.active .page-link {
    background: #ffd700;
    border-color: #ffd700;
    color: #1a1a1a;
    font-weight: 700;
}

.pagination .page-item.disabled .page-link,
.pagination .page-item.dots .page-link {
    color: #666;
    background: transparent;
    border-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .nav-item .page-link {
    font-size: 13px;
    color: #ccc;
}

.pagination .nav-item.disabled .page-link {
    color: #666;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet & HP Besar (Landscape) — aturan .header/.search-box dipusatkan
   di mobile.css supaya tidak ada dua sumber yang saling menimpa. */
@media (max-width: 768px) {
    .grid-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 10px 0;
    }
    
    .card-img-wrap {
        height: auto;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-content h5 {
        font-size: 1rem;
    }
    
    .card-content p {
        font-size: 0.9rem;
    }
    
    .pagination {
        gap: 14px;
    }
}

/* HP Sedang (iPhone SE, Galaxy A Series) */
@media (max-width: 576px) {
    .card-content h5 {
        font-size: 0.95rem;
    }
    
    .card-content p {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 20px;
    }
}

/* HP Kecil (320px ke bawah) */
@media (max-width: 400px) {
    .card-content {
        padding: 10px;
    }
    
    .card-content h5 {
        font-size: 0.9rem;
    }
    
    .card-content p {
        font-size: 0.8rem;
    }
    
    .pagination {
        gap: 10px;
    }

    .pagination .page-item .page-link {
        font-size: 12px;
    }
}

/* ===================================
   ARTIKEL STATIS — kartu gelap transparan supaya teks tetap
   kebaca di atas background bertema (foto/pola ramai)
   =================================== */
.content-home {
    background-color: rgba(10, 8, 6, 0.78);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    color: #d8d8d8;
    line-height: 1.7;
}

.content-home h1 {
    position: relative;
    padding-left: 16px;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffffff;
}

.content-home h1::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 2px;
    background-color: #ffd700;
}