*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
html {
    scroll-behavior: smooth;
    overscroll-behavior: 10px;

}
html,body {
    overflow-x: hidden;
}

body {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    text-align: center;
    height: 100%;
    overflow-y: auto;
}

/* Header */
header {
    margin-top: 80px;
    padding: 30px;
}

header h1 {
    font-size: 40px;
}

header p {
    margin-top: 10px;
}

/* Gallery */
.gallery {
    margin-left: 10px ;
    margin-right: 10px;
    display: flex;
    gap: 20px;
    padding: 100px 0 0;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory ;
    overflow-x: hidden;
    overflow-y: visible;
    touch-action: pan-y;
}

/* Card */
.card {
    background: white;
    border-radius: 15px;
    overflow: hidden; /* biar gambar ikut rounded */
    flex-shrink: 0;
    min-width: 200px;
    max-width: 400px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* bayangan */
    transition: transform 0.3s, box-shadow 0.3s;
    scroll-snap-align: start;
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card p {
    padding: 10px;
    font-weight: bold;
    color: black;
}

.card:hover {
    background: #616c9f;
    transition: 0.04s;
}

/* modal background */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    background-color: rgba(0,0,0,0.0);
    opacity: 0;
    visibility: hidden;

    transition: all 0.3s ease;
}

/* saat aktif */
.modal.show {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0,0,0,0.8);
}

/* gambar */
.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;

    transform: scale(0.7);
    transition: transform 0.3s ease;
}

/* zoom saat muncul */
.modal.show .modal-content {
    transform: scale(1);
}

/* tombol X */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;

    opacity: 0;
    transition: opacity 0.3s;
}

.modal.show .close {
    opacity: 1;
}

.wrapperG {
    position: relative;
}

.btn {
    position: absolute;
    top: 63%;
    transform: translateY(-50%);
    background: black;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.left {
    left: 0;
}
.right {
    right: 0;
}

/* PROFIL KELAS */
.profil-kelas {
    background: rgba(255,255,255,0.2);
    margin: 20px;
    padding: 20px;
    border-radius: 15px;
}

/* PROFIL SISWA */
.profil-siswa {
    padding: 100px 20px;
}

.profil-siswa h2 {
    margin-bottom: 15px;
}

/* CARD */
.siswa {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 10 / 5; /* bentuk card */
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    color: black;

    cursor: pointer;
}

.grid-siswa {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
    justify-content: center;
    gap: 25px;
    padding: 20px;
}

.siswa img {
    height: 100%;
    aspect-ratio: 3 / 4; /*foto portrait*/
    object-fit: cover;
}

.info {
    flex: 1;
    padding: 10px;

    display: flex;
    flex-direction: column;
}

.info h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #720101;
}

.info p {
    font-size: 14px;
    color: #555;
}

.clone {
    position: fixed;
    z-index: 10000;
    margin: 0;

    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.clone.active {
    top: 50% !important;
    left: 50% !important;

    transform: translate(-50%, -50%);
    
    width: 90vw !important;
    max-width: 600px;
    
    height: auto !important;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: 0.3s;
    z-index: 9999;
}

.overlay.show {
    background: rgba(0,0,0,0.7);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 35px;
    height: 35px;

    background: rgba(0,0,0,0.6); /* 🔥 ini penting */
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    font-size: 20px;

    z-index: 10001;
}

.close-btn:hover {
    transform: scale(1.2);
    color: #ff4d4d;
}

