/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-section {
    width: 100%;
    padding: 5rem clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(180deg, #FCFCFC 0%, #F5E6D3 100%);
    background-size: 100% 100%;
    background-attachment: scroll;
    background-repeat: no-repeat;
}

.div {
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 3.5vw, 1.75rem) 0 clamp(1.25rem, 3.5vw, 1.75rem);
    max-width: 1440px;
    text-align: center;
    margin: 0 auto;
}

.div-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.text-wrapper-2 {
    font-family: "Poppins-Bold", Helvetica;
    font-weight: 500;
    color: #6b4423;
    font-size: clamp(32px, 6vw, 60px);
    line-height: 1.2;
    margin: 0;
}

.from-humble-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.from-humble {
    font-family: "Poppins-Regular", Helvetica;
    font-weight: 400;
    color: #8b6f47;
    font-size: clamp(14px, 2.5vw, 18px);
    line-height: 1.6;
    max-width: 800px;
    margin: 0;
}


/* ============================================
   GALLERY GRID
   ============================================ */

.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: 280px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        grid-auto-rows: 280px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        gap: 2rem;
    }
}

/* Responsive gallery grid */
.gallery-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* default desktop */
    gap: 16px;
    align-items: stretch;
}

/* ============================================
   GALLERY ITEMS
   ============================================ */

.gallery-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.1), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #f4efe8;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0px 8px 12px -4px rgba(0, 0, 0, 0.15), 0px 16px 24px -3px rgba(0, 0, 0, 0.15);
}

.gallery-item-tall {
    grid-row: span 2;
}

@media (max-width: 375px) {
    .gallery-item-tall {
        grid-row: span 1;
    }
}

/* jaga proporsi dan crop gambar */
.gallery-image-wrapper{
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
}

.gallery-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3; /* default aspect ratio */
    transition: transform 0.25s ease;
}

.gallery-image-wrapper:hover .gallery-image{
    transform: scale(1.04);
}

/* MOBILE: 2 kolom kanan-kiri, gambar menyesuaikan (lebih kotak) */
@media (max-width: 375px){
    .gallery-grid{
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* jangan biarkan item-tall memecah tata letak mobile */
    .gallery-item-tall{
        grid-row: auto;
    }

    /* gunakan aspect ratio kotak agar rapi pada 2 kolom */
    .gallery-image{
        aspect-ratio: 1 / 1;
    }
}


/* ============================================
   GALLERY IMAGE
   ============================================ */

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}


/* ============================================
   GALLERY OVERLAY
   ============================================ */

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    font-family: "Poppins-Bold", Helvetica;
    font-weight: 680;
    color: #6b4423 !important;
    font-size: clamp(14px, 2vw, 16px);
    margin: 0;
    line-height: 1.5;
}


/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
    .gallery-section {
        padding: 3rem clamp(1.5rem, 4vw, 2rem);
    }
    /* Ubah dari 1 kolom menjadi 2 kolom untuk mobile */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
        grid-auto-rows: auto;
        padding-inline: 0.5rem;
    }
    .gallery-header {
        margin-bottom: 2rem;
    }

    /* sesuaikan item-tall agar tidak memecah layout mobile */
    .gallery-item-tall {
        grid-row: auto; /* tidak span banyak baris pada mobile */
    }

    /* gunakan aspek kotak agar rapi di 2 kolom kecil */
    .gallery-image {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        min-height: 120px;
        object-fit: cover;
    }

    /* overlay dan teks lebih ringkas di mobile */
    .gallery-overlay {
        padding: 0.5rem;
        background: linear-gradient(0deg, rgba(255,255,255,0.92) 0%, rgba(0,0,0,0) 100%);
        opacity: 1; /* tampilkan agar mudah dibaca di layar sentuh */
    }

    .gallery-caption {
        font-size: clamp(12px, 3.2vw, 14px);
        line-height: 1.3;
    }

    /* Popup gambar: responsif, kolom jadi baris */
    .popup-content {
        width: 94%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
        border-radius: 12px;
    }

    .popup-body {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .popup-image-container {
        width: 100%;
        height: auto;
        max-height: 35vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        background-color: #faf7f2;
    }

    .popup-image {
        width: 100%;
        height: auto;
        max-height: 33vh;
        object-fit: contain;
        display: block;
        border-radius: 8px;
    }

    .popup-details {
        padding: 1rem;
        max-height: calc(55vh);
        overflow-y: auto;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }

    .btn-close {
        top: 8px;
        right: 8px;
        font-size: 1.5rem;
    }

    .contain-ket {
        margin-bottom: 0.8rem;
        padding: 6px 12px;
        font-size: 12px;
    }

    .popup-title {
        font-size: 16px;
        margin: 0 0 0.6rem;
        line-height: 1.3;
    }

    .popup-description {
        font-size: 13px;
        line-height: 1.4;
        margin: 0 0 0.8rem;
    }

    .popup-meta {
        margin-bottom: 1rem;
    }

    .meta-item {
        margin-bottom: 8px;
        padding: 6px 0;
        gap: 8px;
    }

    .meta-icon {
        font-size: 0.95rem;
        margin-top: 2px;
    }

    .meta-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }

    .meta-value {
        font-size: 12px;
    }

    .popup-interactions {
        display: flex;
        gap: 0.4rem;
        margin-top: 0.8rem;
        padding-top: 0.8rem;
        border-top: 1px solid #e0e0e0;
    }

    .popup-interaction1, .popup-interaction2 {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 0.8rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        flex: 1;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .popup-interaction1 {
        background: #FAF7F2;
        color: #6b4423;
        border: 1px solid #6b4423;
    }

    .popup-interaction2 {
        background: #6b4423;
        color: #FFFFFF;
        border: 1px solid #6b4423;
    }

    .popup-interaction1:active {
        background: #6b4423;
        color: white;
    }

    .popup-interaction2:active {
        opacity: 0.8;
    }
}

@media (max-width: 768px) {
    .contain-ket {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        gap: 8px;
        padding: 8px 14px;
        background-color: #f5e6d3;
        border-radius: 9999px;
        margin-bottom: 1rem;
        border: 1px solid #e0d4c1;
        box-shadow: 0 2px 6px rgba(107, 68, 35, 0.1);
    }

    .keterangan-singkat {
        position: relative;
        width: auto;
        margin: 0;
        font-family: "Poppins-Bold", Helvetica;
        font-weight: 600;
        color: #6b4423;
        font-size: 12px;
        letter-spacing: 0.3px;
        line-height: 16px;
        text-transform: uppercase;
    }

    .popup-title {
        font-size: 16px;
        margin: 0.4rem 0 0.6rem;
        line-height: 1.3;
    }

    .popup-description {
        font-size: 13px;
        line-height: 1.4;
        margin: 0 0 0.8rem;
    }

    /* Popup gambar: responsif, kolom jadi baris */
    .popup-content {
        width: 94%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
        border-radius: 12px;
    }

    .popup-body {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .popup-image-container {
        width: 100%;
        height: auto;
        max-height: 35vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        background-color: #faf7f2;
    }

    .popup-image {
        width: 100%;
        height: auto;
        max-height: 33vh;
        object-fit: contain;
        display: block;
        border-radius: 8px;
    }

    .popup-details {
        padding: 1rem;
        max-height: calc(55vh);
        overflow-y: auto;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }

    .btn-close {
        top: 8px;
        right: 8px;
        font-size: 1.5rem;
    }

    .contain-ket {
        margin-bottom: 0.8rem;
        padding: 6px 12px;
        font-size: 12px;
    }

    .popup-title {
        font-size: 16px;
        margin: 0 0 0.6rem;
        line-height: 1.3;
    }

    .popup-description {
        font-size: 13px;
        line-height: 1.4;
        margin: 0 0 0.8rem;
    }

    .popup-meta {
        margin-bottom: 1rem;
    }

    .meta-item {
        margin-bottom: 8px;
        padding: 6px 0;
        gap: 8px;
    }

    .meta-icon {
        font-size: 0.95rem;
        margin-top: 2px;
    }

    .meta-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }

    .meta-value {
        font-size: 12px;
    }

    .popup-interactions {
        display: flex;
        gap: 0.4rem;
        margin-top: 0.8rem;
        padding-top: 0.8rem;
        border-top: 1px solid #e0e0e0;
    }

    .popup-interaction1, .popup-interaction2 {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 0.8rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        flex: 1;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .popup-interaction1 {
        background: #FAF7F2;
        color: #6b4423;
        border: 1px solid #6b4423;
    }

    .popup-interaction2 {
        background: #6b4423;
        color: #FFFFFF;
        border: 1px solid #6b4423;
    }

    .popup-interaction1:active {
        background: #6b4423;
        color: white;
    }

    .popup-interaction2:active {
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .contain-ket {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        gap: 6px;
        padding: 6px 12px;
        background-color: #f5e6d3;
        border-radius: 9999px;
        margin-bottom: 0.8rem;
        border: 1px solid #e0d4c1;
        box-shadow: 0 2px 6px rgba(107, 68, 35, 0.1);
    }

    .keterangan-singkat {
        position: relative;
        width: auto;
        margin: 0;
        font-family: "Poppins-Bold", Helvetica;
        font-weight: 600;
        color: #6b4423;
        font-size: 11px;
        letter-spacing: 0.2px;
        line-height: 14px;
        text-transform: uppercase;
    }

    .popup-title {
        font-size: 15px;
        margin: 0.3rem 0 0.4rem;
    }

    .popup-description {
        font-size: 12px;
        margin: 0 0 0.6rem;
    }

    /* Popup gambar: responsif, kolom jadi baris */
    .popup-content {
        width: 94%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
        border-radius: 12px;
    }

    .popup-body {
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .popup-image-container {
        width: 100%;
        height: auto;
        max-height: 35vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem;
        background-color: #faf7f2;
    }

    .popup-image {
        width: 100%;
        height: auto;
        max-height: 33vh;
        object-fit: contain;
        display: block;
        border-radius: 8px;
    }

    .popup-details {
        padding: 1rem;
        max-height: calc(55vh);
        overflow-y: auto;
        border-left: none;
        border-top: 1px solid #f0f0f0;
    }

    .btn-close {
        top: 8px;
        right: 8px;
        font-size: 1.5rem;
    }

    .contain-ket {
        margin-bottom: 0.8rem;
        padding: 6px 12px;
        font-size: 12px;
    }

    .popup-title {
        font-size: 16px;
        margin: 0 0 0.6rem;
        line-height: 1.3;
    }

    .popup-description {
        font-size: 13px;
        line-height: 1.4;
        margin: 0 0 0.8rem;
    }

    .popup-meta {
        margin-bottom: 1rem;
    }

    .meta-item {
        margin-bottom: 8px;
        padding: 6px 0;
        gap: 8px;
    }

    .meta-icon {
        font-size: 0.95rem;
        margin-top: 2px;
    }

    .meta-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }

    .meta-value {
        font-size: 12px;
    }

    .popup-interactions {
        display: flex;
        gap: 0.4rem;
        margin-top: 0.8rem;
        padding-top: 0.8rem;
        border-top: 1px solid #e0e0e0;
    }

    .popup-interaction1, .popup-interaction2 {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.5rem 0.8rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        flex: 1;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .popup-interaction1 {
        background: #FAF7F2;
        color: #6b4423;
        border: 1px solid #6b4423;
    }

    .popup-interaction2 {
        background: #6b4423;
        color: #FFFFFF;
        border: 1px solid #6b4423;
    }

    .popup-interaction1:active {
        background: #6b4423;
        color: white;
    }

    .popup-interaction2:active {
        opacity: 0.8;
    }

    .popup-interaction i {
        font-size: 0.85rem;
    }

    .meta-item {
        margin-bottom: 4px;
        padding: 4px 0;
    }

    .meta-label {
        font-size: 0.7rem;
        margin-bottom: 1px;
    }

    .meta-value {
        font-size: 0.85rem;
    }

    .meta-icon {
        font-size: 0.85rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.gallery-item:focus-within {
    outline: 2px solid #8b6f47;
    outline-offset: 2px;
}


/* ============================================
   ANIMATIONS FOR GALLERY
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInGrid {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0px 4px 6px -4px rgba(0, 0, 0, 0.1), 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0px 8px 12px -4px rgba(107, 68, 35, 0.2), 0px 16px 24px -3px rgba(107, 68, 35, 0.15);
    }
}

/* Apply animations */
.div-wrapper {
    animation: fadeInDown 0.8s ease-out;
}

.from-humble-wrapper {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gallery-item {
    animation: scaleInGrid 0.6s ease-out both;
}

.gallery-item:nth-child(1) { animation-delay: 0.3s; }
.gallery-item:nth-child(2) { animation-delay: 0.35s; }
.gallery-item:nth-child(3) { animation-delay: 0.4s; }
.gallery-item:nth-child(4) { animation-delay: 0.45s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.55s; }

/* Image zoom effect on hover */
.gallery-image {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced overlay transition */
.gallery-overlay {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(2px);
}

/* Smooth box-shadow transition without animation */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: 0px 8px 12px -4px rgba(107, 68, 35, 0.2), 0px 16px 24px -3px rgba(107, 68, 35, 0.15) !important;
}


 /* CSS untuk popup detail gambar */
.gallery-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.gallery-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: white;
    border-radius: 16px;
    width: min(980px, 90%);
    height: min(494px, 90%);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid #e0e0e0;
}

.gallery-popup.active .popup-content {
    transform: scale(1);
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    background: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b4423;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-close:hover {
    background-color: rgba(107, 68, 35, 0.1);
    color: #8b6f47;
    transform: scale(1.1);
}

.popup-body {
    display: flex;
    height: 100%;
    min-height: 0;
}

.popup-image-container {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background-color: #faf7f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.popup-details {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    background: white;
    border-left: 1px solid #f0f0f0;
}

.contain-ket {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f5e6d3;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.keterangan-singkat {
    font-family: "Poppins-Regular", Helvetica;
    font-weight: 400;
    color: #8b6f47;
    font-size: 14px;
    letter-spacing: 0;
    line-height: 20px;
    margin: 0;
}

.popup-title {
    font-family: "Quicksand-Regular", Helvetica;
    font-weight: 700;
    color: #6b4423;
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.popup-description {
    font-family: "Poppins-Regular", Helvetica;
    font-weight: 400;
    color: #8b6f47;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    word-wrap: break-word;
}

.popup-meta {
    margin-bottom: 30px;
    background: white;
    padding: 0;
}

.meta-item {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.meta-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.meta-icon {
    font-size: 1.05rem;
    color: #6b4423;
    flex-shrink: 0;
    margin-top: 3px;
}

.meta-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.meta-label {
    font-weight: 600;
    color: #6b4423;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: block;
}

.meta-value {
    color: #8b6f47;
    font-size: 0.95rem;
    font-family: "Poppins-Regular", Helvetica;
    font-weight: 400;
    line-height: 1.4;
    word-wrap: break-word;
}

.popup-interactions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.popup-interaction1,
.popup-interaction2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    flex: 1;
    min-height: 44px;
    font-size: 14px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.popup-interaction1 {
    background: #FAF7F2;
    color: #6b4423;
    border-color: #6b4423;
}

.popup-interaction1:hover {
    background: #6b4423;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 68, 35, 0.3);
}

.popup-interaction1:active {
    transform: translateY(0);
}

.popup-interaction2 {
    background: #6b4423;
    color: #FFFFFF;
    border-color: #6b4423;
}

.popup-interaction2:hover {
    background: #5a3820;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 68, 35, 0.3);
}

.popup-interaction2:active {
    transform: translateY(0);
}

.popup-interaction i {
    font-size: 1.1rem;
}

/* Responsif untuk tablet */
@media (max-width: 992px) {
    .popup-content {
        height: min(500px, 85%);
    }
    
    .popup-details {
        flex: 0 0 280px;
        padding: 25px;
    }
    
    .popup-title {
        font-size: 18px;
    }
    
    .popup-description {
        font-size: 13px;
    }
}

/* Responsif untuk mobile landscape dan tablet kecil */
@media (max-width: 768px) {
    .gallery-popup {
        padding: 15px;
    }
    
    .popup-content {
        width: min(480px, 90%);
        height: auto;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .popup-body {
        flex-direction: column;
        height: auto;
        max-height: calc(85vh - 40px);
    }
    
    .popup-image-container {
        flex: none;
        height: 40vh;
        min-height: 200px;
        padding: 15px;
    }
    
    .popup-image {
        max-height: 38vh;
        width: auto;
        max-width: 100%;
    }
    
    .popup-details {
        flex: none;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        padding: 20px;
        max-height: 45vh;
    }
    
    .btn-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        width: 36px;
        height: 36px;
    }
    
    .contain-ket {
        margin-bottom: 10px;
        padding: 6px 12px;
    }
    
    .keterangan-singkat {
        font-size: 12px;
    }
    
    .popup-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .popup-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .popup-meta {
        margin-bottom: 20px;
    }
    
    .meta-item {
        margin-bottom: 10px;
        padding: 6px 0;
        gap: 10px;
    }
    
    .meta-icon {
        font-size: 0.95rem;
        margin-top: 2px;
    }
    
    .meta-label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .meta-value {
        font-size: 0.85rem;
    }
    
    .popup-interactions {
        gap: 10px;
        padding-top: 15px;
    }
    
    .popup-interaction1,
    .popup-interaction2 {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .popup-interaction i {
        font-size: 0.95rem;
    }
}

/* Responsif untuk mobile portrait */
@media (max-width: 576px) {
    .gallery-popup {
        padding: 10px;
    }
    
    .popup-content {
        width: min(420px, 94%);
        max-height: 90vh;
        border-radius: 10px;
    }
    
    .popup-image-container {
        height: 35vh;
        min-height: 180px;
        padding: 10px;
    }
    
    .popup-image {
        max-height: 33vh;
    }
    
    .popup-details {
        padding: 15px;
        max-height: 55vh;
    }
    
    .btn-close {
        top: 8px;
        right: 8px;
        font-size: 1.3rem;
        width: 32px;
        height: 32px;
    }
    
    .contain-ket {
        margin-bottom: 8px;
        padding: 5px 10px;
    }
    
    .keterangan-singkat {
        font-size: 11px;
        line-height: 18px;
    }
    
    .popup-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .popup-description {
        font-size: 12px;
        margin-bottom: 16px;
        line-height: 1.4;
    }
    
    .popup-meta {
        margin-bottom: 16px;
    }
    
    .meta-item {
        margin-bottom: 8px;
        padding: 4px 0;
        gap: 8px;
    }
    
    .meta-icon {
        font-size: 0.85rem;
    }
    
    .meta-label {
        font-size: 0.75rem;
    }
    
    .meta-value {
        font-size: 0.8rem;
    }
    
    .popup-interactions {
        gap: 8px;
        padding-top: 12px;
        flex-wrap: wrap;
    }
    
    .popup-interaction1,
    .popup-interaction2 {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 36px;
        flex: 1 1 calc(50% - 4px);
    }
    
    .popup-interaction i {
        font-size: 0.85rem;
    }
}

/* Responsif untuk mobile kecil (≤ 375px) */
@media (max-width: 375px) {
    .popup-details {
        padding: 12px;
    }
    
    .popup-title {
        font-size: 14px;
    }
    
    .popup-description {
        font-size: 11px;
    }
    
    .meta-label {
        font-size: 0.7rem;
    }
    
    .meta-value {
        font-size: 0.75rem;
    }
    
    .popup-interaction1,
    .popup-interaction2 {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Responsif untuk tinggi layar kecil */
@media (max-height: 600px) and (orientation: landscape) {
    .popup-content {
        max-height: 95vh;
    }
    
    .popup-body {
        max-height: 95vh;
    }
    
    .popup-image-container {
        height: 50vh;
    }
    
    .popup-details {
        max-height: 50vh;
        padding: 15px;
    }
    
    .popup-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .popup-description {
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .popup-interactions {
        padding-top: 12px;
    }
}