/* =============================================
   Hero Block — taubenloft/hero
   Pixel-perfect from Figma 1:2577 (1920×1058)
   ============================================= */

.tl-hero {
    background: #333a42;
    color: #b9bec5;
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Safety: in the Gutenberg editor iframe theme CSS sometimes doesn't load
   immediately — give every image/svg inside .tl-hero a sane default so the
   block doesn't blow up the editor canvas.
   NOTE: do NOT set `height: auto` here — specific rules like
   `.tl-hero__badge { height: 49px }` would lose to `.tl-hero img` specificity. */
.tl-hero img  { max-width: 100%; display: block; }
.tl-hero svg  { max-width: 100%; }

/* Page background follows the hero */
.tl-hero { isolation: isolate; }


.tl-hero__container {
    max-width: 1200px;              /* Figma content width */
    margin: 0 auto;
    padding: 96px 24px;             /* Figma: section paddingBottom 96 (nav previously occupied top) */
}

/* ===== NAV ===== */
.tl-hero__nav {
    width: 100%;
    padding: 16px 24px;
    border-bottom: 0.5px solid rgb(120, 125, 132);  /* Figma 2026-05: stroke #787D84 weight 0.5 */
}

.tl-hero__nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.tl-hero a.tl-hero__nav-logo,
.tl-hero .tl-hero__nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.tl-hero__nav-logo img {
    height: 35px;
    width: auto;
    display: block;
}

.tl-hero__nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tl-hero__nav-menu li { margin: 0; }

.tl-hero .tl-hero__nav-menu a {
    color: #b9bec5 !important;
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', sans-serif;
    font-size: 16px;
    line-height: 22px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
    letter-spacing: 0;
}

.tl-hero .tl-hero__nav-menu a:hover,
.tl-hero .tl-hero__nav-menu a:focus {
    opacity: 0.7;
    color: #b9bec5 !important;
}

/* ===== TOP: pre-heading + org logos + H1 =====
   Figma:
     Frame 17572 itemSpacing 48  → .top → .bottom
     Frame 17571 itemSpacing 48  → (preheading+logos) ↔ H1
     logo wrapper itemSpacing 16 → preheading ↔ logos row
*/
.tl-hero__top {
    text-align: center;
    margin-bottom: 48px;            /* Figma Frame 17572 itemSpacing */
}

.tl-hero__pre-heading {
    font-size: 16px;
    line-height: 21.824px;          /* Figma lineHeightPx */
    font-weight: 600;
    color: #b9bec5;
    max-width: 485px;               /* Figma 2026-05: logo frame width 485 */
    margin: 0 auto 16px;            /* center within container; Figma itemSpacing 16 */
}

.tl-hero__org-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;                      /* Figma Frame 17552 itemSpacing */
    height: 55px;
    margin: 0 auto 48px;            /* Figma Frame 17571 itemSpacing → H1 */
    max-width: 600px;
}

.tl-hero__org-logos img {
    max-height: 55px;
    width: auto;
    object-fit: contain;
    display: block;
}

.tl-hero__heading {
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', sans-serif;
    font-size: 48px;
    line-height: 57.6px;            /* Figma lineHeightPx */
    font-weight: 500;
    color: #b9bec5;
    letter-spacing: 0;
    max-width: 1200px;              /* matches Figma frame width */
    margin: 0 auto;
    text-align: center;
}

/* ===== BOTTOM: 3-column grid with side photos =====
   Figma Frame 17570: 1441×494, HORIZONTAL, itemSpacing 121, counterAxis CENTER
   Left photo 342×348 | middle 515 | right photo 342×348
*/
.tl-hero__bottom {
    display: grid;
    grid-template-columns: 275px 515px 275px;   /* Figma 2026-05: photo 275 / middle 515 / photo 275 */
    column-gap: 68px;                            /* Figma 2026-05: itemSpacing 68 */
    align-items: center;
    justify-content: center;
}

.tl-hero__img {
    width: 275px;                /* Figma 2026-05 */
    height: 348px;
    border-radius: 0;            /* Figma: sharp corners (was 16px) */
    overflow: hidden;
}

.tl-hero__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tl-hero__center {
    display: flex;
    flex-direction: column;
    align-items: center;            /* Figma counterAxisAlignItems CENTER */
    gap: 48px;                      /* Figma middle itemSpacing (hero_middle ↔ hero_below) */
    min-width: 0;
    width: 100%;
}

/* hero_middle = checklist + buttons (itemSpacing 48). Since they're direct
   siblings inside .tl-hero__center, the 48px gap above covers it. */

/* Checklist — Figma: hero_list itemSpacing 24, each item itemSpacing 10 */
.tl-hero__checklist {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;                            /* Figma itemSpacing */
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
}

.tl-hero__check-item {
    display: flex;
    align-items: center;                  /* Figma: counterAxisAlignItems CENTER (likely) */
    gap: 10px;                            /* Figma itemSpacing */
    font-size: 14px;
    line-height: 19px;
    font-weight: 500;
    color: #b9bec5;
}

.tl-hero__check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #b9bec5;
    margin-top: -0.5px;
}

/* Buttons — Figma: buttons frame 515w HORIZONTAL itemSpacing 24, both buttons layoutGrow:1 (stretch equally) */
.tl-hero__buttons {
    display: flex;
    gap: 24px;                      /* Figma itemSpacing */
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 515px;               /* Figma frame width */
    margin: 0 auto;
}

.tl-hero a.tl-hero__btn,
.tl-hero .tl-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;        /* center text+icon in stretched button */
    gap: 10px;                      /* Figma item gap (text + icon) */
    padding: 10px 20px;             /* Figma padding 10/20 */
    border-radius: 30px;            /* Figma cornerRadius */
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', sans-serif;
    font-size: 16px;
    line-height: 24px;              /* Figma lineHeightPx */
    font-weight: 400;               /* Figma fontWeight 400 (Regular) */
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    cursor: pointer;
    box-shadow: none;
    flex: 1 1 0;                    /* Figma layoutGrow:1 — equal stretch in row */
    min-width: 0;
    box-sizing: border-box;
    align-self: center;
}

.tl-hero a.tl-hero__btn--filled {
    background: #eaebe6;
    color: #333a42 !important;
    border: 1px solid #eaebe6;
}

.tl-hero a.tl-hero__btn--filled:hover,
.tl-hero a.tl-hero__btn--filled:focus {
    opacity: 0.88;
    color: #333a42 !important;
}

.tl-hero a.tl-hero__btn--outline {
    background: transparent;
    color: #b9bec5 !important;
    border: 1px solid #eaebe6;     /* Figma 2026-05: stroke #EAEBE6 @ 1.0 (was rgba 0.6) */
}

.tl-hero a.tl-hero__btn--outline:hover,
.tl-hero a.tl-hero__btn--outline:focus {
    background: rgba(185, 190, 197, 0.08);
    color: #b9bec5 !important;
}

/* Subtle icon nudge on hover */
.tl-hero .tl-hero__btn svg { transition: transform 0.25s ease-out; }
.tl-hero .tl-hero__btn--filled:hover svg,
.tl-hero .tl-hero__btn--filled:focus svg { transform: translateY(2px); } /* ↓ download */
.tl-hero .tl-hero__btn--outline:hover svg,
.tl-hero .tl-hero__btn--outline:focus svg { transform: translate(2px, -2px); } /* ↗ if present */

/* ===== hero_below — cities + map_button =====
   Figma hero_below: VERTICAL, itemSpacing 32, counterAxis CENTER
   - cities-row (logos): "Bereits in…" text + badges row, gap 24
   - map-button:        "Karte anzeigen" + down arrow, gap 16
*/
.tl-hero__cities {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;                      /* Figma hero_below itemSpacing */
    width: -moz-fit-content;
    width: fit-content;
    max-width: 100%;
}

.tl-hero__cities-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;                      /* Figma logos itemSpacing */
}

.tl-hero__cities-text {
    font-size: 16px;
    line-height: 21.824px;          /* Figma lineHeightPx */
    font-weight: 600;
    color: #b9bec5;
    text-align: center;
}

.tl-hero__badges-row {
    display: flex;
    align-items: center;
    gap: 0;                         /* no flex gap — crests overlap via margin (Figma Frame 14 itemSpacing -10) */
}

/* Internal badges overlap (Figma city_logos Frame 14 itemSpacing -10) */
.tl-hero__badge {
    height: 49px;                   /* Figma badge height */
    width: auto;
    object-fit: contain;
    margin-left: -10px;             /* Figma itemSpacing -10 */
    display: block;
}

.tl-hero__badge:first-child {
    margin-left: 0;
}

.tl-hero__cities-count {
    font-size: 14px;
    line-height: 19.096px;
    font-weight: 600;
    color: #b9bec5;
    margin-left: 4px;               /* Figma Frame 17682 itemSpacing 4 (crests group ↔ +25) */
}

.tl-hero__map-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;                      /* Figma map_button itemSpacing */
}

.tl-hero a.tl-hero__map-link {
    font-size: 14px;
    line-height: 19.096px;          /* Figma lineHeightPx */
    font-weight: 600;
    color: #b9bec5 !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.tl-hero a.tl-hero__map-link:hover,
.tl-hero a.tl-hero__map-link:focus {
    opacity: 0.75;
    color: #b9bec5 !important;
}

/* Scroll arrow — Figma "down button": 36×36 round, padding 8/18 */
.tl-hero__scroll-arrow {
    width: 36px;
    height: 36px;
    color: #b9bec5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.85;
}
.tl-hero__scroll-arrow svg {
    display: block;
    transition: transform 0.3s ease-out;
}
.tl-hero a.tl-hero__map-link:hover ~ .tl-hero__scroll-arrow svg,
.tl-hero__map-button:hover .tl-hero__scroll-arrow svg { transform: translateY(3px); }

/* ===== Responsive ===== */

/* ===== Laptop (≤1440px / MacBook 13" default scaling) =====
   At 1440×~756 vh the Figma 1920 layout overflows viewport and side photos
   hug the edges (x≈-8). Tighten everything: smaller padding, smaller side
   photos, narrower heading, smaller column-gap. Target hero height ≈720px
   so CTAs sit above the fold. */
@media (max-width: 1440px) {
    /* Container has max-width 1200, so at 1440 there's ~240px slack — only tighten section padding, keep Figma photo/gap sizes */
    .tl-hero__container { padding: 96px 32px; }
    .tl-hero__top { margin-bottom: 48px; }
}

@media (max-width: 1280px) {
    /* Slightly tighter gap to keep grid on one row at viewports ~1200-1280 */
    .tl-hero__bottom {
        column-gap: 48px;
    }
}

/* ===== Tablet & narrow laptop (≤1100, ≥768) =====
   At intermediate widths middle column gets too narrow when squeezed between
   two side photos. Restructure via grid-template-areas: photos go in the TOP
   ROW (side-by-side), content (heading, checklist, buttons) FULL-WIDTH BELOW.
   Looks balanced 770→1100. */
@media (max-width: 1100px) and (min-width: 768px) {
    .tl-hero__container { padding: 64px 32px 48px; }
    .tl-hero__bottom {
        grid-template-columns: 288px 288px;   /* fixed widths so photos sit close, centered */
        grid-template-rows: auto auto;
        grid-template-areas:
            "imgL imgR"
            "content content";
        column-gap: 16px;                /* -33% (was 24) to bring photos closer */
        row-gap: 48px;
        align-items: start;
        justify-content: center;
    }
    .tl-hero__img--left  { grid-area: imgL; }
    .tl-hero__img--right { grid-area: imgR; }
    .tl-hero__center {
        grid-area: content;
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
    .tl-hero__img {
        width: 288px;                    /* -10% from 320 */
        height: auto;
        aspect-ratio: 342 / 348;
        border-radius: 14px;
    }
    .tl-hero__heading { font-size: 38px; line-height: 46px; }

    /* Buttons side-by-side again since we have full width now */
    .tl-hero__buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* ===== Mobile — Figma node 1:2598 (440×1058) =====
   Section padding:  48 / 20 / 48 / 20
   Container gap:    32 (between top and bottom)
   Frame 17554 gap:  48 (logo block ↔ Frame 17553)
   logo wrapper gap: 16 (preheading ↔ logos)
   Logos row gap:    24, sizes ~39h
   H1:               38/45.6 weight 500
   Frame 17553 gap:  32 (H1 ↔ checklist)
   hero_list gap:    16 (smaller than desktop 24)
   ================================================ */
@media (max-width: 767px) {
    .tl-hero__container { padding: 48px 20px; }
    .tl-hero__top { margin-bottom: 48px; }
    .tl-hero__pre-heading {
        font-size: 16px;
        line-height: 22.4px;
        margin: 0 0 16px;
    }
    .tl-hero__org-logos {
        gap: 24px;
        height: 39px;
        margin: 0 auto 48px;          /* Figma Frame 17554 itemSpacing 48 */
        max-width: 100%;
        justify-content: center;      /* Figma counterAxisAlignItems CENTER */
        flex-wrap: nowrap;
    }
    .tl-hero__org-logos img {
        max-height: 39px;
        flex-shrink: 1;
        min-width: 0;
        object-fit: contain;
    }
    .tl-hero__heading {
        font-size: 38px;
        line-height: 45.6px;
        max-width: 100%;
    }

    .tl-hero__bottom {
        grid-template-columns: 1fr;
        row-gap: 32px;
    }
    .tl-hero__img--left,
    .tl-hero__img--right { display: none; }

    .tl-hero__center {
        gap: 32px;
        max-width: 515px;             /* Figma middle column width — don't stretch wider */
        margin: 0 auto;
    }
    .tl-hero__checklist {
        gap: 16px;                     /* mobile itemSpacing 16 */
        width: 100%;                   /* stretch to match buttons width */
        max-width: 400px;
        padding-left: 32px;            /* indent items so icons align with button text edge */
        box-sizing: border-box;
    }

    .tl-hero__buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;                    /* Figma itemSpacing 24 */
        width: 100%;
        max-width: 400px;             /* Figma button frame width */
        margin: 0 auto;
    }
    .tl-hero a.tl-hero__btn,
    .tl-hero .tl-hero__btn {
        justify-content: center;
        padding: 10px 20px;
        width: 100%;
    }

    .tl-hero__cities { gap: 32px; }                 /* Figma hero_below itemSpacing */
    .tl-hero__cities-row { gap: 24px; }             /* Figma logos itemSpacing */
    .tl-hero__cities-text {
        font-size: 16px;                            /* Figma 16 (not 14) */
        line-height: 22.4px;
        font-weight: 600;
    }
    .tl-hero__cities-count { display: inline; }       /* show +25 counter on mobile too */
    .tl-hero__map-button { gap: 16px; }              /* Figma map_button itemSpacing */
    .tl-hero a.tl-hero__map-link {
        font-size: 16px;                            /* Figma mobile 16/22.4 weight 600 */
        line-height: 22.4px;
    }
}

/* ===== Wider mobile / tablet portrait (600-767px) =====
   Between Figma mobile 440 and tablet — single-column but logos/H1 stay larger
   since there's room. */
@media (min-width: 600px) and (max-width: 767px) {
    .tl-hero__container { padding: 56px 28px; }
    .tl-hero__org-logos {
        gap: 24px;
        height: 48px;             /* between mobile 39 and desktop 55 */
        margin: 0 auto 48px;
    }
    .tl-hero__org-logos img { max-height: 48px; }
    .tl-hero__heading {
        font-size: 36px;
        line-height: 43.2px;
        word-break: break-word;
        hyphens: auto;
    }
    .tl-hero__center { max-width: 480px; }
}

/* ===== Narrow mobile (≤480px / iPhone SE / Android base) =====
   Min supported viewport 360 (iPhone 12 etc) — at 360 with logos 35px
   and gap 12, the 5-logo row stays inside the content area comfortably. */
@media (max-width: 480px) {
    .tl-hero__container { padding: 40px 16px; }
    .tl-hero__org-logos {
        gap: 12px;
        height: 35px;
        margin: 0 auto 40px;
    }
    .tl-hero__org-logos img { max-height: 35px; }

    .tl-hero__heading {
        font-size: 28px;             /* down from 38 */
        line-height: 33.6px;
    }
    .tl-hero__center { gap: 28px; }
    .tl-hero__buttons { gap: 16px; }
}

/* Hamburger icon — only rendered on mobile */
.tl-hero__nav-hamburger {
    display: none;
    width: 24px;
    height: 18px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}
.tl-hero__nav-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #b9bec5;
    border-radius: 2px;
}

/* ===== Editor preview ===== */
.tl-hero-editor-preview {
    background: #333a42;
    padding: 40px 24px;
    text-align: center;
    color: #b9bec5;
    border-radius: 4px;
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', sans-serif;
}

.tl-hero-editor-preview h2 {
    font-size: 22px;
    font-weight: 500;
    color: #b9bec5;
    margin: 0 0 16px;
    line-height: 1.25;
}

.tl-hero-editor-preview .preview-pre {
    font-size: 12px;
    color: rgba(185, 190, 197, 0.7);
    margin-bottom: 12px;
    font-weight: 600;
}

.tl-hero-editor-preview .preview-checks {
    font-size: 12px;
    color: rgba(185, 190, 197, 0.85);
    margin-bottom: 16px;
    line-height: 1.8;
    text-align: left;
    display: inline-block;
}

.tl-hero-editor-preview .preview-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tl-hero-editor-preview .preview-btn-1 {
    background: #eaebe6;
    color: #333a42;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 12px;
}

.tl-hero-editor-preview .preview-btn-2 {
    border: 1px solid rgba(185, 190, 197, 0.5);
    color: #b9bec5;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 12px;
}
