.news-page {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

/* HEADER */
.news-header {
    text-align: center;
    margin-bottom: 40px;
}
.news-badge {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(145deg, #facc15, #f59e0b);
    color: #075928;
    font-weight: 700;
    border-radius: 999px;
    margin-bottom: 12px;
}
.news-header h1 {
    font-size: 36px;
    color: #048149;
    margin-bottom: 10px;
}
.news-header p {
    color: #444;
}

/* LAYOUT */
.news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* HOT NEWS */
.hot-card {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    height: 340px;
}

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

.hot-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hot-badge {
    display: inline-block;
    background: #048149;
    color: white;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    width: fit-content;
    font-weight: 700;
    margin-bottom: 10px;
}

.hot-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.6;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read {
    margin-top: 15px;
    display: inline-block;
    color: #048149;
    font-weight: 700;
    text-decoration: none;
}

/* TABS */
.news-tabs {
    display: flex;
    gap: 12px;
    margin: 30px 0 18px;
}
.tab-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: #e9f5ef;
    color: #048149;
    font-weight: 700;
    transition: 0.25s;
}
.tab-btn.active {
    background: #048149;
    color: white;
}

/* GRID */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* CARD */
.news-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
    transition: 0.25s;

    height: 420px; /* kunci tinggi */
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-6px);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.news-title {
    font-size: 16px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    margin-bottom: 10px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.6;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;

    margin-top: auto;
}

/* SIDEBAR */
.news-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-box {
    background: white;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.sidebar-box h3 {
    margin-bottom: 15px;
    color: #048149;
}

.video-box iframe {
    width: 100%;
    height: 200px;
    border-radius: 14px;
    margin-bottom: 15px;
}

.tiktok-box {
    padding: 14px;
    background: #f3f3f3;
    border-radius: 14px;
    font-size: 14px;
    color: #333;
}
/* ================= MODAL DETAIL BERITA ================= */
.news-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.news-modal.active {
    display: block;
}

.news-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
}

.news-modal-content {
    position: relative;
    width: min(900px, 92%);
    max-height: 85vh;
    margin: 50px auto;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);

    display: flex;
    flex-direction: column;
    animation: popUp 0.25s ease;
}

@keyframes popUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.news-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 24px;
    color: white;
    background: rgba(0,0,0,0.45);
    transition: 0.2s;
    z-index: 10;
}

.news-modal-close:hover {
    background: rgba(0,0,0,0.65);
    transform: scale(1.05);
}

.news-modal-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.news-modal-body {
    padding: 18px 22px 24px;
    overflow-y: auto;
}

.news-modal-date {
    display: inline-block;
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.news-modal-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    color: #111;
}

.news-modal-text {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* responsive */
@media (max-width: 576px) {
    .news-modal-img {
        height: 200px;
    }
    .news-modal-title {
        font-size: 20px;
    }
}
/* ================= DETAIL PAGE ================= */
.detail-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.btn-back {
    display: inline-block;
    width: fit-content;
    padding: 10px 16px;
    border-radius: 999px;
    background: #e9f5ef;
    color: #048149;
    text-decoration: none;
    font-weight: 700;
    transition: 0.25s;
}

.btn-back:hover {
    background: #048149;
    color: #fff;
    transform: translateY(-2px);
}

.detail-article {
    background: #fff;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.25;
}

.detail-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 18px;
}

/* wrapper biar gambar selalu rapi */
.detail-img-wrap {
    width: 100%;
    height: 360px;        /* 🔥 ini ngunci tinggi gambar */
    border-radius: 16px;
    overflow: hidden;     /* 🔥 biar zoom/crop rapi */
    margin-bottom: 18px;
}

.detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* 🔥 gambar ngikut wrapper */
    display: block;
}

.detail-content p {
    font-size: 15px;
    line-height: 1.9;
    color: #333;
    margin-bottom: 14px;
    text-align: justify;
}

/* responsive detail */
@media (max-width: 576px) {
    .detail-title {
        font-size: 22px;
    }

    .detail-img-wrap {
        height: 220px;
    }

    .detail-article {
        padding: 18px;
    }
}

/* TAB CONTENT */
.tab-content { display: none; }
.tab-content.active { display: grid; }
.tab-content {
    display: none;
    animation: fadeSlide 0.35s ease;
}

.tab-content.active {
    display: grid;
}
.tab-btn {
    transition: all 0.2s ease;
}

.tab-btn:active {
    transform: scale(0.94);
}
.news-layout{
  display: grid;
  grid-template-columns: minmax(0,1fr) 380px;
  gap: 30px;
  align-items: start;
}

.news-main,
.news-sidebar{
  min-width: 0;
}

.video-box iframe{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 14px;
  margin-bottom: 15px;
}

/* Fix TikTok biar ga ngancurin grid */
.tiktok-box{
  overflow: hidden;
}

.tiktok-box blockquote{
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 auto !important;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .news-layout { grid-template-columns: 1fr; }
    .news-sidebar { position: static; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .hot-card { grid-template-columns: 1fr; height: auto; }
    .hot-image { height: 220px; }
}

@media (max-width: 576px) {
    .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hot-card {
    grid-template-columns: 1fr; /* jadi 1 kolom */
    height: auto;              /* jangan dikunci */
  }

  .hot-img {
    height: 220px;             /* biar konsisten */
    object-fit: cover;
  }

  .hot-content {
    padding: 16px;
  }
}
@media (max-width: 768px) {
  .video-box iframe {
    height: 180px;
  }
}
@media (max-width: 768px) {
  .video-box iframe {
    height: 180px;
  }
}
