/*
 * Neue Startseite (Umbauplan Stufe 4) – Vorlage templates/home-next.php, Inhalte inc/home.php.
 * Entwurf: Canvas «boatmarket24 Seiten», Blätter «Startseite» (Desktop 1440, Telefon 390).
 * Farben, Radien und Schriften nur über Tokens. Eine Schrift (Geist), keine Mono-Schrift, keine Versalien.
 */
.bm24-home { background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
.bm24-home *, .bm24-home *::before, .bm24-home *::after { box-sizing: border-box; }
.bm24-home a { color: var(--ink); }
.bm24-home h1, .bm24-home h2, .bm24-home h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-weight: var(--weight-semibold); }
.bm24-home p { margin: 0; font-size: inherit; line-height: inherit; } /* MyListing setzt jedes <p> auf 14px */
.bm24-home h2 { font-size: 34px; line-height: 40px; letter-spacing: -0.02em; }
.bm24-h-in { max-width: 1400px; margin: 0 auto; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px)); }

/* Kopfbereich: Aussage, Premium-Platz (inc/premium.php, assets/premium.css), Suche */
.bm24-h-hero .bm24-h-in { padding-top: 88px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 20px; }
.bm24-h-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
.bm24-h-claim { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.bm24-home h1 { font-size: 72px; line-height: 1.04; letter-spacing: -0.03em; max-width: 14ch; text-wrap: balance; }
.bm24-h-claim p { font-size: 18px; line-height: 28px; max-width: 52ch; color: var(--ink-muted); }

.bm24-h-search { display: flex; flex-wrap: wrap; margin: 0; border: 1px solid var(--ink); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.bm24-h-f { flex: 1 1 150px; min-width: 0; padding: 10px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.bm24-h-f.is-wide { flex: 2 1 240px; }
.bm24-h-f label { margin: 0; font: 400 13px/18px var(--font-sans); color: var(--ink-muted); }
.bm24-h-f input, .bm24-h-f select {
  width: 100%; min-width: 0; height: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
  font: 400 16px/24px var(--font-sans); color: var(--ink); appearance: none; -webkit-appearance: none;
}
.bm24-h-f input::placeholder { color: var(--ink-muted); opacity: 1; }
.bm24-h-f input:focus, .bm24-h-f select:focus { outline: none; }
.bm24-h-f:focus-within { box-shadow: inset 0 -2px 0 var(--ink); }
.bm24-h-search button {
  flex: 0 0 auto; min-height: 58px; margin: 0; padding: 0 32px; border: 0; border-radius: 0; background: var(--lake); color: var(--on-lake);
  font: var(--weight-semibold) 16px/24px var(--font-sans); cursor: pointer;
}
.bm24-h-search button:hover { background: var(--ink); }
.bm24-h-search button:focus-visible { outline: 2px solid var(--ink); outline-offset: -5px; box-shadow: inset 0 0 0 3px var(--surface); }
.bm24-h-morelink { display: none; align-self: flex-start; font-size: 15px; text-underline-offset: 4px; text-decoration: underline; }

/* Neu auf dem Markt */
.bm24-h-new .bm24-h-in { padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.bm24-h-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.bm24-h-bar nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: var(--weight-semibold); }
.bm24-h-bar nav a { color: var(--ink-muted); text-decoration: none; }
.bm24-h-bar nav a:first-child { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.bm24-h-bar nav a:hover { color: var(--ink); }
.bm24-h-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; } /* Spalten enger (Sam, 19.11.2026) */ /* vier Reihen: ab 1360 px vier Spalten (rund 310 px je Karte, 16 Boote) */
@media (max-width: 1359px) { .bm24-h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bm24-h-grid > :nth-child(n+13) { display: none; } } /* 12 Boote */
.bm24-h-grid > .lf-item-container.listing-preview { margin: 0 !important; min-width: 0; }
.bm24-h-all { align-self: flex-start; font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: 4px; }

/* Verkaufen */
.bm24-h-sell { background: var(--surface-sunken); }
.bm24-h-sell .bm24-h-in { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 40px; }
.bm24-h-sell ol { margin: 0; padding: 0; list-style: none; counter-reset: bm24step; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px 56px; }
.bm24-h-sell li { counter-increment: bm24step; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ink); padding-top: 16px; }
.bm24-h-sell li h3 { font-size: 19px; line-height: 24px; }
.bm24-h-sell li h3::before { content: counter(bm24step) "\2002"; color: var(--ink-muted); font-weight: 400; }
.bm24-h-sell li p { color: var(--ink-muted); max-width: 40ch; }
.bm24-h-cta {
  align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  border-radius: var(--radius-md); background: var(--accent-market); color: var(--on-accent-market) !important;
  font-weight: var(--weight-semibold); text-decoration: none;
}
.bm24-h-cta:hover { background: var(--accent-market-strong); }
.bm24-h-cta:focus-visible, .bm24-home a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Einstieg nach Art */
.bm24-h-kinds .bm24-h-in { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 32px 96px; }
.bm24-h-kinds h2 { flex: 1 1 280px; }
.bm24-h-list { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.bm24-h-list a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.bm24-h-kn { font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.01em; }
.bm24-h-kc { margin-left: 6px; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.bm24-h-kt { font-size: 15px; line-height: 22px; color: var(--ink-muted); text-align: right; }
@media (hover: hover) { .bm24-h-list a:hover .bm24-h-kn { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; } }

/* Telefon */
@media (max-width: 767px) {
  .bm24-h-in { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bm24-home h2 { font-size: 28px; line-height: 34px; }
  .bm24-h-hero .bm24-h-in { padding-top: 40px; padding-bottom: 48px; gap: 16px; }
  .bm24-h-head { margin-bottom: 16px; }
  .bm24-h-claim { gap: 16px; }
  .bm24-home h1 { font-size: 44px; }
  .bm24-h-claim p { font-size: 16px; line-height: 1.55; }
  .bm24-h-f { flex: 1 1 0; padding: 9px 14px; border-bottom: 1px solid var(--line); }
  .bm24-h-f.is-wide { flex: 1 1 100%; border-right: 0; }
  .bm24-h-f.is-more { display: none; }
  .bm24-h-f:nth-child(2) { border-right: 0; }
  .bm24-h-search button { flex: 1 1 100%; min-height: 52px; }
  .bm24-h-morelink { display: inline; }
  .bm24-h-new .bm24-h-in { padding-bottom: 56px; gap: 20px; }
  /* Telefon: zwei Spalten, zwölf Boote (Sam, 19.11.2026: «4 inserate … viel zu wenig … bilder viel zu hoch»).
     Karte kompakt, alle Pflichtangaben bleiben: Titel, Untertitel, Masse, Ort, Preis */
  .bm24-h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .bm24-h-grid > :nth-child(n+13) { display: none !important; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-info { padding: 8px 10px 10px !important; gap: 1px; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-info h4.listing-preview-title { font-size: 15px !important; line-height: 19px !important; min-height: 38px; }
  .bm24-h-grid .bm24-card-tag { font-size: 13px; line-height: 18px; }
  .bm24-h-grid .bm24-card-meta { font-size: 12px; line-height: 17px; }
  /* Baujahr fett in eigener Zeile: mit Massen in einer Zeile wurde sie bei 138 px Kartenbreite abgeschnitten (2.49.5) */
  .bm24-h-grid .bm24-card-meta .bm24-card-year { display: block; }
  .bm24-h-grid .bm24-card-meta .bm24-card-sep { display: none; }
  .bm24-h-grid .bm24-c-price { margin-top: 2px; font-size: 12px; line-height: 18px; }
  .bm24-h-grid .bm24-c-price .value { font-size: 15px; }
  .bm24-h-grid .bm24-c-price .value .b24-conv { display: block; margin-left: 0; font-size: 12px; line-height: 16px; }
  .bm24-h-grid .bm24-card-badges { top: 6px; left: 6px; gap: 4px; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-c-feat, .bm24-h-grid .lf-item-container.listing-preview .bm24-c-new, .bm24-h-grid .lf-item-container.listing-preview .bm24-c-fuel, .bm24-h-grid .lf-item-container.listing-preview .bm24-c-status { height: 24px; padding: 0 8px; font-size: 12px; }
  .bm24-h-grid .bm24-dots { bottom: 6px; }
  /* Schnellansicht weg, Merken kleiner: auf 174 px breiten Bildern sonst drei Elemente übereinander */
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-acts { top: 6px !important; right: 6px !important; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-acts li:has(.c27-toggle-quick-view-modal) { display: none !important; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-acts li a { width: 30px !important; height: 30px !important; }
  .bm24-h-grid .lf-item-container.listing-preview .bm24-card-acts li a i { font-size: 16px !important; }
  .bm24-h-all { align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--ink); border-radius: var(--radius-md); text-decoration: none; }
  .bm24-h-sell .bm24-h-in { padding-top: 56px; padding-bottom: 56px; gap: 28px; }
  .bm24-h-sell ol { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bm24-h-cta { align-self: stretch; min-height: 52px; }
  .bm24-h-kinds .bm24-h-in { padding-top: 56px; padding-bottom: 56px; flex-direction: column; gap: 20px; }
  .bm24-h-kinds h2, .bm24-h-list { flex: none; }
  .bm24-h-list a { flex-direction: column; align-items: flex-start; padding: 14px 0; }
  .bm24-h-kn { font-size: 22px; line-height: 28px; }
  .bm24-h-kt { text-align: left; }
}

/* Unter «Selling a boat»: Datenbank, Schild, Händler (Ausbau 2.32.0) */
.bm24-h-more { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 56px; border-top: 1px solid var(--line); }
.bm24-h-more li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bm24-h-more a { font-weight: var(--weight-semibold); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
/* Zeile mit Sam (Runde 13) */
.bm24-h-sam { display: flex; gap: 16px; align-items: center; }
.bm24-h-sam img { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; display: block; }
.bm24-home .bm24-h-sam p { color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.bm24-home .bm24-h-sam .bm24-h-sam-t { color: var(--ink); font-size: 17px; font-weight: var(--weight-semibold); }
.bm24-h-sam-l { margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.bm24-h-sam-l a { font-weight: var(--weight-semibold); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.bm24-h-more a:hover { text-decoration-color: var(--ink); }
.bm24-h-more span { font-size: 15px; line-height: 22px; color: var(--ink-muted); }

/* Beliebte Suchen: Werften und Regionen mit Anzahl */
.bm24-h-pop .bm24-h-in { padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 32px 96px; }
.bm24-h-pop h2 { flex: 1 1 280px; }
.bm24-h-popcols { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 56px; }
.bm24-h-popcols h3 { font-size: 15px; line-height: 20px; color: var(--ink-muted); font-weight: 400; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.bm24-h-popcols ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.bm24-h-popcols li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.bm24-h-popcols a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; text-decoration: none; }
.bm24-h-popcols a span { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .bm24-h-popcols a:hover { text-decoration: underline; text-underline-offset: 4px; } .bm24-h-popcols a:hover span { text-decoration: none; } }

/* Magazin: drei neuste Artikel */
.bm24-h-mag { background: var(--surface-sunken); }
.bm24-h-mag .bm24-h-in { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.bm24-h-mag .bm24-h-bar { align-items: baseline; }
.bm24-h-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
.bm24-h-post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.bm24-h-pimg { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden; background: var(--lake-soft); }
.bm24-h-pimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bm24-h-pcat { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bm24-h-ptitle { font: var(--weight-title) 20px/26px var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
@media (hover: hover) { .bm24-h-post:hover .bm24-h-ptitle { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; } }

/* Über boatmarket24 und häufige Fragen */
.bm24-h-about .bm24-h-in { padding-top: 88px; padding-bottom: 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px 96px; align-items: start; }
.bm24-h-abouttext { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.6; }
.bm24-h-abouttext h2 { margin-bottom: 8px; }
.bm24-h-abouttext p { color: var(--ink); max-width: 60ch; }
.bm24-h-abouttext a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.bm24-h-abouttext a:hover { text-decoration-color: var(--ink); }
.bm24-h-faq { display: flex; flex-direction: column; }
.bm24-h-faq h2 { margin-bottom: 24px; }
.bm24-h-faq details { border-top: 1px solid var(--line); }
.bm24-h-faq details:first-of-type { border-top-color: var(--ink); }
.bm24-h-faq details:last-of-type { border-bottom: 1px solid var(--line); }
.bm24-h-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: var(--weight-semibold); }
.bm24-h-faq summary::-webkit-details-marker { display: none; }
.bm24-h-faq summary::after { content: "+"; flex: none; width: 20px; text-align: center; font-weight: 400; font-size: 22px; line-height: 24px; color: var(--ink-muted); }
.bm24-h-faq details[open] summary::after { content: "\2212"; }
.bm24-h-faq summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bm24-h-faq details p { padding: 0 36px 18px 0; color: var(--ink-muted); }
.bm24-h-faq .bm24-h-all { margin-top: 20px; }

@media (max-width: 1023px) {
  .bm24-h-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm24-h-posts > :nth-child(3) { display: none; }
  .bm24-h-about .bm24-h-in { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .bm24-h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm24-h-grid > :nth-child(n+9) { display: none; } /* Tablet: vier Reihen zu zwei */
}
@media (max-width: 767px) {
  .bm24-h-more { grid-template-columns: minmax(0, 1fr); }
  .bm24-h-pop .bm24-h-in { padding-bottom: 56px; flex-direction: column; gap: 20px; }
  .bm24-h-pop h2, .bm24-h-popcols { flex: none; }
  .bm24-h-mag .bm24-h-in { padding-top: 56px; padding-bottom: 56px; gap: 20px; }
  .bm24-h-posts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .bm24-h-posts > :nth-child(3) { display: flex; }
  .bm24-h-about .bm24-h-in { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
}

/* Startseite aus Elementor (2.46.0): Hülle von Elementor ohne eigene Abstände, die Abschnitte bringen ihre mit */
.bm24-home-el .elementor-section, .bm24-home-el .elementor-container, .bm24-home-el .elementor-column, .bm24-home-el .elementor-widget-wrap, .bm24-home-el .e-con, .bm24-home-el .e-con-inner { padding: 0 !important; }
.bm24-home-el .elementor-section.elementor-section-full_width > .elementor-container, .bm24-home-el .elementor-section > .elementor-container { max-width: none; }
.bm24-home-el .elementor-column > .elementor-widget-wrap { align-content: flex-start; }
.bm24-home-el .elementor-element { --widgets-spacing: 0px; --kit-widget-spacing: 0px; }
.bm24-home-el .elementor-widget, .bm24-home-el .elementor-widget:not(:last-child) { margin: 0 !important; }
.bm24-home-el [class*="elementor-widget-bm24-home-"] { width: 100%; }
/* Eigene Elementor-Widgets (Überschrift, Text, Knopf), die Sam dazwischen setzt: Breite und Schrift wie die Abschnitte */
.bm24-home-el .elementor-widget:not([class*="elementor-widget-bm24-home-"]) > .elementor-widget-container,
.bm24-home-el .elementor-widget-heading:not(:has(> .elementor-widget-container)), .bm24-home-el .elementor-widget-text-editor:not(:has(> .elementor-widget-container)) {
  max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: max(40px, env(safe-area-inset-right, 0px));
}
.bm24-home-el .elementor-heading-title { font-family: var(--font-display); font-weight: var(--weight-semibold); color: var(--ink); letter-spacing: -0.02em; }
.bm24-home-el .elementor-widget-text-editor { font-family: var(--font-sans); color: var(--ink); }

/* Freier Textabschnitt (Widget «Home: Text section») */
.bm24-h-text.is-haze { background: var(--surface-sunken); }
.bm24-h-text .bm24-h-in { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 20px; }
.bm24-h-textbody { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.6; max-width: 70ch; }
.bm24-h-textbody a { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.bm24-h-textbody a:hover { text-decoration-color: var(--ink); }
.bm24-h-textbody ul, .bm24-h-textbody ol { margin: 0; padding-left: 1.2em; }
.bm24-h-abouttext > p:empty { display: none; }
@media (max-width: 767px) {
  .bm24-home-el .elementor-widget:not([class*="elementor-widget-bm24-home-"]) > .elementor-widget-container,
  .bm24-home-el .elementor-widget-heading:not(:has(> .elementor-widget-container)), .bm24-home-el .elementor-widget-text-editor:not(:has(> .elementor-widget-container)) { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bm24-h-text .bm24-h-in { padding-top: 56px; padding-bottom: 56px; }
}
