/* ==========================================================================
   Halaman daftar artikel — /articles dan /articles/search
   ----------------------------------------------------------------------------
   Catatan layout: header tema (position:fixed) dibungkus jquery.sticky menjadi
   elemen .sticky-wrapper dengan tinggi 77px, sehingga alur dokumen sudah
   otomatis menyisakan ruang tepat di bawah header. Karena itu padding-top
   section di halaman ini cukup 0 (tanpa celah tambahan).
   ========================================================================== */

.articles-page {
    background-color: #f8fafc;
}

.articles-page .site-content {
    background-color: #f8fafc;
}

/* Pita judul biru bawaan tema bersifat position:absolute sehingga tersembunyi
   di balik header — sembunyikan dan ganti dengan kop halaman mengalir di bawah. */
.articles-page .page-title-holder {
    display: none !important;
}

.articles-page .section-wrapper {
    padding-top: 0 !important;
    padding-bottom: 90px;
}

/* --------------------------------------------------------------------------
   Kop halaman: judul, deskripsi, dan form pencarian
   -------------------------------------------------------------------------- */
.articles-head {
    text-align: center;
    padding: 46px 0 38px;
}

.articles-head-title {
    font-family: 'Rubik', sans-serif;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin: 0 0 12px;
}

.articles-head-sub {
    font-size: 17px;
    line-height: 1.6;
    color: #64748b;
    max-width: 640px;
    margin: 0 auto;
}

.articles-head .article-search-form {
    margin: 28px auto 0;
}

.article-search-form input[type=search],
.article-search-form button {
    font-size: 15px;
}

.articles-page .article-search-info {
    text-align: center;
    color: #64748b;
    font-size: 16px;
    margin: 0 0 26px;
}

.articles-page .article-search-info strong {
    color: #0078d4;
}

/* --------------------------------------------------------------------------
   Grid kartu artikel
   -------------------------------------------------------------------------- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e6ecf4;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #cfe4f7;
    box-shadow: 0 16px 34px rgba(0, 120, 212, 0.12);
}

/* Thumbnail rasio tetap agar seluruh kartu seragam tingginya */
.article-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f2fd 0%, #f5f8fc 100%);
}

.article-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card-thumb img {
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Hover thumbnail — meniru pola tema .grid-item a.item-link (grid Services):
   overlay hitam fade-in + caption "Baca Artikel" slide-up. Di samakan dengan
   grid artikel di homepage (#artikel) agar efek hover terasa konsisten.
   -------------------------------------------------------------------------- */
.article-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    z-index: 1;
}

.article-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.article-card-cta {
    display: block;
    text-align: center;
    transform: translateY(14px);
    transition: transform 0.35s ease;
}

.article-card-cta-title {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 6px;
}

.article-card-cta-sub {
    display: block;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #0c96ff;
}

.article-card:hover .article-card-thumb::after,
.article-card:hover .article-card-overlay {
    opacity: 0.72;
}

.article-card:hover .article-card-cta {
    transform: translateY(0);
}

.article-card:hover .article-card-thumb img {
    opacity: 0.9;
}

/* Placeholder artikel tanpa gambar: ikon tetap di atas overlay. */
.article-card-thumb.is-empty::after {
    z-index: 3;
}

/* Fallback untuk browser tanpa dukungan aspect-ratio */
@supports not (aspect-ratio: 16 / 10) {
    .article-card-thumb {
        height: 210px;
    }
}

/* Placeholder ikon untuk artikel tanpa gambar */
.article-card-thumb.is-empty::after {
    content: '\f1ea';
    font-family: 'FontAwesome';
    font-size: 46px;
    color: #b9c9dc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   Isi kartu: meta, judul, kutipan, link baca
   -------------------------------------------------------------------------- */
.article-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.article-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #94a3b8;
    margin-bottom: 12px;
}

.article-card-meta .fa {
    color: #0078d4;
    margin-right: 4px;
}

.article-card-cat {
    display: inline-block;
    background: rgba(0, 120, 212, 0.1);
    color: #0078d4;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    line-height: 1.4;
    text-transform: uppercase;
    text-decoration: none;
    padding: 4px 11px;
    border-radius: 50px;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-card-cat:hover {
    background: #0078d4;
    color: #ffffff !important;
}

.article-card-title {
    font-family: 'Rubik', sans-serif;
    font-size: 19px;
    line-height: 1.45;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 10px;
    word-break: break-word;
}

.article-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: #0078d4;
}

.article-card-excerpt {
    flex: 1;
    font-size: 15px;
    line-height: 1.65;
    color: #64748b;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: #0078d4;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.article-card-more:hover {
    color: #0c96ff;
    gap: 12px;
}

/* --------------------------------------------------------------------------
   State kosong (tanpa artikel / hasil pencarian nol)
   -------------------------------------------------------------------------- */
.articles-empty {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1px dashed #d7e1ec;
    border-radius: 14px;
    text-align: center;
    padding: 56px 24px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
}

.articles-empty .fa {
    display: block;
    font-size: 40px;
    color: #c3d2e3;
    margin-bottom: 14px;
}

.articles-empty p {
    margin: 0 0 6px;
}

.articles-empty a {
    color: #0078d4;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Paginasi (resources/views/vendor/pagination/default.blade.php → nav.pagination)
   -------------------------------------------------------------------------- */
.articles-page .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 46px;
    padding: 0;
    list-style: none;
}

.articles-page .pagination a,
.articles-page .pagination span {
    display: inline-block;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.articles-page .pagination a:hover {
    border-color: #0078d4;
    color: #0078d4;
}

.articles-page .pagination span.active {
    background: #0078d4;
    border-color: #0078d4;
    color: #ffffff;
}

.articles-page .pagination span:not(.active) {
    background: #f8fafc;
    color: #b6c2d1;
}

/* --------------------------------------------------------------------------
   Responsif
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1100px) {
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 680px) {
    .articles-page .section-wrapper {
        padding-bottom: 60px;
    }
    .articles-head {
        padding: 34px 0 30px;
    }
    .articles-head-title {
        font-size: 30px;
    }
    .articles-head-sub {
        font-size: 15px;
    }
    .article-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .article-card-title {
        font-size: 17px;
    }
    .articles-page .pagination {
        margin-top: 34px;
    }
}
