/*
Theme Name: Blocksy Child
Template: blocksy
*/


/* 1. Der Container: Basis für 3D-Effekte und Zoom */
.projekt-container {
    position: relative;
    overflow: visible;
    transition: transform 0.2s ease-out;
    z-index: 1;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* 2. Das Bild: Nur die Lücke unten schließen */
.projekt-bild {
    filter: grayscale(100%);
    transition: filter 0.6s ease;
    display: block; /* Wichtig: Macht das Bild zum Block, entfernt Text-Lücke */
    width: 100%;
    vertical-align: bottom; /* Wichtig: Drückt das Bild hart an den Boden */
}

/* 3. Text mit "Liquid Glass" Effekt */
.bild-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    
    width: auto;
    max-width: calc(100% - 70px);
    min-width: 150px;
    padding: 20px 10px;
    
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    
    font-size: clamp(12px, 1vw + 10px, 18px); 
    line-height: 1.3;
    font-weight: 700;
    color: #09111f !important;
    text-align: center;
    white-space: normal;
    
    /* NEU: Text erst beim Hover sichtbar */
    opacity: 0;
    transition: all 0.4s ease;
}

/* --- HOVER ZUSTÄNDE --- */

.projekt-container:hover {
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.projekt-container:hover .projekt-bild {
    filter: grayscale(0%);
}

/* Text bei Hover sichtbar machen und nach vorne holen */
.projekt-container:hover .bild-text {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(30px);
    background: rgba(255, 255, 255, 0.6);
}

.wp-block-paragraph a {
    text-decoration: none !important;
}


/* --- TEIL 2: STICKY FUNKTION FÜR PROJEKTSEITEN --- */

/* Text klebt beim Scrollen */
.sticky-text {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    display: block !important;
}

/* Ermöglicht das Kleben innerhalb der WordPress-Spalten */
.wp-block-columns {
    overflow: visible !important;
    align-items: flex-start;
}

/* --- LINKS & ALLGEMEINES --- */
.bild-text a, .wp-block-paragraph a {
    text-decoration: none !important;
    color: inherit !important;
}




/* --- BEREINIGTES LIGHTBOX CSS --- */
.wp-lightbox-overlay .scrim {
    background-color: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(15px) !important;
}

.wp-lightbox-overlay .lightbox-image-container {
    background: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    /*border-radius: 24px !important;*/
    padding: 10px !important;
}

/* Kreuz komplett und global aus dem DOM-Layout entfernen */
.wp-lightbox-overlay .wp-lightbox-close-button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important; /* Verschiebt es komplett aus dem Sichtfeld */
}

.wp-lightbox-overlay.active .wp-lightbox-close-button {
    display: flex !important;
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* Die Lupe selbst */
.zoom-magnifier {
    position: fixed;
    width: 400px;
    height: 400px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    z-index: 9999999;
    /* WICHTIG: Das Bild in der Lupe darf nicht über den Rand ragen */
    overflow: hidden; 
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    background-repeat: no-repeat;
    background-color: #fff;
    /* Begrenzung auf Screen-Größe */
    max-width: 90vw;
    max-height: 90vh;
    /* Verhindert, dass die Lupe bei Randnähe "springt" */
    box-sizing: border-box;
}

.zoom-magnifier {
    /* ... dein bisheriger Code ... */
    will-change: transform; /* Hilft dem Browser, die Lupe als eigene Hardware-Ebene zu behandeln */
    transition: opacity 0.1s ease; /* Macht das Einblenden sanfter */
}



/* Container: 3 Spalten, Masonry-Look */
.parallax-gallery-container {
    column-count: 3;
    column-gap: 25px;
    padding: 20px;
}

/* Karten */
.parallax-item {
    display: block; 
    width: 100%;
    margin-bottom: 25px;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    /* NEU: Verhindert, dass das Bild in der Box "schwimmt" */
    line-height: 0; 
}

/* Bild: Das ist der entscheidende Teil gegen den Streifen */
.parallax-item img {
    display: block; /* Entfernt den text-basierten Freiraum unter dem Bild */
    width: 100%;
    height: auto;
    vertical-align: top; /* Zwingt das Bild an den oberen Rand der Box */
    object-fit: cover;
}

/* Hover-Effekt */
.parallax-item:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}


/* Eigene Klasse für den Kontakt-Button */
.wp-block-button.mein-kontakt-button .wp-block-button__link {
    /* Ein ganz dezentes Grau statt rein transparent */
    background: rgba(230, 230, 230, 0.8) !important; 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Ein dünner Rahmen, damit er sich abhebt */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    
    /* Farbe und Schattierung */
    color: #09111f !important;
    font-weight: 700 !important;
    padding: 15px 30px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    
    /* Leichter Schatten für Tiefe */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}

/* Hover-Effekt */
.wp-block-button.mein-kontakt-button .wp-block-button__link:hover {
    background: rgba(200, 200, 200, 0.9) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
}