/* =========================
   TABLET
========================= */
@media (max-width: 992px){

    .content-area{
        padding: 20px;
    }

    .hero-section{
        padding: 35px 25px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-text h1{
        font-size: 2rem;
    }

    .hero-text p{
        max-width: 100%;
    }

    .hero-image{
        width: 100%;
        text-align: center;
    }

    .hero-image img{
        max-width: 300px;
    }

    .grid-4{
        grid-template-columns: repeat(2,1fr);
    }

    .materi-grid{
        grid-template-columns: repeat(2,1fr);
    }

    .contact-grid{
        grid-template-columns: 1fr;
    }

.leaflet-card{
        min-width: calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}


/* =========================
   MOBILE
========================= */
@media (max-width: 768px){

    .app-header{
        left: 0;
        padding: 0 14px;
    }

    .body-wrapper{
        margin-left: 0;
    }

    .content-area{
        padding: 16px;
    }

    /* sidebar mobile */
    .left-sidebar{
        transform: translateX(-100%);
    }

    .left-sidebar.open{
        transform: translateX(0);
    }

    .sidebar-overlay.active{
        display: block;
    }

    /* HERO */
    .hero-section{
        padding: 28px 20px;
        border-radius: 20px;
    }

    .hero-text h1{
        font-size: 1.7rem;
        line-height: 1.3;
    }

    .hero-text p{
        font-size: .92rem;
    }

    .hero-actions{
        width: 100%;
        flex-direction: column;
    }

    .hero-actions .btn{
        width: 100%;
        justify-content: center;
    }

    .hero-image{
        display: none;
    }

    /* section */
#about p{
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.95rem;

    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}
    #contact,
    #materi{
        padding: 24px 18px;
    }

    /* GRID */
    .grid-4{
        grid-template-columns: 1fr;
    }

    .grid-2{
        grid-template-columns: 1fr;
    }

    .materi-grid{
        grid-template-columns: 1fr;
    }

    /* CARD */
    .action-card{
        padding: 18px;
    }

    /* carousel leaflet */
    .leaflet-card{
        min-width: calc(100% - 10px);
        max-width: calc(100% - 10px);
    }
.carousel-btn{
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 20;
}

.carousel-btn.prev,
.prev{
    left: 0;
}

.carousel-btn.next,
.next{
    right: 0;
}

    /* modal leaflet */
    .modal-content{
        width: 95%;
        border-radius: 16px;
    }

    .modal-content img{
        max-height: 65vh;
    }

    .leaflet-caption{
        padding: 16px;
    }

    .leaflet-caption h3{
        font-size: 20px;
    }

    .leaflet-caption p{
        font-size: 14px;
    }

    .modal-btn{
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .prev-btn{
        left: 10px;
    }

    .next-btn{
        right: 10px;
    }

}


/* =========================
   SMALL MOBILE
========================= */
@media (max-width: 480px){

    .hero-text h1{
        font-size: 1.5rem;
    }

    .section-title{
        font-size: 1.1rem;
    }

    .btn{
        padding: 11px 16px;
        font-size: .85rem;
    }

    .team-item{
        font-size: .8rem;
    }

    .leaflet-card{
        min-width: calc(100% - 10px);
        max-width: calc(100% - 10px);
    }

}
/* =========================
   FIX OVERFLOW MOBILE
========================= */

html,
body{
    overflow-x: hidden;
    width: 100%;
}

.page-wrapper,
.body-wrapper,
.content-area{
    width: 100%;
    overflow-x: hidden;
}

/* hero fix */
.hero-section{
    width: 100%;
    overflow: hidden;
}

/* card/grid fix */
.grid-4,
.grid-2,
.contact-grid,
.materi-grid{
    width: 100%;
}

/* carousel fix */
.leaflet-carousel{
    padding: 0 44px; /* naik dari 30px */
}

.leaflet-wrapper{
    overflow-x: auto;
    scrollbar-width: none;
}

.leaflet-wrapper::-webkit-scrollbar{
    display: none;
}

/* modal fix */
.modal-content{
    max-width: calc(100% - 20px);
}

/* image fix */
img{
    max-width: 100%;
    height: auto;
    display: block;
}
/* =========================
   TEXT OVERFLOW FIX
========================= */

#about p,
.team-item,
.contact-item,
.card-label,
.materi-card span{
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* flex/grid child fix */
#about,
#about *{
    min-width: 0;
}
/* =========================
   DESKTOP CAROUSEL FIX
========================= */
.leaflet-section {
    overflow: hidden;
}

.leaflet-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 44px;
}

.leaflet-wrapper {
    display: flex;
    gap: 16px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.leaflet-card {
    min-width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-card);
}

.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.carousel-btn.prev, .prev { left: 0; }
.carousel-btn.next, .next { right: 0; }
/* =========================
   ABOUT SECTION LAYOUT FIX
========================= */

/* Kolom kiri about (team + carousel) full width */
#about .grid-2 > div:first-child {
    min-width: 0;
    width: 100%;
}

/* Carousel ambil full lebar kolom kirinya */
.leaflet-section {
    width: 100%;
    overflow: hidden;
}

.leaflet-carousel {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 0 44px;
    box-sizing: border-box;
}

.leaflet-wrapper {
    width: 100%;
    display: flex;
    gap: 16px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

.leaflet-card {
    min-width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    flex-shrink: 0;
}