/* Base tokens and utilities are defined in css/index/global.css */

/* =================================== */
/* Utilities                           */
/* =================================== */

/* .glass_panel and .btn_primary provided by global.css */

/* =================================== */
/* Section: Hero                       */
/* =================================== */

/* Fixiertes Hintergrundbild */
.hero_section::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('/scr/strandspaziergang_2560_q78.jpg'); /*original '/scr/prosafe-tmp-2.jpg' */
    background-size: cover;
    background-position: 68% center; /* Paar steht rechts der Bildmitte */
    z-index: -1;
}

.hero_section::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(
        circle at top,
        rgba(0,0,0,0.14),
        rgba(0,0,0,0.30)
    );
    z-index: -1;
}

.hero_section {
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    text-align: center;
    color: white;
    overflow-x: hidden;
    /* Prevent internal vertical scrollbar caused by tall content/margins */
    overflow-y: hidden;
}

/* Styling für den Text und Button */
.hero_content {
    /* ===== POSITION / LAYOUT NICHT ÄNDERN (nur minimale Anpassungen erlaubt) ===== */
    margin-left: 20%;
    margin-right: auto;
    margin-top: 40vh;
    width: 40%;
    max-width: 800px;

    /* Visuelle Modernisierung: helleres, feineres Glas */
    padding: var(--space-9) var(--space-9);
    gap: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.64), rgba(250,250,250,0.58));
    border: 1px solid rgba(255,255,255,0.65);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 2px 6px rgba(0,150,215,0.04) inset;

    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    transition: transform 0.35s cubic-bezier(.2,.9,.3,1), box-shadow 0.35s ease, background 0.35s ease, opacity 0.4s ease;
}

/* subtile Brand-Akzentlinie oben */
.hero_content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    background: linear-gradient(90deg, rgba(0,150,215,0) 0%, var(--brand-accent) 50%, rgba(0,150,215,0) 100%);
    opacity: 0.65;
    pointer-events: none;
}

/* statischer, dezenter blau-weißer Rand ohne Animation */
.hero_content::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(0,150,215,0.28), rgba(255,255,255,0.92));
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.75;
    pointer-events: none;
}

/* Typografie: Eyebrow + klarere Hierarchie */
.hero_content .eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(24,38,47,0.72);
    margin-bottom: 6px;
}

.hero_content h1 {
    font-size: clamp(2rem, 2.6vw, 2.6rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin: 0 0 8px 0;
    color: var(--text-900);
}

.hero_content p {
    font-size: clamp(1rem, 1.1vw, 1.12rem);
    line-height: 1.65;
    margin: 0;
    color: var(--text-700);
}

.hero_content p strong { color: #0b1619; font-weight: 700; }

/* Hero-CTA tuning (visual only) */
.hero_content .btn_primary,
.hero_button.btn_primary {
    margin-top: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 12px 30px rgba(0,150,215,0.42);
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.2s ease;
}

.hero_content .btn_primary:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 42px rgba(0,150,215,0.5);
}

/* Animation beim Hinausscrollen - erst nach unten, dann ausblenden */
.hero_content.scrolled { opacity: 0; transform: translateY(100px); }

/* Force no text-shadows inside the hero in case other rules reintroduce them */
.hero_content h1 { text-shadow: none !important; }
.hero_content p  { text-shadow: none !important; }

/* Mobile: ensure dark typography remains readable on small screens */
@media (max-width: 768px) {
    .hero_content h1 { color: var(--text-800); }
    .hero_content p  { color: var(--text-700); }
}

/* Styling für den blauen Button */
.hero_button {
    user-select: none;
}

.hero_button:hover {
    animation: zoomen 0.5s ease-in-out;
    transform: scale(1.1);
    cursor: pointer;
}

/* Styling für das animierte scroll_icon */
.scroll_icon {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    animation: bounce 2s infinite;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Animation beim Hinausscrollen */
.scroll_icon.scrolled {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px);
}

.scroll_icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
}

/* Definition der Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* =================================== */
/* Scroll to Top Button */
/* =================================== */

.scroll_to_top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease, bottom 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll_to_top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll_to_top:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 150, 215, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.scroll_to_top::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) rotate(-135deg);
    width: 10px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
}

@media (max-width: 768px) {
    .scroll_to_top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .scroll_to_top::after {
        bottom: 13px;
        width: 9px;
        height: 9px;
    }
}



/* =================================== */
/* Layout: Hauptinhalt                 */
/* =================================== */

main {
    width: 100%;
    max-width: 100vw;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

.main_container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    background-color: transparent;
    position: relative;
    overflow-x: hidden;
}

/* removed unused .container_widget */

/* removed unused .features-container rules */




/* =================================== */
/* Komponenten: feature + statistic    */
/* =================================== */


/* Feature Section: constrained to page grid like statistics & widget */
.screen_feature {
    width: 100%;
    background: transparent; /* keep background neutral, cards are the highlight */
    padding-top: var(--space-6); /* reduced top padding */
    padding-bottom: var(--space-6);
    box-sizing: border-box;
}

/* Inner container aligns exactly with statistics/widget container */
.features_container {
    width: min(100%, var(--container-max-width));
    padding: var(--space-8) var(--section-padding-x);
    margin: 0 auto var(--space-4);
    box-sizing: border-box;
    text-align: center;
    position: relative;
    overflow: hidden; /* clip cards to container bounds */
}

/* Apply a glass-panel frame (rounded rectangle with subtle blur and border)
   so the features section keeps the same framed look as the widget area. */
.features_container {
    background: linear-gradient(180deg, var(--glass-bg), rgba(250,250,250,0.78));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Header + sublines */
.features_container h2 {
    font-size: clamp(2.2rem, 3.6vw, 3rem);
    font-weight: 900;
    color: var(--text-900);
    margin: 0 0 var(--space-3) 0;
    line-height: 1.02;
}

.feature-subline {
    font-size: clamp(1rem, 1.1vw, 1.12rem);
    color: var(--text-700);
    max-width: 720px;
    margin: 0 auto var(--space-3);
    line-height: 1.55;
}

.feature-subline-small {
    font-size: 0.95rem;
    color: var(--text-600);
    margin: 0 auto var(--space-4);
}

.feature_cards_container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-4); /* less space between header and grid */
    width: 100%;
    align-items: stretch; /* Alle Karten in einer Reihe haben gleiche Höhe */
    position: relative;
    overflow: visible; /* prevent clipping when cards scale/overlap */
}

/* Responsives Verhalten für kleinere Bildschirme - siehe unten bei den konsolidierten Media Queries */

/* Tablet und iPad Ansicht */
@media (max-width: 1024px) {
    .hero_content {
        margin-left: 8%;
        width: 55%;
        max-width: 480px;
    }
}

/* Größere Tablets - bessere Proportionen */
@media (max-width: 900px) {
    .hero_section::before {
        background-position: 68% center; /* Paar steht rechts der Bildmitte */
    }
    
    .hero_content {
        margin-left: 5%;
        width: 65%;
        max-width: 420px;
    }
}

@media (max-width: 768px) {
    .hero_section {
        justify-content: center;
    }
    
    .hero_content {
        margin-left: auto;
        margin-right: auto;
        margin-top: 32vh; /* Reduziert von 40vh für kleinere Viewports */
        width: 90%;
        max-width: 500px;
        padding: 22px 20px;
    }
}

@media (max-width: 480px) {
    .hero_content {
        margin-top: 25vh; /* Noch kleiner auf sehr kleinen Screens */
        padding: 18px 16px;
    }
}

@media (max-width: 540px) {
    .hero_section::before {
        background-position: 68% center; /* Paar steht rechts der Bildmitte */
    }

    .hero_content {
        width: calc(100% - 32px);
        max-width: calc(100vw - 32px);
    }
    
    .screen_feature {
        width: 100%;
        padding: 20px 12px;
        margin: 32px 0 0;
        box-sizing: border-box;
    }
    
    .features_container {
        padding: var(--space-6) var(--space-4);
        width: 100%;
        box-sizing: border-box;
    }

    .feature_cards_container {
        grid-template-columns: 1fr;
        margin-top: 12px;
        padding: 0;
        width: 100%;
    }
}



/* .card base and hover are defined in global.css */

@keyframes featurePulse {
    0% { box-shadow: var(--shadow-sm), 0 0 0 0 rgba(0,150,215,0.12); }
    50% { box-shadow: var(--shadow-md), 0 0 0 10px rgba(0,150,215,0.12); }
    100% { box-shadow: var(--shadow-sm), 0 0 0 0 rgba(0,150,215,0.12); }
}


/* Card: compact base, expansion overlay on hover */
.feature_cards_container .card {
    /* Default footprint stays compact; overlay handles expansion */
    --card-hover-scale: 1; /* not used for sizing anymore */
    --card-hover-shadow: 0 22px 64px rgba(2,20,27,0.30);
    --card-exp-width: min(460px, 90vw);  /* responsive Breite - max 460px oder 90% vom Viewport */
    --card-exp-min-height: 260px;
    --card-exp-max-height: 520px;
    --card-exp-pad-x: 30px;
    --card-exp-pad-y: 28px;
    --card-exp-icon-size: 56px;
    --card-exp-icon-gap: 14px;
    --card-exp-title-gap: 12px;
    --card-exp-icon-top: calc(50% - 110px);
    --card-exp-title-top: calc(50% - 32px);
    --card-exp-desc-top: calc(50% + 12px);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    min-height: auto;
    height: auto; /* automatische Höhe, damit Description Platz hat */
    padding: var(--space-5);
    border-radius: var(--radius-md);
    background: var(--bg-elev-1);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-sm);
    transition: transform 260ms cubic-bezier(.2,.9,.3,1), box-shadow 260ms cubic-bezier(.2,.9,.3,1), filter 200ms ease;
    overflow: hidden; /* Header wird automatisch an Kanten abgeschnitten */
    transform-origin: center;
    will-change: transform, box-shadow;
    isolation: isolate; /* stacking context for hover z-index */
    backface-visibility: hidden; /* keep scaled text crisp */
    transform: translateZ(0); /* promote layer for sharper scaling */
}

/* Overlay panel lives outside layout; default card stays still */
.feature_cards_container .card::before {
    content: "";
    position: absolute;
    width: var(--card-exp-width);
    min-height: var(--card-exp-min-height);
    max-height: var(--card-exp-max-height);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: linear-gradient(180deg, #fff, rgba(255,255,255,0.96));
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--card-hover-shadow);
    opacity: 0;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(.2,.9,.3,1), opacity 200ms ease;
    z-index: 10;
}

.feature_cards_container .card:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card_header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: calc(100% + 2 * var(--space-5) + 2px); /* Kompensiere Card-Padding + Border */
    margin-left: calc(-1 * var(--space-5) - 1px); /* Ziehe nach links inkl. Border */
    margin-right: calc(-1 * var(--space-5) - 1px); /* Ziehe nach rechts inkl. Border */
    margin-top: calc(-1 * var(--space-5) - 1px); /* Ziehe nach oben inkl. Border */
    margin-bottom: var(--space-3); /* Abstand zur Description */
    padding: var(--space-3) var(--space-5); /* Horizontales Padding gleich wie Card */
    background: rgba(0,150,215,0.08);
    border-radius: 0; /* Kein Radius - wird durch Card abgeschnitten */
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.card_icon {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0,150,215,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    position: relative;
    z-index: 11;
}

.card_title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-900);
    margin: 0;
    position: relative;
    z-index: 11;
    text-align: left;
}

/* Inner layout: keep body flow so expanded padding/gap separates title and text */
/* Ausnahme für card_header der breitere negative margins hat */
.feature_cards_container .card > *:not(.card_header) { width: 100%; }

.card_title { margin-bottom: 0; }

.card_description {
    color: var(--text-800);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: var(--space-1) 0 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 220ms ease;
    pointer-events: auto;
    position: static;
}

/* Disable the floating overlay - no longer needed */
.feature_cards_container .card::before,
.feature_cards_container .card:hover::before {
    display: none;
}

/* Hover effect for desktop (devices with hover capability) */
@media (hover: hover) {
    .feature_cards_container .card:hover {
        box-shadow: var(--shadow-md);
        border-color: rgba(0,150,215,0.28);
        background: linear-gradient(180deg, #fff, rgba(255,255,255,0.96));
        animation: featurePulse 1.6s ease-in-out infinite;
        z-index: 30;
    }
}

/* Ensure overlay sits above neighbors and section */
.feature_cards_container .card:hover {
    z-index: 30;
}

/* Touch-Geräte: Hover-Effekt via JS (.is-hover) */
@media (hover: none) {
    /* Hover-Effekt via JS (.is-hover) auf Touch-Geräten */
    .card.is-hover {
        box-shadow: var(--shadow-md);
        border-color: rgba(0,150,215,0.28);
        background: linear-gradient(180deg, #fff, rgba(255,255,255,0.96));
        animation: featurePulse 1.6s ease-in-out infinite;
        z-index: 10;
    }

    /* Dim non-active cards slightly on touch devices */
    .feature_cards_container:has(.is-hover) .card:not(.is-hover) {
        filter: saturate(0.9) brightness(0.98);
    }
}

/* Dim non-hovered cards slightly to emphasize the active tile without movement */
@media (hover: hover) {
    .feature_cards_container:hover .card:not(:hover) {
        filter: saturate(0.9) brightness(0.98);
    }
}

/* Responsive column changes preserved (2 columns / 1 column) */
@media (max-width: 1024px) { .feature_cards_container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature_cards_container { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Ensure the features section aligns visually with statistics/widget sections on small screens */
@media (max-width: 480px) {
    .features_container { padding-left: 16px; padding-right: 16px; }
    .screen_feature { padding-top: var(--space-4); padding-bottom: var(--space-6); }
}

/* Desktop: push the features section further down so hero elements
   (inside the hero area and near the scroll indicator) are no longer visible
   in this view. This ensures a clear gap between the scroll indicator and
   the features content on large screens. */
@media (min-width: 900px) {
    .screen_feature { padding-top: var(--space-6); }
    .features_container { margin-top: 0; }
    .scroll_icon_section { padding-top: var(--space-6); }
}

/* Mobile Anpassung - weniger Abstand */
@media (max-width: 768px) { .card_title { margin-bottom: var(--space-1); } }



/* statistic section */

.scroll_icon_section {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-3) 0 var(--space-4) 0;
    background-color: transparent;
    min-height: 80px;
}

.scroll_icon_section .scroll_icon {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 0 auto;
}

.scroll_icon_section .scroll_icon::after {
    top: 8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.screen_statistic {
    width: 100%;
    margin: 0;
    padding: var(--space-12) 0;
}

.statistics_container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: var(--space-6);
    padding: 0 var(--section-padding-x);
    margin: 0 auto;
    width: min(100%, var(--container-max-width));
    box-sizing: border-box;
}

.statistic_item {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.statistic_item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(0,150,215,0.28); }

.statistic_number { font-size: clamp(2rem, 3vw, 2.6rem); font-weight: 800; color: var(--text-900); margin-bottom: var(--space-2); font-variant-numeric: tabular-nums; }

.statistic_label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-600); margin-bottom: var(--space-3); }

/* Tooltip Styling */
.statistic_tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background-color: #ffffff;
    color: var(--text-800);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-transform: none;
    white-space: normal;
    width: 260px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    text-align: center;
    line-height: 1.45;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.statistic_item:hover .statistic_tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Pfeil für Tooltip */
.statistic_tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #ffffff;
}

/* Responsive Anpassungen - Erste Umschaltung bei 1165px */
@media (max-width: 1165px) {
  .statistics_container { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-5); }
}

@media (max-width: 640px) {
    .statistics_container { grid-template-columns: 1fr; gap: var(--space-4); padding-left: var(--section-padding-x); padding-right: var(--section-padding-x); }

    /* Ensure tooltips can escape card bounds and sit above each card */
    .statistics_container .statistic_item {
        overflow: visible;
        position: relative; /* required for absolute-positioned tooltip */
        z-index: 1;
    }

    /* Mobile: show tooltip as an inline bubble under the card (relative)
         to avoid fixed overlays and stacking issues on small viewports. */
    .statistics_container .statistic_item .statistic_tooltip {
        position: relative;
        left: auto;
        bottom: auto;
        top: auto;
        transform: none;
        opacity: 1;
        visibility: visible;
        /* Tooltip is decorative on mobile; avoid capturing pointer events */
        pointer-events: none;
        /* Keep tooltip compact instead of full-width */
        width: auto;
        max-width: 100%;
        padding: 10px 14px;
        margin: var(--space-3) auto 0 auto;
        z-index: 1; /* sits inside the card flow */
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        text-align: center;
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: var(--radius-sm);
        display: inline-block;
    }

    /* Arrow: small neutral gray triangle — for inline/relative tooltip we
         position it at the top center of the next element using a pseudo. */
    .statistics_container .statistic_item .statistic_tooltip::after {
        content: '';
        position: absolute;
        left: 50%;
        /* place arrow above the tooltip with a small gap */
        top: -20px; /* distance between tooltip top and arrow (gap = ~12px) */
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #a8a8a8; /* arrow pointing up toward card */
        pointer-events: none;
        filter: drop-shadow(0 1px 0 rgba(0,0,0,0.03));
    }

    /* When tooltips are moved to body for mobile positioning we'll apply the
       same visual rules via a lightweight class so the styles apply despite
       the DOM move. */
    .tooltip--mobile {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: none !important;
        width: auto !important;
        max-width: min(320px, 90%) !important;
        padding: 10px 14px !important;
        margin: 0 !important;
        z-index: 10080 !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
        text-align: center !important;
        border: 1px solid rgba(0,0,0,0.06) !important;
        border-radius: var(--radius-sm) !important;
        background-color: #ffffff !important;
        color: var(--text-800) !important;
    }

    .tooltip--mobile::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -8px;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #a8a8a8;
        pointer-events: none;
        filter: drop-shadow(0 1px 0 rgba(0,0,0,0.03));
    }
}

/* Tooltip placement for medium viewports: top two tooltips above, bottom two below
     Applies only between 641px and 1165px inclusive, leaving behavior below 640px
     and at/above 1166px unchanged. Ensures overflow is visible and tooltips sit
     above background graphics with adequate z-index and shadow. */
@media (min-width: 641px) and (max-width: 1165px) {
    .screen_statistic,
    .statistics_container {
        overflow: visible; /* allow tooltip to escape container clipping */
    }

    .statistics_container .statistic_item {
        overflow: visible; /* ensure children (tooltips) are not clipped */
        z-index: 1; /* base stacking for items */
    }

    /* Default tooltip placement in this band: below the card */
    .statistics_container .statistic_item .statistic_tooltip {
        position: absolute;
        top: calc(100% + 10px);
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 10050; /* float above most page elements and background */
        box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    }

    .statistics_container .statistic_item:hover .statistic_tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    /* Reset and base styling for the arrow pseudo-element so overrides are reliable */
    .statistics_container .statistic_item .statistic_tooltip::after {
        content: '';
        position: absolute;
        width: 0;
        height: 0;
        left: 50%;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        /* clear any border-top/bottom from other rules */
        border-top: 0 none;
        border-bottom: 0 none;
        pointer-events: none;
    }

    /* Top-positioned tooltips (items 1 & 2): place tooltip above card and draw arrow pointing down */
    .statistics_container .statistic_item:nth-child(1) .statistic_tooltip,
    .statistics_container .statistic_item:nth-child(2) .statistic_tooltip {
        top: auto;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        z-index: 10050;
    }

    .statistics_container .statistic_item:nth-child(1) .statistic_tooltip::after,
    .statistics_container .statistic_item:nth-child(2) .statistic_tooltip::after {
        bottom: -8px; /* sits at bottom edge of tooltip */
        border-top: 8px solid #ffffff; /* arrow pointing down */
    }

    /* Bottom-positioned tooltips (items 3 & 4): tooltip below card and arrow pointing up */
    .statistics_container .statistic_item:nth-child(3) .statistic_tooltip::after,
    .statistics_container .statistic_item:nth-child(4) .statistic_tooltip::after {
        top: -8px; /* sits at top edge of tooltip */
        border-bottom: 8px solid #ffffff; /* arrow pointing up */
    }

    /* Lift hovered item to avoid overlap with neighbouring elements */
    .statistics_container .statistic_item:hover {
        z-index: 10100;
    }
}



/* =================================== */
/* Komponenten: Widget & Sektion       */
/* =================================== */

/* removed duplicate html block; merged to top */

.screen_widget {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    height: auto;
    width: calc(100% - 40px);
    max-width: var(--container-max-width);
    margin: var(--space-12) auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.Platzhalter_diesdas {
    display: flex;
    flex-direction: column;
    color: var(--text-800);
    padding: var(--space-10) var(--space-8);
    margin: 0;
    align-items: stretch;
    gap: var(--space-6);
    height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .Platzhalter_diesdas {
        margin: 15px;
        padding: 18px;
        width: calc(100% - 30px);
    }
}

/* Registrierungs-Widget (antson) auf schmalen Screens: gleicher Fix wie auf
   direkt (direkt/css/direkt.css). Die seitlichen Abstaende summierten sich
   auf ~88px je Seite (iPhone 13: Felder nur ~210 von 390px breit). */
@media (max-width: 600px) {
    /* Schmalere Seitenraender um Sektion und Glas-Panel */
    #id_site_widget.screen_widget {
        width: calc(100% - 16px);
    }

    #id_site_widget .Platzhalter_diesdas {
        margin: 0;
        padding: var(--space-3);
        width: 100%;
    }

    /* antson setzt class="container" auf <antson-form>, dadurch greift
       unser .container aus global.css (20px Padding); antsons eigenes
       form.container bringt nochmals 15px. */
    #widget_container > antson-form,
    #widget_container form.vibot-twbs.container {
        padding-left: 0;
        padding-right: 0;
    }

    /* Inhalt etwas verkleinern; zoom statt transform: scale, damit sich das
       Layout mitverkleinert und kein Leerraum entsteht. */
    #widget_container > antson-form {
        zoom: 0.8;
    }

    /* iOS Safari zoomt in Eingabefelder unter 16px hinein; trotz zoom
       effektiv 16px (16 / 0.8). antson setzt teils !important. */
    #widget_container > antson-form :is(input, select, textarea) {
        font-size: calc(16px / 0.8) !important;
    }
}

/* .section-intro defined in global.css */

/* Widget: ensure external widget buttons match site CTA styles */
/* Targets the injected widget inside #widget_container so layout file owns widget visuals */
#widget_container button,
#widget_container input[type="button"],
#widget_container input[type="submit"],
#widget_container .btn_primary,
#widget_container .header_button {
    background: var(--brand-accent);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 12px 30px rgba(0,150,215,0.42);
    padding: 12px 22px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#widget_container button:hover,
#widget_container input[type="button"]:hover,
#widget_container input[type="submit"]:hover,
#widget_container .btn_primary:hover,
#widget_container .header_button:hover {
    background: #007FB7;
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(0,150,215,0.5);
}
