#about, #leistungen, #zielgruppe, #quote, #search, #team, #kontakt, #referenzen {
    padding: 6rem var(--content-padding-right) 0 var(--content-padding);
    display: grid;
    grid-template-columns: repeat(1, 1fr);
}
#quote, #search {
    padding: 2rem 0 2rem 0;
    margin-top: 6rem;
    margin-right: var(--content-padding-right);
    margin-left: var(--content-padding);
}
h2 {
    margin-bottom: 2rem;
}

#about div:nth-child(1) p, #zielgruppe > div:nth-child(1) p:first-of-type, #kontakt > div:nth-child(1) p, #leistungen div:first-child p, #referenzen >div:first-child p, #team > div:first-child p:first-of-type  {
    font-family: var(--font-family-headline);
    letter-spacing: var(--letter-spacing);
    font-size: var(--font-size-small);
}
#about div:nth-child(2) p, #zielgruppe div:nth-child(2) p, #kontakt div:nth-child(2) p {
    margin-bottom: 0.6rem;
    margin-top: 0;
}
#about div:nth-child(2) p:last-of-type {
    margin-bottom: 1.6rem;
}
#leistungen > div:first-child, #referenzen > div:first-child, #team > div:first-child {
    max-width: 1000px;
}

#leistungen > div:last-child span , #team > div:last-child > div > span {
    display: block;
    width: 100%;
    padding-bottom: 66%;
    position: relative;
    margin-bottom: 1rem;
    background: rgb(179, 188, 224);
}
#leistungen > div:last-child span img, #team > div:last-child > div > span img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    object-fit: cover;
    height: 100%;
}

h3 {
    margin-bottom: 0.6rem;
    font-size: var(--font-size);
    letter-spacing: 0.04em;
    font-family: var(--font-family-headline);
    line-height: 120%;
}
#leistungen > div:last-child ul {
    margin-top: 0;
    margin-left: 1.3rem;
    margin-bottom: 2.4rem;
}
#leistungen > div:last-child > div:last-child ul {
    margin-bottom: 0;
}
#leistungen > div:last-child li {
    margin-bottom: 0.4rem;
    line-height: 160%;
    font-size: var(--font-size);
}
#zielgruppe svg, #kontakt svg {
    width: 1.6rem;
    height: auto;
    margin-bottom: 0.8rem;
}
#zielgruppe .gridbox, #kontakt .gridbox {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}
#zielgruppe .btn {
    margin-top: 2rem;
}
.listbox > div {
    margin-top: 2rem;
    max-width: 890px;
    /* background: var(--color-gray);
    padding: 1rem 1rem 0.8rem;
    border-radius: 0.2rem; */
}
.listbox > div:first-child {
    margin-top: 3rem;
}
#zielgruppe {
    align-items: flex-start;
}


#quote {
    background-image: url('assets/images/batteriespeicher-mobile.webp');
    background-size: cover;
    background-repeat: no-repeat;
    padding: 10rem 1rem 2rem 1.5rem;
    background-position: center left;
}
#search {
    background-image: url('assets/images/flaeche-mobile.webp');
    background-size: cover;
    background-repeat: no-repeat;
    padding: 10rem 1rem 2rem 1.5rem;
    background-position: center left;
}
blockquote, .text-content {
    margin-left: auto;
}
    
blockquote p {
    font-size: var(--font-size-h2);
    font-family: var(--font-family-headline);
    letter-spacing: var(--letter-spacing);
    line-height: 120%;
    color: var(--color-white);
    text-indent: -0.5em;
}
blockquote footer {
    font-size: var(--font-size-small);
    font-family: var(--font-family-headline);
    color: var(--color-white);
    letter-spacing: var(--letter-spacing);
    margin-top: 1rem;
}
blockquote > *, .text-content > * {
    max-width: 400px;
}
#search {
    position: relative;
    padding: 15rem 1rem 2rem 1.5rem;
}
#search .text-content * {
    color: var(--color-white);
}
#search .text-content p:first-of-type {
    margin-bottom: 1rem;
}
#search .text-content h3 {
    margin-top: 2rem;
}
#search .text-content ul {
    margin-left: 1.4rem;
}
#search .text-content ul li {
    font-size: var(--font-size);
    line-height: 160%;
}
#search .text-content a {
    border-color: var(--color-white);
    margin-top: 2rem;
    background-color: var(--color-white);
    color: var(--color-blue);
}
.stoerer {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 140px;
    height: auto;
}
#team h2 {
    margin-bottom: 1rem;
}
#team h3 span {
    display: block;
    font-size: var(--font-size-small);
    font-family: var(--font-family);
    font-weight: 400;
    margin-bottom: 0.2rem;
}
#team h3 {
    margin-bottom: 1rem;
}
#team > div:last-child {
    margin-top: 2rem;
}
#kontakt h3 {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
#kontakt h3 svg {
    margin-bottom: 0;
    margin-right: 0.4rem;
}
#kontakt a, #kontakt address {
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-style: normal;
    margin-bottom: 0.4rem;
    display: inline-block;
    transform: translateX(0);
    transition: 0.2s ease-in-out all;
}
#kontakt a:hover{
    transform: translateX(0.6rem);
}
#team > div:last-child > div p:last-child {
    margin-bottom: 2rem;
    margin-top: 1rem;
}
.page-footer {
    background: #EAEFF3;
    padding: 3rem var(--content-padding-right) 3rem var(--content-padding);
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    margin-top: 6rem;
    align-items: flex-end;
}
.page-footer a {
    margin: 0.4rem 0.8rem 0 0;
}
.page-footer a:last-of-type {
    margin: 0.4rem 0 0 0;
}
.page-footer div:first-child {
    display: flex;
    flex-direction: column;
}
.page-footer div:first-child span {
    margin-top: 3rem;
}
.footer-logo {
    width: 200px;
}
.tab-buttons {
    display: none;
}
div[role=tabpanel] {
    margin-bottom: 3rem;
}
div[role=tabpanel] > span {
    margin-bottom: 1rem;
    padding-left: 1rem;
    display: block;
    position: relative;
}
div[role=tabpanel] > span:before {
    content: "";
    border-left: 3px solid var(--color-blue);
    position: absolute;
    left: 0;
    top: 0.1rem;
    bottom: 0.4rem;
}
.img-container {
    position: relative;
    padding-bottom: 50%;
    display: block;
}
.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}
div[role=tabpanel] ul {
    list-style: none;
    margin-top: 2rem;
}
div[role=tabpanel] span {
    font-size: 0.8rem;
    font-family: var(--font-family-headline);
    display: block;
    line-height: 130%;
}
div[role=tabpanel] li {
    margin-bottom: 1rem;
    -webkit-column-break-inside: avoid; 
    page-break-inside: avoid;
    break-inside: avoid;
}
div[role=tabpanel] p, div[role=tabpanel] li {
    font-size: var(--font-size);
    line-height: 160%;
    font-family: var(--font-family);
}
button {
    cursor: pointer;
    transition: 0.2s ease-in-out all;
}
#about.smallprint h1 {
    font-size: var(--font-size-h2) !important;
    margin-top: 3rem;
    margin-bottom: 3rem;
}
#about.smallprint h2 {
    font-size: var(--font-size-large) !important;
}
#about.smallprint h2:not(:first-of-type) {
    margin-top: 3.4rem;
}
#about.smallprint h3:not(:first-of-type) {
    margin-top: 2rem;
}
#about.smallprint ul {
    margin-left: 1.4rem;
    margin-bottom: 1.4rem;
}
.smallprint li {
    font-size: var(--font-size);
    margin-bottom: 0.2rem;
}
.smallprint a {
    font-size: var(--font-size);
    font-family: var(--font-family);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}
@media screen and (min-width: 700px) {
    div[role=tabpanel] ul {
        columns: 2;
        column-gap: 2rem;
    }
    #quote {
        background-image: url('assets/images/batteriespeicher-tablet.webp');
    }
    #search {
        background-image: url('assets/images/flaeche-tablet.webp');
    }
}
@media screen and (min-width: 900px) {
    #quote, #search {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 6.2rem 2rem 6rem 1rem;
    }
    .page-footer {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .page-footer div:last-child{
        text-align: right;
    }
    blockquote, .text-content {
        grid-column: 2 / span 1;
        margin-left: 0;
    }
    blockquote > *, .text-content > * {
        max-width: 470px;
    }
    #about, #leistungen, #zielgruppe, #team, #kontakt, #referenzen {
        padding-top: 8rem;
    }
    #quote, #search, .page-footer {
        margin-top: 8rem;
    }
    #leistungen > div:last-child, #team > div:last-child {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }
     #leistungen > div:last-child > div, #team > div:last-child > div {
        grid-column: span 4;
    }
    #leistungen > div:last-child ul {
        margin-left: 1.4rem;
    }
    #zielgruppe .gridbox, #kontakt .gridbox {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 3rem;
    }
    #team > div:last-child > div p:last-child {
        margin-bottom: 0;
        margin-top: 1rem;
    }
    .listbox > div {
        margin-top: 3rem;
        /* padding: 2rem 2rem 1.8rem; */
    }
}


@media screen and (min-width: 1024px) {
    #leistungen, #zielgruppe, #team, #kontakt, #referenzen {
        padding-top: 5rem;
        margin-top: 5rem;
    }
    #quote, #search {
        margin-top: 10rem;
        padding: 9.2rem 2rem 9rem;
    }
    #search {
        padding: 6.2rem 2rem 6rem;
    }
    .stoerer {
        top: 2rem;
        left: 2rem;
        width: 180px;
    }
    #quote {
        background-image: url('assets/images/batteriespeicher.webp');
    }
    #search {
        background-image: url('assets/images/flaeche.webp');
    }
    .page-footer {
        margin-top: 10rem;
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
    #leistungen > div:last-child span, #team > div:last-child > div > span {
        margin-bottom: 1.4rem;
    }
    
    #about, #zielgruppe, #kontakt {
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
    }

    #about div:nth-child(2), #zielgruppe > div:nth-child(2), #kontakt > div:nth-child(2) {
        grid-column: 6 / span 7;
    }
    #about div:nth-child(1), #zielgruppe > div:nth-child(1), #kontakt > div:nth-child(1) {
        grid-column: 1 / span 5;
    }
    span.mobile-only {
        display: none;
    }
    .tab-buttons {
        display: block;
    }
    .tab-wrapper {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 2rem;
        align-items: flex-start;
        scroll-margin-top: 2rem;
    }
    .tab-wrapper > div:last-child {
        grid-column: 6 / span 7;
    }
    .tab-wrapper > div:first-child {
        grid-column: 1 / span 5;
    }
    .tab-wrapper > div:last-child .mobile-only {
        display: none;
    }
    div[role=tabpanel] {
        margin-bottom: 2rem;
    }
    
    div[role=tabpanel] ul {
        columns: 1;
    }
    button[role=tab] {
        text-align: left;
        padding-left: 1rem;
        position: relative;
        margin-bottom: 1.4rem;
        font-size: var(--font-size);
        letter-spacing: 0;
        width: 100%;
    }
    .tab-buttons button:nth-child(1) { animation-delay: 0.1s; }
    .tab-buttons button:nth-child(2) { animation-delay: 0.2s; }
    .tab-buttons button:nth-child(3) { animation-delay: 0.3s; }
    .tab-buttons button:nth-child(4) { animation-delay: 0.4s; }
    .tab-buttons button:nth-child(5) { animation-delay: 0.5s; }
    .tab-buttons button:nth-child(6) { animation-delay: 0.6s; }

    button[role=tab]:before {
        position: absolute;
        top: 0.2rem;
        bottom: 0.4rem;
        left: 0;
        content: "";
        border-left: 3px solid var(--color-blue);
    }
    button[role=tab] span:last-child {
        font-family: var(--font-family);
        display: block;
        margin-top: 0.4rem;
    }
    .tab-buttons {
        position: relative;
        top: 2rem;
    }
    .tab-buttons button[aria-selected="false"] {
        opacity: 0.6;
    }
    .tab-buttons button[aria-selected="false"]:before {
        opacity: 0;
        transition: 0.2s ease-in-out all;
    }
    .tab-buttons button[aria-selected="false"]:hover {
        opacity: 1;
    }
    .tab-buttons button[aria-selected="false"]:hover:before {
        border-color: var(--color-blue);
        opacity: 1;
    }
    .tab-panels {
        flex: 1;
        min-height: 300px;
        position: relative;
    }
    .tab-panels [role="tabpanel"] {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        min-height: 200px;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.7s ease;
        pointer-events: none;
    }
    .tab-panels [role="tabpanel"] {
        opacity: 0;
    }
    .tab-panels [role="tabpanel"]:not([aria-hidden="true"]) {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
        transition: opacity 0.3s ease, transform 0.7s ease;
        transition-delay: 0.3s;
    }
    #about.smallprint h1 {
        margin-top: -0.4rem;
    }
    #zielgruppe > div:first-child{
        position: sticky;
        top: 8rem;
    }
    .listbox > div:first-child {
        margin-top: 0;
    }
}
@media screen and (min-height: 500px) and (min-width: 1024px) {
    .tab-buttons {
        position: sticky;
    }
}
@media screen and (min-width: 1200px) {
    #leistungen, #zielgruppe, #team, #kontakt, #referenzen {
        padding-top: 5rem;
        margin-top: 7rem;
    }
    #quote, #search, .page-footer {
        margin-top: 12rem;
    }
    .footer-logo {
        width: 240px;
    }
    #leistungen > div:last-child, #team > div:last-child {
        gap: 3rem;
    }
    #about div:nth-child(1) {
        grid-column: 1 / span 4;
    }
    
    #quote{
        padding: 10.2rem 4rem 10rem;
    }
    #search {
        padding: 6.2rem 4rem 6rem;
    }
    .stoerer {
        top: 4rem;
        left: 4rem;
        width: 220px;
    }
    blockquote > *, .text-content > * {
        max-width: 570px;
    }
    #team > div:last-child > div p:last-child {
        margin-bottom: 2rem;
        margin-top: 1rem;
    }
    button[role=tab] {
        max-width: 80%;
    }
    div[role=tabpanel] ul {
        columns: 2;
    }
}
@media screen and (min-width: 1920px) {
    #leistungen, #zielgruppe, #team, #kontakt, #referenzen {
        padding-top: 5rem;
        margin-top: 9rem;
    }
    #quote, #search, .page-footer {
        margin-top: 14rem;
    }
    #about div:nth-child(1) {
        grid-column: 1 / span 5;
    }
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.no-js .fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Delays für gestaffelte Animationen - funktionieren jetzt korrekt */
@media screen and (min-height: 500px) and (min-width: 1024px) {
    .fade-in-delay-1.visible { 
        transition-delay: 0.1s !important; 
    }
    .fade-in-delay-2.visible { 
        transition-delay: 0.2s !important; 
    }
    .fade-in-delay-3.visible { 
        transition-delay: 0.3s !important; 
    }
    .fade-in-delay-4.visible { 
        transition-delay: 0.4s !important; 
    }
    .fade-in-delay-5.visible { 
        transition-delay: 0.5s !important; 
    }
}