/* ==========================================================================
   CASES
   ========================================================================== */

.cases__section .wp-block-group__inner-container {
    max-width: 1000px;
    margin-right: auto;
    margin-left: auto;
}

.cases__grid {
    gap: 40px;
}


/* ==========================================================================
   GENERATEPRESS / GUTENBERG RESETS
   ========================================================================== */

.site-main .cases__section > .wp-block-group__inner-container,
.site-main .cases__item > .wp-block-group__inner-container {
    padding: 0;
}

.site-main .cases__area > .wp-block-group__inner-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.site-main .cases__area .wp-block-group__inner-container {
    padding: 0;
}


/* ==========================================================================
   CASE-KACHEL
   ========================================================================== */

.cases__item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 6 / 5;
}

.cases__item > .wp-block-group__inner-container {
    position: relative;
    width: 100%;
    height: 100%;
}


/* Bild */

.cases__item figure {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.cases__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cases__item:hover img {
    transform: scale(1.04);
}


/* ==========================================================================
   OVERLAY UND KREIS
   ========================================================================== */

.cases__overlay {
    /* Dieselben Werte steuern Kreis und Titelposition. */
    --circle-size: 70.2%;
    --circle-right: -8.1%;
    --circle-bottom: -21.3%;

    position: absolute;
    inset: 0;
    z-index: 2;
    isolation: isolate;

    opacity: 0;
    transition: opacity 0.35s ease;
}

.cases__item:hover .cases__overlay {
    opacity: 1;
}

/* Kreis */
.cases__overlay::before {
    content: "";
    position: absolute;
    right: var(--circle-right);
    bottom: var(--circle-bottom);
    z-index: -1;

    width: var(--circle-size);
    aspect-ratio: 1 / 1;

    background: var(--color-hover);
    border-radius: 50%;
    opacity: 0.9;
}

/* Container liegt exakt über dem Kreis und zentriert den Titel nur vertikal. */
.site-main .cases__area .cases__overlay > .wp-block-group__inner-container {
    position: absolute;
    right: var(--circle-right);
    bottom: var(--circle-bottom);

    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: var(--circle-size);
    aspect-ratio: 1 / 1;
    padding: 0;
    text-align: left;
}

.cases__title {
    width: 80%;
    margin: 0;
    padding: 12%;

    color: var(--color-red);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Beschreibungstext vollständig ausblenden. */
.cases__text {
    display: none;
}

/* Bei Kacheln ohne Link keinen Link-Cursor anzeigen. */
.cases__no-link,
.cases__no-link * {
    cursor: default !important;
}


/* ==========================================================================
   UNSICHTBARER LINK ÜBER DER GESAMTEN KACHEL
   ========================================================================== */

.cases__item > .wp-block-group__inner-container > .wp-block-buttons {
    position: absolute;
    inset: 0;
    z-index: 10;
    margin: 0 !important;
    padding: 0 !important;
}

.cases__link {
    width: 100%;
    height: 100%;
    margin: 0 !important;
}

.cases__link .wp-block-button__link {
    position: absolute !important;
    inset: 0;

    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* ==========================================================================
   CASES AREA
   ========================================================================== */

.cases__area {
    position: relative;
    width: 100%;
    padding: 75px 0 0;
    background: #fff;
}

.cases__area > .wp-block-group__inner-container {
    width: 100%;
    max-width: none;
    padding: 0;
}


/* ==========================================================================
   SECTION LABEL
   ========================================================================== */

/* Desktop ab 1500 px: links neben dem Inhalt. */
.section-label {
    display: flex;
    align-items: center;
    width: calc((100vw - 1280px) / 2 - 37px);
    margin-bottom: -17px;
}

.site-main .section-label > .wp-block-group__inner-container {
    display: flex;
    align-items: center;
    gap: 25px;

    width: 100%;
    max-width: none;
    padding: 0;
}

.section-label > .wp-block-group__inner-container::before {
    content: "";
    display: block;
    flex: 1;
    height: 1px;
    background: var(--color-red);
}

.section-label p {
    margin: 0;

    color: var(--color-red);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ==========================================================================
   RESPONSIVE: UNTER 1500 PX
   ========================================================================== */

@media (max-width: 1499px) {
    .section-label {
        width: calc((100vw - 1280px) / 2 + 64px);
        margin-bottom: 30px;
    }
}


/* ==========================================================================
   RESPONSIVE: KLEINER DESKTOP / LAPTOP
   ========================================================================== */

@media (max-width: 1200px) {
    .cases__overlay {
        --circle-size: 78%;
        --circle-right: -10%;
        --circle-bottom: -23%;
    }
}


/* ==========================================================================
   RESPONSIVE: TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .cases__grid {
        gap: 30px;
    }

    .cases__title {
        font-size: 26px;
    }
}


/* ==========================================================================
   RESPONSIVE: MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .cases__area {
        padding: 75px 25px 0;
    }

    .cases__grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .cases__overlay {
        --circle-size: 90%;
        --circle-right: -18%;
        --circle-bottom: -24%;
    }

    .cases__title {
        padding: 15%;
        font-size: 22px;
    }

    .site-main .section-label > .wp-block-group__inner-container {
        gap: 0;
    }
}


/* ==========================================================================
   TOUCH-GERÄTE
   Overlay sichtbar machen, wenn kein echtes Hover verfügbar ist.
   ========================================================================== */

/*@media (hover: none) {
    .cases__overlay {
        opacity: 1;
    }
}*/
