/* =====================================================
   MEDIA SECTION STYLES - 2025 OPTIMIZED
   ===================================================== */

/* Media Section Container */
.section#media {
    padding: 4rem 0;
    overflow: visible;  /* Geändert von hidden zu visible für Hover-Animationen */
    position: relative;
    inline-size: 100%;
    max-inline-size: 100%;
    box-sizing: border-box;
    
    /* 2025: Container Query Setup */
    container-type: inline-size;
    container-name: media-section;
}

.media-container {
    max-inline-size: 75rem;  /* ~1200px */
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    overflow: visible;  /* Geändert von hidden zu visible für Hover-Animationen */
    min-block-size: auto;
    block-size: auto;
    contain: layout style;
    inline-size: 100%;
    max-inline-size: 100%;
    box-sizing: border-box;
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(1rem, 3vw, 1.25rem);  /* 2025: Fluid Typography */
    line-height: 1.6;
    margin-block-end: 3rem;
    max-inline-size: 37.5rem;  /* ~600px */
    margin-inline: auto;
}

/* =====================================================
   MEDIA TAB NAVIGATION - 2025 TOUCH OPTIMIZED
   ===================================================== */
.media-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-block: 3rem 4rem;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-inline-size: min(31.25rem, 90vw);  /* ~500px, responsive */
    margin-inline: auto;
    
    /* 2025: Container Query Setup */
    container-type: inline-size;
    container-name: media-tabs;
}

[data-theme="light"] .media-tabs {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.media-tab {
    flex: 1;
    /* 2025: Enhanced Touch Targets */
    min-block-size: 44px;  /* Apple minimum */
    min-inline-size: 44px;
    padding-block: 0.75rem;
    padding-inline: clamp(0.5rem, 2vw, 1.5rem);
    
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: calc(var(--border-radius) - 4px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.media-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.media-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 2025: Enhanced Focus-Visible */
.media-tab:focus-visible {
    outline: 2px solid var(--accent-primary, #ff3366);
    outline-offset: 2px;
    border-radius: calc(var(--border-radius) - 4px);
}

[data-theme="light"] .media-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.1);
}

.media-tab-icon {
    font-size: clamp(1rem, 3vw, 1.25rem);
}

.media-tab-text {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
}

/* =====================================================
   MEDIA CONTENT SECTIONS - OPTIMIZED SCROLLING
   ===================================================== */
.media-content {
    display: none;
    animation: fadeInUp 0.6s ease-out;
    overflow: visible;  /* Geändert von hidden zu visible für Hover-Animationen */
    min-block-size: auto;
    block-size: auto;
    position: relative;
    box-sizing: border-box;
    margin-top: 2rem;  /* Zusätzlicher Abstand nach oben für bessere Animation */
    
    /* 2025: View Transitions (if supported) */
    view-transition-name: media-content;
}

.media-content.active {
    display: block;
    overflow: visible;  /* Geändert von hidden zu visible für Hover-Animationen */
}

/* 2025: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .media-content {
        animation: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);  /* ~20px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-state {
    text-align: center;
    padding-block: 4rem;
    padding-inline: 2rem;
    color: var(--text-secondary);
    overflow: visible;
}

.loading-spinner {
    inline-size: 2.5rem;  /* ~40px */
    block-size: 2.5rem;
    border: 3px solid rgba(255, 51, 102, 0.1);
    border-block-start: 3px solid var(--accent-primary, #ff3366);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-inline: auto;
    margin-block-end: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding-block: 4rem;
    padding-inline: 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-block-end: 1rem;
    color: var(--accent-primary, #ff3366);
}

.empty-state h3 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-block-end: 0.5rem;
    color: var(--text-primary);
}

/* Error States */
.error-state {
    text-align: center;
    padding-block: 4rem;
    padding-inline: 2rem;
    color: var(--text-secondary);
}

.error-state i {
    font-size: 3rem;
    margin-block-end: 1rem;
    color: #ff6b6b;
}

.error-state h3 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-block-end: 0.5rem;
    color: var(--text-primary);
}

.retry-button {
    margin-block-start: 1rem;
    padding-block: 0.75rem;
    padding-inline: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    
    /* 2025: Touch Optimization */
    min-block-size: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 51, 102, 0.4);
}

/* 2025: Enhanced Focus-Visible */
.retry-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* =====================================================
   GALLERY SECTION - MODERN GRID LAYOUTS
   ===================================================== */
.galleries-grid {
    display: grid;
    /* 2025: Intrinsic Web Design */
    grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));  /* ~300px */
    gap: clamp(1rem, 4vw, 2rem);
    margin-block-start: 2rem;
    overflow: visible;
    box-sizing: border-box;
    
    /* Container Query Setup */
    container-type: inline-size;
    container-name: galleries;
}

.gallery-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
    cursor: pointer;
    box-sizing: border-box;
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gallery-card:hover {
    transform: translateY(-0.5rem);  /* ~8px */
    border-color: var(--accent-primary, #ff3366);
    box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.25);  /* ~20px 50px */
}

/* 2025: Enhanced Focus-Visible */
.gallery-card:focus-visible {
    outline: 2px solid var(--accent-primary, #ff3366);
    outline-offset: 2px;
}

[data-theme="light"] .gallery-card:hover {
    box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.15);
}

.gallery-preview {
    aspect-ratio: 16/10;
    background: var(--tertiary-bg);
    position: relative;
    overflow: hidden;
}

.gallery-preview img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: var(--transition);
    
    /* 2025: Modern Image Rendering */
    image-rendering: crisp-edges;
}

.gallery-card:hover .gallery-preview img {
    transform: scale(1.05);
}

.gallery-placeholder {
    inline-size: 100%;
    block-size: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.gallery-overlay {
    position: absolute;
    inset-block-end: 0;
    inset-inline: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-info {
    padding: 1.5rem;
}

.gallery-title {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-block-end: 0.5rem;
    line-height: 1.3;
}

.gallery-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-block-end: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding-block: 0.3rem;
    padding-inline: 0.8rem;
    border-radius: 1.25rem;  /* ~20px */
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* =====================================================
   VIDEO & MUSIC SECTIONS - MODERN LAYOUTS
   ===================================================== */
.videos-grid, .music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr));
    gap: clamp(1rem, 4vw, 2rem);
    margin-block-start: 2rem;
    overflow: visible;
    box-sizing: border-box;
}

.video-card, .music-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
    cursor: pointer;
    box-sizing: border-box;
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.video-card:hover {
    transform: translateY(-0.3125rem);  /* ~5px */
    border-color: var(--accent-primary, #ff3366);
    box-shadow: 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.2);  /* ~15px 40px */
}

/* 2025: Enhanced Focus-Visible */
.video-card:focus-visible, .music-card:focus-visible {
    outline: 2px solid var(--accent-primary, #ff3366);
    outline-offset: 2px;
}

[data-theme="light"] .video-card:hover, [data-theme="light"] .music-card:hover {
    box-shadow: 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.1);
}

.video-thumbnail, .music-player {
    block-size: 10.375rem;  /* ~166px */
    position: relative;
    background: #000;
    overflow: hidden;  /* Verhindert Überlauf bei object-fit */
}

.video-thumbnail img {
    inline-size: 100%;
    block-size: 100%;
    border: none;
    object-fit: cover;  /* Verhindert Verzerrung, behält Seitenverhältnis */
    object-position: center;  /* Zentriert das Bild */
}

.music-player {
    block-size: 10.375rem;  /* ~166px */
    position: relative;
    background: #000;
    overflow: hidden;  /* Verhindert Überlauf bei SoundCloud Player */
    border-radius: var(--border-radius);  /* Runde Ecken für besseres Design */
}

.music-player iframe {
    inline-size: 100%;
    block-size: 100%;
    border: none;
    border-radius: var(--border-radius);  /* Konsistente Rundung */
}

.video-play-overlay {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    inline-size: 3.75rem;  /* ~60px */
    block-size: 3.75rem;
    background: rgba(255, 51, 102, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.video-play-overlay::before {
    content: "▶";  /* Play-Symbol hinzugefügt */
    font-size: 1.2rem;
    margin-left: 0.2rem;  /* Zentriert das Play-Symbol optisch */
}

.video-card:hover .video-play-overlay {
    background: var(--accent-primary, #ff3366);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Separater Hover-Effekt für Music Cards - ohne Transform */
.music-card:hover {
    transform: translateY(-0.3125rem);  /* ~5px - nur die Card bewegt sich */
    border-color: var(--accent-primary, #ff3366);
    box-shadow: 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.2);  /* ~15px 40px */
}

.music-card:hover .music-player {
    /* Kein Transform - Player bleibt stabil im Container */
    border-color: var(--accent-primary, #ff3366);
}

.video-info, .music-info {
    padding: 1.5rem;
}

.video-title, .music-title {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-block-end: 0.5rem;
    line-height: 1.3;
}

.video-description, .music-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-block-end: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-category, .music-artist {
    background: var(--gradient-primary);
    color: white;
    padding-block: 0.3rem;
    padding-inline: 0.8rem;
    border-radius: 1.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-block-end: 1rem;
    display: inline-block;
}

.video-date, .music-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =====================================================
   LIGHTBOX FOR GALLERY - MODERN IMPLEMENTATION
   ===================================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-inline-size: 90vw;
    max-block-size: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-inline-size: 100%;
    max-block-size: 100%;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.5);  /* ~20px 60px */
}

.lightbox-close {
    position: absolute;
    inset-block-start: -3.125rem;  /* ~-50px */
    inset-inline-end: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.625rem;  /* ~10px */
    transition: var(--transition);
    z-index: 10001;
    
    /* 2025: Touch Optimization */
    min-block-size: 44px;
    min-inline-size: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* 2025: Enhanced Focus-Visible */
.lightbox-close:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    border-radius: 50%;
}

.lightbox-nav {
    position: absolute;
    inset-block-start: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
    transition: var(--transition);
    
    /* 2025: Touch Optimization */
    min-block-size: 44px;
    min-inline-size: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* 2025: Enhanced Focus-Visible */
.lightbox-nav:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.lightbox-prev {
    inset-inline-start: 1rem;
}

.lightbox-next {
    inset-inline-end: 1rem;
}

.lightbox-info {
    position: absolute;
    inset-block-end: 1rem;
    inset-inline: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    border-radius: var(--border-radius);
    color: white;
    text-align: center;
}

.lightbox-title {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
    margin-block-end: 0.5rem;
}

.lightbox-counter {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    backdrop-filter: blur(10px);
    padding: 1rem;
    
    /* 2025: Touch Optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    max-inline-size: 90vw;
    max-block-size: 90vh;
    background: var(--secondary-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.5);
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--tertiary-bg);
    border-block-end: 1px solid var(--border-color);
}

.video-modal-title {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 600;
    color: var(--text-primary);
}

.video-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    
    /* 2025: Touch Optimization */
    min-block-size: 44px;
    min-inline-size: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* 2025: Enhanced Focus-Visible */
.video-modal-close:focus-visible {
    outline: 2px solid var(--accent-primary, #ff3366);
    outline-offset: 2px;
}

.video-modal-body {
    padding: 0;
}

.video-player-container {
    aspect-ratio: 16/9;
    background: #000;
}

.video-player-container iframe {
    inline-size: 100%;
    block-size: 100%;
    border: none;
}

/* =====================================================
   2025: MODERN CONTAINER QUERIES
   ===================================================== */

/* Mobile optimizations */
@container media-tabs (max-width: 30rem) {
    .media-tab {
        flex-direction: column;
        gap: 0.25rem;
        padding-block: 0.5rem;
        padding-inline: 0.25rem;
    }
    
    .media-tab-text {
        font-size: 0.75rem;
    }
    
    .media-tab-icon {
        font-size: 1rem;
    }
}

@container galleries (max-width: 30rem) {
    .galleries-grid,
    .videos-grid,
    .music-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@container galleries (min-width: 30rem) and (max-width: 48rem) {
    .galleries-grid,
    .videos-grid,
    .music-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   FALLBACK: MEDIA QUERIES für ältere Browser
   ===================================================== */

@supports not (container-type: inline-size) {
    @media (max-width: 768px) {
        .media-tabs {
            max-inline-size: 100%;
            margin-block: 2rem;
            padding: 0.375rem;  /* ~6px */
            gap: 0.25rem;  /* ~4px */
            overflow: hidden;
            box-sizing: border-box;
        }

        .media-tab {
            padding-block: 0.75rem;
            padding-inline: 0.8rem;
            font-size: 0.75rem;
            flex-direction: column;
            gap: 0.25rem;
        }

        .media-tab-text {
            display: none;
        }

        .media-tab-icon {
            font-size: 1.125rem;
        }

        .galleries-grid,
        .videos-grid,
        .music-grid {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        .gallery-card,
        .video-card,
        .music-card {
            margin-inline: 0;
        }

        .lightbox-nav {
            inline-size: 2.75rem;  /* ~44px */
            block-size: 2.75rem;
            font-size: 1.25rem;
        }

        .lightbox-content {
            max-inline-size: 95vw;
            max-block-size: 85vh;
        }

        .lightbox-close {
            inset-block-start: 1.25rem;  /* ~20px */
            inset-inline-end: 1.25rem;
            font-size: 1.5rem;
        }

        .lightbox-info {
            padding: 0.75rem;
        }

        .video-modal-content {
            max-inline-size: 95vw;
            max-block-size: 85vh;
        }

        .video-modal-header {
            padding: 0.75rem;
        }

        .video-modal-title {
            font-size: 1rem;
        }

        .video-modal-close {
            inline-size: 2.75rem;
            block-size: 2.75rem;
            font-size: 1.125rem;
        }
    }

    @media (max-width: 480px) {
        .media-tabs {
            margin-block: 1.5rem;
            padding: 0.25rem;
            gap: 0.125rem;
            border-radius: 0.75rem;
        }

        .media-tab {
            padding-block: 0.5rem;
            padding-inline: 0.25rem;
            font-size: 0.625rem;
            border-radius: 0.625rem;
        }

        .media-tab-text {
            display: none;
        }

        .media-tab-icon {
            font-size: 1rem;
        }

        .galleries-grid,
        .videos-grid,
        .music-grid {
            grid-template-columns: 1fr;
            gap: 0.75rem;
            margin-block-start: 1rem;
        }

        .gallery-info,
        .video-info,
        .music-info {
            padding: 1rem;
        }

        .section-subtitle {
            font-size: 1rem;
            margin-block-end: 2rem;
            padding-inline: 1rem;
        }

        .media-container {
            padding-inline: 1rem;
        }

        .video-modal-content {
            max-inline-size: 100vw;
            max-block-size: 100vh;
            border-radius: 0;
        }

        .video-modal-header {
            padding: 0.5rem;
        }

        .video-modal-title {
            font-size: 0.875rem;
        }

        .video-modal-close {
            inline-size: 2.5rem;  /* ~40px */
            block-size: 2.5rem;
            font-size: 1rem;
        }
    }
}

/* =====================================================
   2025: ACCESSIBILITY ENHANCEMENTS
   ===================================================== */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .media-content,
    .gallery-card,
    .video-card,
    .music-card,
    .lightbox-close,
    .lightbox-nav,
    .video-modal-close {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
    
    .gallery-preview img,
    .video-play-overlay {
        transform: none !important;
    }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
    .media-tab:focus-visible,
    .gallery-card:focus-visible,
    .video-card:focus-visible,
    .music-card:focus-visible,
    .retry-button:focus-visible,
    .lightbox-close:focus-visible,
    .lightbox-nav:focus-visible,
    .video-modal-close:focus-visible {
        outline-width: 3px;
    }
    
    .media-tabs {
        border-width: 2px;
    }
}

/* =====================================================
   PHOTOSWIPE MOBILE OPTIMIZATIONS
   ===================================================== */

/* Mobile: PhotoSwipe UI-Elemente so anpassen, dass sie das Bild nicht verdecken */
@media (max-width: 768px) {
    /* Top-Bar (Close-Button und Counter) kleiner machen */
    .pswp__top-bar {
        height: 50px !important;
        padding: 0.5rem !important;
    }
    
    /* Counter (Foto-Anzahl) kleiner und weniger prominent */
    .pswp__counter {
        font-size: 12px !important;
        line-height: 20px !important;
        height: auto !important;
        margin-top: 10px !important;
        margin-inline-start: 12px !important;
        opacity: 0.7 !important;
        /* Text schmaler machen */
        font-weight: 500 !important;
    }
    
    /* Buttons in Top-Bar kleiner machen */
    .pswp__button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* Close-Button kleiner */
    .pswp__button--close {
        margin-right: 8px !important;
    }
    
    /* Caption-Bereich (PhotoSwipe v5 Struktur) so positionieren, dass er das Bild nicht verdeckt */
    .pswp__caption {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0.75rem 1rem !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%) !important;
        color: white !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        max-height: 30vh !important;
        overflow-y: auto !important;
        /* Sicherstellen, dass Caption nicht über das Bild geht */
        z-index: 15 !important;
        /* Text oben ausrichten */
        text-align: left !important;
    }
    
    /* Caption-Container in PhotoSwipe v5 */
    .pswp__caption__center {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    
    /* Hauptbild-Container: Sicherstellen, dass genug Platz für UI ist */
    .pswp__item {
        /* Platz für Top-Bar oben und Caption unten lassen */
        padding-top: 50px !important;
        padding-bottom: 0 !important;
    }
    
    /* Wenn Caption vorhanden ist, zusätzlich Platz unten lassen */
    .pswp:has(.pswp__caption) .pswp__item {
        padding-bottom: 30vh !important;
    }
}

/* Sehr kleine Bildschirme (z.B. iPhone SE) */
@media (max-width: 480px) {
    /* Top-Bar noch kleiner */
    .pswp__top-bar {
        height: 44px !important;
        padding: 0.25rem !important;
    }
    
    .pswp__counter {
        font-size: 11px !important;
        margin-inline-start: 8px !important;
        margin-top: 8px !important;
    }
    
    .pswp__button {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Caption noch kompakter */
    .pswp__caption {
        padding: 0.5rem 0.75rem !important;
        font-size: 12px !important;
        max-height: 25vh !important;
    }
    
    .pswp__item {
        padding-top: 44px !important;
        padding-bottom: 0 !important;
    }
    
    .pswp:has(.pswp__caption) .pswp__item {
        padding-bottom: 25vh !important;
    }
}

/* Portrait-Modus: Caption ausblenden oder minimieren, wenn Bild zu klein wird */
@media (max-width: 768px) and (orientation: portrait) {
    /* Wenn Bildschirm zu klein, Caption optional ausblenden */
    @media (max-height: 600px) {
        .pswp__caption {
            display: none !important;
        }
        
        .pswp__item {
            padding-top: 50px !important;
            padding-bottom: 0 !important;
        }
    }
}

/* Landscape-Modus auf mobilen Geräten: Mehr Platz für UI */
@media (max-width: 768px) and (orientation: landscape) {
    .pswp__top-bar {
        height: 40px !important;
    }
    
    .pswp__caption {
        max-height: 20vh !important;
        font-size: 12px !important;
    }
    
    .pswp__item {
        padding-top: 40px !important;
        padding-bottom: 0 !important;
    }
    
    .pswp:has(.pswp__caption) .pswp__item {
        padding-bottom: 20vh !important;
    }
}

/* =====================================================
   ENDE DER MEDIA-STYLES
   ===================================================== */ 