main {
    --con-padding: clamp(4rem, 10vw, 12rem);
}

@media (max-width: 1280px) {
    main { --con-padding: clamp(3rem, 8vw, 6rem); }
}

@media (max-width: 950px) {
    main { --con-padding: 3rem; }
}

@media (max-width: 768px) {
    main { --con-padding: 1.25rem; }
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--primary);
    color: #1f2328;
}

/* === Page Section (matches /kursus padding) === */
.galeri-section {
    padding: 6.5rem 0 3rem;
}

.galeri-section .container {
    padding: 0 var(--con-padding);
    max-width: 1200px;
    margin: 0 auto;
}

.galeri-section h1 {
    font-family: "Poppins", sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.masonry-grid {
    columns: 3;
    column-gap: 0.75rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.03);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    object-fit: contain;
    user-select: none;
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__inner {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    padding: 0.5rem 1rem;
    transition: opacity 0.2s;
    user-select: none;
    z-index: 1;
}

.lightbox__arrow:hover {
    opacity: 1;
}

.lightbox__arrow--prev {
    right: 100%;
}

.lightbox__arrow--next {
    left: 100%;
}

.lightbox__arrow.is-hidden {
    display: none;
}

.gallery-cta__btn {
    font-family: "Poppins", sans-serif;
}

/* === Responsive === */
@media (max-width: 768px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }
}
