/* ==========================================================================
   Cosamirai Image Intro Block Styles
   ========================================================================== */

   .cosamirai-image-intro {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: var(--app-height, 100vh);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
}

.scrollmagic-pin-spacer .cosamirai-image-intro {
    position: fixed !important;
    left: 0 !important;
    width: 100% !important;
    margin-left: 0 !important;
}

.cosamirai-image-intro .intro-overlay-color {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}


.masked-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 213 87'%3E%3Cpath d='M106.071 86.9372C164.317 86.9372 212.141 54.9162 212.141 30.725C212.141 10.3857 170.563 0 106.071 0C41.5787 0 0 10.3857 0 30.725C0 54.9162 47.8245 86.9372 106.071 86.9372Z' fill='white'/%3E%3C/svg%3E") 50% 50% / 0% 0% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 213 87'%3E%3Cpath d='M106.071 86.9372C164.317 86.9372 212.141 54.9162 212.141 30.725C212.141 10.3857 170.563 0 106.071 0C41.5787 0 0 10.3857 0 30.725C0 54.9162 47.8245 86.9372 106.071 86.9372Z' fill='white'/%3E%3C/svg%3E") 50% 50% / 0% 0% no-repeat;
}

.overlay-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 1;
}

.image-intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    font-weight: 200;
    opacity: 0.7;
}

.cosamirai-image-intro.pebble-2 .masked-container {
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 326 84'%3E%3Cpath d='M162.683 0C82.7552 0 0 20.1968 0 41.69C0 63.1989 82.7552 83.38 162.683 83.38C242.611 83.38 325.366 63.1832 325.366 41.69C325.366 20.1968 242.611 0 162.683 0Z' fill='white'/%3E%3C/svg%3E") 50% 50% / 0% 0% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 326 84'%3E%3Cpath d='M162.683 0C82.7552 0 0 20.1968 0 41.69C0 63.1989 82.7552 83.38 162.683 83.38C242.611 83.38 325.366 63.1832 325.366 41.69C325.366 20.1968 242.611 0 162.683 0Z' fill='white'/%3E%3C/svg%3E") 50% 50% / 0% 0% no-repeat;
}

/* Content */
.image-intro-content {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
}

.image-intro-texts {
    display: flex;
    width: 100%;
    gap: 1ch;
    position: relative;
    justify-content: center;
}

.image-intro-text {
    font-family: "PP Fragment Glare", sans-serif;
    font-size: 22vw;
    text-align: center;
    color: var(--c-light-stone);
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    margin-top: -6vw;
}

html[lang="DE-de"] .image-intro-text {
    font-size: 15vw;
}

.image-intro-text:first-child {
    text-align: right;
}

.image-intro-text:last-child {
    text-align: left;
}


.image-intro-text-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "PP Fragment Glare", serif;
    font-weight: 300;
    font-size: var(--fs-L-H2-XL);
    text-align: center;
    color: var(--c-light-stone);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
    opacity: 0;
    z-index: 11;
    max-width: 68vw;
}

html[lang="de-DE"] .image-intro-text-2 {
    font-size: var(--fs-90);
}

/* Backend Preview Styles */
.cosamirai-image-intro-preview {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.image-intro-preview-content h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.preview-simple {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.preview-texts-simple {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-text-simple {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #495057;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-image-simple {
    background: var(--c-moss, #4a5d23);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.preview-text-bottom {
    background: #fff;
    color: #6c757d;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-style: italic;
    border: 1px solid #e9ecef;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Animation improvements */
@media (prefers-reduced-motion: reduce) {
    .image-intro-text {
        transition: none;
    }
}

@media (max-width: 1200px)
{
    .image-intro-text-2
    {
        font-size:4rem;
        max-width: 90vw;
    }
    html[lang="de-DE"] .image-intro-text-2
    {
        font-size:3.5rem;
        max-width: 90vw;
    }
    
}

@media (max-width: 768px) {
    .image-intro-texts {
        grid-template-columns: 1fr;
        gap: 9.875rem;
        margin-top: -2%;
    }

    .image-intro-text-2
    {
        font-size:3rem;
    }
    html[lang="de-DE"] .image-intro-text-2
    {
        font-size:2.6rem;
    }

    .image-intro-text {
        font-size: var(--fs-S-H1-M);
    }

    .image-intro-text:is(:first-child, :last-child) {
        text-align: center;
        font-size: 27vw;
    }

    .image-intro-text-3 {
        font-size: var(--fs-S-H1-L);
    }
}

@media (max-width: 500px) {

    .image-intro-text-2
    {
        font-size:2.4rem;
    }
    html[lang="de-DE"] .image-intro-text-2
    {
        font-size:2.1rem;
    }

}

