/* =========================================================
   NOTE: CSS MERGED & CLEANED — ALL ORIGINAL CODE KEPT
   ========================================================= */


/* =========================================================
   BASE LAYOUT
   ========================================================= */

/* NOTE: .row muncul dua kali di file asal */
.row {
    padding-left: 20px;
    padding-right: 20px;
}


/* =========================================================
   HERO IMAGE WRAPPER
   ========================================================= */
.hero-image-wrapper {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


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

    .hero-image-wrapper {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .mobile-padding {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    h1 {
        font-size: 25px !important;
        line-height: 32px;
    }

    .magazine-title {
        font-size: 36px;
    }

    .magazine-subline {
        width: 50px;
    }
}


/* =========================================================
   HERO WRAPPER (YGMC NEWS)
   ========================================================= */
.hero-m4 {
    margin-top: 50px;
    padding-top: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-m4-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #111;
}

body.dark .hero-m4-title {
    color: #f1f1f1;
}

.hero-m4-sub {
    font-size: 15px;
    color: #555;
    margin-top: 5px;
}

body.dark .hero-m4-sub {
    color: #dcdcdc;
}

.hero-m4-line {
    margin: 10px auto 0;
    width: 160px;
    height: 4px;
    background: linear-gradient(to right, #000, transparent, #000);
}

body.dark .hero-m4-line {
    background: linear-gradient(to right, #fff, transparent, #fff);
}


/* =========================================================
   MAGAZINE HERO (DETAIL BERITA)
   ========================================================= */
.magazine-hero {
    margin-top: 70px;
    padding: 45px 20px 10px;
    text-align: center;
}

.magazine-inner {
    max-width: 900px;
    margin: auto;
}

.magazine-title {
    font-family: "Playfair Display", serif;
    font-size: 45px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.8px;
    color: #111;
    margin-bottom: 18px;
}

.magazine-subline {
    width: 100px;
    height: 3px;
    margin: 10px auto 20px;
    background: #000;
}

.magazine-meta {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.5px;
}

.magazine-meta .dot {
    width: 5px;
    height: 5px;
    background: #555;
    display: inline-block;
    border-radius: 50%;
    margin: 0 10px;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

/* NOTE: BAGIAN INI DUPLIKAT DI FILE ASLI, TAPI DIBIARKAN */
.column {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.column h2 {
    font-size: 20px;
    font-weight: bold;
    border-left: 4px solid #007bff;
    padding-left: 10px;
    margin-bottom: 15px;
}

.news-item {
    margin-bottom: 15px;
    display: flex;
}

.image-date-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.image-date-wrapper img {
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.date-content-wrapper .date {
    font-size: 12px;
    color: #666;
}

.news-content a {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.news-content a:hover {
    color: orange;
}


/* =========================================================
   CARD BERITA — GRID LIST
   ========================================================= */
.card-berita {
    width: 300px !important;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: .3s;

    /* NOTE: agar footer tetap di bawah */
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card-berita:hover {
    transform: translateY(-4px);
}

.card-berita img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-berita-content {
    padding: 15px;
}

.card-berita-title {
    font-size: 14px !important;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    height: 48px; /* atau sesuaikan: 2 baris x line-height */
    line-height: 1.2em;
}

.card-berita-text {
    font-size: 12px !important;
    color: #555;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* jumlah baris yang ingin ditampilkan */
    -webkit-box-orient: vertical;

    overflow: hidden;
    text-overflow: ellipsis;
}

.card-berita-footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px !important;
    margin-top: auto; /* NOTE: kunci supaya footer tidak naik */
}

.card-berita-footer a {
    font-weight: bold;
    color: #007bff;
}

.card-berita-footer a:hover {
    color: orange;
}


/* =========================================================
   GRID CONTAINER — 3 ITEM PER BARIS
   ========================================================= */
.berita-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}


/* =========================================================
   HIGHLIGHT NEW ARTICLE
   ========================================================= */
.highlight-wrapper {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.15);
    margin: 30px 0 45px 0;
}

.highlight-image {
    width: 100%;
    object-fit: cover;
    filter: brightness(0.85);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
}

.highlight-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
}

.highlight-meta {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.highlight-btn {
    background: #ff8a00;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
}

.highlight-btn:hover {
    background: #ffb74a;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 992px) {
    .col-lg-7,
    .col-lg-4 {
        padding-left: 20px;
        padding-right: 20px;
    }

    .berita-grid-container {
        justify-content: center;
    }
    .event-content .desc {
    display: none;
    }
    .event-content p {
    margin-top: 20px;
    }

}
@media (min-width: 992px) and (max-width: 1366px) {
    .card-berita {
        width: 250px !important;
    }
}


@media (max-width: 768px) {
    h1 {
        font-size: 25px !important;
    }

    .card-berita {
        width: 100%;
    }

    .highlight-image {
        height: 250px;
    }

    .highlight-title {
        font-size: 20px;
    }
    .event-content .desc {
    display: none;
    }
    .event-content p {
    margin-top: 20px;
    }

}


/* =========================================================
   SMALL BUTTONS
   ========================================================= */
.btn-small-orange {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    padding: 3px 8px;
    color: #fff;
    background-color: #ff8c00;
    border-radius: 4px;
    text-decoration: none;
}

.btn-small-orange:hover {
    background-color: #e67a00;
}

.btn-readmore {
    background: #ff8a00;
    padding: 5px 10px;
    color: #fff !important;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
}

.btn-readmore:hover {
    background: #e67a00;
}


/* =========================================================
   DARK MODE (VERSI 1 — DARI FILE ASLI)
   ========================================================= */

/* NOTE: Bagian ini Override pertama */
body.dark {
    background: #111;
}

body.dark .highlight-wrapper {
    background: #CCC;
}

body.dark .column {
    background: #CCC !important;
}

body.dark .card-berita {
    background: #CCC !important;
}



/* =========================================================
   DARK MODE (VERSI 2 — PALING BAWAH, MENGOVERRIDE VERSI 1)
   ========================================================= */

/* NOTE: Bagian ini override versi sebelumnya */
body.dark {
    background: #0f0f0f;
    color: #e8e8e8;
}

body.dark .card-berita-content {
    background: #1b1b1b !important;
    border: 1px solid rgba(255,255,255,0.08);
}
body.dark .column h2, body.dark .column h4 {
    color: #111 !important;
}
body.dark .date-content-wrapper .date {
    color: #1b1b1b !important;
}

body.dark .column {
    background: #1a1a1a;
}

body.dark .magazine-title {
    color: #fff;
}

body.dark .magazine-subline {
    background: #fff;
}

body.dark .news-content {
    color: #1b1b1b !important;
}

body.dark .image-date-wrapper img {
    box-shadow: 0 2px 6px rgba(255,255,255,0.08);
}
body.dark .card-berita-title{
    color: #CCC;
}