/* === FONT & ROOT VARIABLES === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #102A70;
    --accent-color: #f5c401;
    --background-white: #ffffff;
    --background-light-grey: #f8fafc;
    --text-dark: #212529;
    --text-light: #ffffff;
    --text-muted: #6c757d;
    --border-light: #e9ecef;
    --card-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
    --card-shadow-hover: 0 10px 30px rgba(16, 42, 112, 0.1);
    --border-radius: 12px;
}

/* === GENERAL STYLES === */
html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', sans-serif;
    background: var(--background-light-grey);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
a { text-decoration: none; color: var(--primary-color); transition: color 0.3s ease; }
a:hover { color: var(--accent-color); }

/* === BREADCRUMB HEADER === */
.section-breadcrum {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 3.5rem 0;
    border-bottom: 4px solid var(--accent-color);
}
.section-breadcrum .container { text-align: left; }
.section-breadcrum h2 { font-weight: 700; font-size: 2.5rem; color: var(--text-light); margin: 0; }
.section-breadcrum p { margin-top: 0.5rem; font-size: 1rem; opacity: 0.8; }
.section-breadcrum p a { color: var(--text-light); }

/* === BLOG LAYOUT === */
.blog-section { padding: 80px 0; }
.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
@media (min-width: 992px) {
    .blog-layout { grid-template-columns: 2fr 1fr; }
}

/* === Search Results Header === */
.search-results-header {
    background-color: var(--background-white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
}
.search-results-header h3 { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--text-muted); }
.search-results-header span { color: var(--primary-color); font-weight: 700; }
.clear-search-btn { background: #fde8e8; color: #d9534f; padding: 8px 15px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.clear-search-btn:hover { background: #d9534f; color: var(--text-light); }


/* === [DIUBAH] BLOG CARD STYLING (HORIZONTAL & UNIFORM HEIGHT) === */
.posts-list { display: grid; grid-template-columns: 1fr; gap: 30px; }
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}
.blog-card.is-visible { opacity: 1; transform: translateY(0); }
.blog-card:hover { transform: translateY(-8px); box-shadow: var(--card-shadow-hover); }

.card-image {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background-color: var(--border-light);
}
.card-image img {
    display: block;
    width: 100%;
    height: 220px; /* Tinggi gambar di mobile */
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Penting agar konten mengisi ruang kartu */
}
.card-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    /* Efek ellipsis untuk judul yang terlalu panjang */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-content p.excerpt {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
    /* Efek ellipsis untuk deskripsi yang terlalu panjang */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 10px 15px; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border-light); padding-top: 15px; margin-top: auto; }
.card-meta span { display: flex; align-items: center; }
.card-meta .icon { color: var(--primary-color); margin-right: 6px; }

@media (min-width: 768px) {
    .blog-card {
        flex-direction: row;
        min-height: 240px; /* KUNCI: Menetapkan tinggi minimal yang seragam */
        height: 240px;      /* KUNCI: Memaksa tinggi kartu menjadi sama */
    }
    .card-image {
        width: 40%;
        max-width: 300px;
    }
    .card-image img {
        height: 100%;
    }
    .card-content { padding: 30px; }
}

/* === SIDEBAR WIDGETS === */
.sidebar .widget { background: var(--background-white); padding: 30px; border-radius: var(--border-radius); box-shadow: var(--card-shadow); margin-bottom: 30px; }
.sidebar .widget-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-color); }
.search-form { display: flex; }
.search-form .form-control { width: 100%; border: 1px solid var(--border-light); padding: 12px; border-radius: 8px 0 0 8px; font-family: 'Montserrat', sans-serif; }
.search-form .btn-search { background: var(--primary-color); color: var(--text-light); border: none; padding: 0 20px; border-radius: 0 8px 8px 0; cursor: pointer; }
.category-list { list-style: none; padding: 0; }
.category-list li { border-bottom: 1px solid var(--border-light); }
.category-list li:last-child { border-bottom: none; }
.category-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; font-weight: 500; }
.category-list a .count { background-color: var(--background-light-grey); padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; }
.category-list a:hover { color: var(--accent-color); }

/* === PAGINATION === */
.pagination-container { display: flex; justify-content: center; align-items: center; margin-top: 40px; padding: 10px; }
.pagination-link { color: var(--primary-color); background-color: var(--background-white); border: 1px solid var(--border-light); padding: 10px 18px; margin: 0 5px; border-radius: 8px; font-weight: 600; transition: background-color 0.3s ease, color 0.3s ease; }
.pagination-link:hover { background-color: var(--primary-color); color: var(--text-light); border-color: var(--primary-color); }
.pagination-link.active { background-color: var(--primary-color); color: var(--text-light); border-color: var(--primary-color); cursor: default; }
.pagination-link.disabled { color: var(--text-muted); pointer-events: none; }

/* [BARU] Pagination Summary */
.pagination-summary {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === IMAGE MODAL === */
.img-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.img-modal.active { opacity: 1; visibility: visible; }
.img-modal-content { max-width: 90%; max-height: 90%; object-fit: contain; border-radius: var(--border-radius); box-shadow: 0 10px 40px rgba(0,0,0,0.6); transform: scale(0.8); transition: transform 0.3s ease; }
.img-modal.active .img-modal-content { transform: scale(1); }
.modal-close-btn { position: absolute; top: 20px; right: 20px; color: var(--text-light); font-size: 2.5rem; cursor: pointer; z-index: 10000; transition: transform 0.3s ease; }
.modal-close-btn:hover { transform: rotate(90deg); color: var(--accent-color); }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-breadcrum h2 { font-size: 2rem; }
    .card-content h3 { font-size: 1.2rem; }
    .search-results-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}