/**
 * Woltmann – Startseite (Elementor-Seite „Home“).
 *
 * Farben, Schriften, Abstände, Rahmen, Rundungen, Hintergründe, Grids und Hover-Farben sind in Elementor eingestellt.
 * Hier steht nur, was Elementor nicht kann:
 *  - Kreis-Hover (Blau füllt sich von unten rechts) auf Buttons (Klasse w-fx-btn) und Karten
 *  - Farbwechsel von Überschrift/Text/Icon beim Hover über die ganze Karte
 *  - wischbare Reihen mit Scroll-Snap (Klasse w-home-rail) + Pfeile (woltmann-home.js)
 *  - Markup der WPCarSync-Shortcodes: Schnellsuche, Angebots-Chips, Angebote, Standorte
 * Klassen werden in Elementor unter Erweitert → CSS-Klassen gesetzt.
 */

/* Kreis-Hover der Elementor-Buttons (w-fx-btn, w-fx-btn--light, w-fx-btn--outline) und Textlink mit Pfeil (w-link-arrow)
   stehen seitenweit in woltmann-design.css (auch für Angebotsinhalte u. a. Elementor-Seiten). */
.w-home .w-entry::before, .w-home .w-svc::before, .w-home .w-topic__body::before, .w-home .w-loc::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--w-fx, var(--w-blue-700));
    clip-path: circle(0% at 100% 100%); transition: clip-path .55s var(--w-ease);
}
.w-home .w-entry, .w-home .w-svc, .w-home .w-topic__body, .w-home .w-loc { position: relative; isolation: isolate; }
.w-home .w-entry:hover::before, .w-home .w-svc:hover::before, .w-home .w-topic:hover .w-topic__body::before, .w-home .w-loc:hover::before {
    clip-path: circle(150% at 100% 100%);
}
/* Ecken: Karten ohne overflow:hidden (sonst glättet der Browser Rahmen und Füllung getrennt → weißer Saum).
   Rahmen beim Hover = Füllfarbe → Füllung mit 4 px kleinerem Radius als die Karte (14 px), sie verschwindet im Rahmen. */
.w-home .w-entry::before, .w-home .w-svc::before { border-radius: 10px; }
.w-home .w-topic__body::before { border-radius: 0 0 10px 10px; }
/* Rahmen ≠ Füllfarbe (hervorgehobene Kachel, Standorte): exakter Innenradius, sonst ragen Ecken auf den Rahmen */
.w-home .w-svc--featured { --w-fx: var(--w-blue-900); }
.w-home .w-svc--featured::before { border-radius: 13px; }
.w-home .w-loc::before { border-radius: 13px; }
/* Themen-Bild oben: ohne overflow der Karte selbst auf die Rundung zuschneiden (auch beim Zoom) */
.w-home .w-topic__img .elementor-widget-container { overflow: hidden; border-radius: 13px 13px 0 0; }

/* Farbwechsel beim Hover über die ganze Karte. „body …“ bzw. doppelte Klassen, weil Elementor die Farben je Widget
   mit .elementor-633 .elementor-element.elementor-element-xxx … setzt (gleich stark bzw. beim Icon stärker). */
.w-home :is(.w-entry, .w-svc, .w-topic) .elementor-heading-title,
.w-home :is(.w-entry, .w-svc, .w-topic) .elementor-widget-text-editor,
.w-home .w-svc .elementor-icon { transition: color .3s, background-color .3s, fill .3s; }
body .w-home :is(.w-entry, .w-svc, .w-topic):hover .elementor-heading-title,
body .w-home .w-topic:hover .w-topic__more { color: #fff; }
body .w-home :is(.w-entry, .w-svc, .w-topic):hover .elementor-widget-text-editor:not(.w-topic__more) { color: rgba(255, 255, 255, .8); }
.w-home.w-home .w-svc:hover .w-svc__icon.elementor-view-stacked .elementor-icon { background-color: var(--w-orange); color: #fff; fill: #fff; }
.w-home.w-home .w-svc:hover .w-svc__icon.elementor-view-stacked .elementor-icon svg { fill: #fff; }
.w-home .w-entry .w-entry__img img { transition: transform .5s var(--w-ease); }
.w-home .w-entry:hover .w-entry__img img { transform: translateX(8px); }
.w-home .w-topic .w-topic__img img { transition: transform .4s; }
.w-home .w-topic:hover .w-topic__img img { transform: scale(1.05); }


/* Imagefilm-Button: runder Play-Kreis, Text vertikal mittig dazu (Elementor richtet Icon und Text nicht aus: Text klebt oben) */
.w-film .elementor-button-content-wrapper { align-items: center; }
.w-film .elementor-button-icon {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 14px;
    background: rgba(255, 255, 255, .15); border: 2px solid rgba(255, 255, 255, .7); transition: background .2s, border-color .2s;
}
.w-film .elementor-button:hover .elementor-button-icon { background: var(--w-orange); border-color: var(--w-orange); }

/* ---------- Wischbare Reihen (Einstiege, Angebote, Standorte) + Pfeile im Abschnittskopf ---------- */
.w-home-rail {
    --card-w: 78%; --card-gap: 16px;
    display: grid !important; grid-auto-flow: column; grid-auto-columns: var(--card-w); grid-template-columns: none;
    gap: var(--card-gap) !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--w-edge, 20px); padding: 4px var(--w-edge, 20px) 16px !important; margin: 0 calc(-1 * var(--w-edge, 20px)); scrollbar-width: none; /* bis an den Bildschirmrand = Seitenrand */
}
.w-home-rail::-webkit-scrollbar { display: none; }
/* Mit der Maus ziehen (woltmann-home.js): Greif-Cursor, während des Ziehens kein Einrasten und keine Textauswahl */
@media (pointer: fine) { .w-home-rail { cursor: grab; } }
.w-home-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.w-home-rail.is-dragging a { pointer-events: none; }
.w-home-rail > * { scroll-snap-align: start; min-width: 0; width: auto !important; }
.w-home-rail > [hidden] { display: none !important; }
@media (min-width: 700px) { .w-home-rail { --card-w: calc((100% - 2 * var(--card-gap)) / 2.3); } }
@media (min-width: 1000px) {
    .w-home-rail { --card-w: calc((100% - 3 * var(--card-gap)) / 4); margin: 0; padding: 4px 0 16px !important; scroll-padding: 0; }
    .w-home .w-rail--entries { --card-w: calc((100% - 4 * var(--card-gap)) / 5); }
    /* Angebote: 4 pro Ansicht wie die übrigen Reihen (Wunsch 19.11.2026; vorher 3 wie Modell-/Markenseite) */
}
.w-home .w-section-head.w-has-nav { flex-direction: row; align-items: flex-end; justify-content: space-between; }
.w-rail-nav { display: none; gap: 8px; flex: none; }
.w-home .w-rail-nav button {
    width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--w-line); background: #fff;
    display: grid; place-items: center; cursor: pointer; color: var(--w-blue-700); transition: background .2s, color .2s, border-color .2s;
}
.w-home .w-rail-nav button:hover:not(:disabled), .w-home .w-rail-nav button:focus:not(:disabled) { background: var(--w-blue-700); border-color: var(--w-blue-700); color: #fff; }
.w-home .w-rail-nav button:disabled { opacity: .35; cursor: default; }
.w-rail-nav svg { width: 18px; height: 18px; }
.w-home.w-sec--dark .w-rail-nav button { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.w-home.w-sec--dark .w-rail-nav button:hover:not(:disabled) { background: #fff; border-color: #fff; color: var(--w-blue-900); }
@media (min-width: 1000px) { .w-rail-nav { display: flex; } }
.w-rail-empty { color: var(--w-muted); padding: 24px 0; margin: 0; }

/* ---------- Familie: Badge und Zeitleiste ---------- */
.w-family__badge strong { display: block; font-size: 30px; line-height: 1.1; margin-bottom: 6px; }
.w-home ol.w-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.w-home ol.w-timeline li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; margin: 0; }
.w-home ol.w-timeline b { color: var(--w-orange-text); } /* barrierearm, s. --w-orange-text */

/* ---------- Schnellsuche: Markup aus [WPCS_filter key=…] und [WPCS_filterform_submit] ---------- */
.w-home .w-qs > .elementor-element { min-width: 0; margin: 0; }
.w-home .w-qs .wpcs-filter { margin: 0; }
.w-home .w-qs__price .wpcs-filter__label { display: block; margin: 0 0 4px; font: 700 12px/1.3 "Montserrat", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--w-muted); }
.w-home .w-qs__submit .wpcs-filter__submit { width: 100%; min-height: 48px; white-space: nowrap; }
/* Zahl im Button mit gleich breiten Ziffern: beim Hochzählen springt nichts (Spaltenbreite fest in Elementor: 290 px) */
.w-home .w-qs__submit .wpcs_search_count { font-variant-numeric: tabular-nums; }

/* ---------- Angebote: Chips (Template theme/ui/uri_filter_chips.php) + [WPCS_offers] als Reihe ---------- */
.w-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.w-home .w-chip {
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--w-line); background: #fff;
    font: 600 14px "Montserrat", sans-serif; text-transform: none; color: var(--w-ink); cursor: pointer; transition: border-color .2s, color .2s;
}
.w-home .w-chip:hover, .w-home .w-chip:focus { background: #fff; color: var(--w-blue-700); border-color: var(--w-blue-700); }
.w-home .w-chip[aria-pressed="true"] { background: var(--w-blue-700); border-color: var(--w-blue-700); color: #fff; }
/* Gleich hohe Angebotskarten: Höhe durch alle Ebenen bis zur Karte durchreichen
   (Liste → wpcs_2slides_container → _track → _content1 → Karte); Preise/Buttons sitzen dann unten bündig (WPCarSync: Footer margin-top:auto) */
.w-home .w-offers-rail .wpcs-offers-list > *,
.w-home .w-offers-rail .wpcs_2slides_track,
.w-home .w-offers-rail .wpcs_2slides_content1 { height: 100%; }
.w-home .w-offers-rail .wpcs-offer-card { height: 100%; display: flex; flex-direction: column; }

/* ---------- Standorte: Markup aus [WPCS_locations template="home_rail"] ---------- */
.w-home .w-loc {
    --w-fx: #0f6a93;
    display: flex; flex-direction: column; height: 100%; border-radius: 14px; background: var(--w-blue-700); overflow: hidden;
    text-decoration: none; color: #fff; border: 1px solid rgba(255, 255, 255, .08); transition: border-color .35s;
}
.w-home .w-loc:hover { border-color: rgba(255, 255, 255, .25); color: #fff; }
.w-loc__img { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.w-home .w-loc__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--w-ease); }
.w-home .w-loc:hover .w-loc__img img { transform: scale(1.05); }
.w-loc__badge { position: absolute; top: 12px; left: 12px; background: var(--w-orange); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.w-loc__body { padding: 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.w-home .w-loc__title { margin: 0; font: 700 19px/1.25 "Montserrat", sans-serif; text-transform: none; color: var(--w-orange); }
.w-home .w-loc__brands { margin: 0; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.w-home .w-loc__address { margin: 8px 0 0; font-style: normal; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .9); }
.w-loc__phone { margin-top: auto; padding-top: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.w-loc__phone svg { width: 16px; height: 16px; color: var(--w-orange); }

/* ---------- Video-Lightbox ---------- */
.w-lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 10, 15, .92); display: none; place-items: center; padding: 20px; }
.w-lightbox.is-open { display: grid; }
.w-lightbox__frame { width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.w-lightbox__frame iframe { width: 100%; height: 100%; border: 0; }
.w-lightbox .w-lightbox__close {
    position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 0;
    background: #fff; color: var(--w-blue-900); display: grid; place-items: center; cursor: pointer;
}
.w-lightbox__close svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) { .w-home *, .w-home *::before { transition: none !important; } }

/* Standorte-Seite: dieselben Standortkarten als Raster statt wischbarer Reihe (Klasse w-locs-grid am Shortcode-Widget;
   ohne .w-section-head im Abschnitt setzt woltmann-home.js keine Pfeile) */
.w-locs-grid .w-home-rail { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); overflow: visible; scroll-snap-type: none; margin: 0; padding: 0 !important; }
@media (min-width: 700px) { .w-locs-grid .w-home-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .w-locs-grid .w-home-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
