/* RESET DASAR & FONT */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Pastikan body dan html mengambil lebar 100% dan mencegah overflow horizontal */
html, body {
    width: 100%; 
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    /* Tambahkan padding horizontal kecil untuk mencegah konten menempel di tepi */
    padding: 0 15px; 
}

a {
    text-decoration: none;
    color: inherit;
}

/* HEADER & NAVIGASI */
header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8em;
    font-weight: bold;
}

nav a {
    margin-left: 20px;
    transition: color 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

nav a:hover {
    color: #1abc9c;
}

.cta-button, #join-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

#join-btn:hover {
    background-color: #c0392b;
}

nav a.active-menu {
    color: #1abc9c !important;
    font-weight: bold;
    border-bottom: 2px solid #1abc9c;
    padding-bottom: 5px;
}

/* CONTENT (Sembunyikan semua halaman kecuali yang aktif) */
main {
    flex-grow: 1;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* HERO SECTION (HOME) */
#home-page .hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1600x600?text=Latar+Belakang+Workout');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

#home-page .hero-section h2 {
    font-size: 3em;
    margin-bottom: 15px;
}

#home-page .cta-button {
    background-color: #1abc9c;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s ease;
}

/* INFO SECTION */
.info-section {
    padding: 60px 0;
    background-color: white;
}

.info-grid {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.info-card {
    padding: 25px;
    border-left: 4px solid #1abc9c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex: 1;
    text-align: center;
}


/* JADWAL SECTION */
.section-title {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 40px;
    color: #2c3e50;
}

.subtitle {
    text-align: center;
    margin-top: -30px;
    margin-bottom: 50px;
    color: #7f8c8d;
    font-size: 1.1em;
}

.schedule-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.schedule-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 100%;
    max-width: 350px;
    transition: transform 0.3s ease;
}

/* GALERI SECTION */
#galeri-page .gallery-section {
    background-color: #ecf0f1;
    padding: 60px 0;
}

.gallery-grid {
    display: grid;
    /* Grid akan membuat 1 kolom di mobile, dan lebih banyak kolom di desktop */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 15px;
}

/* --- Bagian GALERI SECTION (dalam style.css) --- */

.gallery-grid {
    display: grid;
    /* Tetap responsif */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px;
}

.gallery-card {
    /* Gaya Kartu */
    background-color: #f8f8f8; /* Ubah background menjadi putih sangat terang */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    
    /* KUNCI: Memaksa rasio 4:3 pada seluruh kartu */
    aspect-ratio: 4 / 3; 
    
    overflow: hidden; /* Sangat penting untuk memotong bagian gambar yang berlebihan */
    transition: transform 0.3s ease;
    width: 100%; 
    cursor: pointer;
    
    /* Hapus kode padding atau position yang tidak perlu di sini */
}

.gallery-card img {
    /* KUNCI: Memastikan gambar mengisi 100% dari area kartu 4:3 */
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block; /* Hapus spasi default di bawah gambar */
}

/* Jika Anda menggunakan caption, pastikan properti posisinya benar */
.card-caption {
    /* Kami asumsikan caption ada di luar gambar atau di bawahnya */
    background-color: #2c3e50; /* Ganti dengan warna background caption yang jelas */
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    
    /* Jika caption harus berada di bawah gambar: */
    position: static; 
}

/* TENTANG KAMI SECTION */
#tentang-page .about-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#tentang-page .about-section h3, #tentang-page .about-section h4 {
    text-align: left;
    margin-top: 20px;
    color: #2c3e50;
}

#tentang-page .about-section ul {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

/* DAFTAR/FORM SECTION */
#daftar-page .form-section {
    padding: 50px 0;
    background-color: #ecf0ff;
    display: flex;
    justify-content: center;
}
.form-card {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}
.form-card h3 {
    margin-bottom: 25px;
    text-align: center;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}
.form-group input, .form-card button[type="submit"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}
.form-card button[type="submit"] {
    background-color: #1abc9c;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}
.form-card button[type="submit"]:hover {
    background-color: #16a085;
}
#responseMessage {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}

/* FOOTER */
footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
    margin-top: auto;
}

/* RESPONSIVENESS (Mobile View) - Perbaikan tampilan agar full layar */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start; 
    }
    
    header h1 {
        margin-bottom: 10px; 
    }

    nav {
        margin-top: 5px;
        text-align: left;
        display: flex; 
        flex-wrap: wrap; 
        width: 100%;
    }

    nav a {
        margin: 0 15px 10px 0; 
        font-size: 0.9em;
    }

    #join-btn {
        margin-top: 10px;
        margin-left: 0;
        display: block; 
        width: 100%; 
    }
    
    #home-page .hero-section h2 {
        font-size: 2.2em;
    }
    
    .info-grid {
        flex-direction: column;
    }
}
