/* ==========================================================
   Startseite – dynamischer Leistungsüberblick
   ========================================================== */

.home-services {
    padding: clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4rem);
}

.home-services-head {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
    max-width: 1180px;
    margin: 0 auto 2.4rem;
}

.home-services-head h2 {
    margin: 0.45rem 0 0;
    max-width: 720px;
}

.home-services-head > p {
    margin: 0;
    line-height: 1.75;
    color: var(--muted, #667085);
}

.home-services-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1180px;
    margin: 0 auto;
}

.home-service-card {
    position: relative;
    overflow: hidden;
    min-height: 245px;
    padding: clamp(1.5rem, 3vw, 2.1rem);
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(17, 24, 39, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.home-service-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary, #b71c1c);
    opacity: 0.9;
}

.home-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(17, 24, 39, 0.11);
    border-color: rgba(183, 28, 28, 0.25);
}

.home-service-card-wide {
    grid-column: span 7;
}

.home-service-card-compact {
    grid-column: span 5;
}

.home-service-card:nth-child(3) {
    grid-column: span 5;
}

.home-service-card:nth-child(4) {
    grid-column: span 7;
}

.home-service-card-accent {
    background:
        linear-gradient(135deg, rgba(183, 28, 28, 0.055), rgba(255, 255, 255, 0) 58%),
        #fff;
}

.home-service-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.home-service-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(183, 28, 28, 0.09);
    color: var(--primary, #b71c1c);
    font-size: 1.25rem;
}


.home-service-content {
    max-width: 620px;
    margin-top: 2.2rem;
}

.home-service-content h3 {
    margin: 0 0 0.7rem;
    color: var(--dark, #1f2937);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.home-service-content p {
    margin: 0;
    line-height: 1.72;
    color: var(--muted, #667085);
}

.home-services-footer {
    max-width: 1180px;
    margin: 2rem auto 0;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.home-services-footer p {
    margin: 0;
    max-width: 690px;
    color: var(--muted, #667085);
    line-height: 1.7;
}

.home-services-footer .button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

@media (max-width: 900px) {
    .home-services-head {
        grid-template-columns: 1fr;
        gap: 1rem;
        align-items: start;
    }

    .home-service-card-wide,
    .home-service-card-compact,
    .home-service-card:nth-child(3),
    .home-service-card:nth-child(4) {
        grid-column: span 6;
    }

    .home-service-card {
        min-height: 235px;
    }

    .home-services-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .home-services {
        padding: 3.2rem 1rem;
    }

    .home-services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .home-service-card-wide,
    .home-service-card-compact,
    .home-service-card:nth-child(3),
    .home-service-card:nth-child(4) {
        grid-column: 1;
    }

    .home-service-card {
        min-height: auto;
        padding: 1.35rem;
        border-radius: 18px;
    }

    .home-service-content {
        margin-top: 1.65rem;
    }

    .home-service-number {
        font-size: 2.7rem;
    }

    .home-services-footer {
        margin-top: 1.5rem;
        gap: 1.25rem;
    }

    .home-services-footer .button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-service-card {
        transition: none;
    }

    .home-service-card:hover {
        transform: none;
    }
}
