/* Berita Page Styles */
.berita-page {
    background-color: #fff;
    min-height: 100vh;
}

.berita-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

/* ====== PAGE HEADER ====== */
.berita-page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 6rem 2rem 4rem;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.berita-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.berita-page-header-inner {
    position: relative;
    z-index: 1;
}

.berita-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.berita-page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.berita-page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* ====== COMMON ELEMENTS ====== */
.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 4px solid #f1f5f9;
}

.section-label span {
    background: var(--text-dark);
    color: white;
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ====== HIGHLIGHT SECTION ====== */
.highlight-grid {
    display: grid;
    /* Diubah dari 1.8fr menjadi 1.3fr agar kolom utama tidak terlalu mendominasi/besar */
    grid-template-columns: 1.3fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

/* Highlight Main */
.highlight-main {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.highlight-main-img {
    /* Diubah dari 80% menjadi 100% agar gambarnya rapi memenuhi kolom barunya yang sudah dikecilkan */
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-lg);
}

.highlight-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.highlight-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.highlight-main:hover .highlight-main-img img {
    transform: scale(1.05);
}

.highlight-main:hover .highlight-overlay {
    opacity: 1;
}

.img-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.1);
}

.highlight-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    align-self: flex-start;
    /* Memastikan badge tidak melebar */
    animation: flash 2s infinite;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.highlight-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-main-title {
    /* Font dikecilkan dari 2rem menjadi 1.6rem agar lebih proporsional */
    font-size: 1.6rem;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-weight: 800;
    transition: color 0.3s;
}

.highlight-main:hover .highlight-main-title {
    color: var(--primary-color);
}

.highlight-main-excerpt {
    /* Font dikecilkan dari 1.1rem menjadi 1rem */
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.highlight-readmore {
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Highlight Side */
.highlight-side {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.side-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.side-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.side-card-img {
    /* Ukuran gambar sampingan sedikit disesuaikan agar proporsional dengan kolom yang lebih lebar */
    width: 120px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.side-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.side-card:hover .side-card-img img {
    transform: scale(1.1);
}

.img-placeholder-side {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.1);
}

.side-card-body {
    flex: 1;
}

.side-card-meta {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.side-card-title {
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Mengurangi clamp agar tidak terlalu panjang */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.side-card:hover .side-card-title {
    color: var(--primary-color);
}

.side-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tambahan Responsif agar saat di HP/Tablet tidak berantakan */
@media (max-width: 992px) {
    .highlight-grid {
        grid-template-columns: 1fr;
        /* Berubah menjadi 1 kolom atas-bawah saat layar kecil */
        gap: 2rem;
    }
}

/* ====== LIST GRID SECTION ====== */
.berita-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.list-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.list-card-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.list-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.list-card:hover .list-card-img img {
    transform: scale(1.08);
}

.img-placeholder-list {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
}

.list-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.list-card-title {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s;
}

.list-card:hover .list-card-title {
    color: var(--primary-color);
}

.list-card-excerpt {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-readmore {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Empty State */
.berita-empty {
    text-align: center;
    padding: 6rem 2rem;
    background: white;
    border-radius: 24px;
    border: 1px dashed #cbd5e1;
}

.berita-empty i {
    font-size: 4rem;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
}

.berita-empty h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.berita-empty p {
    color: var(--text-muted);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .berita-page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .berita-wrapper {
        padding: 0 1.5rem 4rem;
    }

    .berita-page-header {
        padding: 5rem 1.5rem 3rem;
    }

    .berita-page-header h1 {
        font-size: 2rem;
    }

    .highlight-main-title {
        font-size: 1.75rem;
    }

    .berita-list-grid {
        grid-template-columns: 1fr;
    }

    .side-card {
        flex-direction: column;
        gap: 1rem;
    }

    .side-card-img {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* ====== PAGINATION ====== */
.pagination-container {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.6rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-link {
    text-decoration: none;
    color: var(--text-dark);
    height: 40px;
    min-width: 40px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-glow);
}

.page-link.prev,
.page-link.next {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.page-link.prev:hover,
.page-link.next:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

@media (max-width: 640px) {
    .pagination {
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
        padding: 1rem;
    }

    .page-numbers {
        order: 1;
    }

    .page-link.prev {
        order: 2;
        width: 100%;
    }

    .page-link.next {
        order: 3;
        width: 100%;
    }
}