/* ===============================
   RESET AMAN
============================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Poppins', Arial, sans-serif;
    background: linear-gradient(145deg, #fdfcfb, #f5f5f7);
    color: #333;
    scroll-behavior: smooth;
}

/* ===============================
   FIX NAVBAR & FOOTER
============================== */
nav.topnav,
footer {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
}

/* ===============================
   KONTEN HALAMAN
============================== */
.page-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 25px;
}


/* ===============================
   TITLE EVENTS & PROMOS
============================== */
.page-title {
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #222;
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 60px;
    text-transform: none;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #c62828;
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-title {
    font-size: 1.8rem;
    margin: 45px 0 30px;
    color: #222;
    padding-left: 14px;
    border-left: 6px solid #c62828;
    font-weight: 700;
}

/* ===============================
   GRID
============================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 380px));
    gap: 32px;
    justify-content: start;
}

/* ===============================
   CARD
============================== */
.card {
    background: linear-gradient(145deg, #ffffff, #f9f9fa);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    padding: 20px;
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;

    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.12);
    background: linear-gradient(160deg, #ffffff, #f4f4f6);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #777;
    font-style: italic;
}

/* ===============================
   IMAGE EVENT (di card biasa — tersembunyi jika tidak ada foto)
============================== */
.image-box {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #eee;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.card:hover .image-box img {
    transform: scale(1.05);
}

/* ===============================
   IMAGE PROMO (di card biasa)
============================== */
.promo-image-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #f0f0f0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.04);
}

.promo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.card:hover .promo-image-wrapper img {
    transform: scale(1.03);
}

/* ===============================
   CARD BODY
============================== */
.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #111;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-body p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* META */
.meta {
    font-size: 0.85rem;
    color: #888;
}

/* 🔥 DESKRIPSI DI CARD (DIPOTONG RAPI) */
.desc {
    overflow: hidden;
    max-height: 5.4em;   /* sekitar 3 baris */
    line-height: 1.8;
}

/* ===============================
   PROMO KHUSUS
============================== */
.promo-card {
    border-top: 6px solid #c62828;
}

.promo-date {
    color: #c62828;
    font-weight: 700;
}

/* ===============================
   BUTTON
============================== */
.btn-more {
    margin-top: auto;
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: color .3s ease;
}

.btn-more::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s ease;
}

.btn-more:hover {
    color: #1d4ed8;
}

.btn-more:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ===============================
   MODAL
============================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    width: 92%;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 24px;
    animation: fadeUp .3s ease;
}

/* ===============================
   MODAL INNER LAYOUT:
   Foto kiri + Teks kanan
============================== */
.modal-inner {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Kolom kiri: gambar */
.modal-image-col {
    flex: 0 0 260px;
    width: 260px;
}

.modal-image-col .modal-img {
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: contain;   /* ← tidak terpotong, gambar penuh */
    border-radius: 16px;
    background: #f3f3f3;
    display: block;
}

/* Kolom kanan: teks */
.modal-text-col {
    flex: 1;
    min-width: 0;
}

.modal-text-col h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
    letter-spacing: 0.4px;
}

.modal-text-col .meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

.modal-text-col .desc {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    margin-top: 12px;
}

.modal-text-col .promo-date {
    font-size: 1rem;
    color: #c62828;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

/* Jika tidak ada gambar → teks full width */
.modal-inner.no-image .modal-image-col {
    display: none;
}

.modal-inner.no-image .modal-text-col {
    width: 100%;
}

/* Close button */
.modal-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.modal-close button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    transition: color .2s;
}

.modal-close button:hover {
    color: #c62828;
}

/* ===============================
   RESPONSIVE
============================== */
@media (max-width: 1024px) {
    .page-container {
        padding: 50px 20px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 360px));
        gap: 24px;
    }

    .page-title {
        font-size: 28px;
        margin-bottom: 45px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .modal-image-col {
        flex: 0 0 220px;
        width: 220px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 40px 16px;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 35px;
    }

    .page-title::after {
        width: 50px;
        margin: 10px auto 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin: 35px 0 20px;
        padding-left: 12px;
        border-left-width: 4px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 320px));
        gap: 16px;
    }

    .card {
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    }

    .card:hover {
        box-shadow: 0 16px 40px rgba(0,0,0,0.1);
        transform: translateY(-4px);
    }

    .image-box,
    .promo-image-wrapper {
        height: 120px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .card-body h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .card-body p {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .meta {
        font-size: 0.8rem;
    }

    .btn-more {
        font-size: 0.9rem;
    }

    .modal-box {
        width: 96%;
        padding: 24px;
        border-radius: 20px;
    }

    /* Modal: stack vertikal di layar kecil */
    .modal-inner {
        flex-direction: column;
        gap: 18px;
    }

    .modal-image-col {
        flex: none;
        width: 100%;
    }

    .modal-image-col .modal-img {
        max-height: 220px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .page-container {
        padding: 30px 12px;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 28px;
    }

    .page-title::after {
        width: 40px;
        height: 2px;
        margin: 8px auto 0;
    }

    .section-title {
        font-size: 1.2rem;
        margin: 28px 0 16px;
        padding-left: 10px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        border-radius: 14px;
        padding: 14px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.05);
    }

    .image-box,
    .promo-image-wrapper {
        height: 140px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .card-body h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .card-body p {
        font-size: 0.85rem;
        margin-bottom: 8px;
        line-height: 1.6;
    }

    .meta {
        font-size: 0.75rem;
    }

    .desc {
        max-height: 3.6em;  /* 2 baris */
    }

    .btn-more {
        font-size: 0.85rem;
        margin-top: 8px;
    }

    .promo-date {
        font-size: 0.85rem;
    }

    .modal-box {
        width: 98%;
        padding: 20px;
        max-height: 90vh;
    }

    .modal-box .card {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 24px 10px;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .page-title::after {
        width: 35px;
        margin: 6px auto 0;
    }

    .section-title {
        font-size: 1.1rem;
        margin: 20px 0 14px;
        padding-left: 8px;
    }

    .cards-grid {
        gap: 12px;
    }

    .card {
        border-radius: 12px;
        padding: 12px;
    }

    .image-box,
    .promo-image-wrapper {
        height: 120px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .card-body h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .card-body p {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .meta {
        font-size: 0.7rem;
    }

    .desc {
        max-height: 1.8em;  /* 1 baris */
    }

    .btn-more {
        font-size: 0.8rem;
        margin-top: 6px;
    }

    .modal-box {
        width: 99%;
        padding: 16px;
    }
}

@media (max-width: 360px) {
    .page-container {
        padding: 18px 8px;
    }

    .page-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 1rem;
        margin: 16px 0 12px;
    }

    .cards-grid {
        gap: 10px;
    }

    .card {
        padding: 10px;
    }

    .image-box,
    .promo-image-wrapper {
        height: 100px;
    }

    .card-body h4 {
        font-size: 0.9rem;
    }

    .card-body p {
        font-size: 0.75rem;
    }
}

/* ===============================
   ANIMATION
============================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}