/* ======================================== */
/* Mobile Styles - MORE10.ONE             */
/* Breakpoints: 768px, 480px, 390px       */
/* ======================================== */

/* ======================================== */
/* DEFAULT: Mobile-Elemente verstecken    */
/* ======================================== */
.lightbox-mobile-bar {
    display: none;
}

.lightbox-mobile-panel {
    display: none;
}

.overlay-trigger {
    display: none;
}

/* ======================================== */
/* Overlay-Trigger Button (Pfeil)         */
/* Sichtbar ab 768px                      */
/* ======================================== */
@media (max-width: 768px) {
    
    /* WICHTIG: Pfeil MUSS über dem Overlay sein und klickbar! */
    .gallery-item .overlay-trigger {
        display: flex !important;
        position: absolute !important;
        bottom: 8px !important;
        right: 8px !important;
        width: 36px !important;
        height: 36px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 50 !important;
        pointer-events: auto !important;
        -webkit-transition: all 0.2s ease;
        transition: all 0.2s ease;
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-tap-highlight-color: transparent;
    }
    
    .gallery-item .overlay-trigger svg {
        width: 20px;
        height: 20px;
        color: white;
        pointer-events: none;
    }
    
    .gallery-item .overlay-trigger:active {
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    /* Overlay - pointer-events nur auf Inhalt, nicht auf ganzes Overlay */
    .gallery-item .overlay {
        opacity: 0;
        visibility: hidden;
        z-index: 3 !important;
        pointer-events: none !important; /* Overlay selbst fängt keine Klicks ab */
    }
    
    .gallery-item.overlay-active .overlay {
        opacity: 1;
        visibility: visible;
    }
    
    /* NUR die Overlay-Icons bekommen pointer-events */
    .gallery-item .overlay-icons {
        pointer-events: auto !important;
        width: calc(100% - 50px);
        padding-right: 0;
    }
    
    .gallery-item .overlay-icons [data-action] {
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    /* Pfeil-BUTTON dreht sich wenn Overlay aktiv */
    .gallery-item.overlay-active .overlay-trigger {
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
    }
    
    .gallery-item .overlay-line {
        width: calc(100% - 50px);
    }
}

/* ======================================== */
/* Tablet & kleine Laptops (≤ 768px)      */
/* ======================================== */
@media (max-width: 768px) {
    .site-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .header-controls {
        gap: var(--spacing-sm);
    }
}

/* ======================================== */
/* Mobile Geräte (≤ 480px)                */
/* ======================================== */
@media (max-width: 480px) {
    
    /* --- Header Fixes --- */
    .site-header {
        padding: var(--spacing-sm) var(--spacing-sm);
    }
    
    .page1-logo-container {
        left: var(--spacing-sm);
    }
    
    .header-controls {
        gap: var(--spacing-xs);
    }
    
    .language-select select {
        padding: 0.4rem 2rem 0.4rem 0.6rem;
        font-size: 13px;
        min-height: 32px;
    }
    
    .hamburger {
        width: 26px;
        height: 18px;
    }
    
    /* --- Headline Anpassungen --- */
    .center h1 {
        font-size: 48px;
        letter-spacing: 0.4rem;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    }
    
    .center h2 {
        font-size: 13px;
        letter-spacing: 0.5rem;
        padding-left: 0.5em;
        margin-top: 10px;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    }
    
    /* --- Scroll Button --- */
    .scroll-btn {
        width: 72px;
        height: 84px;
        margin-top: 50px;
        border-radius: 14px;
    }
    
    .scroll-btn svg {
        width: 32px;
        height: 32px;
    }
    
    /* --- Suchfeld --- */
    .search-container {
        width: 88%;
    }
    
    .search-container input {
        padding: 14px 45px 14px 18px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    /* --- Menü --- */
    .menu.open {
        width: 100%;
    }
    
    .menu a {
        font-size: 22px;
        padding: 12px 30px;
    }
    
    /* --- Galerie Mobile --- */
    .gallery-container {
        padding: 0 var(--spacing-xs);
        margin: 1rem var(--spacing-xs);
    }
    
    .gallery {
        column-gap: 10px;
    }
    
    .gallery-item {
        margin-bottom: 10px;
        border-radius: 8px;
    }
}

/* ======================================== */
/* Kleine Mobile Geräte (≤ 390px)         */
/* ======================================== */
@media (max-width: 390px) {
    
    /* --- Header noch kompakter --- */
    .site-header {
        padding: var(--spacing-xs) var(--spacing-xs);
    }
    
    .page1-logo-container {
        left: var(--spacing-xs);
    }
    
    .page1-logo-container .logo {
        font-size: 16px;
        gap: 0.5rem;
    }
    
    .logo img {
        height: 22px;
    }
    
    .language-select select {
        padding: 0.35rem 1.8rem 0.35rem 0.5rem;
        font-size: 12px;
    }
    
    /* --- Headline kleiner --- */
    .center h1 {
        font-size: 38px;
        letter-spacing: 0.3rem;
    }
    
    .center h2 {
        font-size: 11px;
        letter-spacing: 0.35rem;
        padding-left: 0.35em;
    }
    
    /* --- Scroll Button --- */
    .scroll-btn {
        width: 64px;
        height: 74px;
        margin-top: 40px;
        border-radius: 12px;
    }
    
    .scroll-btn svg {
        width: 28px;
        height: 28px;
    }

    /* --- Suchfeld --- */
    .search-container {
        width: 92%;
    }
    
    .search-container input {
        padding: 12px 40px 12px 14px;
        font-size: 15px;
    }
    
    /* --- Galerie noch enger --- */
    .gallery-container {
        padding: 0 4px;
        margin: 0.5rem 4px;
    }
    
    .gallery {
        column-gap: 8px;
    }
    
    .gallery-item {
        margin-bottom: 8px;
        border-radius: 6px;
    }
    
    /* --- Overlay Trigger kleiner --- */
    .gallery-item .overlay-trigger {
        width: 32px !important;
        height: 32px !important;
        bottom: 6px !important;
        right: 6px !important;
    }
    
    .gallery-item .overlay-trigger svg {
        width: 18px;
        height: 18px;
    }
}

/* ======================================== */
/* Sehr kleine Geräte (≤ 320px)           */
/* ======================================== */
@media (max-width: 320px) {
    .center h1 {
        font-size: 32px;
        letter-spacing: 0.2rem;
    }
    
    .center h2 {
        font-size: 10px;
        letter-spacing: 0.25rem;
    }
}

/* ======================================== */
/* LIGHTBOX MOBILE - KOMPLETT Fullscreen  */
/* Überschreibt alle lightbox.css Styles  */
/* ======================================== */
@media (max-width: 768px) {
    
    /* --- Lightbox Container: KEIN padding --- */
    .gallery-lightbox {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* --- Content: KOMPLETT fullscreen, KEIN Rahmen --- */
    .gallery-lightbox .lightbox-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    
    /* --- Blur-Hintergrund AUS --- */
    .gallery-lightbox .lightbox-background {
        display: none !important;
    }
    
    /* --- Overlay transparent --- */
    .gallery-lightbox .lightbox-overlay {
        background: transparent !important;
    }
    
    /* --- Main Bereich --- */
    .gallery-lightbox .lightbox-main {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 60px !important; /* Platz für Bottom Bar */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* --- Image Container: KEIN padding --- */
    .gallery-lightbox .lightbox-image-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* --- Bild: Fullscreen, KEIN border-radius --- */
    .gallery-lightbox .lightbox-image {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* --- Sidebar KOMPLETT verstecken --- */
    .gallery-lightbox .lightbox-sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* --- Close Button Mobile --- */
    .gallery-lightbox .lightbox-close {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(0, 0, 0, 0.6) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 50% !important;
        z-index: 10000 !important;
    }
    
    /* --- Mobile Bottom Bar --- */
    .lightbox-mobile-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 8px 12px !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10000 !important;
    }
    
    .mobile-bar-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 44px;
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        color: white;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-bar-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-bar-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .mobile-bar-btn.primary {
        flex: 1;
        max-width: 160px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: transparent;
    }
    
    .mobile-bar-btn.primary:active {
        opacity: 0.9;
    }
    
    .mobile-bar-btn.active {
        background: rgba(102, 126, 234, 0.3);
        border-color: #667eea;
    }
    
    /* --- Mobile Info Panel --- */
    .lightbox-mobile-panel {
        position: fixed !important;
        bottom: 60px !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 50vh;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px 16px 0 0;
        z-index: 9999 !important;
        overflow: hidden;
        display: none;
    }
    
    .lightbox-mobile-panel.active {
        display: block !important;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .mobile-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-panel-header span {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.85rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .mobile-panel-close {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-panel-close svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-panel-content {
        padding: 20px;
        overflow-y: auto;
        max-height: calc(50vh - 60px);
    }
    
    /* Panel Content Styles */
    .mobile-panel-content .info-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mobile-panel-content .info-row:last-child {
        border-bottom: none;
    }
    
    .mobile-panel-content .info-label {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.9rem;
    }
    
    .mobile-panel-content .info-value {
        color: white;
        font-size: 0.9rem;
        text-align: right;
    }
    
    /* Colors Panel */
    .mobile-panel-content .colors-grid {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }
    
    .mobile-panel-content .color-item {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-panel-content .color-item span {
        font-size: 0.75rem;
        font-weight: 500;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }
}
