/* Slideshow Component Styles */
.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    margin: 0;
    padding: 0;
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.slideshow-track {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0;
    padding: 0;
    display: block;
}

.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Hide on idle functionality */
.slideshow-container.hide-on-idle.idle .slideshow-overlay {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slideshow-container.hide-on-idle.idle .slideshow-controls {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slideshow-container.hide-on-idle.idle .slideshow-indicators {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Show on hover/touch */
.slideshow-container:hover .slideshow-overlay,
.slideshow-container.touching .slideshow-overlay {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.slideshow-container:hover .slideshow-controls,
.slideshow-container.touching .slideshow-controls {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.slideshow-container:hover .slideshow-indicators,
.slideshow-container.touching .slideshow-indicators {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Ensure controls are visible on hover even when idle */
.slideshow-container.hide-on-idle:hover .slideshow-controls,
.slideshow-container.hide-on-idle.touching .slideshow-controls {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

.slideshow-container.hide-on-idle:hover .slideshow-indicators,
.slideshow-container.hide-on-idle.touching .slideshow-indicators {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}

.slideshow-slide:hover .slideshow-overlay {
    opacity: 1;
}

/* Make overlay visible by default */
.slideshow-slide.active .slideshow-overlay {
    opacity: 0.7 !important;
}

.slideshow-caption {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.slideshow-caption h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.slideshow-actions {
    display: flex;
    justify-content: flex-end;
}

.slideshow-expand {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

.slideshow-expand:hover {
    background: white;
    transform: scale(1.1);
}

.slideshow-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.slideshow-prev,
.slideshow-next {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
    pointer-events: auto;
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background: white;
    transform: scale(1.1);
}

.slideshow-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.slideshow-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.slideshow-indicator.active {
    background: white;
    transform: scale(1.2);
}

.slideshow-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .slideshow-container {
        height: 300px;
    }
    
    .slideshow-caption h3 {
        font-size: 1rem;
    }
    
    .slideshow-expand,
    .slideshow-prev,
    .slideshow-next {
        width: 2rem;
        height: 2rem;
    }
    
    .slideshow-indicators {
        bottom: 0.5rem;
    }
    
    .slideshow-indicator {
        width: 0.5rem;
        height: 0.5rem;
    }
}

@media (max-width: 480px) {
    .slideshow-container {
        height: 250px;
    }
    
    .slideshow-overlay {
        padding: 0.75rem;
    }
    
    .slideshow-caption h3 {
        font-size: 0.875rem;
    }
}

/* PhotoSwipe Customizations */
.pswp__bg {
    background: rgba(0, 0, 0, 0.9);
}

.pswp__caption__center {
    text-align: center;
    font-size: 1rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pswp__button--close {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.pswp__button--arrow--left,
.pswp__button--arrow--right {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

/* Slideshow wrapper with attribution */
.slideshow-wrapper-with-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Attribution styling */
.slideshow-attribution {
    margin-top: 0.5rem;
    width: 100%;
    display: block;
}

.slideshow-attribution p {
    font-size: 0.875rem;
    text-align: center;
    margin: 0;
    font-style: italic;
}
