*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
html {
    scroll-behavior: smooth;
    overscroll-behavior: none;

}
html,body {
    overflow-x: hidden;
}

body {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    text-align: center;
    height: 100%;
    overflow-y: auto;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 9998;
}

/* LOGO */
.logo {
    text-decoration: none;
    color: white;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* MENU */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    z-index: 1000;
}

.nav-links li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    position: relative;
    transition: 0.3s;
}

/* HOVER EFFECT */
.nav-links li a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: #00f7ff;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a:hover {
    color: #00f7ff;
}

/* HAMBURGER */
.menu-toggle {
    width: 30px;
    height: 22px;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2000;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 5px;
    transition: 0.3s ease;
}

/* animasi jadi X */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px; /* turun sedikit dari navbar */
        right: 5px;

        width: 180px;   /* 🔥 tetap kecil */
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(10px);

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;

        padding: 15px 0;
        border-radius: 12px;

        transform: translateX(120%);
        opacity: 0;
        visibility: hidden;

        transition: 0.3s ease;
        box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li a {
        font-size: 14px;
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
}

/* 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: 300px;

    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: 200px;
    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;
}

.wrapper {
    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: 16 / 9; /* 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: 9 / 16; /*foto portrait*/
    object-fit: cover;
}

.info {
    flex: 1;
    padding: 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.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;
}

.contact {
    padding: 100px 20px 200px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.2);
}

.contact {
    animation: fadeUp 1s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* FORM */
.contact form {
    display: flex;
    flex-direction: column;
    width: 300px;
    gap: 10px;
}

.contact input,
.contact textarea {
    padding: 12px;
    border-radius: 10px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.2);
    color: white;
    transition: 0.3s;
}

.contact input::placeholder,
.contact textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.contact input:focus,
.contact textarea:focus {
    background: rgba(255,255,255,0.3);
}

.contact button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #00adb5, #00f7ff);
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

.contact button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px #00f7ff;
}

/* INFO */
.contact form,
.contact-info {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.contact form:hover,
.contact-info:hover {
    transform: translateY(-5px);
}

.contact-info h3 {
    margin-bottom: 10px;
}

/* Footer */
footer {
    font-size: 11px;
    padding: 10px;
    background: #00000086;
}
