/* Content block styles */
.thch-content {
    padding: 6rem 0;
    overflow-x: clip;
}

/* === Background variants === */
.thch-content--bg-white   { background: #fff; }
.thch-content--bg-neutral { background: var(--thch-color-neutral, #EAECF0); }
.thch-content--bg-beige      { background: #DDD9CE; }
.thch-content--bg-warm-beige { background: #BDB9A7; }
.thch-content--bg-dark    { background: var(--thch-color-primary, #1D245D); }

/* === Grid layout (CSS Grid — prevents overlap) === */
.thch-content__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--thch-space-6xl);
    align-items: center;
}

/* Image side placement */
.thch-content--image-left .thch-content__media  { grid-column: 1; grid-row: 1; }
.thch-content--image-left .thch-content__text   { grid-column: 2; grid-row: 1; }
.thch-content--image-right .thch-content__media { grid-column: 2; grid-row: 1; }
.thch-content--image-right .thch-content__text  { grid-column: 1; grid-row: 1; }

/* === Image width variants === */
/* Narrow: image gets exact 33%, text gets remaining space (gap comes out of text side) */
.thch-content--img-narrow .thch-content__grid { grid-template-columns: 33.333% 1fr; }
.thch-content--img-default .thch-content__grid { grid-template-columns: 1fr 1fr; }
.thch-content--img-wide .thch-content__grid { grid-template-columns: 60% 1fr; }
/* Flip ratios for image-right */
.thch-content--image-right.thch-content--img-narrow .thch-content__grid { grid-template-columns: 1fr 33.333%; }
.thch-content--image-right.thch-content--img-wide .thch-content__grid { grid-template-columns: 1fr 60%; }

/* === Media column === */
.thch-content__media {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
}

/* Dark overlay on image */
.thch-content__image-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

/* Overlay — center (default) */
.thch-content__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 60%;
    max-height: 40%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}

/* Column mode — logo stacked above image */
.thch-content--media-column .thch-content__media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow: visible;
}

.thch-content__logo {
    max-width: 60%;
    height: auto;
    object-fit: contain;
}

.thch-content__img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 1.25rem;
    object-fit: cover;
}
.thch-content__video {
    width: 100%;
    display: block;
    border-radius: 1.25rem;
}

/* Video wrapper — reuses thch-hero__video for shared play logic */
.thch-content__video-wrap {
    position: relative;
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
}
.thch-content__video-wrap .thch-content__video {
    border-radius: 0;
}
.thch-content__video-wrap:not(.is-playing) { cursor: pointer; }
.thch-content__video-wrap.is-playing { cursor: default; }
.thch-content__video-wrap.is-playing .thch-hero__play { display: none; }

/* Play button — self-contained, no dependency on hero block CSS */
.thch-content__video-wrap .thch-hero__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}
.thch-content__video-wrap .thch-hero__play:hover { background: rgba(255, 255, 255, 0.35); }

/* === Contain mode — preserve original image proportions === */
.thch-content--img-contain .thch-content__media {
    display: flex;
    align-items: center;
    justify-content: center;
}
.thch-content.thch-content--img-contain .thch-content__img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    flex: none;
    min-height: 0;
}

/* === Full bleed — image extends to viewport edge === */
.thch-content--image-left[class*="thch-content--bleed"] .thch-content__media {
    margin-left: calc(-1 * max(0px, (100vw - var(--thch-container-width)) / 2 + var(--thch-gutter)));
    border-radius: 0 1.25rem 1.25rem 0;
}
.thch-content--image-right[class*="thch-content--bleed"] .thch-content__media {
    margin-right: calc(-1 * max(0px, (100vw - var(--thch-container-width)) / 2 + var(--thch-gutter)));
    border-radius: 1.25rem 0 0 1.25rem;
}
.thch-content--bleed-both .thch-content__media {
    border-radius: 1.25rem;
}
[class*="thch-content--bleed"] .thch-content__img,
[class*="thch-content--bleed"] .thch-content__video,
[class*="thch-content--bleed"] .thch-content__video-wrap {
    min-height: 28rem;
    border-radius: inherit;
}

/* === Full-width grid: break out of container for bleed-both === */
.thch-content--bleed-both .thch-content__grid {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    gap: 0;
}
/* Remove bleed negative margins — the grid itself is already full-width */
.thch-content--bleed-both .thch-content__media {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 1.25rem;
}
.thch-content--bleed-both .thch-content__text {
    max-width: 28.75rem;
    margin-inline: auto;
    padding: var(--thch-space-4xl);
    box-sizing: content-box;
}

/* === Full height + bleed — image breaks to viewport edge === */
.thch-content--full-height[class*="thch-content--bleed"] .thch-content__grid {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    gap: 0;
}
.thch-content.thch-content--full-height[class*="thch-content--bleed"] {
    padding: 0;
}
.thch-content--full-height[class*="thch-content--bleed"] .thch-content__text {
    max-width: 28.75rem;
    margin-inline: auto;
    padding: var(--thch-space-4xl);
    box-sizing: content-box;
}

/* === Full height (no bleed) — image stretches vertically within container === */
.thch-content--full-height .thch-content__grid {
    align-items: stretch;
}
.thch-content--full-height .thch-content__media {
    border-radius: 1.25rem;
    display: flex;
}
.thch-content--full-height .thch-content__img {
    flex: 1;
    width: 100%;
    min-height: 24rem;
    border-radius: 1.25rem;
    object-fit: cover;
}
.thch-content--full-height .thch-content__text {
    align-self: center;
}

/* === Text column === */
.thch-content__text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}

.thch-content__heading-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thch-content__text .thch-btn { margin-top: 1.75rem; /* 1.25rem gap + 1.75rem = 3rem from body */ }

/* Text alignment variant */
.thch-content--text-center .thch-content__text {
    text-align: center;
    align-items: center;
}

.thch-content__subtitle {
    font-family: var(--thch-eyebrow-font, "Aptos", "Aptos Fallback", system-ui, sans-serif);
    font-size: var(--thch-eyebrow-size, 1rem);
    font-weight: var(--thch-eyebrow-weight, 400);
    line-height: var(--thch-eyebrow-line-height, 1.5rem);
    color: var(--thch-color-tertiary-700, #7B7767);
    margin: 0 0 var(--thch-eyebrow-gap, 1rem);
    letter-spacing: var(--thch-eyebrow-tracking, 0.125rem);
    text-transform: uppercase;
}

.thch-content__title {
    font-family: var(--thch-font-heading, 'Aptos', 'Aptos Fallback', system-ui, sans-serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--thch-color-primary, #1D245D);
    margin: 0;
}

.thch-content__body {
    font-family: var(--thch-font-body, 'Aptos', 'Aptos Fallback', system-ui, sans-serif);
    font-size: var(--thch-text-base);
    line-height: 1.6;
    color: rgba(23, 27, 55, 0.8);
    margin: 0;
}

/* Body size XL */
.thch-content--body-xl .thch-content__body {
    font-size: var(--thch-text-xl);
    line-height: 1.4;
}

.thch-content__body p { margin: 0 0 1rem; }
.thch-content__body p:last-child { margin-bottom: 0; }


/* === Steps variant — numbered cards replace media column === */
.thch-content__steps {
    display: flex;
    flex-direction: column;
    gap: var(--thch-gap-card);
    align-self: center;
    position: relative;
}

/* Bubbles background behind step cards */
.thch-content__steps-bg {
    position: absolute;
    inset: -4rem -4rem;
    width: calc(100% + 16rem);
    height: calc(100% + 12rem);
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

.thch-content__step {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    border-left: 0.5rem solid var(--thch-color-tertiary, #ADA791);
    box-shadow: 0 0.5rem 1rem rgba(23, 23, 23, 0.1), 0 0 1px rgba(23, 23, 23, 0.05);
}

.thch-content__step-num {
    flex: none;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../../../thch-project/assets/img/glass-icon-bubble.png') center / contain no-repeat;
    font-family: var(--thch-font-heading, 'Aptos', 'Aptos Fallback', system-ui, sans-serif);
    font-weight: 700;
    font-size: 3rem;
    line-height: 3rem;
    text-align: center;
    color: var(--thch-color-primary, #1D245D);
}

.thch-content__step-title {
    font-family: var(--thch-font-heading, 'Aptos', 'Aptos Fallback', system-ui, sans-serif);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.333;
    color: var(--thch-color-primary, #1D245D);
}

/* Steps on dark background */
.thch-content--bg-dark .thch-content__step {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--thch-color-tertiary, #ADA791);
}
.thch-content--bg-dark .thch-content__step-num,
.thch-content--bg-dark .thch-content__step-title {
    color: #fff;
}

/* Steps grid placement */
.thch-content--steps.thch-content--image-left .thch-content__steps  { grid-column: 1; grid-row: 1; }
.thch-content--steps.thch-content--image-right .thch-content__steps { grid-column: 2; grid-row: 1; }

/* === Dark background auto-colors === */
.thch-content--bg-dark .thch-content__subtitle { color: var(--thch-color-tertiary-300, #C8C4B5); }
.thch-content--bg-dark .thch-content__title { color: #fff; }
.thch-content--bg-dark .thch-content__body { color: rgba(255, 255, 255, 0.75); }


/* === Checklist styles === */
.thch-content__body ul { list-style: none; padding: 0; margin: 1rem 0; }
.thch-content__body ul li {
    position: relative;
    /* 1.5rem below 480px viewport, scaling up to 2.5rem at ~1200px */
    padding-left: clamp(1.5rem, 0.83rem + 2.22vw, 2.5rem);
    margin-bottom: 1rem;
    line-height: 1.55;
}
.thch-content__body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 0.8125rem;
    height: 0.625rem;
    background: var(--Primary-500, #1D245D);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10' viewBox='0 0 13 10' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.183153 5.18306C0.42723 4.93898 0.822958 4.93898 1.06704 5.18306L3.95843 8.07445L11.8498 0.183058C12.0939-0.061019 12.4896-0.0610193 12.7337 0.183058C12.9778 0.427136 12.9778 0.822864 12.7337 1.06694L4.40037 9.40027C4.15629 9.64435 3.76056 9.64435 3.51649 9.40027L0.183153 6.06694C-0.060925 5.82286-0.060925 5.42714 0.183153 5.18306Z' fill='currentColor'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10' viewBox='0 0 13 10' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.183153 5.18306C0.42723 4.93898 0.822958 4.93898 1.06704 5.18306L3.95843 8.07445L11.8498 0.183058C12.0939-0.061019 12.4896-0.0610193 12.7337 0.183058C12.9778 0.427136 12.9778 0.822864 12.7337 1.06694L4.40037 9.40027C4.15629 9.64435 3.76056 9.64435 3.51649 9.40027L0.183153 6.06694C-0.060925 5.82286-0.060925 5.42714 0.183153 5.18306Z' fill='currentColor'/%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
}

/* Dark background: white checkmarks */
.thch-content--bg-dark .thch-content__body ul li::before {
    background: #FAFAFA;
}

/* === Responsive === */
@media (max-width: 62rem) {
    .thch-content__title { font-size: 1.75rem; }
}

@media (max-width: 48rem) {
    .thch-content__grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .thch-content__media,
    .thch-content__text,
    .thch-content__steps {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .thch-content__steps-bg { display: none; }

    /* Bleed-Varianten setzen gap: 0 (Bild bis zum Rand). Gestapelt braucht der
       Text darunter wieder Luft (ClickUp 86cbetufx). */
    .thch-content[class*="thch-content--bleed"] .thch-content__grid,
    .thch-content--full-height[class*="thch-content--bleed"] .thch-content__grid {
        row-gap: var(--thch-space-xl);
    }

    /* Schritte-Karten kompakter (ClickUp 86cbetqh0): Nummer, Titel und Padding
       auf Mobil eine Stufe kleiner, Kartenabstand enger. */
    .thch-content__steps { gap: 1rem; }
    .thch-content__step {
        gap: 0.875rem;
        padding: 1rem 1.25rem;
        border-left-width: 0.375rem;
        border-radius: 0.875rem;
    }
    .thch-content__step-num {
        width: 3rem;
        height: 3rem;
        font-size: 2rem;
        line-height: 3rem;
    }
    .thch-content__step-title {
        font-size: 1.125rem;
        line-height: 1.3;
    }

    /* Reset bleed on mobile */
    .thch-content--image-left[class*="thch-content--bleed"] .thch-content__media,
    .thch-content--image-right[class*="thch-content--bleed"] .thch-content__media {
        margin-left: 0;
        margin-right: 0;
        border-radius: 1.25rem;
    }
    [class*="thch-content--bleed"] .thch-content__img {
        min-height: 16rem;
        border-radius: 1.25rem;
    }

    /* Full height / bleed-both: reset full-width grid on mobile */
    .thch-content--full-height[class*="thch-content--bleed"] .thch-content__grid,
    .thch-content--bleed-both .thch-content__grid {
        width: auto;
        margin-left: 0;
    }

    /* Mit dem Bleed faellt auch sein Grund weg. Das `padding: 0` weiter oben
       gehoert zum randlosen Desktop-Layout, wo das Bild bis an die
       Viewportkante laeuft. Mobil ist der Bleed zurueckgesetzt (Radius zurueck,
       Grid im Container) - ohne diese Zeile klebt der Block oben und unten an
       seinen Nachbarn. */
    .thch-content.thch-content--full-height[class*="thch-content--bleed"],
    .thch-content.thch-content--bleed-both {
        padding: var(--thch-section-py) 0;
    }
    /* Kein zusaetzliches Padding: der (reduzierte) Grid-Gap trennt Medium und
       Text bereits, und die Section bringt seit dem Bleed-Reset oben wieder
       ihre eigene Polsterung mit - beides zusammen ergab 33px obendrauf.

       ⚠ Der Selektor MUSS die Attribut-Form spiegeln. Die Desktop-Regel
       `.thch-content--full-height[class*="--bleed"] .thch-content__text` hat
       Spezifitaet (0,4,0); ein Override mit nur zwei Klassen (0,2,0) verliert
       still, egal wie weit unten er steht. Derselbe Fall wie bei der
       :not()-Kette in kontaktformular-page.css. */
    .thch-content--full-height[class*="thch-content--bleed"] .thch-content__text,
    .thch-content--bleed-both .thch-content__text {
        padding: 0;
    }
    .thch-content__grid {
        gap: 2rem;
    }
    .thch-content--full-height .thch-content__media {
        border-radius: 1.25rem;
    }
    .thch-content--full-height .thch-content__img {
        min-height: 16rem;
        border-radius: 1.25rem;
    }

    .thch-content__media {
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    .thch-content__img {
        max-width: 100%;
    }

    .thch-content { padding: 3.5rem 0; }
}

/* === Media bottom — text row on top (heading left, body right, like the
   homepage intro), media below spanning the full content width === */
.thch-content--media-bottom .thch-content__grid {
    grid-template-columns: 1fr;
}
.thch-content--media-bottom .thch-content__media {
    grid-column: 1;
    grid-row: 2;
}
.thch-content--media-bottom .thch-content__text {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem var(--thch-space-6xl);
    align-items: start;
}
.thch-content--media-bottom .thch-content__text > :not(.thch-content__heading-group) {
    grid-column: 2;
}

@media (max-width: 62rem) {
    .thch-content--media-bottom .thch-content__text {
        grid-template-columns: 1fr;
    }
    .thch-content--media-bottom .thch-content__text > :not(.thch-content__heading-group) {
        grid-column: 1;
    }
}

/* === Media bottom centered — subtitle/title/body/CTA centered on top,
   media below at content width, tighter gap than the split variant === */
.thch-content--media-bottom-center .thch-content__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
.thch-content--media-bottom-center .thch-content__media {
    grid-column: 1;
    grid-row: 2;
}
.thch-content--media-bottom-center .thch-content__text {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    text-align: center;
    max-width: 64rem;
    margin-inline: auto;
}
