/* 2 img - 1 text  layout*/
.two-img-layout-holder{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: var(--section-padding);
}

.two-img-layout{
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5%;
    padding: 0 3em;
}

.two-img-layout .txt-holder,
.two-img-layout .img-holder{
    display: flex;
    flex-direction: column;
}
.two-img-layout .img-holder{
    width: 55%;
}
.two-img-layout .txt-holder{
    gap: 10px;
    width: 45%;
    transform: translateY(50px);
    opacity: 0;
    transition: transform .8s ease;
}
.two-img-layout .txt-holder.revealed{
    transform: translateY(0);
    opacity: 1;
}
.two-img-layout button{
    margin-top: 20px;
}

.two-img-layout .img-holder img{
    width: 65%;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
    object-position: center;
}
.two-img-layout .img-holder img:first-of-type{
    transform: translateY(12%);

}
.two-img-layout .img-holder img:last-of-type{

}


.two-img-layout img:first-of-type{
    justify-self: start;
    align-self: start;
}
.two-img-layout img:last-of-type{
    justify-self: end;
    align-self: end;
}




@media (max-width: 800px) {
    .two-img-layout-holder{
        overflow: hidden;
    }
    .two-img-layout{
        flex-direction: column;
        gap: 40px;
        padding: 0;
    }

    .two-img-layout .txt-holder,
    .two-img-layout .img-holder{
        width: 100%;
    }
    .two-img-layout .txt-holder{
        max-width: 500px;
    }

    .two-img-layout .img-holder img{
        max-width: 350px;
        width: 70%;
    }

    .two-img-layout .img-holder img:first-of-type{
        transform: translateY(12%) translateX(-15%) ;
    }
    .two-img-layout .img-holder img:last-of-type{
        transform: translateY(-12%) translateX(15%) ;
    }
}



/* 3 img - 1 text layout */
.three-img-layout-holder{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: var(--section-padding);
}

.three-img-layout{
    width: 100%;
    padding: 0 3em;
    gap: 1.2em;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, max-content);
}

.three-img-layout .img-holder{
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    transition: all .8s ease;
}
.three-img-layout .img-holder.reveal:nth-of-type(1){
    transform: translateX(-50px);
    opacity: 0;
}
.three-img-layout .img-holder.reveal:nth-of-type(2){
    transform: translateX(50px);
    opacity: 0;
}
.three-img-layout .img-holder.reveal:nth-of-type(3){
    transform: translateX(50px);
    opacity: 0;
}
.three-img-layout .img-holder.reveal.revealed{
    transform: translateX(0);
    opacity: 1;
}

.three-img-layout .img-holder:hover > img{
    transform: scale(1.05);
}
.three-img-layout .img-holder:hover > p::before{
    width: 50%;
}
.three-img-layout .img-holder p{
    position: absolute;
    bottom: 1em;
    left: 1em;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
}
.three-img-layout .img-holder p::before{
    content: '';
    width: 33%;
    height: 2px;
    background-color: var(--ac-clr);
    box-shadow: 0 0 7px var(--ac-clr);
    transition: all 1s ease;
}


.three-img-layout .img-holder img{
    width: 100%;
    height: auto;
    transition: transform 1s ease;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}
.three-img-layout .img-holder:nth-of-type(1){
    grid-column: 1/8;
    grid-row: 1/5;
}
.three-img-layout .img-holder:nth-of-type(2){
    grid-column: 8/13;
    grid-row: 1/4;
}
.three-img-layout .img-holder:nth-of-type(3){
    grid-column: 8/12;
    grid-row: 4/6;
}

.three-img-layout .txt-holder{
    grid-column: 2/8;
    grid-row: 5/13;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1em;
    transform: translateY(50px);
    opacity: 0;
    transition: all .8s ease;
}
.three-img-layout .txt-holder.revealed{
    transform: translateY(0);
    opacity: 1;
}
.three-img-layout button{
    margin-top: 20px;
}


@media (max-width: 700px) {
    .three-img-layout{
        gap: 10px;
        padding: 0;
        max-width: 500px;
    }

    .three-img-layout .img-holder p{
        bottom: 10px;
        left: 10px;
    }
    .three-img-layout .img-holder:nth-of-type(1){
        grid-column: 1/8;
        grid-row: 1/6;
    }
    .three-img-layout .img-holder:nth-of-type(2){
        grid-column: 8/13;
        grid-row: 1/3;
    }
    .three-img-layout .img-holder:nth-of-type(3){
        grid-column: 8/13;
        grid-row: 3/6;
    }

    .three-img-layout .txt-holder{
        grid-column: 1/13;
        grid-row: 6/13;
    }
}


@media (max-width: 400px){
    .three-img-layout .img-holder:nth-of-type(1){
        grid-column: 1/13;
        grid-row: 1/3;
    }
    .three-img-layout .img-holder:nth-of-type(2){
        grid-column: 1/7;
        grid-row: 3/5;
        transform: translateX(-50px) !important;
    }
    .three-img-layout .img-holder.revealed:nth-of-type(2){
        transform: translateX(0) !important;
    }
    .three-img-layout .img-holder:nth-of-type(3){
        grid-column: 7/13;
        grid-row: 3/5;
    }
}



/* 1 img - 2 text layout */
.one-img-layout-holder{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: var(--section-padding);
}
.one-img-layout{
    width: 100%;
    padding: 0 3em;
    gap: 1.2em;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, max-content);
}

.one-img-layout .txt-holder{
    grid-column: 1/8;
    grid-row: 1/2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(50px);
    opacity: 0;
    transition: all .8s ease;
}
.one-img-layout .txt-holder button {
    margin-top: 20px;
}
.one-img-layout .txt-holder.revealed{
    transform: translateY(0);
    opacity: 1;
}

.one-img-layout .img-holder{
    grid-column: 8/13;
    grid-row: 1/5;
    border-radius: var(--radius);
    overflow: hidden;
}
.one-img-layout .img-holder img{
    width: 100%;
    height: auto;
	display: block;
}

.one-img-layout .bottom-holder{
    grid-column: 2/8;
    grid-row: 4/13;
    background-color: var(--card-clr);
    padding: 1em;
    border-radius: var(--radius);
    transform: translateX(30%);
}
.one-img-layout .bottom-holder ul{
    display: flex;
    flex-direction: column;
    gap: 1em;
}
.one-img-layout .bottom-holder ul li{
    display: flex;
    align-items: center;
    gap: 10px;
}
.one-img-layout .bottom-holder ul li img{
    min-width: 40px;
    min-height: 40px;
    height: 40px;
    width: 40px;
}
.one-img-layout .bottom-holder button{
    margin-top: 20px;
}






/* FAQ layout */
.faq-layout {
    width: 100%;
    background: none;
    display: flex;
    justify-content: center;
}

.faq-layout__inner {
	padding: 50px 3em;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.faq-accordion {
    width: 100%;
    border-top: 1px solid rgba(223, 223, 223, 0.2);
}

.faq__item {
    border-bottom: 1px solid rgba(223, 223, 223, 0.2);
}

.faq__q {
    width: 100%;
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 1rem 0;
    text-align: left;
}

.faq__qtext {
    color: var(--light);
    font-family: var(--font-body);
    font-size: calc(.9rem + 0.2vw);
    line-height: 1.7;
}

.faq__icon {
    position: relative;
    width: 1.2em;
    height: 1.2em;
    color: var(--acc-clr, var(--ac-clr));
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 400;
    flex: 0 0 auto;
}

.faq__icon-plus,
.faq__icon-minus {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 220ms ease, transform 220ms ease;
}

.faq__icon-plus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.faq__icon-minus {
    opacity: 0;
    transform: scale(0.6) rotate(-90deg);
}

.faq__item.is-open .faq__icon-plus {
    opacity: 0;
    transform: scale(0.6) rotate(90deg);
}

.faq__item.is-open .faq__icon-minus {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.faq__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 320ms ease;
}

.faq__item.is-open .faq__a {
    grid-template-rows: 1fr;
}

.faq__acontent {
    overflow: hidden;
    padding-left: 2rem;
}

.faq__acontent p {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 260ms ease, transform 260ms ease;
    padding: 0 0 1rem 0;
    font-family: var(--font-body);
    font-size: calc(.9rem + 0.2vw);
    line-height: 1.7;
}

.faq__item.is-open .faq__acontent p {
    opacity: 1;
    transform: translateY(0);
}




@media (max-width: 800px) {
	.faq-layout__inner{
		padding: var(--section-padding);
		max-width: 500px;
	}
	
	
    .one-img-layout{
        display: flex;
        flex-direction: column;
        gap: 40px;
        padding: 0;
        max-width: 500px;
        margin-bottom: -300px;
    }
    .one-img-layout .img-holder{
        max-width: 350px;
        align-self: flex-end;
        transform: translateX(30%) !important;
    }
    .one-img-layout .bottom-holder{
        transform: translateY(-30%);
        width: 70%;
        min-width: 272px;
    }
}

/* === FAQ Layout appear animation (fade + rise) === */
#faq-layout,
.faq-layout {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
    will-change: opacity, transform;
}

#faq-layout.is-visible,
.faq-layout.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    #faq-layout,
    .faq-layout {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* === Dienstleistungen cards stagger reveal === */
.dienstleistungen-cards-holder .dienstleistung-card {
    transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    .dienstleistungen-cards-holder .dienstleistung-card {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* === News-Sammlung: max 2 nebeneinander + gleich große Cards === */
main .news-sammlung {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 640px) {
    main .news-sammlung {
        grid-template-columns: 1fr;
    }
}

main .news-sammlung .nav-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

main .news-sammlung .nav-card .card-img-holder {
    aspect-ratio: 16 / 9;
}

main .news-sammlung .nav-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

main .news-sammlung .nav-card .nav-card__text-row {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* === News-Excerpt: Basis-Spacing (Wortlimit serverseitig) === */
main .news-sammlung .nav-card .news-card__excerpt {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 0 1em 12px;
    color: var(--txt);
}

/* === Index: Website-Weg Background Change === */
body.home {
    transition: background-color 1500ms ease;
}

body.home.website-weg-scrolled-past {
    background-color: var(--light);
}
