/* ============================================================
   EssenMuc Immobilien GmbH – Stylesheet
   CI: Gold #b79a72, Teal #3f6d7b, Warm-Beige #f5f1ea
   ============================================================ */

:root {
  --bg:          #f5f1ea;
  --card:        #ffffff;
  --ink:         #26303a;
  --muted:       #6d685f;
  --line:        #ece3d7;
  --accent:      #b79a72;
  --accent-dark: #8d6d4e;
  --accent-soft: #f4ede2;
  --link:        #3f6d7b;
  --link-dark:   #2a5260;
  --success:     #2d7a4f;
  --error:       #c0392b;
  --warning:     #b57d1a;
  --shadow:      0 14px 40px rgba(30,24,18,.08);
  --shadow-soft: 0 8px 20px rgba(30,24,18,.05);
  --radius:      18px;
  --radius-lg:   28px;
  --max:         1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(183,154,114,.18), transparent 38%),
    radial-gradient(circle at 86% 16%, rgba(63,109,123,.10), transparent 42%),
    linear-gradient(180deg, #f7f4ee, var(--bg));
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ─── Page Shell ─────────────────────────────────────────── */

.page {
  width: min(calc(100% - 24px), var(--max));
  margin: 20px auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(183,154,114,.10);
  overflow: hidden;
}

/* ─── Topbar & Nav ───────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(183,154,114,.10), transparent), #fff;
  flex-wrap: wrap;
}

.logoWrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logoBox {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(183,154,114,.22), rgba(183,154,114,.08));
  border: 1px solid rgba(183,154,114,.28);
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}
.logoBox img { max-width: 42px; max-height: 42px; }

.brandText strong { display: block; font-size: 17px; color: var(--accent-dark); }
.brandText span   { display: block; font-size: 12px; color: var(--muted); }

.navToggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid rgba(183,154,114,.28);
  border-radius: 12px;
  background: rgba(183,154,114,.10);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.navToggle span { display: block; height: 2px; background: var(--accent-dark); border-radius: 2px; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  font-size: 13px; font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--muted);
  transition: all .16s ease;
}
.nav a:hover, .nav a.active {
  background: rgba(183,154,114,.12);
  color: var(--accent-dark);
  text-decoration: none;
}

/* ─── Breadcrumb ─────────────────────────────────────────── */

.breadcrumb {
  padding: 12px 28px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
}
.breadcrumb a { color: var(--link); }
.breadcrumb span { margin: 0 6px; opacity: .5; }

/* ─── Content ────────────────────────────────────────────── */

.content { padding: 32px 36px 48px; }

.kicker {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.1; color: var(--accent-dark); }
h2 { margin: 0 0 12px; font-size: 20px; color: #2e3844; }
h3 { margin: 0 0 8px; font-size: 16px; color: #2e3844; }

/* ─── Listing Grid ───────────────────────────────────────── */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.listing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.listing-card__image {
  position: relative;
  height: 210px;
  background: var(--line);
  overflow: hidden;
}
.listing-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.listing-card__image .no-image {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--muted); font-size: 13px;
  background: linear-gradient(135deg, #f0ebe3, #e8e0d5);
}
.listing-card__badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 6px;
}

.listing-card__body { padding: 18px 20px; }
.listing-card__price {
  font-size: 22px; font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: 4px;
}
.listing-card__price-sub {
  font-size: 12px; color: var(--muted);
}
.listing-card__title {
  font-size: 15px; font-weight: 700;
  color: var(--ink);
  margin: 10px 0 6px;
}
.listing-card__addr {
  font-size: 13px; color: var(--muted);
}
.listing-card__facts {
  display: flex; gap: 16px;
  margin-top: 12px;
  font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.listing-card__facts span { display: flex; align-items: center; gap: 4px; }

/* ─── Exposé Detail ──────────────────────────────────────── */

.expose-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.gallery {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.gallery__main {
  position: relative;
  height: 420px;
  background: var(--line);
  cursor: zoom-in;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.gallery__thumbs {
  display: flex; gap: 8px;
  padding: 10px;
  background: #f9f6f2;
  overflow-x: auto;
  scrollbar-width: thin;
}
.gallery__thumbs img {
  width: 80px; height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: border-color .14s;
}
.gallery__thumbs img:hover,
.gallery__thumbs img.active { border-color: var(--accent); }

.facts-bar {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.fact-item {
  display: flex; flex-direction: column;
  min-width: 100px;
}
.fact-item__label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.fact-item__value { font-size: 18px; font-weight: 800; color: var(--ink); }

.expose-section { margin-bottom: 28px; }
.expose-section h2 { font-size: 17px; color: var(--accent-dark); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.feature-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 6px 0;
}
.feature-item::before { content: '✓'; color: var(--accent-dark); font-weight: 800; flex-shrink: 0; }

.energy-box {
  background: var(--accent-soft);
  border: 1px solid rgba(183,154,114,.3);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.energy-box h3 { font-size: 14px; margin-bottom: 10px; color: var(--accent-dark); }
.energy-class {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  font-size: 22px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  margin-bottom: 8px;
}
.energy-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px solid rgba(183,154,114,.2); }
.energy-row:last-child { border-bottom: none; }

/* ─── Sidebar / Inquiry Panel ────────────────────────────── */

.inquiry-panel {
  position: sticky; top: 20px;
  border: 1px solid rgba(183,154,114,.3);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.inquiry-panel__head {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 18px 20px;
  color: #fff;
}
.inquiry-panel__head h3 { margin: 0; font-size: 18px; }
.inquiry-panel__head .price { font-size: 26px; font-weight: 800; margin-top: 4px; }
.inquiry-panel__body { padding: 20px; }

.provision-note {
  background: rgba(183,154,114,.08);
  border: 1px solid rgba(183,154,114,.25);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.provision-note strong { color: var(--accent-dark); }

/* ─── Forms ──────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(183,154,114,.15);
}
.form-group textarea { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.consent-block { margin-top: 16px; }
.consent-item {
  display: flex; gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.consent-item input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent-dark); }
.consent-item a { color: var(--link); }
.consent-required { color: var(--error); font-size: 11px; }

/* ─── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px; font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: all .16s ease; white-space: nowrap;
  font-family: inherit;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #d3b48a);
  color: #fff;
  box-shadow: 0 8px 18px rgba(183,154,114,.28);
}
.btn--primary:hover { opacity: .94; transform: translateY(-1px); text-decoration: none; }
.btn--ghost {
  background: #fff;
  color: var(--accent-dark);
  border-color: rgba(183,154,114,.45);
}
.btn--ghost:hover { background: var(--accent-soft); text-decoration: none; }
.btn--full { width: 100%; }

/* ─── Badges ─────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge--green  { background: #e6f4ee; color: #1a6b42; }
.badge--orange { background: #fff4e0; color: #b57d1a; }
.badge--gray   { background: #f0f0f0; color: #555; }
.badge--muted  { background: #f0efed; color: var(--muted); }
.badge--teal   { background: #e8f3f6; color: var(--link-dark); }
.badge--gold   { background: rgba(183,154,114,.18); color: var(--accent-dark); }

/* ─── Flash Messages ─────────────────────────────────────── */

.flash {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}
.flash__icon { font-weight: 800; font-size: 16px; flex-shrink: 0; }
.flash--success { background: #e8f5ee; border: 1px solid #a8d8bc; color: #1a6b42; }
.flash--error   { background: #fdf0ef; border: 1px solid #e5a8a3; color: #8b2020; }
.flash--info    { background: #eaf3f8; border: 1px solid #a0c8db; color: #1a4d62; }

/* ─── Search / Filter Bar ────────────────────────────────── */

.search-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 20px 28px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  align-items: flex-end;
}
.search-bar select,
.search-bar input {
  padding: 9px 14px;
  border: 1px solid rgba(183,154,114,.35);
  border-radius: 12px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  outline: none;
}
.search-bar select:focus,
.search-bar input:focus { border-color: var(--accent); }
.search-bar .btn { min-height: 40px; padding: 9px 18px; font-size: 13.5px; }

/* ─── Confirm / Success Page ─────────────────────────────── */

.confirm-card {
  max-width: 560px;
  margin: 40px auto;
  text-align: center;
  padding: 40px 32px;
}
.confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 20px;
  font-size: 32px;
}
.confirm-icon--success { background: #e8f5ee; color: #1a6b42; }
.confirm-icon--error   { background: #fdf0ef; color: #8b2020; }

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  background: linear-gradient(180deg, #f7f4ee, #f0ece3);
  border-top: 1px solid var(--line);
  margin-top: 40px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand a { color: var(--link); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--link); }
.footer-copy {
  text-align: center;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .expose-layout { grid-template-columns: 1fr; }
  .inquiry-panel { position: static; }
}

@media (max-width: 640px) {
  .content { padding: 20px 18px 32px; }
  .topbar { padding: 14px 18px; }
  .navToggle { display: flex; }
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 10px 0;
    gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 8px; padding: 10px 16px; }
  .listing-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .gallery__main { height: 240px; }
}
