/* Beratungstermin Button - Basisstil */
.service-box a[data-modal-target="kontaktModal"] {
    display: inline-block;
    background-color: #1565c0;
    color: white;
    padding: 12px 20px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-sizing: border-box;
    width: auto;
}

.service-box a[data-modal-target="kontaktModal"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #c62828;
    transition: all 0.4s cubic-bezier(0.42, 0, 0.58, 1);
    z-index: -1;
}

.service-box a[data-modal-target="kontaktModal"]:hover {
    color: white;
    border-color: #c62828;
    box-shadow: 0 6px 15px rgba(198, 40, 40, 0.3);
    transform: translateY(-3px);
}

.service-box a[data-modal-target="kontaktModal"]:hover::before {
    width: 100%;
}

/* Verbesserte Service-Box für Button-Positionierung */
.service-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ===== BREAKPOINTS FÜR ALLE BILDSCHIRMGRÖSSEN ===== */

/* Extra große Bildschirme */
@media (min-width: 1601px) {
    .service-box a[data-modal-target="kontaktModal"] {
        padding: 15px 25px;
        font-size: 18px;
        width: auto;
        margin-top: 15px;
    }
}

/* Große Bildschirme */
@media (min-width: 1201px) and (max-width: 1600px) {
    .service-box a[data-modal-target="kontaktModal"] {
        padding: 14px 22px;
        font-size: 17px;
        width: auto;
        margin-top: 15px;
    }
}

/* NEUER BEREICH: Mittlere große Desktops (1050px-1200px) */
@media (min-width: 1051px) and (max-width: 1200px) {
    .service-box a[data-modal-target="kontaktModal"] {
        padding: 12px 20px;
        font-size: 16px;
        width: auto;
        margin-top: 15px;
    }
}

/* NEUER BEREICH: Problematischer Bereich (992px-1050px) */
@media (min-width: 992px) and (max-width: 1050px) {
    .service-box a[data-modal-target="kontaktModal"] {
        display: block;
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 0;
    }
}

/* Tablets und kleine Desktops (841px-991px) */
@media (min-width: 841px) and (max-width: 991px) {
    .service-box {
        position: relative;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        position: static;
        display: block;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 0;
        padding: 12px 18px;
        font-size: 15px;
        background-color: #1565c0;
    }
}

/* Übergangsbereich (831px-840px) */
@media (min-width: 831px) and (max-width: 840px) {
    .service-box a[data-modal-target="kontaktModal"] {
        position: static;
        display: block;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 0;
        padding: 12px 15px;
        font-size: 15px;
    }
}

/* Kritischer Übergangsbereich (825px-830px) */
@media (min-width: 825px) and (max-width: 830px) {
    .service-box {
        padding-bottom: 0;
        margin-bottom: 15px;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        position: static;
        display: block;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 0;
        padding: 12px 15px;
        font-size: 15px;
        z-index: 2;
    }
}

/* Mittlere Zwischengröße (775px-824px) */
@media (min-width: 775px) and (max-width: 824px) {
    .service-box {
        padding-bottom: 50px;
        margin-bottom: 15px;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        font-size: 15px;
        z-index: 2;
        background-color: #c62828;
    }
}

/* Tablets/große Mobilgeräte */
@media (min-width: 768px) and (max-width: 774px) {
    .service-box {
        padding-bottom: 50px;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        font-size: 15px;
        z-index: 2;
        background-color: #c62828;
    }
}

/* Mobilgeräte (allgemein) */
@media (max-width: 767px) {
    .service-box {
        padding-bottom: 50px;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
        text-align: center;
        border-radius: 6px;
        z-index: 2;
        background-color: #c62828;
        font-weight: 700;
        box-shadow: 0 0 12px rgba(198, 40, 40, 0.5);
    }

    .service-box a[data-modal-target="kontaktModal"]::after {
        content: " »";
        font-size: 18px;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .service-box {
        padding-bottom: 45px;
    }

    .service-box a[data-modal-target="kontaktModal"] {
        font-size: 15px;
        padding: 10px;
    }
}

/*Scrollbutton der an den Anfang führt*/
/*Scrollbutton der an den Anfang führt*/
.scroll-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #61a7ee;
    /* Dunklere Farbe passend zum Footer */
    color: white;
    text-align: center;
    font-size: 28px;
    line-height: 52px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    transform-origin: center center;
    will-change: transform, opacity;
}

.scroll-to-top.visible {
    display: block;
    opacity: 0.95;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    background-color: #1565c0;
    /* Blauton, der zu Ihrer Seite passt */
    box-shadow: 0 10px 15px rgba(21, 101, 192, 0.25);
    border-color: #ffffff;
}

.scroll-to-top:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* ===== RESPONSIVITÄT WIE CONTAINER 1 ===== */

/* Sehr große Bildschirme (4K und größer) */
@media (min-width: 1920px) {
    .scroll-to-top {
        width: 70px;
        height: 70px;
        font-size: 36px;
        line-height: 64px;
        bottom: 40px;
        right: 40px;
        border-width: 3px;
    }
}

/* Größere Bildschirme (größere Desktops) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .scroll-to-top {
        width: 65px;
        height: 65px;
        font-size: 32px;
        line-height: 60px;
        bottom: 35px;
        right: 35px;
    }
}

/* Mittlere Bildschirme (Laptops, Desktops) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .scroll-to-top {
        width: 60px;
        height: 60px;
        font-size: 30px;
        line-height: 56px;
        bottom: 30px;
        right: 30px;
    }
}

/* Tablets und kleinere Laptops */
@media (min-width: 992px) and (max-width: 1199px) {
    .scroll-to-top {
        width: 55px;
        height: 55px;
        font-size: 28px;
        line-height: 51px;
    }
}

/* Tablets und große Mobilgeräte */
@media (min-width: 768px) and (max-width: 991px) {
    .scroll-to-top {
        width: 50px;
        height: 50px;
        font-size: 26px;
        line-height: 47px;
        bottom: 25px;
        right: 25px;
    }
}

/* Mobilgeräte (allgemein) */
@media (max-width: 767px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 24px;
        line-height: 42px;
        bottom: 20px;
        right: 20px;
        border-width: 1.5px;
    }
}

/* Kritischer Bereich (bestimmte Tablets und Mobilgeräte) */
@media (min-width: 768px) and (max-width: 830px) {
    .scroll-to-top {
        bottom: 22px;
        right: 22px;
    }
}

/* Kleine Mobilgeräte */
@media (max-width: 480px) {
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 22px;
        line-height: 38px;
        bottom: 15px;
        right: 15px;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 320px) {
    .scroll-to-top {
        width: 35px;
        height: 35px;
        font-size: 18px;
        line-height: 33px;
        bottom: 12px;
        right: 12px;
    }
}

/* Spezielle Animation für den Scroll-Button */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(21, 101, 192, 0.7);
        /* Blau statt Türkis */
    }

    70% {
        box-shadow: 0 0 0 10px rgba(21, 101, 192, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(21, 101, 192, 0);
    }
}

.scroll-to-top.visible {
    animation: pulse-glow 2s infinite;
}

/* CSS-Animationen --> */

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 5px 20px rgba(21, 101, 192, 0.5);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(-70%);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 20px rgba(21, 101, 192, 0.4);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(-60%);
    }

    50% {
        transform: translateY(-40%);
    }

    100% {
        transform: translateY(-60%);
    }
}