/* Override für Services-Bereich - Optimierte Version */

/* Hauptbereich Services */
.services {
    position: relative;
    padding: 4.5rem 0;
    background: linear-gradient(180deg, var(--primary-color) 0%, #ffffff 100%) !important;
    transition: padding 0.3s ease-in-out;
    z-index: 1;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
    width: 100%;
    box-sizing: border-box;
}

/* Entfernung aller möglichen Pseudo-Elemente, die Verläufe erzeugen könnten */
.services::before,
.services::after {
    display: none !important;
}

/* Typo auf dunklem Hintergrund */
.services h2,
.services h3,
.services .card-title {
    color: rgba(255, 255, 255, 0.92) !important;
}

.services p,
.services .card-text {
    color: rgba(255, 255, 255, 0.74) !important;
}

/* Services Grid Layout Fix */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Service Card Container Fix */
.service-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Einheitliche Farbe für Icons */
.services .card-icon {
    background: rgba(239, 157, 46, 0.95) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
}

/* Entfernung aller Pseudo-Elemente bei Icons */
.services .card-icon::before,
.services .card-icon::after {
    display: none !important;
}

/* Buttons mit einheitlicher Farbe und Hover-Animation */
.services .btn-primary {
    background-color: var(--primary-color) !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.98) !important;
    transition: all 0.3s ease !important;
}

.services .btn-primary:focus,
.services .btn-primary:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Hover-Effekt für Buttons wiederherstellen */
.services .btn-primary:hover {
    background-color: var(--dark-color) !important;
    border-color: var(--dark-color) !important;
    color: rgba(255, 255, 255, 0.98) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35) !important;
}

/* Einheitliche Farbe für Titelunterstriche */
.services .card-title::after {
    background: #ef9d2e !important;
}

/* Card Styles Fix */
.services .card {
    height: 100%;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(6px);
}

.services .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
    border-color: rgba(239, 157, 46, 0.35) !important;
}

/* Full-width Card: Hintergrundbild in Original-Helligkeit */
.services .service-card-full .card-image-bg {
    opacity: 1 !important;
}

.services .service-card-full .card-body {
    background: transparent !important;
}

/* Card Video/Image Background Fix */
/* Card der mittleren, quadratischen Services als Clip-Container */
.service-card-square .card {
    position: relative;
    overflow: hidden;
}

/* Video vollflächig und zentriert im Card-Bereich anzeigen */
.card-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Responsive Anpassungen */
@media (max-width: 991.98px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card-full {
        grid-column: 1 / -1;
    }
    
    .service-card-square {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

@media (max-width: 991px) {
    .services .card {
        box-shadow: none !important;
        transform: none !important;
    }

    .services .card:hover {
        box-shadow: none !important;
        transform: none !important;
        border-color: rgba(255, 255, 255, 0.10) !important;
    }

    .services .btn-primary,
    .services .btn-primary:hover {
        background-color: var(--primary-color) !important;
        border-color: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.98) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .services .card-icon,
    .services .card:hover .card-icon {
        transform: none !important;
        box-shadow: none !important;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 3rem 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .service-card-square {
        aspect-ratio: auto;
        min-height: 250px;
    }
    
    .services .card-body {
        padding: 1.5rem;
    }

    .services .card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .service-card .card-body {
        background: rgba(8, 22, 39, 0.78) !important;
    }

    .service-card-full .card-body {
        background: rgba(8, 22, 39, 0.78) !important;
    }
    
    .services .card-title {
        font-size: 1.5rem;
        min-height: auto;
    }
}
