/* ================= RESET & DASAR ================= */
body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 50px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
}

/* ================= MAIN CONTENT & CONTAINERS ================= */
.main-content {
    flex: 1;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.section-container {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-transparent {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* ================= HEADERS & TITLES ================= */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.7;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent);
}

.section-title.title-center {
    justify-content: center;
}

/* ================= HERO BANNER ================= */
.hero-banner-container {
    width: 100%;
    margin-bottom: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 21 / 9;
    background-color: var(--primary-light);
    position: relative;
}

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}

.hero-banner-container:hover .hero-banner-img {
    transform: scale(1.03);
}

/* ================= JADWAL CARDS ================= */
.schedule-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.schedule-card {
    /* flex: 1 (boleh melar), 1 (boleh menyusut), 280px (ukuran dasar) */
    flex: 1 1 280px;

    /* PENTING: Jangan gunakan max-width di sini agar item bebas melar memenuhi layar */

    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.schedule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent);
    border-radius: 6px 0 0 6px;
}

.schedule-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.schedule-icon {
    font-size: 28px;
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
    padding: 15px;
    border-radius: 50%;
    flex-shrink: 0;
}

.schedule-info h3 {
    font-size: 19px;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.schedule-info p {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ================= GALERI ================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 220px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--border);
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 30px;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--overlay-rgb), 0.5);
    z-index: 1;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 2;
}

.gallery-item::before,
.gallery-item::after {
    pointer-events: none;
}

/* ================= ARTIKEL POST CARDS ================= */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.card-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-no-cover {
    width: 100%;
    height: 220px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    /* Warna icon gambar default jadi hijau */
    font-size: 50px;
    opacity: 0.5;
}

.card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    font-size: 13px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 21px;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 25px;
    flex: 1;
}

.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    transition: color 0.3s;
}

.post-card:hover .card-footer {
    color: var(--accent);
}

.card-footer i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.post-card:hover .card-footer i {
    transform: translateX(8px);
}

/* ================= TOMBOL BUTTONS ================= */
.btn-see-more {
    background: var(--primary);
    color: #ffffff;
    border: 2px solid var(--primary);
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(6, 78, 59, 0.15);
}

.btn-see-more:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

/* ================= SOSIAL MEDIA ================= */
.social-links-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--primary);
    font-size: 24px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: transparent;
    color: #fff;
}

.social-btn.facebook:hover {
    background: #1877F2;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.3);
}

.social-btn.instagram:hover {
    background: #E4405F;
    box-shadow: 0 8px 20px rgba(228, 64, 95, 0.3);
}

.social-btn.tiktok:hover {
    background: #000000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.youtube:hover {
    background: #FF0000;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.social-btn.whatsapp:hover {
    background: #25D366;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

/* ================= FORM PENCARIAN & FILTER ================= */
.filter-form {
    display: flex;
    gap: 15px;
    background: transparent;
    padding: 0;
    border: none;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg-surface);
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.sort-box select {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    cursor: pointer;
    background: var(--bg-surface);
    transition: border-color 0.3s ease;
}

.sort-box select:focus {
    border-color: var(--accent);
}

.btn-search {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: var(--accent);
}

/* ================= PAGINATION ================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--bg-main);
    color: var(--accent);
    border-color: var(--accent);
}

.page-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* ================= LIGHTBOX ================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
    /* Latar lightbox digelapkan dengan hint warna primary */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10000;
}

.close:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* ================= BANNER HARI RAYA ================= */
.holiday-banner {
    background: var(--bg-surface);
    color: var(--primary);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 15px 30px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow);
    text-align: center;
}

.holiday-icon {
    font-size: 24px;
}

@media (max-width: 768px) {
    .holiday-banner {
        font-size: 15px;
        padding: 12px 20px;
        flex-direction: row;
    }

    .holiday-icon {
        font-size: 20px;
    }
}

/* ================= RESPONSIVE / TAMPILAN HP ================= */
@media (max-width: 768px) {
    .section-container {
        padding: 25px 15px;
        margin-bottom: 25px;
    }

    .hero-banner-container {
        margin-bottom: 20px;
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-sm);
    }

    .post-grid,
    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .section-header h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .section-header p {
        font-size: 14px;
        line-height: 1.5;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .section-title.title-center {
        flex-direction: column;
        gap: 12px;
    }

    .section-title.title-center i {
        font-size: 32px;
        background: rgba(16, 185, 129, 0.1);
        padding: 15px;
        border-radius: 50%;
    }

    .schedule-card {
        padding: 20px 15px;
        gap: 15px;
    }

    .schedule-icon {
        font-size: 20px;
        padding: 12px;
    }

    .schedule-info h3 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .schedule-info p {
        font-size: 13px;
    }

    .card-body {
        padding: 20px 15px;
    }

    .card-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .card-excerpt {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .card-meta {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .btn-see-more {
        padding: 10px 25px;
        font-size: 14px;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .filter-form {
        flex-direction: column;
    }

    .sort-box select,
    .btn-search {
        width: 100%;
    }
}