.gallery-section {
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.gallery-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f3f4f6;
    height: 645px;
    min-height: unset;
}

.gallery-container:empty::after {
    content: 'Loading gallery...';
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #6b7280;
    font-size: 1.125rem;
}

#gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.gallery-item {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-item-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

#prevBtn,
#nextBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10;
}

#prevBtn:hover,
#nextBtn:hover {
    background: rgba(255, 255, 255, 0.95);
}

#prevBtn {
    left: 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

#nextBtn {
    right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gallery-dot.active {
    background-color: #3b82f6;
}

.gallery-error,
.gallery-empty {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f3f4f6;
    padding: 2rem;
    text-align: center;
}

.gallery-error {
    color: #ef4444;
}

.gallery-empty {
    color: #6b7280;
}

/* Add these styles to your existing CSS */
.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Style video controls */
.gallery-video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.gallery-video::-webkit-media-controls-play-button,
.gallery-video::-webkit-media-controls-timeline,
.gallery-video::-webkit-media-controls-current-time-display,
.gallery-video::-webkit-media-controls-time-remaining-display,
.gallery-video::-webkit-media-controls-mute-button,
.gallery-video::-webkit-media-controls-volume-slider {
    color: white;
}

/* Adjust content overlay for videos */
.gallery-item:has(video) .gallery-item-content {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding-bottom: 4rem; /* Extra padding to avoid overlap with video controls */
}

/* Hide content when video is playing */
.gallery-video:playing ~ .gallery-item-content {
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-video:paused ~ .gallery-item-content {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-container {
        aspect-ratio: unset;
    }

    .gallery-item-content {
        padding: 1rem;
    }

    .gallery-item-content h3 {
        font-size: 1.25rem;
    }

    .gallery-item:has(video) .gallery-item-content {
        padding-bottom: 3rem;
    }
}

@media (max-width: 640px) {
    

    .gallery-item:has(video) .gallery-item-content {
        padding-bottom: 2.5rem;
    }
} 