/*
 * Escola Bern Event 2026 — pixelgenaue Umsetzung des Figma-Designs
 * (Escola Microsites → «Microsite Bern Event 2026»; Desktop-Frame 4285:1087,
 * Mobile-Frame 4246:2863). Aufbau auf css/microsite.css; Breakpoint 992px
 * wie bei den übrigen Event-Microsites.
 *
 * Das Figma misst viele Abstände an der Versalhöhe (text-box-trim). Wo das
 * Design solche Boxen verwendet, übernimmt text-box: trim-both die exakte
 * Vertikal-Metrik; Browser ohne Support rendern minimal luftiger.
 */

html {
    scroll-padding: calc(80px + 2.5rem);
}

#bern-event {
    font-family: Nunito, sans-serif;
    color: #333333;
    overflow-x: clip;
    padding-bottom: 35px;
}

#bern-event h1,
#bern-event h2,
#bern-event h3,
#bern-event h4,
#bern-event .lead,
#bern-event .date,
#bern-event .address,
#bern-event .via,
#bern-event .timeline span,
#bern-event .why-item h3,
#bern-event .bern-alternatives .item p {
    text-box: trim-both cap alphabetic;
}

#bern-event h2 {
    font-size: 25px;
    line-height: 32px;
    font-weight: bold;
    color: #333333;
    text-align: center;
    margin: 0;
}

#bern-event .bern-container {
    width: min(1067px, calc(100% - 50px));
    margin-inline: auto;
}

#bern-event .bern-container.wide {
    width: min(1293px, calc(100% - 50px));
}

#bern-event .bold {
    font-weight: bold;
}

/* ---------- Buttons ---------- */

#bern-event .bern-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.5rem;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background-color: #0083db;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
    font-weight: bold;
    width: max-content;
    cursor: pointer;
    text-decoration: none;
}

#bern-event .bern-btn:hover {
    background-color: #0069af;
    color: #ffffff;
}

#bern-event .bern-btn i {
    font-size: 16px;
}

#bern-event .bern-btn-tertiary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background-color: #fafafa;
    color: #0083db;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    font-weight: bold;
    width: max-content;
    cursor: pointer;
    text-decoration: none;
}

#bern-event .bern-btn-tertiary:hover {
    background-color: #f1f1f1;
    color: #0083db;
}

/* Fixer «Jetzt anmelden»-Button: erscheint, sobald der Hero-CTA aus dem
   Viewport scrollt, und verschwindet bei der Anmeldung (vgl. update-event). */
#bern-event .jump-to-sign-up-fixed {
    position: fixed;
    inset: auto 25px 20px 25px;
    width: auto;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration, 200ms) linear;
}

#bern-event .jump-to-sign-up-fixed.show {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Hero ---------- */

#bern-event .bern-hero {
    position: relative;
}

#bern-event .hero-text {
    position: relative;
    z-index: 1;
    padding-top: 108px; /* 28px unter der fixen Navigation (80px) */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#bern-event .eyebrow {
    color: #0083db;
    font-size: 18px;
    line-height: 28px;
    font-weight: bold;
    margin: 0 0 29px;
}

#bern-event .bern-hero h1 {
    font-size: 30px;
    line-height: 40px;
    letter-spacing: 0.2px;
    font-weight: bold;
    color: #333333;
    margin: 0 0 24px;
}

#bern-event .lead {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400; /* Bootstrap .lead setzt 300 */
    margin: 0 0 24px;
}

#bern-event .bern-illustration {
    position: relative;
    margin-top: 40px;
    height: 391px;
    pointer-events: none;
    user-select: none;
}

#bern-event .bern-illustration img {
    position: absolute;
    max-width: none;
}

/* Cluster auf ein 375px-Design zentriert: Offset = 50% − 187.5px + Figma-x */
#bern-event .bern-illustration .blob-1 {
    left: calc(50% - 262px);
    top: 0;
    width: 487px;
    height: 391px;
}

#bern-event .bern-illustration .blob-2 {
    left: calc(50% - 172px);
    top: 90px;
    width: 386px;
    height: 307px;
}

#bern-event .bern-illustration .bear {
    left: calc(50% - 111.5px);
    top: 15px;
    width: 224px;
    height: 361px;
}

/* ---------- Unsere Bern Events ---------- */

#bern-event .bern-events {
    background-color: #f0f9ff;
    margin-top: 76px;
    padding: 48px 0 82px;
}

#bern-event .bern-events h2 {
    margin-bottom: 48px;
}

#bern-event .cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#bern-event .online-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* .card kollidiert mit Bootstrap (margin) und der .card-Komponente aus
   escola-page.css (max-width 288, cursor, Hover-Scale/-Schatten) — alles
   explizit neutralisieren. */
#bern-event .card {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px;
    margin: 0;
    display: block;
    width: 100%;
    max-width: none;
    cursor: auto;
    transition: none;
}

#bern-event .card:hover,
#bern-event .card:active {
    background-color: #ffffff;
    box-shadow: none;
    transform: none;
}

#bern-event .main-card {
    min-height: 436px;
}

#bern-event .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 8px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.2px;
    font-weight: bold;
    width: max-content;
}

#bern-event .badge-red {
    background-color: #fdf2f2;
    border-color: #f7cccc;
    color: #d50000;
}

#bern-event .badge-blue {
    background-color: #f4fafe;
    border-color: #d3eafd;
    color: #2196f3;
}

#bern-event .card h3 {
    font-size: 21px;
    line-height: 28px;
    font-weight: bold;
    color: #333333;
    text-align: left;
    margin: 24px 0 0;
}

#bern-event .card .date {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2px;
    margin: 24px 0 0;
}

#bern-event .card .address {
    display: block;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2px;
    color: #0083db;
    text-decoration: none;
    margin: 16px 0 0;
}

#bern-event .card .address:hover {
    text-decoration: underline;
}

#bern-event .card h4 {
    font-size: 17px;
    line-height: 24px;
    font-weight: bold;
    letter-spacing: 0; /* escola-page.css setzt h4 auf 1.2px */
    color: #333333;
    margin: 26px 0 0;
}

#bern-event .timeline {
    margin-top: 24px;
}

#bern-event .timeline .row {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 32px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2px;
    padding: 16px 0;
    margin: 0; /* Bootstrap .row bringt negative Margins mit */
}

#bern-event .timeline .row:first-child {
    padding-top: 0;
}

#bern-event .timeline .row:last-child {
    padding-bottom: 0;
}

#bern-event .timeline .row + .row {
    border-top: 1px solid #e5e5e5;
}

#bern-event .timeline .hour {
    font-weight: bold;
    color: #333333;
}

#bern-event .card .via {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2px;
    margin: 16px 0 0;
}

/* ---------- Hosts ---------- */

#bern-event .bern-hosts {
    margin-top: 68px;
    text-align: center;
}

#bern-event .bern-hosts h2 {
    margin-bottom: 48px;
}

#bern-event .hosts {
    display: flex;
    justify-content: center;
    column-gap: 24px;
}

#bern-event .host {
    width: 157px;
}

#bern-event .host img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 10px 0 18px;
}

#bern-event .host .name {
    font-size: 16px;
    line-height: 28px;
    font-weight: bold;
    margin: 0;
}

#bern-event .host .role {
    font-size: 14px;
    line-height: 25px;
    margin: 0;
}

/* ---------- Wellen-Divider ---------- */

#bern-event .bern-divider {
    margin-top: 52px;
    position: relative;
    pointer-events: none;
    user-select: none;
}

#bern-event .bern-divider .bear-walking {
    position: relative;
    z-index: 1;
    display: block;
    width: 88.5px;
    height: 50.6px;
    margin-left: 61.7px;
}

#bern-event .bern-divider .wave {
    display: block;
    width: 856px;
    max-width: none;
    height: 55.4px; /* Figma skaliert die Welle mobil leicht flacher */
    margin-top: -17px;
    margin-left: -17px;
}

/* ---------- Warum Sie dabei sein sollten ---------- */

#bern-event .bern-why {
    margin-top: 68px;
}

#bern-event .bern-why h2 {
    margin-bottom: 40px;
    margin-inline: auto;
    max-width: 271px;
}

#bern-event .why-track {
    display: flex;
    width: 295px;
    margin-inline: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

#bern-event .why-track::-webkit-scrollbar {
    display: none;
}

#bern-event .why-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#bern-event .why-item .icon {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
}

#bern-event .why-item .icon img {
    max-width: none;
}

#bern-event .why-item .icon i {
    font-size: 50px;
    color: #0083db;
}

#bern-event .why-item h3 {
    font-size: 21px;
    line-height: 28px;
    font-weight: bold;
    color: #333333;
    margin: 0 0 13px;
}

#bern-event .why-item p {
    font-size: 14px;
    line-height: 25px;
    margin: 0;
}

#bern-event .why-dots {
    display: flex;
    justify-content: center;
    column-gap: 8px;
    margin-top: 50px;
}

#bern-event .why-dots .dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #eeeeee;
    cursor: pointer;
}

#bern-event .why-dots .dot.active {
    background-color: #0083db;
}

/* ---------- Für wen eignet sich der Event? ---------- */

#bern-event .bern-audience {
    position: relative;
    margin-top: 113px;
    text-align: center;
}

#bern-event .bern-audience h2 {
    margin-bottom: 40px;
    margin-inline: auto;
    max-width: 317px;
}

#bern-event .bern-audience p {
    font-size: 16px;
    line-height: 28px;
    color: #000000;
    margin: 0 auto;
    max-width: 317px;
}

#bern-event .bern-audience .bear-backpack {
    position: absolute;
    z-index: 1;
    right: 21px;
    top: 216px;
    width: 80px;
    height: 176px;
    max-width: none;
    transform: scaleX(-1);
    pointer-events: none;
    user-select: none;
}

/* ---------- Nicht der passende Termin? ---------- */

#bern-event .bern-alternatives {
    background-color: #e2f3ff;
    margin-top: 180px;
    padding: 80px 0 65px;
}

#bern-event .bern-alternatives h2 {
    margin-bottom: 60px;
    margin-inline: auto;
    max-width: 239px;
}

#bern-event .bern-alternatives .list {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 60px;
}

#bern-event .bern-alternatives .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 30px;
    width: 319px;
    max-width: 100%;
}

#bern-event .bern-alternatives .item h4 {
    font-size: 17px;
    line-height: 24px;
    font-weight: bold;
    letter-spacing: 0; /* escola-page.css setzt h4 auf 1.2px */
    color: #333333;
    margin: 0;
}

#bern-event .bern-alternatives .item p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2px;
    text-align: center;
    margin: 0;
}

/* ---------- Anmeldung ---------- */

#bern-event .bern-signup {
    margin-top: 68px;
    text-align: center;
}

#bern-event .bern-signup h2 {
    margin-bottom: 8px;
}

#bern-event .bern-signup iframe {
    display: block;
    width: min(830px, calc(100% - 2px));
    margin-inline: auto;
    border: none;
    /* Airtables Resize-Snippet greift bei diesem Formular nicht — Höhe darum
       fix auf die gemessene Formularlänge (kein Scrollen im Formular, kein
       Leerraum danach). Mobile umbricht mehr Text als Desktop (s. unten). */
    height: 1300px;
}

/* =====================================================================
   Desktop (≥ 992px) — Referenz: Frame «MacBook Pro - Bern Event», 1440px
   ===================================================================== */

@media screen and (min-width: 992px) {
    #bern-event {
        padding-bottom: 72px;
    }

    #bern-event .jump-to-sign-up-fixed {
        inset: auto 32px 196px auto;
    }

    /* Hero: Textspalte links (x=187, 435px), Illustration rechts verankert.
       Die fixe Navigation (80px) überlagert den Inhalt — alle Hero-Offsets
       enthalten sie deshalb. */
    #bern-event .bern-hero {
        height: 789px;
    }

    #bern-event .hero-text {
        padding-top: 231px;
        max-width: 435px;
    }

    #bern-event .eyebrow {
        margin-bottom: 40px;
    }

    #bern-event .bern-hero h1 {
        font-size: 40px;
        line-height: 48px;
        letter-spacing: 0;
    }

    #bern-event .lead {
        font-size: 14px;
        line-height: 20px;
        letter-spacing: 0.2px;
        margin-bottom: 24px;
    }

    #bern-event .bern-illustration {
        position: absolute;
        top: 127px;
        right: 41px;
        width: 698px;
        height: 559px;
        margin-top: 0;
    }

    #bern-event .bern-illustration .blob-1 {
        left: 0;
        top: 0;
        width: 698.3px;
        height: 559px;
    }

    #bern-event .bern-illustration .blob-2 {
        left: 129.7px;
        top: 129px;
        width: 552.8px;
        height: 438.1px;
    }

    #bern-event .bern-illustration .bear {
        left: 237.6px;
        top: 56px;
        width: 277px;
        height: 447px;
    }

    /* Events: Band #F0F9FF, Karten 510px links/rechts. Der Figma-Frame ist
       unten höher gepolstert als oben (690.7px Bandhöhe). */
    #bern-event .bern-events {
        margin-top: 0;
        padding: 80px 0 106px;
    }

    #bern-event .cards {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 47px;
    }

    #bern-event .card {
        padding: 40px;
        width: 510px;
        max-width: 100%;
    }

    #bern-event .main-card {
        min-height: 436px;
    }

    #bern-event .online-cards .card {
        min-height: 211px;
    }

    #bern-event .online-cards {
        width: 510px;
        max-width: 100%;
    }

    #bern-event .card .address .mobile-br {
        display: none;
    }

    #bern-event .timeline .row {
        grid-template-columns: 168px 1fr;
    }

    /* Hosts */
    #bern-event .bern-hosts {
        margin-top: 82px;
    }

    #bern-event .bern-hosts h2 {
        margin-bottom: 56px;
    }

    #bern-event .hosts {
        column-gap: 44px;
    }

    /* Wellen-Divider: volle Breite, Bär bei x=106.5 */
    #bern-event .bern-divider {
        margin-top: 38px;
    }

    #bern-event .bern-divider .bear-walking {
        width: 161px;
        height: 92px;
        margin-left: 106.5px;
    }

    #bern-event .bern-divider .wave {
        width: 100%;
        height: auto;
        margin-top: -31px;
        margin-left: 0;
    }

    /* Warum: Reihen zu 3 + 2, kein Karussell */
    #bern-event .bern-why {
        margin-top: 134px;
    }

    #bern-event .bern-why h2 {
        margin-bottom: 60px;
        max-width: none;
    }

    #bern-event .why-track {
        width: auto;
        max-width: 931px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px 23px;
        overflow: visible;
    }

    #bern-event .why-item {
        flex: 0 0 295px;
    }

    #bern-event .why-dots {
        display: none;
    }

    /* Für wen: Text 504px zentriert, Rucksack-Bär rechts */
    #bern-event .bern-audience {
        margin-top: 140px;
    }

    #bern-event .bern-audience h2 {
        margin-bottom: 60px;
        max-width: none;
    }

    #bern-event .bern-audience p {
        max-width: 504px;
    }

    #bern-event .bern-audience .bear-backpack {
        right: 147px;
        top: 0;
        width: 155px;
        height: 340px;
    }

    /* Alternativen: Band #E2F3FF, drei Spalten in 1293px */
    #bern-event .bern-alternatives {
        margin-top: 141px;
        padding: 80px 0;
    }

    #bern-event .bern-alternatives h2 {
        max-width: none;
    }

    #bern-event .bern-alternatives .list {
        flex-direction: row;
        align-items: flex-start;
        column-gap: 60px;
    }

    #bern-event .bern-alternatives .item {
        flex: 1 0 0;
        width: auto;
    }

    #bern-event .bern-alternatives .item:nth-child(1) p {
        max-width: 356px;
    }

    #bern-event .bern-alternatives .item:nth-child(2) p {
        max-width: 346px;
    }

    #bern-event .bern-alternatives .item:nth-child(3) p {
        max-width: 338px;
    }

    /* Anmeldung */
    #bern-event .bern-signup {
        margin-top: 143px;
    }

    #bern-event .bern-signup h2 {
        text-box: normal;
        font-size: 32px;
        line-height: 56px;
        margin-bottom: 12px;
    }
}

/* Zwischenbreiten: Illustration skaliert, damit sie den Hero-Text nicht
   überlagert (im Figma existiert nur 1440/375). */
@media screen and (min-width: 992px) and (max-width: 1280px) {
    #bern-event .bern-illustration {
        transform: scale(0.78);
        transform-origin: top right;
        right: 24px;
    }
}
