/* hwalanya.com — eigenes CSS, kein Framework. Mobil zuerst. */
:root {
  --ink: #1c2733;
  --muted: #566573;
  --navy: #004274;      /* HWA-Markenfarbe (homeworldalanya.com) */
  --navy-dark: #00335a;
  --red: #8f1c1a;       /* HWA-Markenfarbe, Aktionsknöpfe */
  --red-dark: #74110f;
  --mist: #ebf1f4;      /* kühles Hellgrau-Blau für Flächen */
  --line: #cfd9df;
  --white: #ffffff;
  --tg: #1b78ad;        /* Telegram, abgedunkelt für Kontrast mit weißer Schrift */
  --wa: #0d7a6c;        /* WhatsApp, abgedunkelt für Kontrast */
  --max: #5a3fc0;       /* MAX, Kontrast mit weißer Schrift > 4,5:1 */
  --serif: "PT Serif", Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 17px/1.6 var(--sans);
  padding-bottom: 64px; /* Platz für die Kontaktleiste auf dem Handy */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: .2em 0 .35em; letter-spacing: -.005em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 0 0 .25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .92rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--white); padding: .5rem 1rem; z-index: 99; }
.ic { flex: none; }

.preview-bar { background: #fff3c4; color: #5a4500; font: 600 13px/1.4 var(--sans); text-align: center; padding: 6px 12px; }

/* Kopf */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 6px; }
.logo img { width: 170px; height: auto; }
.header-contact { display: flex; align-items: center; gap: 10px; }
.h-phone { display: none; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; }
.main-nav { overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-in { display: flex; gap: 18px; padding-top: 4px; padding-bottom: 8px; white-space: nowrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--ink); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: var(--r); border: 2px solid transparent;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
}
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: .92rem; }
.btn-primary, .btn-call { background: var(--red); color: var(--white); }
.btn-primary:hover, .btn-call:hover { background: var(--red-dark); color: var(--white); }
.btn-tg { background: var(--tg); color: var(--white); }
.btn-tg:hover { background: #125d87; color: var(--white); }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: #075e53; color: var(--white); }
.btn-max { background: var(--max); color: var(--white); }
.btn-max:hover { background: #452f99; color: var(--white); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--mist); color: var(--navy); }
.btn-check { background: var(--white); color: var(--tg); border-color: var(--tg); width: 100%; }
.btn-check:hover { background: #eaf4fb; color: var(--tg); }

/* Brotkrumen */
.crumbs ol { list-style: none; margin: 12px auto 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--muted); }

/* Seitenkopf */
.page-head { padding-top: 8px; }
.count-line { font-weight: 600; color: var(--navy); margin-bottom: .6em; }
.lead { font-size: 1.08rem; max-width: 70ch; }
.text-block { max-width: 72ch; }
.text-block h2:first-child { margin-top: 1.5rem; }

/* Karten */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--white); }
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-link:hover .card-title { color: var(--red); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--mist); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-hm { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); color: var(--ink); font: 700 .78rem/1 var(--sans); padding: 5px 7px; border-radius: 4px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; }
.card-place, .card-meta { margin: 0; color: var(--muted); font-size: .92rem; }
.card-price { margin: .45rem 0 0; font: 700 1.25rem/1.2 var(--serif); color: var(--ink); }
.card-note { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); }
.card-soon { opacity: .78; }
.more { margin-top: 1rem; font-weight: 600; }

/* Startseite */
.hero { background: var(--mist); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; gap: 22px; padding-top: 22px; padding-bottom: 26px; align-items: center; }
.hero-lead { font-size: 1.12rem; max-width: 46ch; }
.hero-stock { color: var(--navy); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-person { margin: 0; display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.hero-person img { width: 112px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.hero-person figcaption { font-size: .98rem; }
.hero-person figcaption a { display: inline-block; margin-top: 4px; font-weight: 700; }

/* Objektseite */
.object { padding-top: 6px; }
.obj-top { display: grid; gap: 18px; }
.gallery { position: relative; margin: 0 -16px; }
.g-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--mist); }
.g-track::-webkit-scrollbar { display: none; }
.g-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; aspect-ratio: 4 / 3; }
.g-slide img { width: 100%; height: 100%; object-fit: cover; }
.g-slide picture { display: block; width: 100%; height: 100%; }
/* Galerie: Fotos 2…n erst einblenden, wenn das erste Foto geladen ist (sonst laden sie gleichzeitig und bremsen das erste) */
.g-track .g-slide + .g-slide { display: none; }
.gallery.g-ready .g-track .g-slide + .g-slide { display: block; }
.g-ui { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; }
.g-ui button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); font: 700 1.5rem/1 var(--sans); color: var(--ink); cursor: pointer; }
.g-count { background: rgba(28,39,51,.78); color: var(--white); font: 600 .85rem/1 var(--sans); padding: 7px 9px; border-radius: 4px; }
/* Vollbild mit Zoom (Val, 25.10.2026) */
.g-slide img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 100; display: none; background: #0a0e14; touch-action: none; }
.lb.lb-open { display: block; }
html.lb-lock, html.lb-lock body { overflow: hidden; }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; transition: transform .12s ease-out; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.lb-zoomed .lb-img { cursor: grab; transition: none; }
.lb-top { position: absolute; top: 10px; right: 10px; left: 10px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lb-count { margin-right: auto; background: rgba(28,39,51,.78); color: var(--white); font: 600 .9rem/1 var(--sans); padding: 8px 10px; border-radius: 4px; }
.lb-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); font: 700 1.6rem/1 var(--sans); cursor: pointer; }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -22px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.obj-hm { margin: 0; font-weight: 700; color: var(--muted); font-size: .9rem; }
.obj-head h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem); }
.obj-place { color: var(--muted); margin-top: -.2em; }
.price-box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 10px 0 12px; }
.price { font: 700 2rem/1.1 var(--serif); margin: 0 0 4px; }
.price-rub { margin: 0; font-weight: 600; }
.price-rub span, .price-m2, .price-note { color: var(--muted); font-weight: 400; font-size: .9rem; }
.price-m2, .price-note { margin: 2px 0 0; }
.obj-updated { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.obj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.facts dl, .fact-box dl { margin: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.facts dl > div, .fact-box dl > div { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; }
.obj-text, .amenities, .obj-loc { max-width: 72ch; }
.obj-text h3, .text-block h3 { font-size: 1.2rem; margin: 1.6rem 0 .4rem; }
.amenities ul { columns: 1; padding-left: 1.1em; }
.am-note { color: var(--muted); margin-bottom: .4em; }
.source-note { color: var(--muted); font-size: .85rem; margin-top: 2rem; }

/* Berater */
.advisor { display: grid; grid-template-columns: 96px 1fr; gap: 14px; margin: 2.4rem 0; padding: 16px; background: var(--mist); border-radius: var(--r); border-left: 4px solid var(--red); }
.advisor-photo { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.advisor-name { font: 700 1.2rem/1.2 var(--serif); margin: 0 0 4px; }
.advisor-role, .advisor-line { margin: 0 0 8px; }
.advisor-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.advisor-text { display: contents; }
.advisor-text > p { grid-column: 2; }
.advisor-actions { grid-column: 1 / -1; }
.advisor-hint { grid-column: 1 / -1 !important; font-size: .85rem; color: var(--muted); margin: 0; }

/* Bezirk */
.cta-band { display: grid; gap: 12px; margin: 2rem 0; padding: 18px; background: var(--navy); color: var(--white); border-radius: var(--r); }
.cta-text { margin: 0; font: 700 1.15rem/1.35 var(--serif); }
/* Bezirks- und Anlagenseiten ohne aktives Objekt: Hinweis mit Kontaktknöpfen */
.no-offers { margin: 1rem 0 1.4rem; padding: 18px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); }
.no-offers-text { margin: 0 0 14px; font-weight: 700; color: var(--navy); }
.no-offers .advisor-actions { grid-column: auto; }
.complexes { color: var(--muted); margin-top: 1rem; }
.fact-box { background: var(--white); }
.fact-box .sources { color: var(--muted); font-size: .85rem; margin-top: .8rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 460px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .9rem; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; max-width: 72ch; }
.faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style-position: outside; }
.faq-a { padding: 0 0 8px; }
.preview-todo { border: 2px dashed #d6b300; background: #fffbe6; padding: 12px 16px; border-radius: var(--r); margin: 2rem 0; }
.preview-todo h2 { margin-top: 0; font-size: 1.1rem; }

/* Übersicht */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chips a { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.chips a span { color: var(--muted); font-weight: 400; margin-left: 2px; }
.chips a:hover { border-color: var(--navy); }
.hub-group h2 { margin-top: 2rem; }
.group-link { margin-top: -.4rem; }

/* Kontakt, Berater-Seite */
.contact-grid { display: grid; gap: 24px; }
.ways { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ways li { display: grid; gap: 4px; }
.ways li > span { color: var(--muted); font-size: .92rem; }
.person { display: grid; gap: 20px; }
.person-photo { width: 220px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Fuß */
.site-footer { background: var(--navy); color: #dfe8ee; margin-top: 3rem; padding: 28px 0 12px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer h2 { color: var(--white); font: 700 1rem/1.3 var(--sans); margin: 0 0 .6rem; }
.footer-in { display: grid; gap: 22px; }
.f-brand img { width: 170px; margin-bottom: 8px; }
.f-nav { display: grid; gap: 4px; align-content: start; }
.f-legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: 22px; padding-top: 12px; font-size: .82rem; color: #b8c8d4; }

/* Kontaktleiste Handy */
.contact-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0, 30, 60, .08); }
.contact-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; text-decoration: none; font: 700 .8rem/1.1 var(--sans); }
.cb-call { color: var(--red); }
.cb-tg { color: var(--tg); }
.cb-wa { color: var(--wa); }
.cb-max { color: var(--max); }
.contact-bar.cb4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .h-phone { display: inline-flex; }
  .logo img { width: 210px; }
  .hero-in { grid-template-columns: 1.4fr 1fr; padding-top: 40px; padding-bottom: 44px; }
  .hero-person { grid-template-columns: 1fr; padding: 14px; max-width: 340px; justify-self: end; }
  .hero-person img { width: 100%; }
  .gallery { margin: 0; border-radius: var(--r); overflow: hidden; }
  .facts dl, .fact-box dl { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .amenities ul { columns: 2; }
  .advisor { grid-template-columns: 150px 1fr; padding: 20px; }
  .advisor-photo { width: 150px; grid-row: span 4; }
  .advisor-actions, .advisor-hint { grid-column: 2 !important; }
  .cta-band { grid-template-columns: 1fr auto; align-items: center; padding: 22px 26px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .person { grid-template-columns: 260px 1fr; align-items: start; }
  .person-photo { width: 260px; }
  .footer-in { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  body { padding-bottom: 0; }
  .contact-bar { display: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .obj-top { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); align-items: start; gap: 28px; }
  .obj-head { position: sticky; top: 12px; }
  .obj-main { max-width: 820px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
@media print {
  .contact-bar, .main-nav, .g-ui, .preview-bar { display: none; }
}

/* Übersicht Bezirke */
.d-list { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; }
.d-row { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; }
.d-row h2 { margin: 0 0 6px; font-size: 1.3rem; }
.d-row h2 a { color: var(--ink); text-decoration: none; }
.d-row h2 a:hover { color: var(--navy); text-decoration: underline; }
.d-teaser { margin: 0 0 6px; }
.d-count { margin: 0 0 6px; font-weight: 600; color: var(--navy); }
.d-dist { margin: 0 0 8px; padding-left: 1.1em; color: var(--muted); font-size: .94rem; }
.d-more { margin: 0; }
@media (min-width: 700px) { .d-list { grid-template-columns: repeat(2, 1fr); } }

/* Menü auf schmalen Handys: alle fünf Punkte ohne Scrollen */
/* Unter 420 px: „Контакты“ steht in der festen Kontaktleiste unten und im Fuß, daher im Menü ausgeblendet */
@media (max-width: 479px) {
  .nav-in { gap: 14px; }
  .main-nav a { font-size: .94rem; }
}
@media (max-width: 419px) {
  .main-nav a.nav-kontakty:not([aria-current]) { display: none; }
}

/* Wohnanlage */
.zhk-gallery { max-width: 860px; margin-top: 8px; }
.g-source { font-size: .88rem; margin: 6px 0 18px; }
.zhk .facts { max-width: 860px; }

/* Ratgeber */
.gid .page-head, .gid-short, .gid-toc, .gid-body, .gid-sources { max-width: 74ch; }
.gid-meta { color: var(--muted); font-size: .94rem; }
.gid-short { background: var(--mist); border-left: 4px solid var(--navy); padding: 4px 18px; margin: 14px 0 18px; border-radius: 6px; }
.gid-short h2, .gid-toc h2 { font-size: 1.1rem; margin: 12px 0 6px; }
.gid-toc ol { margin: 0 0 16px; padding-left: 1.3em; }
.gid-body h2 { margin-top: 1.8rem; }
.gid-body table, .gid .table-wrap table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .95rem; }
.gid-body th, .gid-body td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.gid-sources { margin-top: 2rem; font-size: .94rem; }
.gid-draft { margin-top: 14px; }

/* Startseite: Bezirkskacheln, Anlagen, Ratgeber */
.trust-line { color: var(--muted); font-size: .92rem; margin: 12px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 6px; }
.tile { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--white); }
.tile:hover { border-color: var(--navy); }
.tile-name { font: 700 1.05rem/1.25 var(--serif); }
.tile-count { color: var(--muted); font-size: .88rem; }
.tile-price { font-weight: 700; color: var(--navy); font-size: .95rem; }
.z-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; max-width: 72ch; }
.z-list a { font-weight: 700; }
.z-list span { color: var(--muted); font-size: .94rem; }
.gid-cards { display: grid; gap: 12px; }
.gid-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.gid-card h3 { font-size: 1.08rem; margin: 0 0 6px; }
.gid-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.links ul { padding-left: 1.2em; }
.links h3 { margin-top: 1.4rem; }
@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .gid-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(5, 1fr); }
}
