/**
 * Baumimpuls – Ergänzungen zum unveränderten Theme (style.css).
 *
 * Die Vorlage löst einige Varianten über Inline-Styles auf einzelnen Seiten.
 * Für wiederverwendbare Content Blocks brauchen wir dafür echte Klassen.
 * style.css bleibt bewusst unangetastet, damit Theme-Updates einspielbar sind.
 */

/* Gedämpfter Section-Hintergrund (in der Vorlage inline gesetzt) */
.section-muted {
    background: color-mix(in oklab, var(--gs-bg) 60%, var(--gs-border));
}



/* Section-Kopf: Eyebrow, Überschrift, Einleitung */
.section__head > .eyebrow + h1,
.section__head > .eyebrow + h2,
.section__head > .eyebrow + h3 {
    margin-top: 0.75rem;
}

.section__head > :last-child {
    margin-bottom: 0;
}

/* Gradient-Variante für CTA-Banner */
.card-gs-gradient, .frame-card-gs-gradient {
    background: var(--gs-gradient);
    color: #fff;
    border-color: transparent;
}

.frame-card-gs-gradient .eyebrow, .card-gs-gradient .eyebrow {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.frame-card-gs-gradient .btn-outline-gs,.card-gs-gradient .btn-outline-gs {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: transparent;
}

/* Hero: Text über dem Hintergrundbild ausrichten */
.hero {
    display: flex;
    align-items: flex-end;
}

.hero--center {
    align-items: center;
}

.hero .eyebrow {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.hero__body {
    max-width: 720px;
}

/* Bildposition im Text-Medien-Element */
.text-media--media-right .row {
    flex-direction: row-reverse;
}

/* Galerie: flüssiges Raster, alle Kacheln gleich groß, Zeilen entstehen von selbst */
.gallery-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .gallery-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .gallery-grid--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.gallery-grid__item {
    margin: 0;
    min-width: 0;
}

.gallery-grid__frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: #0f2a1d;
}

.gallery-grid__frame--4-3 { aspect-ratio: 4 / 3; }
.gallery-grid__frame--1-1 { aspect-ratio: 1 / 1; }
.gallery-grid__frame--16-9 { aspect-ratio: 16 / 9; }

.gallery-grid__frame .gallery-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s;
}

.gallery-grid__frame:hover .gallery-img {
    transform: scale(1.03);
}

/* Galerie-Thumbnails öffnen die Lightbox */
.gallery-img {
    cursor: zoom-in;
}

/* Rahmenvarianten aus dem Basic "TYPO3/Appearance" */
.frame-ruler-before {
    border-top: 1px solid var(--gs-border);
}

.frame-ruler-after {
    border-bottom: 1px solid var(--gs-border);
}

.frame-indent .container-x > .row > [class^='col'] {
    margin-inline: auto;
}

/* Nummerierte Prozess-Schritte */
.icon-badge--number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
}

/* Preisplan-Hervorhebung (ergänzt .pricing-card.featured aus style.css) */
.pricing-card.featured .chip {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.pricing-card__price {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

/* Von main.js gesteuerte Sichtbarkeit respektiert das hidden-Attribut */
[hidden] {
    display: none !important;
}

/* ---------------------------------------------------------------------------
   Projekte (EXT:baumimpuls_projects)
   --------------------------------------------------------------------------- */

/* Stimmungsbild hinter dem Seitenkopf – auf allen Unterseiten gleich.
   Der Hero-Verlauf bleibt als Leseschicht über dem Foto.
   Die Unterkante ist keine Rundung, sondern eine Astgeflecht-Schablone:
   Foto in den Zweigen, Seite in den Lücken, Äste ragen in den Content. */
.page-title {
    --page-title-photo: image-set(
        url('../img/page-title.webp') type('image/webp'),
        url('../img/page-title.jpg') type('image/jpeg')
    );
    background: none;
    border-radius: 0;
    overflow: visible;
    padding-bottom: 6.25rem;
    z-index: 1;
}

.page-title__weave {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: calc(100% + 5.75rem);
    z-index: 0;
    pointer-events: none;
    background-color: #0f2a1d;
    background-image: var(--gs-hero), var(--page-title-photo);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 42%;
    -webkit-mask-image: url('../img/page-title-weave.svg?v=7');
    mask-image: url('../img/page-title-weave.svg?v=7');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-position: center;
    mask-position: center;
}

.page-title .container-x {
    position: relative;
    z-index: 1;
}

/* Glow-Kreise nicht an der Unterkante – sonst wirken sie wie die alten Rundungen. */
.page-title::before {
    top: -140px;
    right: -80px;
}

.page-title::after {
    bottom: auto;
    top: 18%;
    left: -90px;
}

/* Auf Detailansichten trägt das Plugin die H1, im Seitenkopf steht nur noch
   der Seitenname als Auszeichnung. */
.page-title .eyebrow {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* Sidebar der zweispaltigen Ansichten läuft unter der Sticky-Navigation mit */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 6rem;
    }
}

/* Kartenbilder der ähnlichen Projekte behalten das Seitenverhältnis */
.project-thumb {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Platzhalter, solange ein Projekt kein Titelbild hat */
.project-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: var(--gs-gradient);
    color: rgba(255, 255, 255, 0.75);
    font-size: 2.5rem;
}

.projects-pagination .filter-btn {
    min-width: 2.75rem;
    justify-content: center;
}

/* Wortmarke ersetzt Icon + Text. Seitenverhältnis 1920×319. */
.brand-logo {
    display: block;
    height: 36px;
    width: auto;
}

/* Das schwarze I der farbigen Wortmarke wäre auf dunklem Grund unsichtbar. */
.footer .brand-logo,
[data-bs-theme="dark"] .navbar-gs .brand-logo,
[data-bs-theme="dark"] .offcanvas .brand-logo {
    filter: brightness(0) invert(1);
}

/* ---------------------------------------------------------------------------
   Hand-Ornament (Strichzeichnung Hand / Baum / Blatt)
   Als Maske gelegt, damit der Schwarzwert über --hand-ink einstellbar ist
   und im Dark Mode automatisch mit --gs-fg mitgeht.

   z-index liegt über .section-y > * (style.css setzt dort 1), sonst deckt
   der Inhaltscontainer die Zeichnung vollständig zu. pointer-events: none
   hält die Fläche klickdurchlässig.
   --------------------------------------------------------------------------- */
:root {
    --hand-ink: color-mix(in oklab, var(--gs-fg) 11%, transparent);
}

#main .section-y {
    overflow: hidden;
}

#main .section-y:nth-child(odd of .section-y)::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 2;
    top: 52%;
    right: 0%;
    width: min(26rem, 42vw);
    aspect-ratio: 720 / 950;
    transform: translateY(-48%) rotate(3deg);
    background-color: var(--hand-ink);
    -webkit-mask-image: url("../img/hand.svg");
    mask-image: url("../img/hand.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
}

@media (max-width: 767.98px) {
    #main .section-y:nth-child(odd of .section-y)::after {
        width: min(17rem, 68vw);
        right: -18%;
        opacity: 0.7;
        transform: translateY(-46%) rotate(6deg);
    }
}

@media print {
    #main .section-y:nth-child(odd of .section-y)::after {
        content: none;
    }
}

/* Team-Karten: Name/Funktion liegen absolut über dem Foto. Ohne Bild
   (oder wenn das img nicht display:block ist) fällt die Karte auf die
   Rahmenlinie zusammen – dann sieht man nur einen Balken. */
.team-card img,
.team-card__placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.team-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gs-gradient);
    color: rgba(255, 255, 255, 0.85);
    font-size: 3rem;
}

/* ---------------------------------------------------------------------------
   Hauptnavigation: Unterseiten der ersten Ebene als Hover-Submenü
   --------------------------------------------------------------------------- */
.navbar-gs .nav-caret {
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.7em;
    vertical-align: 0.1em;
    opacity: 0.65;
}

.navbar-gs .dropdown-menu {
    --bs-dropdown-min-width: 13.5rem;
    --bs-dropdown-bg: var(--gs-card);
    --bs-dropdown-color: var(--gs-fg);
    --bs-dropdown-border-color: var(--gs-border);
    --bs-dropdown-border-radius: var(--gs-radius);
    --bs-dropdown-link-color: var(--gs-fg);
    --bs-dropdown-link-hover-color: var(--gs-primary);
    --bs-dropdown-link-hover-bg: color-mix(in oklab, var(--gs-primary) 10%, transparent);
    --bs-dropdown-link-active-color: var(--gs-primary);
    --bs-dropdown-link-active-bg: color-mix(in oklab, var(--gs-primary) 12%, transparent);
    margin-top: 0;
    padding: 0.55rem 0;
    border: 1px solid var(--gs-border);
    box-shadow: var(--gs-shadow-md);
}

.navbar-gs .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    right: 0;
    left: 0;
    height: 0.75rem;
}

.navbar-gs .dropdown-item {
    font-weight: 500;
    padding: 0.5rem 1.15rem;
}

.navbar-gs .dropdown-item.active {
    font-weight: 700;
}

@media (min-width: 992px) {
    .navbar-gs .dropdown:hover > .dropdown-menu,
    .navbar-gs .dropdown:focus-within > .dropdown-menu {
        display: block;
    }
}

.offcanvas .nav-sub {
    margin-top: 0.25rem;
    margin-left: 0.85rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--gs-border);
    gap: 0;
}

.offcanvas .nav-sub .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gs-muted);
    padding-block: 0.35rem;
}

/* Leistungsseiten: Breadcrumb ohne dunklen Page-Title, H1 sitzt im Hero */
.service-breadcrumb {
    padding: 1.15rem 0 0.15rem;
}

.service-breadcrumb .breadcrumb-gs {
    color: var(--gs-muted);
}

.service-breadcrumb .breadcrumb-gs a {
    color: var(--gs-muted);
}

.service-breadcrumb .breadcrumb-gs a:hover {
    color: var(--gs-primary);
}

.service-breadcrumb .breadcrumb-gs [aria-current="page"] {
    color: var(--gs-fg);
    font-weight: 600;
}

/* Content Blocks in b13-Containern: kein zweites section-y / container-x */
.ce-embed:last-child {
    margin-bottom: 0 !important;
}

.two-columns--card > [class^="col"]:last-child .ce-embed:last-child {
    margin-bottom: 0 !important;
}

/* Vertikaler Ablauf auf Leistungsdetailseiten */
.process-step-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.process-step-list .process-step {
    position: relative;
    padding-left: 3.5rem;
}

.process-step-list .process-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gs-gradient);
    color: #fff;
    font-family: Outfit, sans-serif;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
}

/* Leistungsumfang: zwei Spalten, wenn mehr als drei Punkte */
.service-bullets {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .service-bullets {
        grid-template-columns: 1fr 1fr;
    }
}

/* Sidebar: weitere Leistungen */
.service-nav a {
    color: var(--gs-fg);
    text-decoration: none;
    font-weight: 500;
}

.service-nav a:hover {
    color: var(--gs-primary);
}

.service-nav a .bi-arrow-right {
    color: var(--gs-primary);
}

.service-nav a.is-current {
    font-weight: 700;
    color: var(--gs-primary);
}

.service-nav a.is-current .bi-chevron-right {
    color: var(--gs-primary);
}

/* Zitat auf der Leistungsseite, kein Testimonial-Raster */
.service-quote {
    margin: 0;
}

.service-quote p {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.service-quote footer {
    color: var(--gs-muted);
    font-size: 0.9rem;
}

.footer-cookie-btn {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    color: #c8d8cb;
    text-decoration: none;
    transition: 0.3s;
}

.footer-cookie-btn:hover {
    color: #67d47a;
}

/* Video-Content-Block: Desktop-Lightbox, Mobil inline */
.video-ce__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--gs-radius-lg);
    background: var(--gs-fg);
    box-shadow: var(--gs-shadow-md);
}

.video-ce__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-ce__poster--empty {
    min-height: 100%;
    background: color-mix(in oklab, var(--gs-primary) 25%, var(--gs-fg));
}

.video-ce__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.video-ce__play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: var(--gs-primary);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 30px color-mix(in oklab, var(--gs-fg) 35%, transparent);
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-ce__play:hover .video-ce__play-icon,
.video-ce__play:focus-visible .video-ce__play-icon {
    transform: scale(1.06);
    background: var(--gs-primary-hover);
}

.video-ce__native {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-ce__consent {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
    color: #fff;
    background: color-mix(in oklab, var(--gs-fg) 58%, transparent);
    backdrop-filter: blur(4px);
}

.video-ce__consent[hidden] {
    display: none !important;
}

.video-ce__consent p {
    margin: 0;
    max-width: 28rem;
}

.video-ce__caption {
    margin-top: 0.85rem;
    color: var(--gs-muted);
    font-size: 0.9rem;
    text-align: center;
}

.video-lightbox-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-lightbox-frame video,
.video-lightbox-frame iframe,
.video-lightbox-frame .ratio {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-lightbox-frame video {
    object-fit: contain;
    background: #000;
}

.video-ce__stage.is-playing .video-ce__poster,
.video-ce__stage.is-playing .video-ce__play,
.video-ce__stage.is-playing .video-ce__consent {
    display: none;
}

.video-ce__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 991.98px) {
    .video-ce[data-source="file"] .video-ce__play,
    .video-ce[data-source="file"] .video-ce__poster {
        display: none;
    }

    .video-ce[data-source="file"] .video-ce__native {
        display: block;
        position: absolute;
        inset: 0;
    }
}

/* Vorher/Nachher-Schieber */
.before-after {
    --pos: 50%;
}

.before-after__stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--gs-radius-lg);
    box-shadow: var(--gs-shadow-md);
    user-select: none;
    touch-action: none;
    cursor: ew-resize;
}

.before-after__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
    pointer-events: none;
}

.before-after__img--after {
    position: relative;
}

.before-after__img--before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.before-after__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    z-index: 2;
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--gs-fg) 25%, transparent);
    pointer-events: none;
}

.before-after__grip {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--gs-primary);
    color: #fff;
    font-size: 1rem;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 24px color-mix(in oklab, var(--gs-fg) 35%, transparent);
}

.before-after__range {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    appearance: none;
    background: transparent;
    pointer-events: none;
}

.before-after__label {
    position: absolute;
    top: 1rem;
    z-index: 2;
    padding: 0.3rem 0.75rem;
    border-radius: 10rem;
    background: color-mix(in oklab, var(--gs-fg) 62%, transparent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.before-after__label--before {
    left: 1rem;
}

.before-after__label--after {
    right: 1rem;
}

.before-after__caption {
    margin-top: 0.85rem;
    color: var(--gs-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* TYPO3 Form → Theme */
.form-anfrage .form-group,
.form-anfrage .form-element {
    margin-bottom: 1rem;
}

.form-anfrage .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gs-muted);
    margin-bottom: 0.35rem;
}

.form-anfrage .form-control,
.form-anfrage input[type="file"] {
    border: 1.5px solid var(--gs-border);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    width: 100%;
    background: var(--gs-card);
    color: var(--gs-fg);
}

.form-anfrage .form-control:focus,
.form-anfrage input[type="file"]:focus {
    outline: 0;
    border-color: var(--gs-primary);
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.form-anfrage .form-group.has-error .form-control,
.form-anfrage .form-group.has-error input[type="file"] {
    border-color: #dc2626;
}

.form-anfrage .form-text.error,
.form-anfrage .error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.form-anfrage .inputs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.35rem 1rem;
}

.form-anfrage .form-check {
    min-height: 1.8rem;
}

.form-anfrage .form-check-label a {
    color: var(--gs-primary);
}

.form-anfrage .form-navigation .btn-primary-gs {
    border: 0;
}

#contactForm .form-control-gs,
#contactForm .form-control {
    width: 100% !important;
}

