/* =================================== HERO =================================== */

#serviceHero {
    --max-size: 1600px;
    box-sizing: border-box;
    min-height: calc(100vh - var(--header-height));
    height: auto;
    width: 100vw;
    padding: 9% 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    background: var(--bg);
}

.hero-heading{
    width: fit-content;
    max-width: calc(var(--max-size) / 2);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
}


.hero-heading h1{
    max-width: calc(var(--max-size) / 2 - 100px);
    min-width: 600px;
    color: var(--primary-hover);
    font-size: var(--font-size-xxxl);
    margin: 0;
}

.hero-heading p{
    font-size: var(--font-size-l);
    margin: 0;
    max-width: calc(var(--max-size) / 2 - 200px);
}

.hero-image{
    margin: 0;
    max-height: 500px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(40,40,40,.5) ;
}

.container{
    max-width: var(--max-size);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1rem;

}

.hero-btns{
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: auto;
}

@media (max-width: 600px) {
    #serviceHero {
        --max-size: 600px;
        padding: 2rem 1rem 3rem 1rem;
    }

    .hero-heading {
        width: 100%;
        min-width: 250px;
        max-width: var(--max-size);
    }


    .hero-heading h1 {
        max-width: var(--max-size);
        text-wrap: wrap;
        color: var(--primary-hover);
        font-size: var(--font-size-xxl);
        margin: 0;
        text-align: center;
        min-width: 250px;
    }

    .hero-heading p {
        font-size: var(--font-size-m);
        margin: 1rem 0;
        max-width: var(--max-size);
        text-align: center;
    }

    .hero-image {
        margin: 0;
        max-height: 400px;
        max-width: 100%;
    }

    .container {
        width: 100%;
        max-width: var(--max-size);
        box-sizing: border-box;
    }

    .hero-btns {
        width: 100%;
        box-sizing: border-box;
        padding: 0 1rem;
    }

}

/* =================================== SERVICE SECTION =================================== */


.service-section{
    --max-size: 1400px;
    box-sizing: border-box;
    height: auto;
    width: 100vw;
    padding: 5% 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    background: var(--bg);
}

.service-section:nth-child(odd){
    background-color: var(--surface);
}

.service-section-header{
    width: 100%;
    max-width: var(--max-size);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
}

.service-section-header h2{
    font-size: var(--font-size-xxl);
    color: var(--primary-hover);
    margin: 0;
}

.service-section-header p{
    font-size: var(--font-size-l);
    margin: .8rem 0 0 0;
    max-width: calc(var(--max-size) * .75);
}

.service-section-bullet-card{
    box-sizing: border-box;
    padding: 1rem;
    background-color: var(--surface-elevated);
    border: 1px solid var(--border-elevated);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-section-bullet-card ul {
    margin: 0;
    padding: 1rem;
    list-style: none;
}

.service-section-bullet-card ul li {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}

.service-section-bullet-card ul li::before {
    content: "";
    background-image: url("/assets/fitted_icons/check_18dp_E3E3E3_FILL0_wght400_GRAD0_opsz20.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(41%) sepia(73%) saturate(1265%) hue-rotate(8deg) brightness(102%) contrast(109%);
}

.service-section-content{
    box-sizing: border-box;
    padding: 3rem 0;
    width: 100%;
    max-width: var(--max-size);
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2rem;
}

.reversed{
    flex-direction: row-reverse;
}

.service-section-content img{
    max-height: 500px;
    max-width: 900px;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border);
}


@media (max-width: 600px) {

    .service-section {
        --max-size: 600px;
        width: 100vw;
        padding: 2% 1rem 3rem 1rem;
    }

    .service-section-header {
        width: 100%;
        max-width: var(--max-size);
        display: flex;
        flex-direction: column;
        justify-content: start;
        align-items: start;
    }

    .service-section-header h2 {
        font-size: var(--font-size-xl);
        color: var(--primary-hover);
        margin: 0;
        text-align: center;
    }

    .service-section-header p {
        font-size: var(--font-size-m);
        margin: .8rem 0 0 0;
        max-width: var(--max-size);
        text-align: center;
    }

    .service-section-bullet-card {
        padding: .5rem;
        width: 100%;
    }

    .service-section-bullet-card ul {
        padding: .5rem;
    }

    .service-section-bullet-card ul li {
        gap: .5rem;
        margin-bottom: .5rem;
    }

    .service-section-bullet-card ul li::before {
        content: "";
        background-image: url("/assets/fitted_icons/check_18dp_E3E3E3_FILL0_wght400_GRAD0_opsz20.svg");
        background-size: contain;
        background-repeat: no-repeat;
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        filter: brightness(0) saturate(100%) invert(41%) sepia(73%) saturate(1265%) hue-rotate(8deg) brightness(102%) contrast(109%);
    }

    .service-section-content {
        box-sizing: border-box;
        padding: 1rem 0;
        width: 100%;
        max-width: var(--max-size);
        display: flex;
        flex-direction: row;
        justify-content: start;
        align-items: stretch;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .reversed {
        flex-direction: row-reverse;
    }

    .service-section-content img {
        max-height: 500px;
        max-width: 100%;
        height: auto;
        width: auto;
        object-fit: contain;
        border-radius: 4px;
        border: 1px solid var(--border);
    }

}

/* =================================== SERVICE SECTION =================================== */

#references{
    box-sizing: border-box;
    width: 100%;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#references h2{
    color: var(--primary-hover);
    font-size: var(--font-size-xxxl);
}

#references .img-grid{
    column-count: 4;
    column-gap: 1.5rem;
    padding: 0 2rem 4rem;
    max-width: var(--max-size);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

#references .img-grid div{
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

#references .img-grid div:hover img{
    scale: 1.2;
}

#references .img-grid img{
    height: 100%;
    width: 100%;
    border-radius: 4px;
    transition: 300ms;
    object-fit: cover;
    box-sizing: border-box;
}

.photo-item {
    margin: 0 0 1.5rem 0;
    border-radius: 2px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--surface);

    break-inside: avoid;

    /* --- ANIMATION START-ZUSTAND --- */
    opacity: 0;
    transform: translateY(40px);
    will-change: opacity, transform;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.photo-item__img {
    display: block;
    width: 100%;
    height: auto;
    transition: filter 0.3s ease;
}

.photo-item:hover .photo-item__img {
    filter: brightness(0.9); /* Subtiles Feedback */
}


.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none; /* Klicks gehen durch wenn unsichtbar */
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox__content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox__counter {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-family: monospace;
}

/* Navigation Buttons */
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 1001;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox__nav--prev {
    left: 20px;
}

.lightbox__nav--next {
    right: 20px;
}

@media (max-width: 1200px) {
    #references .img-grid {
        column-count: 3;
        padding: 0 1rem 2rem;
        box-sizing: border-box;
    }
}

@media (max-width: 800px) {
    #references .img-grid {
        column-count: 2;
        padding: 0 1rem 2rem;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {

    #references {
        padding: 2rem 1rem;
    }

    #references h2 {
        color: var(--primary-hover);
        font-size: var(--font-size-xxl);
    }

    #references .img-grid {
        column-count: 1;
        padding: 0 1rem 2rem;
        box-sizing: border-box;
    }

    #references .img-grid .photo-item {
        scroll-snap-align: center;
    }

    #references .img-grid .photo-item:hover img {
        scale: 1.0;
    }

}



/* Mobile Optimierung für Lightbox */
@media (max-width: 768px) {
    .lightbox__nav {
        display: none; /* Auf Handy wird gewischt (Swipe logic needed or simple Tap) */
    }
}