/* ==================================================
   RESET
================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "Nunito", sans-serif;
    background: #f4f8ff;
    color: #172033;
}


/* ==================================================
   NAVBAR
================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 72px;

    background: rgba(255, 255, 255, 0.97);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid #e2e8f0;

    z-index: 9999;
}


.nav-container {
    width: 90%;
    max-width: 1200px;

    height: 100%;

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==================================================
   LOGO
================================================== */

.nav-logo {
    text-decoration: none;

    font-size: 22px;
    font-weight: 900;

    color: #172033;
}

.nav-logo span {
    color: #4f6df5;
}


/* ==================================================
   MENU
================================================== */

.nav-menu {
    display: flex;
    align-items: center;

    gap: 32px;
}

.nav-link {
    position: relative;

    text-decoration: none;

    color: #64748b;

    font-size: 15px;
    font-weight: 700;
}

.nav-link:hover {
    color: #4f6df5;
}

.nav-link::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -8px;

    width: 0;
    height: 2px;

    background: #4f6df5;

    transform: translateX(-50%);

    transition: 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 18px;
}


/* ==================================================
   HAMBURGER
================================================== */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    border: none;
    border-radius: 12px;

    background: #eff6ff;

    cursor: pointer;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;

    z-index: 10001;
}

.menu-toggle span {
    display: block;

    width: 22px;
    height: 2.5px;

    background: #172033;

    border-radius: 10px;

    transition: 0.3s ease;
}


/* ==================================================
   HOME
================================================== */

.home {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 100px 20px 60px;

    background-image:
        url("images/hero/kelas.jpeg");

    background-size: cover;

    background-position: center;

    overflow: hidden;
}

.home-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.48),
            rgba(30, 64, 175, 0.34),
            rgba(37, 99, 235, 0.22)
        );

    z-index: 1;
}

.home-content {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 850px;

    text-align: center;

    color: white;
}

.home-subtitle {
    margin-bottom: 15px;

    font-size: 15px;
    font-weight: 900;

    letter-spacing: 2px;
}

.home h1 {
    font-size: clamp(42px, 7vw, 76px);

    line-height: 1.05;

    font-weight: 900;

    letter-spacing: -2px;

    margin-bottom: 25px;
}

.home h1 span {
    display: block;

    color: #a5bfff;
}

.home-description {
    max-width: 650px;

    margin: 0 auto 22px;

    font-size: 17px;

    line-height: 1.7;

    font-weight: 600;
}

.home-motto {
    font-size: 16px;

    font-weight: 800;

    font-style: italic;

    margin-bottom: 35px;
}

.home-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 13px 24px;

    border-radius: 50px;

    background: #ffffff;

    color: #3157e8;

    text-decoration: none;

    font-size: 15px;

    font-weight: 900;

    transition: 0.3s ease;
}

.home-button:hover {
    transform: translateY(-4px);

    background: #4f6df5;

    color: white;
}


/* ==================================================
   SCROLL
================================================== */

.scroll-down {
    position: absolute;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    z-index: 2;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 7px;

    color: white;
}

.scroll-down span {
    width: 20px;
    height: 32px;

    border: 2px solid rgba(255,255,255,.75);

    border-radius: 20px;

    position: relative;
}

.scroll-down span::after {
    content: "";

    position: absolute;

    top: 6px;
    left: 50%;

    width: 4px;
    height: 7px;

    border-radius: 10px;

    background: white;

    transform: translateX(-50%);
}


/* ==================================================
   CLASS
================================================== */

.class-section {
    padding: 110px 20px 120px;

    background: #f4f8ff;
}

.class-container {
    width: 90%;
    max-width: 1100px;

    margin: auto;
}

.section-heading {
    text-align: center;

    max-width: 650px;

    margin: 0 auto 55px;
}

.section-heading p:first-child {
    color: #2563eb;

    font-size: 13px;

    font-weight: 900;

    letter-spacing: 2px;

    margin-bottom: 8px;
}

.section-heading h2 {
    font-size: clamp(36px, 5vw, 52px);

    line-height: 1.1;

    font-weight: 900;

    color: #172033;

    margin-bottom: 15px;
}

.section-heading > p:last-child {
    color: #64748b;

    font-size: 16px;

    line-height: 1.7;
}


/* ==================================================
   CLASS GRID
================================================== */

.class-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 24px;
}

.person-card {
    background: white;

    border-radius: 22px;

    overflow: hidden;

    border: 1px solid #dbe5f0;

    box-shadow:
        0 8px 25px rgba(30,64,175,.07);

    transition: .3s ease;
}

.person-card:hover {
    transform: translateY(-8px);

    border-color: #bfdbfe;
}

.person-photo {
    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #e8eef7;
}

.person-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.person-info {
    padding: 18px;

    text-align: center;
}

.person-info h3 {
    font-size: 19px;

    font-weight: 900;

    color: #172033;

    margin-bottom: 3px;
}

.person-role {
    font-size: 13px;

    color: #94a3b8;

    margin-bottom: 16px;
}


/* ==================================================
   SOCIAL
================================================== */

.social-link {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 10px;
}

.social {
    width: 38px;
    height: 38px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    text-decoration: none;

    font-size: 17px;
}

.social.instagram {
    background: #fce7f3;

    color: #e83e8c;
}

.social.tiktok {
    background: #eef2f7;

    color: #172033;
}

/* ==================================================
   TENTANG (STATISTIK KELAS)
================================================== */

.about-section {
    padding: 110px 20px 120px;

    background:
        linear-gradient(
            180deg,
            #f4f8ff,
            #eaf1ff
        );
}

.about-container {
    width: 90%;
    max-width: 900px;

    margin: auto;
}

.about-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;

    margin-top: 15px;
}

.about-card {
    background: #ffffff;

    border-radius: 22px;

    padding: 40px 20px;

    text-align: center;

    border: 1px solid #dbe5f0;

    box-shadow:
        0 8px 25px rgba(30, 64, 175, .07);

    transition: .3s ease;
}

.about-card:hover {
    transform: translateY(-6px);

    border-color: #bfdbfe;
}

.about-number {
    font-size: 48px;

    font-weight: 900;

    color: #2563eb;

    line-height: 1;
}

.about-label {
    margin-top: 12px;

    font-size: 14px;

    font-weight: 800;

    color: #64748b;

    text-transform: uppercase;

    letter-spacing: 1px;
}


/* ==================================================
   PAGINATION - HALAMAN "KITA"
================================================== */

.person-card.is-hidden {
    display: none;
}

.class-pagination {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 20px;

    margin-top: 45px;
}

.page-btn {
    padding: 11px 22px;

    border: 1px solid #c7d8f5;
    border-radius: 50px;

    background: #ffffff;

    color: #2563eb;

    font-family: inherit;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    transition: .25s ease;
}

.page-btn:hover:not(:disabled) {
    background: #4f6df5;

    border-color: #4f6df5;

    color: #ffffff;

    transform: translateY(-2px);
}

.page-btn:disabled {
    opacity: .4;

    cursor: not-allowed;
}

.page-indicator {
    color: #64748b;

    font-size: 14px;

    font-weight: 800;
}

@media (max-width: 480px) {

    .class-pagination {
        gap: 12px;
    }

    .page-btn {
        padding: 9px 16px;

        font-size: 13px;
    }

}


/* ==================================================
   ==================================================
   STRUKTUR KELAS
   (disesuaikan dengan class asli di HTML:
    .organization-chart, .organization-box,
    .main-box, .member-placeholder)
   ==================================================
================================================== */

.structure-section {
    position: relative;

    padding: 100px 20px 130px;

    background:
        linear-gradient(
            180deg,
            #edf6ff 0%,
            #e7f1ff 55%,
            #f4f8ff 100%
        );

    overflow: hidden;
}

.structure-container {
    width: 92%;

    max-width: 1150px;

    margin: auto;
}


/* ==================================================
   HEADER STRUKTUR
================================================== */

.structure-heading {
    text-align: center;

    margin-bottom: 55px;
}

.structure-label {
    color: #2563eb;

    font-size: 12px;

    font-weight: 900;

    letter-spacing: 2px;

    margin-bottom: 12px;

    text-transform: uppercase;
}

.structure-heading h2 {
    margin: 0;

    color: #172033;

    font-size: clamp(40px, 6vw, 60px);

    line-height: 1.05;

    font-weight: 900;

    letter-spacing: -1px;
}

.heading-line {
    width: 65px;

    height: 4px;

    margin: 20px auto 0;

    background: #2563eb;

    border-radius: 20px;
}


/* ==================================================
   ORGANIZATION CHART
   9 kotak berurutan di HTML:
   1 wali (.main-box) | 2 ketua | 3 wakil |
   4 bendahara | 5 sekretaris | 6 kebersihan |
   7 pendidikan | 8 keamanan | 9 anggota (.member-placeholder)
================================================== */

.organization-chart {
    position: relative;

    width: 100%;

    display: grid;

    grid-template-columns: repeat(10, 1fr);

    column-gap: 14px;
    row-gap: 55px;

    justify-items: center;
    align-items: start;
}


/* ==================================================
   BOX (semua kotak)
================================================== */

.organization-box {
    position: relative;

    width: 100%;

    background: rgba(255, 255, 255, .82);

    border: 1px solid #72a8ff;

    border-radius: 15px;

    min-height: 82px;

    padding: 18px 12px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    text-align: center;

    box-shadow:
        0 10px 25px rgba(37, 99, 235, .06);

    z-index: 3;

    transition: .25s ease;
}

.organization-box:hover {
    transform: translateY(-3px);

    background: #ffffff;

    box-shadow:
        0 15px 30px rgba(37, 99, 235, .12);
}

.organization-box h3 {
    margin: 0 0 6px;

    color: #2563eb;

    font-size: 10px;

    line-height: 1;

    font-weight: 900;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}

.organization-box p {
    margin: 0;

    color: #172033;

    font-size: 15px;

    line-height: 1.3;

    font-weight: 900;
}


/* GARIS VERTIKAL di atas semua kotak, kecuali wali */

.organization-box:not(.main-box)::before {
    content: "";

    position: absolute;

    top: -55px;

    left: 50%;

    width: 2px;

    height: 55px;

    background: #65a3ff;

    transform: translateX(-50%);

    z-index: 1;
}


/* ==================================================
   1. WALI KELAS
================================================== */

.main-box {
    grid-column: 1 / -1;
    grid-row: 1;

    width: 230px;
}


/* ==================================================
   2 & 3. KETUA + WAKIL
================================================== */

.organization-box:nth-child(2) {
    grid-column: 3 / 6;
    grid-row: 2;

    max-width: 280px;
}

.organization-box:nth-child(3) {
    grid-column: 6 / 9;
    grid-row: 2;

    max-width: 280px;
}


/* ==================================================
   4-8. BENDAHARA, SEKRETARIS, KEBERSIHAN,
        PENDIDIKAN, KEAMANAN (5 kotak sebaris)
================================================== */

.organization-box:nth-child(4) { grid-column: 1 / 3;  grid-row: 3; }
.organization-box:nth-child(5) { grid-column: 3 / 5;  grid-row: 3; }
.organization-box:nth-child(6) { grid-column: 5 / 7;  grid-row: 3; }
.organization-box:nth-child(7) { grid-column: 7 / 9;  grid-row: 3; }
.organization-box:nth-child(8) { grid-column: 9 / 11; grid-row: 3; }


/* ==================================================
   9. ANGGOTA
================================================== */

.member-placeholder {
    grid-column: 1 / -1;
    grid-row: 4;

    width: 300px;
}


/* ==================================================
   ALBUM
================================================== */

#album {
    min-height: 400px;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 100px 20px;

    background:
        linear-gradient(
            180deg,
            #f1f6ff,
            #ffffff
        );
}

#album h2 {
    color: #172033;

    font-size: 42px;

    font-weight: 900;

    margin-bottom: 10px;
}

#album p {
    color: #64748b;
}

/* ==================================================
   FOOTER
================================================== */

.footer {
    background: #0f172a;

    color: #cbd5e1;

    padding: 70px 20px 0;
}

.footer-container {
    width: 90%;
    max-width: 1200px;

    margin: auto;

    display: grid;

    grid-template-columns: 1.4fr 1fr 1fr;

    gap: 40px;

    padding-bottom: 50px;

    border-bottom: 1px solid rgba(255, 255, 255, .08);
}


/* ==================================================
   BRAND
================================================== */

.footer-logo {
    text-decoration: none;

    font-size: 22px;

    font-weight: 900;

    color: #ffffff;
}

.footer-logo span {
    color: #4f6df5;
}

.footer-text {
    margin-top: 14px;

    max-width: 320px;

    font-size: 14px;

    line-height: 1.7;

    color: #94a3b8;
}


/* ==================================================
   HEADING KOLOM
================================================== */

.footer-heading {
    margin-bottom: 18px;

    font-size: 13px;

    font-weight: 900;

    letter-spacing: 1.5px;

    text-transform: uppercase;

    color: #ffffff;
}


/* ==================================================
   LINKS
================================================== */

.footer-links {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.footer-links a {
    width: fit-content;

    text-decoration: none;

    font-size: 14px;

    font-weight: 700;

    color: #94a3b8;

    transition: .25s ease;
}

.footer-links a:hover {
    color: #4f6df5;

    transform: translateX(4px);
}


/* ==================================================
   SOCIAL
================================================== */

.footer-social-icons {
    display: flex;

    gap: 12px;
}


/* ==================================================
   BOTTOM
================================================== */

.footer-bottom {
    padding: 22px 0;

    text-align: center;

    font-size: 13px;

    color: #64748b;
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {


    /* ==================================================
       NAVBAR
    ================================================== */

    .navbar {
        height: 65px;
    }

    .nav-container {
        width: 88%;
    }

    .nav-logo {
        font-size: 20px;
    }

    .menu-toggle {
        display: flex;
    }


    /* ==================================================
       MOBILE MENU
    ================================================== */

    .nav-menu {
        position: fixed;

        top: 65px;
        left: 0;

        width: 100%;

        height: calc(100vh - 65px);

        background: rgba(255,255,255,.98);

        backdrop-filter: blur(18px);

        display: flex;

        flex-direction: column;

        align-items: center;

        justify-content: flex-start;

        padding-top: 65px;

        gap: 28px;

        transform: translateX(100%);

        transition: transform .35s ease;

        z-index: 10000;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        font-size: 21px;

        font-weight: 800;

        color: #374151;

        padding: 5px 10px;
    }


    /* ==================================================
       HOME
    ================================================== */

    .home {
        min-height: 100svh;

        padding:
            90px 20px 80px;
    }

    .home h1 {
        font-size: clamp(
            38px,
            12vw,
            55px
        );

        letter-spacing: -1.5px;
    }

    .home-description {
        font-size: 15px;

        line-height: 1.6;
    }

    .about-section {
        padding: 90px 15px;
    }

    .about-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .about-card {
        padding: 30px 20px;
    }

    .about-number {
        font-size: 40px;
    }


    /* ==================================================
       CLASS
    ================================================== */

    .class-section {
        padding:
            90px 15px;
    }

    .class-container {
        width: 92%;
    }

    .class-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 14px;
    }

    .person-card {
        border-radius: 17px;
    }

    .person-info {
        padding: 13px 8px;
    }

    .person-info h3 {
        font-size: 15px;
    }


    /* ==================================================
       STRUKTUR
    ================================================== */

    .structure-section {
        padding:
            80px 15px 110px;
    }

    .structure-container {
        width: 94%;
    }

    .structure-heading {
        margin-bottom: 55px;
    }

    .structure-label {
        font-size: 10px;

        letter-spacing: 1.7px;

        margin-bottom: 12px;
    }

    .structure-heading h2 {
        font-size:
            clamp(
                40px,
                12vw,
                54px
            );

        line-height: 1.05;
    }


    /* GRID JADI 2 KOLOM */

    .organization-chart {
        grid-template-columns: repeat(2, 1fr);

        row-gap: 45px;

        column-gap: 12px;
    }

    .organization-box:not(.main-box)::before {
        top: -45px;
        height: 45px;
    }

    /* WALI */
    .main-box {
        grid-column: 1 / -1;
        grid-row: 1;

        width: 220px;
    }

    /* KETUA + WAKIL */
    .organization-box:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2;

        max-width: none;
    }

    .organization-box:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2;

        max-width: none;
    }

    /* BENDAHARA..PENDIDIKAN: 2 per baris */
    .organization-box:nth-child(4) { grid-column: 1 / 2; grid-row: 3; }
    .organization-box:nth-child(5) { grid-column: 2 / 3; grid-row: 3; }
    .organization-box:nth-child(6) { grid-column: 1 / 2; grid-row: 4; }
    .organization-box:nth-child(7) { grid-column: 2 / 3; grid-row: 4; }

    /* KEAMANAN: sendiri, di tengah */
    .organization-box:nth-child(8) {
        grid-column: 1 / -1;
        grid-row: 5;

        width: calc(50% - 6px);
    }

    /* ANGGOTA */
    .member-placeholder {
        grid-column: 1 / -1;
        grid-row: 6;

        width: 230px;
    }

    .footer-container {
        grid-template-columns: 1fr;

        gap: 32px;

        text-align: center;
    }

    .footer-text {
        margin: 14px auto 0;
    }

    .footer-social-icons {
        justify-content: center;
    }

}


/* ==================================================
   EXTRA SMALL
================================================== */

@media (max-width: 400px) {

    .structure-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .structure-container {
        width: 96%;
    }

    .main-box {
        width: 200px;
    }

    .member-placeholder {
        width: 210px;
    }

    .organization-chart {
        column-gap: 8px;
    }

    .organization-box:nth-child(8) {
        width: calc(50% - 4px);
    }

    .organization-box h3 {
        font-size: 9px;
    }

    .organization-box p {
        font-size: 13px;
    }
}


/* ==================================================
   TABLET
================================================== */

@media (
    min-width: 769px
) and (
    max-width: 1100px
) {

    .nav-container {
        width: 92%;
    }

    .class-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .structure-container {
        width: 94%;
    }
}