/**
 * Modern File Gallery CSS
 * Inspired by laser cutting configurator design
 * High performance and elegant UI
 */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #4ecdc4;
    --primary-dark: #3baaa7;
    --accent-color: #ff6b6b;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.16);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
.modern-file-gallery-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Enhanced Gallery Grid */
.modern-file-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 32px 0;
    padding: 0;
}

/* Modern File Item */
.modern-file-item {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    transform: translateZ(0); /* Enable hardware acceleration */
    will-change: transform, box-shadow;
    min-width: 180px; /* Dimensione minima ragionevole */
}

.modern-file-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.modern-file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.modern-file-item:hover::before {
    opacity: 1;
}

/* Image Container */
.modern-file-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}

.modern-file-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    background: var(--bg-white);
}

.modern-file-item:hover .modern-file-image {
    transform: scale(1.05);
}

/* Loading Placeholder */
.modern-file-image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* File Info Overlay */
.modern-file-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 16px 16px;
    transform: translateY(100%);
    transition: var(--transition);
}

.modern-file-item:hover .modern-file-info {
    transform: translateY(0);
}

.modern-file-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.modern-file-size {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Action Buttons */
.modern-file-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.modern-file-item:hover .modern-file-actions {
    opacity: 1;
}

.modern-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.modern-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.modern-action-btn.delete-btn:hover {
    background: var(--accent-color);
}

/* Category Headers */
.modern-category-container {
    margin: 48px 0 32px;
}

.modern-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
    position: relative;
}

.modern-category-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-category-count {
    margin-left: 16px;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Subcategory Styling */
.modern-subcategory-container {
    margin: 32px 0;
    padding-left: 24px;
    border-left: 3px solid var(--primary-color);
}

.modern-subcategory-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px;
}

/* Load More Buttons */
.modern-load-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
}

.modern-load-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-load-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.modern-load-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modern-load-btn.loading {
    position: relative;
    color: transparent;
}

.modern-load-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Horizontal Slider Shortcode */
.modern-file-slider-container {
    position: relative;
    margin: 32px 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
}

.modern-file-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 16px;
    padding: 24px;
}

.modern-file-slider::-webkit-scrollbar {
    display: none;
}

.modern-slider-item {
    flex: 0 0 200px;
    position: relative;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.modern-slider-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.modern-slider-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: white;
}

.modern-slider-info {
    padding: 12px;
    text-align: center;
}

.modern-slider-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Navigation Arrows for Slider */
.modern-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.modern-slider-nav:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.modern-slider-nav.prev {
    left: 12px;
}

.modern-slider-nav.next {
    right: 12px;
}

/* Modern Popup */
.modern-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: var(--transition);
}

.modern-popup-overlay.active {
    opacity: 1;
}

.modern-popup-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
    overflow: hidden;
}

.modern-popup-overlay.active .modern-popup-content {
    transform: scale(1) translateY(0);
}

.modern-popup-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.modern-popup-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-light);
}

.modern-popup-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modern-popup-btn.primary {
    background: var(--primary-color);
    color: white;
}

.modern-popup-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.modern-popup-btn.secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--text-secondary);
}

.modern-popup-btn.secondary:hover {
    background: var(--text-secondary);
    color: white;
}

.modern-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    z-index: 1;
}

.modern-popup-close:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* Share Buttons */
.modern-share-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modern-share-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: var(--transition);
}

.modern-share-btn:hover {
    transform: scale(1.1);
}

.modern-share-btn.whatsapp {
    background: #25D366;
}

.modern-share-btn.facebook {
    background: #1877F2;
}

.modern-share-btn.copy {
    background: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .modern-file-gallery {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .modern-file-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1024px) {
    .modern-file-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .modern-file-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin: 24px 0;
    }
    
    .modern-category-title {
        font-size: 24px;
    }
    
    .modern-subcategory-container {
        padding-left: 16px;
    }
    
    .modern-file-slider {
        padding: 16px;
    }
    
    .modern-slider-item {
        flex: 0 0 160px;
    }
    
    .modern-popup-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 480px) {
    .modern-file-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 16px 0;
    }
    
    .modern-file-image-container {
        height: 120px;
    }
    
    .modern-category-title {
        font-size: 20px;
    }
    
    .modern-load-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modern-load-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Performance Optimizations */
.modern-file-gallery * {
    box-sizing: border-box;
}

/* Reduce layout thrashing */
.modern-file-item,
.modern-slider-item {
    contain: layout style paint;
}

/* GPU acceleration for smooth animations */
.modern-file-item:hover,
.modern-popup-content,
.modern-action-btn:hover {
    transform: translateZ(0);
}

/* Preload critical images */
.modern-file-image[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modern-file-image[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility Improvements */
.modern-action-btn:focus,
.modern-load-btn:focus,
.modern-popup-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
        --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FILE STRIP COMPONENT ===== */
.file-strip-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header della striscia */
.file-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.file-strip-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.file-strip-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-strip-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.file-strip-upload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.file-strip-upload-btn span {
    display: none;
}

.file-strip-nav {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.file-strip-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.file-strip-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Contenitore scrollabile */
.file-strip-wrapper {
    position: relative;
    overflow: hidden;
    padding: 16px 0;
}

.file-strip-track {
    display: flex;
    gap: 16px;
    padding: 0 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.file-strip-track::-webkit-scrollbar {
    display: none;
}

/* Item della striscia */
.file-strip-item {
    flex: 0 0 140px;
    cursor: pointer;
    transition: var(--transition);
}

.file-strip-item:hover {
    transform: translateY(-2px);
}

.file-strip-thumbnail {
    position: relative;
    width: 140px;
    height: 100px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--bg-light);
    margin-bottom: 8px;
}

.file-strip-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    transition: var(--transition);
}

.file-strip-item:hover .file-strip-thumbnail img {
    transform: scale(1.05);
}

/* Overlay con azioni */
.file-strip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.file-strip-item:hover .file-strip-overlay {
    opacity: 1;
}

.file-strip-actions {
    display: flex;
    gap: 8px;
}

.file-strip-action {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
    transform: scale(0.8);
}

.file-strip-item:hover .file-strip-action {
    transform: scale(1);
}

.file-strip-action:hover {
    transform: scale(1.1);
}

.file-strip-action.preview-btn:hover {
    background: var(--primary-color);
    color: white;
}

.file-strip-action.select-btn:hover {
    background: #51cf66;
    color: white;
}

.file-strip-action.download-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Info del file */
.file-strip-info {
    text-align: center;
}

.file-strip-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.file-strip-size {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Indicatori di pagina */
.file-strip-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px 16px;
}

.file-strip-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.file-strip-indicator.active,
.file-strip-indicator:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Stati speciali */
.file-strip-item.selected .file-strip-thumbnail {
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.file-strip-item.loading .file-strip-overlay {
    opacity: 1;
    background: rgba(78, 205, 196, 0.8);
}

.file-strip-item.loading .file-strip-actions {
    display: none;
}

.file-strip-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design per File Strip */
@media (max-width: 768px) {
    .file-strip-header {
        padding: 12px 16px;
    }
    
    .file-strip-title {
        font-size: 16px;
    }
    
    .file-strip-upload-btn span {
        display: inline;
    }
    
    .file-strip-controls {
        gap: 8px;
    }
    
    .file-strip-item {
        flex: 0 0 120px;
    }
    
    .file-strip-thumbnail {
        width: 120px;
        height: 85px;
    }
    
    .file-strip-name {
        max-width: 120px;
        font-size: 11px;
    }
    
    .file-strip-track {
        gap: 12px;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .file-strip-upload-btn span {
        display: none;
    }
    
    .file-strip-item {
        flex: 0 0 100px;
    }
    
    .file-strip-thumbnail {
        width: 100px;
        height: 70px;
    }
    
    .file-strip-name {
        max-width: 100px;
        font-size: 10px;
    }
    
    .file-strip-actions {
        gap: 4px;
    }
    
    .file-strip-action {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Integrazione con il tema */
.laser-configurator + .file-strip-container {
    margin-top: 32px;
    border-top: 4px solid var(--primary-color);
}

.file-strip-container.compact {
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.file-strip-container.compact .file-strip-header {
    padding: 12px 16px;
    background: var(--bg-light);
    color: var(--text-primary);
}

.file-strip-container.compact .file-strip-title {
    color: var(--text-primary);
    font-size: 16px;
}

/* File Strip Preview */
.file-strip-preview {
    display: none;
    background: var(--bg-light);
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
}

.file-strip-preview.active {
    opacity: 1;
    transform: translateY(0);
}

.file-strip-preview-content {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 400px;
}

.file-strip-preview img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: white;
    border-radius: var(--border-radius-sm);
    border: 1px solid #ddd;
}

.file-strip-preview-info h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.file-strip-preview-actions {
    display: flex;
    gap: 8px;
}

.preview-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-action-btn.select-btn {
    background: var(--primary-color);
    color: white;
}

.preview-action-btn.select-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.preview-action-btn.download-btn {
    background: var(--accent-color);
    color: white;
}

.preview-action-btn.download-btn:hover {
    background: #e55a5a;
    transform: translateY(-1px);
}

/* ============================
   FILE SLIDESHOW STYLES
   ============================ */

.file-slideshow-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.file-slideshow-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.05), 
        rgba(68, 160, 141, 0.03)
    );
    pointer-events: none;
}

.file-slideshow-title {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1;
    position: relative;
    z-index: 2;
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.file-slideshow-title-line1 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.file-slideshow-title-line2 {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

.file-slideshow-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-slideshow-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.file-slideshow-gallery-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.file-slideshow-track {
    display: flex;
    animation: slideshow-scroll linear infinite;
    width: max-content;
}

@keyframes slideshow-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.file-slideshow-item {
    flex: 0 0 auto;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-white);
    box-shadow: var(--shadow-light);
    /* Dimensioni variabili basate sull'aspect ratio dell'immagine */
    height: 100px;
    width: auto;
    min-width: 80px;
    max-width: 200px;
    /* Centratura orizzontale e verticale */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Previene layout shift durante caricamento */
    box-sizing: border-box;
}

.file-slideshow-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.file-slideshow-item:hover .file-slideshow-overlay {
    opacity: 1;
}

.file-slideshow-item img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--border-radius-sm);
    filter: brightness(0.95) contrast(1.05);
}

.file-slideshow-item:hover img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.1);
}

/* Loader per slideshow */
.file-slideshow-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.file-slideshow-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: slideshow-spin 1s linear infinite;
    margin-bottom: 8px;
}

.file-slideshow-loading-text {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes slideshow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.file-slideshow-item.loading img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.file-slideshow-item.loaded img {
    opacity: 1;
}

.file-slideshow-item.loaded .file-slideshow-loader {
    display: none;
}

.file-slideshow-item.error .file-slideshow-spinner {
    display: none;
}

.file-slideshow-item.error .file-slideshow-loading-text {
    color: #ff6b6b;
}

.file-slideshow-item.error {
    background: #f8f8f8;
    opacity: 0.7;
}

.file-slideshow-item.error img {
    display: none !important;
}

.file-slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.9), 
        rgba(68, 160, 141, 0.8)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(2px);
    border-radius: var(--border-radius-sm);
}

.file-slideshow-action {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.file-slideshow-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
}

.file-slideshow-action:hover::before {
    width: 100%;
    height: 100%;
}

.file-slideshow-action:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    color: white;
}

.file-slideshow-action i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.file-slideshow-action:hover i {
    transform: scale(1.1);
}

.file-slideshow-item:hover .file-slideshow-overlay {
    opacity: 1;
    transform: scale(1.02);
}

/* Modal Styles */
.file-slideshow-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.file-slideshow-modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.file-slideshow-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
}

.file-slideshow-modal-close:hover {
    color: var(--accent-color);
}

/* Rimosso - duplicato con versione migliorata sotto */

.file-slideshow-modal-actions {
    padding: 15px;
    text-align: center;
    background: var(--bg-light);
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.file-slideshow-modal .file-slideshow-configure-btn {
    background: #4ecdc4 !important;
    color: #ffffff !important;
    border: 2px solid #4ecdc4 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.4 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    user-select: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.file-slideshow-modal .file-slideshow-configure-btn:hover,
.file-slideshow-modal .file-slideshow-configure-btn:focus {
    background: #3baaa7 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-color: #3baaa7 !important;
}

.file-slideshow-modal .file-slideshow-configure-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Download Button Styles */
.file-slideshow-modal .file-slideshow-download-btn {
    background: #ff6b6b !important;
    color: #ffffff !important;
    border: 2px solid #ff6b6b !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.4 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    user-select: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.file-slideshow-modal .file-slideshow-download-btn:hover,
.file-slideshow-modal .file-slideshow-download-btn:focus {
    background: #e55a5a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border-color: #e55a5a !important;
}

.file-slideshow-modal .file-slideshow-download-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* View All Button Styles */
.file-slideshow-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-light);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.file-slideshow-view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.file-slideshow-view-all-btn:hover::before {
    left: 100%;
}

.file-slideshow-view-all-btn:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
    color: white;
    text-decoration: none;
}

.view-all-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: left;
    gap: 1px;
}

.view-all-line1 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.view-all-line2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.view-all-icon {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.file-slideshow-view-all-btn:hover .view-all-icon {
    transform: translateX(4px);
}

/* Enhanced Modal Styles */
.file-slideshow-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.file-slideshow-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.file-slideshow-modal-close {
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: var(--transition);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.file-slideshow-modal-close:hover {
    color: #333;
    background: #e0e0e0;
    transform: scale(1.1);
}

/* LAYOUT 50/50 CON PULSANTI SOTTO - MASSIMA PRIORITÀ */
.file-slideshow-modal-body,
#file-slideshow-modal .file-slideshow-modal-body,
#main-gallery-modal .file-slideshow-modal-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr auto !important;
    gap: 15px !important;
    padding: 15px !important;
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Container immagine - colonna sinistra, riga 1 */
.file-slideshow-modal-image-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

/* Container info testo - colonna destra, riga 1 */
.file-slideshow-modal-info {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

/* Pulsanti sotto - tutta la larghezza, riga 2 */
.file-slideshow-modal-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.file-slideshow-modal-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--border-radius);
    padding: 15px;
    height: 300px;
    width: 100%;
    min-width: 0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    box-sizing: border-box;
}

.file-slideshow-modal-info {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.file-slideshow-modal-actions {
    width: 100%;
    box-sizing: border-box;
}

.file-slideshow-modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease;
    cursor: zoom-in;
    transform-origin: center center;
}

.file-slideshow-modal-image-container.zoomed {
    cursor: zoom-out;
    overflow: auto;
    background: rgba(0, 0, 0, 0.9);
}

.file-slideshow-modal-image-container.zoomed img {
    transform: scale(2);
    cursor: grab;
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    min-width: 100%;
    min-height: 100%;
}

.file-slideshow-modal-image-container.zoomed img:active {
    cursor: grabbing;
}

/* Indicatore zoom */
.file-slideshow-modal-image-container::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 15px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.file-slideshow-modal-image-container:hover::after {
    opacity: 1;
}

.file-slideshow-modal-image-container.zoomed::after {
    content: '↩️';
    opacity: 1;
}

.file-slideshow-modal-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.file-slideshow-modal-description h4 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-slideshow-modal-description h4::before {
    content: '✨';
    font-size: 24px;
}

.file-slideshow-modal-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-slideshow-modal-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    transition: var(--transition);
}

.file-slideshow-modal-features li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-light);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.file-slideshow-modal-features li i {
    color: var(--primary-color);
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.file-slideshow-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: auto;
}

/* Enhanced Button Styles */
.file-slideshow-modal-actions button {
    flex: 1;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
}

.file-slideshow-modal-actions button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.file-slideshow-modal-actions button:hover::before {
    left: 100%;
}

.file-slideshow-download-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    border: none !important;
}

.file-slideshow-download-btn:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4) !important;
}

.file-slideshow-configure-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d) !important;
    border: none !important;
}

.file-slideshow-configure-btn:hover {
    background: linear-gradient(135deg, #44a08d, #4ecdc4) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(68, 160, 141, 0.4) !important;
}

/* Mobile Responsiveness - solo per schermi molto piccoli */
@media (max-width: 580px) {
    .file-slideshow-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .file-slideshow-modal-body {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        max-height: calc(95vh - 100px) !important;
    }
    
    .file-slideshow-modal-image-container {
        height: 250px;
    }
    
    .file-slideshow-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-slideshow-modal-actions button {
        flex: none !important;
    }
    
    .file-slideshow-modal-title {
        font-size: 18px;
    }
    
    .file-slideshow-modal-features li {
        font-size: 12px;
        padding: 6px 10px;
    }
}

.file-slideshow-view-all-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================
   MAIN GALLERY UNIFIED STYLES
   ============================ */

/* Loader per galleria principale */
.modern-file-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.modern-file-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: modern-file-spin 1s linear infinite;
    margin-bottom: 6px;
}

.modern-file-loading-text {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes modern-file-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modern-file-item.loading img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modern-file-item.loaded img {
    opacity: 1;
}

.modern-file-item.loaded .modern-file-loader {
    display: none;
}

.modern-file-item.error {
    background: #f8f8f8;
    opacity: 0.7;
}

.modern-file-item.error img {
    display: none !important;
}

.modern-file-item.error .modern-file-spinner {
    display: none;
}

.modern-file-item.error .modern-file-loading-text {
    color: #ff6b6b;
}

/* Overlay per galleria principale */
.modern-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.9), 
        rgba(68, 160, 141, 0.8)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(2px);
    border-radius: var(--border-radius-sm);
}

.modern-file-item:hover .modern-file-overlay {
    opacity: 1;
    transform: scale(1.02);
}

.modern-file-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.modern-file-action {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.modern-file-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
}

.modern-file-action:hover::before {
    width: 100%;
    height: 100%;
}

.modern-file-action:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.modern-file-action i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.modern-file-action:hover i {
    transform: scale(1.05);
}

/* Pulsante condivisione speciale */
.file-slideshow-share-btn {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    color: white !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    overflow: hidden !important;
    flex: 1 !important;
}

.file-slideshow-share-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4) !important;
}
    color: white;
    text-decoration: none;
}

.view-all-text {
    font-weight: 600;
}

.view-all-icon {
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.file-slideshow-view-all-btn:hover .view-all-icon {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .file-slideshow-wrapper {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .file-slideshow-gallery-link {
        align-self: center;
    }
    
    .file-slideshow-view-all-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .file-slideshow-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .file-slideshow-modal-close {
        top: 10px;
        right: 15px;
        font-size: 25px;
    }
    
    .file-slideshow-modal .file-slideshow-configure-btn,
    .file-slideshow-modal .file-slideshow-download-btn {
        padding: 10px 15px !important;
        font-size: 14px !important;
        flex: 1 !important;
        max-width: 150px !important;
    }
    
    .file-slideshow-modal-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
}