/* =========================================================
PAGE
========================================================= */
.berita-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* =========================================================
MAIN CARD
========================================================= */
.berita-card {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(31, 41, 55, .06);
    padding:20px;
}

/* =========================================================
LEFT - IMAGE SECTION
========================================================= */
.berita-media {
    padding: 10px;
    min-width: 0;
}

.berita-main-image-wrapper {
    position: relative;
    width: 100%;
    height: 330px;
    border-radius: 11px;
    overflow: hidden;
    background: #f4f5f7;
}

.berita-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity .2s ease;
}

/* =========================================================
IMAGE ARROWS
========================================================= */
.berita-image-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    cursor: pointer;
    z-index: 2;
    transition: .2s ease;
}

.berita-image-arrow:hover {
    background: #fff;
    color: #d63384;
    transform: translateY(-50%) scale(1.05);
}

.berita-image-arrow i {
    font-size: 18px;
}

.berita-image-prev {
    left: 8px;
}

.berita-image-next {
    right: 8px;
}

/* =========================================================
THUMBNAILS
========================================================= */
.berita-thumbnails {
    display: flex;
    gap: 5px;
    margin-top: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.berita-thumbnail {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 7px;
    overflow: hidden;
    background: #f4f5f7;
    cursor: pointer;
    transition: .2s ease;
}

.berita-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.berita-thumbnail:hover {
    border-color: #d63384;
}

.berita-thumbnail.active {
    border-color: #d63384;
}

/* =========================================================
RIGHT - CONTENT
========================================================= */
.berita-content {
    display: flex;
    flex-direction: column;
    padding: 22px 24px 20px;
    min-width: 0;
}

.berita-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 20px;
    background: #e9f7f8;
    color: #178b91;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.berita-title {
    margin: 0 0 8px;
    color: #202938;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.berita-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8a8f9f;
    font-size: 12px;
    margin-bottom: 12px;
}

.berita-meta i {
    font-size: 15px;
    vertical-align: middle;
}

.berita-summary {
    margin: 0;
    color: #5f6675;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    text-align: justify;
}

/* =========================================================
ARTICLE CONTENT
========================================================= */
.berita-article {
    margin-top: 15px;
    color: #475467;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.berita-article * {
    font-size: 14px !important;
    text-align: justify;
}

.berita-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.berita-article iframe {
    max-width: 100%;
}

/* =========================================================
SHARE
========================================================= */
.berita-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 15px;
}

.berita-share-label {
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    margin-right: 2px;
}

.berita-share a,
.berita-share button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 29px;
    padding: 5px 9px;
    border: 0;
    border-radius: 5px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: .2s ease;
}

/* Facebook */
.berita-share-facebook {
    background: #1877f2 !important;
    color: #fff !important;
}

.berita-share-facebook:hover {
    background: #0d65d9 !important;
    color: #fff !important;
}

/* WhatsApp */
.berita-share-whatsapp {
    background: #25d366 !important;
    color: #fff !important;
}

.berita-share-whatsapp:hover {
    background: #1ebe5d !important;
    color: #fff !important;
}

/* X */
.berita-share-twitter {
    background: #000 !important;
    color: #fff !important;
}

.berita-share-twitter:hover {
    background: #252525 !important;
    color: #fff !important;
}

/* Copy */
.berita-share-copy {
    width: 29px;
    padding: 5px !important;
    background: #f3f4f6 !important;
}

.berita-share-copy:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

.berita-share a i,
.berita-share button i {
    font-size: 15px;
}

/* =========================================================
GALLERY TITLE / EXTRA CONTENT
========================================================= */
.berita-gallery {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #edf0f5;
}

.berita-gallery-title {
    margin: 0 0 15px;
    color: #202938;
    font-size: 18px;
    font-weight: 700;
}

.berita-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.berita-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f5f7;
}

.berita-gallery-item img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform .25s ease;
}

.berita-gallery-item:hover img {
    transform: scale(1.04);
}

/* =========================================================
BACK BUTTON
========================================================= */
.berita-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    color: #d63384;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.berita-back:hover {
    color: #a61e63;
}

/* =========================================================
MOBILE
========================================================= */
@media (max-width: 767px) {

    .berita-page {
        padding: 15px 10px 35px;
    }

    .berita-card {
        display: block;
    }

    .berita-media {
        padding: 8px;
    }

    .berita-main-image-wrapper {
        height: 260px;
    }

    .berita-content {
        padding: 18px;
    }

    .berita-title {
        font-size: 21px;
    }

    .berita-summary {
        font-size: 13px;
    }

    .berita-share {
        margin-top: 18px;
    }

    .berita-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {

    .berita-main-image-wrapper {
        height: 220px;
    }

    .berita-thumbnail {
        flex-basis: 65px;
        width: 65px;
        height: 44px;
    }

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

/* =========================================================
   LAPORAN BERITA - BOOTSTRAP MODAL
========================================================= */

#laporanBeritaModal .modal-dialog {
    max-width: 1100px;
}

#laporanBeritaModal .modal-body {
    padding: 20px;
    background: #f8f9fa;
}

#laporanBeritaModal .berita-page {
    max-width: 100%;
    padding: 0;
}

#laporanBeritaModal .berita-card {
    width: 100%;
    margin: 0;
}

#laporanBeritaModal .berita-article {
    overflow-wrap: anywhere;
}

#laporanBeritaModal .berita-article img {
    max-width: 100%;
    height: auto;
}

#laporanBeritaModal .modal-title {
    color: #fff !important;
    font-weight: 600;
}

@media (max-width: 767px) {
    #laporanBeritaModal .modal-body {
        padding: 10px;
    }

    #laporanBeritaModal .berita-card {
        display: block;
        padding: 10px;
    }

    #laporanBeritaModal .berita-media {
        padding: 5px;
    }

    #laporanBeritaModal .berita-content {
        padding: 15px 10px;
    }
}