/*
========================================
  WHAT'S ON SECTION STYLES (DESKTOP)
========================================
*/
.whats-on {
    padding-bottom: 30px;
    border-bottom: 1px solid black;
}

.whats-on h2 {
    /*margin-bottom: 30px;*/
    font-weight: 500;
}

/* Grid Container */
.class-grid {
    display: grid;
    padding-top: 20px;
    /* Membuat 4 kolom yang sama lebarnya */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    /* Jarak antara baris dan kolom */
}

/* Individual Card */
.class-card-1 {
    /* Gaya ini membuat card terlihat utuh meskipun terdiri dari 2 div terpisah */
    border: 1px solid black;
}

/* Card Image & Banner */
.card-image {
    position: relative;
    /* Diperlukan agar banner bisa diposisikan di dalamnya */
}

.h2-class {
    display: none;
}

.card-image img {
    width: 100%;
    max-height: 325px;
    display: block;
    /* Menghilangkan spasi ekstra di bawah gambar */
    aspect-ratio: 3 / 4;
    /* Menjaga rasio gambar agar seragam */
    object-fit: cover;
    /* Memastikan gambar mengisi area tanpa distorsi */
}

.class-card-1.is-sold-out .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Overlay semi-transparan */
}

.card-banner {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.class-card-1.is-sold-out .card-content {
    background-color: rgba(0, 0, 0, 0.7);
    /* Latar belakang gelap sesuai permintaan */
    border-color: rgba(0, 0, 0, 0.7);
    /* Sesuaikan warna border agar menyatu */
}

.banner-sold-out {
    background-color: rgba(0, 0, 0, 0.7);
}

.banner-seats-left {
    background-color: rgba(200, 50, 50, 0.8);
}

/* Card Content */
.card-content {
    padding: 20px;
    /* border: 1px solid #ccc; */
    border-top: none;
    /* Border atas sudah diwakili oleh gambar */
    /* Pastikan tinggi konten konsisten */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    /* Atur tinggi minimum agar semua card sejajar */
}

.instructor-name {
    font-size: 0.85rem;
    margin-bottom: 8px;
    margin-top: 10px;
    line-height: 1.25rem;
}

.class-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    /* Memberi ruang untuk meta di bawah */
    flex-grow: 1;
}

.class-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.class-meta .date {}

/* Pagination */
.class-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.class-pagination button {}

.class-pagination .pages {
    font-weight: 500;
    display: flex;
    gap: 8px;
    font-size: 18px;
}

.class-pagination .arrow-pagination {
    height: 24px;
    width: 24px;
}

.whats-on-title-desktop {
    display: block;
    margin-bottom: 30px;
}

.whats-on-title-mobile {
    display: none;
}

/*
========================================
  SORT BY DROPDOWN COMPONENT STYLES
========================================
*/

.sort-by-container {
    position: relative;
    /* Kunci untuk positioning dropdown */
}

.sort-by-trigger {
    display: flex;
    align-items: center;
    /* gap: 8px; */
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

.sort-by-trigger span {
    margin-top: 3px;
    color: black;
    font-weight: 500;
}

.sort-by-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    /* Posisi di bawah trigger + 10px jarak */
    right: 0;
    width: 300px;
    background-color: white;
    border: 1px solid #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 25px;

    /* Transisi untuk muncul/hilang */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.sort-by-dropdown.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    /* Efek sedikit naik saat hilang */
}

.dropdown-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-transform: capitalize;
}

.sort-options {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sort-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    text-transform: capitalize;
    font-weight: 400;
    cursor: pointer;
}

/* Checkmark Icon Styling */
.checkmark-icon {
    display: none;
    /* Sembunyikan semua ikon secara default */
    width: 24px;
    height: 24px;
}

/* HANYA tampilkan ikon pada item yang memiliki kelas .is-active */
.sort-option.is-active .checkmark-icon {
    display: block;
}

.sort-option.is-active .sort-title {
    font-weight: 700;
}

.sort-title{
    font-size: 20px;
    text-transform: capitalize;
    font-weight: 400;
    color: black !important;
}

/*
========================================
  WHAT'S ON SECTION STYLES (MOBILE)
========================================
*/

/* Secara default, sembunyikan elemen khusus mobile */
.class-slider-mobile,
.see-more-mobile {
    display: none;
}

.whats-on-title {
    font-size: 24px;
}

/* Terapkan gaya ini hanya pada layar kecil (di bawah 1024px) */
@media (max-width: 1023px) {
    .whats-on-title-desktop {
        display: none;
    }

    .whats-on-title-mobile {
        display: block;
    }

    .whats-on h2 {
        margin-left: 10px;
        font-weight: 500;
        font-size: 16px;
    }

    .h2-class {
        padding-top: 20px;
        padding-bottom: 20px;
        border-top: 1px solid black;
        border-bottom: 1px solid black;
        margin-left: -10px;
        margin-right: -10px;
        margin-bottom: 30px;
        display: block;
    }

    .whats-on-desktop {
        display: none;
    }

    .whats-on-title {
        font-size: 16px;
    }

    /* 1. Sembunyikan elemen desktop */
    .whats-on .class-grid,
    .whats-on {
        /* display: none; */
        display: flex;
        flex-direction: column;
    }

    /* 2. Tampilkan dan tata elemen mobile */
    .whats-on .class-slider-mobile {
        display: block;
        /* Tampilkan slider */
        margin-left: -5%;
        /* Sedikit offset agar slide pertama tidak menempel di tepi */
        margin-right: -5%;
        padding: 0 5%;
        overflow: visible;
        /* Penting agar slide berikutnya terlihat */
    }

    .whats-on .swiper-wrapper {
        /* Tidak perlu style khusus, Swiper akan mengaturnya */
    }

    .whats-on .swiper-slide {
        width: 85%;
        /* Membuat slide tidak mengisi layar penuh */
    }

    /* 3. Atur ulang beberapa gaya card untuk mobile */
    .whats-on .class-card-1 {
        /* Pastikan border tetap ada di mobile */
        border: 1px solid black;
    }

    .whats-on .card-content {
        /* Sedikit kurangi padding dan tinggi di mobile */
        padding: 15px;
        min-height: 160px;
    }

    .whats-on .class-title {
        font-size: 16px;
        /* Sedikit kecilkan judul */
    }

    /* 4. Gaya untuk tombol "See More" */
    .whats-on .see-more-mobile {
        display: block;
        /* Tampilkan tombol */
        text-align: center;
        margin-top: 30px;
        font-weight: 500;
        font-size: 16px;
        text-decoration: underline;
    }
}