/* Provider Gallery Styles */
.provider-gallery-wrapper {
    width: 100%;
    margin: 0 auto;
	margin-bottom:40px;
}

.provider-gallery-grid {
    display: grid;
    gap: 8px;
}

/* Desktop Styles (min-width: 1024px) */
@media (min-width: 1024px) {
    .provider-gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, 1fr);
        aspect-ratio: 16/9;
        height: auto;
        max-height: 600px;
    }
    
    .gallery-item-main {
        grid-row: span 2 / span 2; /* Mengambil 3 dari 5 kolom (60%) - mendekati 50% */
		grid-column: span 3 / span 5;
    }
    
    .gallery-item-thumb {
        position: relative;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .gallery-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        cursor: pointer;
    }
    
}

/* Tablet Styles (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .provider-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto 1fr;
        height: 500px;
        gap: 8px;
    }
    
    .gallery-item-main {
        grid-column: 1 / span 4;
        grid-row: 1;
        height: 375px; /* 75% of 500px */
        overflow: hidden;
        border-radius: 8px;
    }
    
    .gallery-item-thumb {
        aspect-ratio: 4/3;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .gallery-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        cursor: pointer;
    }
    
}

/* Mobile Styles (max-width: 767px) */
@media (max-width: 767px) {
    .provider-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto 1fr;
        height: 300px;
        gap: 4px;
    }
    
    .gallery-item-main {
        grid-column: 1 / span 4;
        grid-row: 1;
        height: 225px; /* 75% of 300px */
        overflow: hidden;
        border-radius: 4px;
    }
    
    .gallery-item-thumb {
        aspect-ratio: 1/1;
        overflow: hidden;
        border-radius: 4px;
    }
    
    .gallery-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        cursor: pointer;
        transition: transform 0.5s ease;
    }
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lightbox-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

.lightbox-slide.active {
    display: flex;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
    max-width: 80%;
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading state */
.gallery-image {
    background: #f0f0f0;
}

/* Focus styles for accessibility */
.gallery-item:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.lightbox-prev:focus,
.lightbox-next:focus,
.lightbox-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}