/* ==========================================================================
   Ca' Gusmini – Theme „Abendsonne“ (abgeleitet aus dem Logo, per Pipette)
   Wird nach styles.css geladen. Nur Glassmorphism, keine Funktionsänderung.
   ========================================================================== */

@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/manrope-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Logo-Pipette (ca-gusmini-logo-web.png) */
  --cg-rose: #f3b49a;        /* Himmel-Rosa */
  --cg-apricot: #ffd993;     /* Abendhimmel Apricot */
  --cg-sun: #ffe99f;         /* Sonnenglühen */
  --cg-orange: #feb76f;      /* Hausfassade */
  --cg-flame: #e45614;       /* Gleitschirm */
  --cg-terracotta: #a84a20;  /* Terrakotta (Buttons, AA mit Weiß 5.7:1) */
  --cg-terracotta-deep: #8f3f1c;
  --cg-gold: #b77a29;        /* Gold der Schrift */
  --cg-gold-deep: #85561a;   /* Gold für Text (AA 5.6:1 auf Creme) */
  --cg-olive: #635819;       /* Olivgrün */
  --cg-olive-deep: #45460e;
  --cg-leaf: #5a6b22;
  --cg-cream: #fff6d7;       /* Creme */
  --cg-paper: #fbf1e6;

  /* Bestehende Variablen auf Palette umstellen */
  --ink: #2b1e16;
  --ink-soft: #3d2c20;
  --muted: #5d4636;
  --terracotta: var(--cg-terracotta);
  --terracotta-dark: var(--cg-terracotta-deep);
  --sage: var(--cg-leaf);
  --glass: rgba(255, 251, 244, 0.58);
  --glass-strong: rgba(255, 251, 244, 0.78);
  --glass-soft: rgba(255, 251, 244, 0.42);
  --glass-border: 1px solid rgba(255, 255, 255, 0.62);
  --glass-blur: blur(20px) saturate(165%);
  --glass-blur-heavy: blur(30px) saturate(180%);
  --shadow: 0 10px 34px rgba(120, 62, 22, 0.12), 0 2px 8px rgba(120, 62, 22, 0.06);
  --shadow-lg: 0 22px 60px rgba(120, 62, 22, 0.2), 0 4px 14px rgba(120, 62, 22, 0.08);
  --radius: 22px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Buchungsstatus – klar unterscheidbar */
  --st-approved: #5a6b22;
  --st-pending: #e3a21a;
  --st-rejected: #9d4f43;
}

/* —— Hintergrund: Abendsonnen-Aurora —— */
html { background: var(--cg-paper); }
body {
  color: var(--ink);
  background: linear-gradient(170deg, #fff4e3 0%, #fde3cf 38%, #f6eedd 70%, #eef0dc 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}
body::before {
  background:
    radial-gradient(38vmax 30vmax at 18% 12%, rgba(254, 183, 111, 0.55), transparent 62%),
    radial-gradient(34vmax 28vmax at 82% 8%, rgba(243, 180, 154, 0.6), transparent 62%),
    radial-gradient(30vmax 26vmax at 50% 40%, rgba(255, 233, 159, 0.45), transparent 65%);
  animation: cg-aurora-a 32s ease-in-out infinite alternate;
}
body::after {
  background:
    radial-gradient(36vmax 28vmax at 85% 85%, rgba(99, 88, 25, 0.16), transparent 62%),
    radial-gradient(30vmax 26vmax at 12% 88%, rgba(183, 122, 41, 0.2), transparent 62%),
    radial-gradient(26vmax 22vmax at 60% 70%, rgba(228, 86, 20, 0.08), transparent 65%);
  animation: cg-aurora-b 40s ease-in-out infinite alternate;
}
@keyframes cg-aurora-a {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(3vmax, 2vmax, 0) rotate(8deg) scale(1.06); }
  100% { transform: translate3d(-2vmax, 4vmax, 0) rotate(-6deg) scale(1.02); }
}
@keyframes cg-aurora-b {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(-4vmax, -3vmax, 0) rotate(10deg); }
}

/* —— Typografie —— */
h1, h2, h3, .brand h1, .topbar-brand strong {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: 0.005em;
}
h1 { font-weight: 600; }
h2 { font-weight: 600; font-size: 1.55rem; }
.panel h2 { font-size: 1.5rem; margin-bottom: 0.7rem; }
h3 { font-weight: 600; }
.lede, .section-sub, .panel-sub, .muted { color: var(--muted); }
a { color: var(--cg-terracotta-deep); }
.eyebrow {
  color: var(--cg-gold-deep);
  letter-spacing: 0.18em;
  font-size: 0.78rem;
}

/* —— Topbar & Menü (deckend genug für Kontrast) —— */
.topbar {
  background: rgba(255, 249, 240, 0.86);
  border-bottom: 1px solid rgba(183, 122, 41, 0.18);
  box-shadow: 0 6px 30px rgba(120, 62, 22, 0.1);
}
.topbar-brand strong { font-size: 1.25rem; font-weight: 700; }
.topbar-brand .brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 14px rgba(183, 122, 41, 0.35);
}
.burger-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(183, 122, 41, 0.25);
}
.burger-panel {
  background: rgba(255, 250, 243, 0.97) !important;
  border-left: 1px solid rgba(183, 122, 41, 0.25);
  box-shadow: -18px 0 50px rgba(80, 40, 15, 0.22);
}
.burger-backdrop { background: rgba(43, 30, 22, 0.35); }
.burger-link { color: var(--ink); border-radius: 12px; }
.burger-link:hover, .burger-link:focus-visible { background: rgba(254, 183, 111, 0.22); }
.burger-link.active, .burger-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(254, 183, 111, 0.38), rgba(243, 180, 154, 0.32));
  color: var(--cg-terracotta-deep);
}
.burger-section-title { color: var(--cg-gold-deep) !important; letter-spacing: 0.08em; }

/* —— Glas-Panels & Karten —— */
.panel,
.auth-card {
  background: var(--glass);
  border: var(--glass-border);
  box-shadow: var(--shadow);
  position: relative;
}
.panel::before {
  /* feiner Lichtsaum oben */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%);
  mix-blend-mode: soft-light;
}
.trip-card, .nearby-card, .tip-card, .kpi-card, .booking-card, .photo-card, .owner-stat, .agreement-card {
  border-radius: 18px;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background 0.3s ease;
  position: relative;
  overflow: hidden;
}
.trip-card::after, .nearby-card::after, .tip-card::after, .kpi-card::after, .photo-card::after {
  /* Glanz-Sweep beim Hover */
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg) translateX(0);
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .trip-card:hover, .nearby-card:hover, .tip-card:hover, .kpi-card:hover, .photo-card:hover, .owner-stat:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
  }
  .trip-card:hover::after, .nearby-card:hover::after, .tip-card:hover::after, .kpi-card:hover::after, .photo-card:hover::after {
    opacity: 1;
    transform: skewX(-18deg) translateX(420%);
    transition: transform 0.9s var(--ease-out), opacity 0.2s ease;
  }
}

/* —— Buttons & Chips —— */
.btn { border-radius: 14px; transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.2s ease; }
.btn-primary {
  background: linear-gradient(135deg, #c0602b, var(--cg-terracotta) 55%, var(--cg-terracotta-deep));
  color: #fff;
  box-shadow: 0 8px 22px rgba(168, 74, 32, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(168, 74, 32, 0.38); }
.btn-ghost {
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink-soft);
  border: 1px solid rgba(183, 122, 41, 0.22);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.95); border-color: rgba(183, 122, 41, 0.45); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(228, 86, 20, 0.45);
  outline-offset: 2px;
}
.insight-chip, .nearby-chip, .chip, .tag {
  background: rgba(255, 252, 247, 0.8);
  border: 1px solid rgba(183, 122, 41, 0.22);
  color: var(--ink-soft);
}
.insight-chip .chip-ico { font-size: 1rem; line-height: 1; }
.nearby-chip.active, .chip.active {
  background: linear-gradient(135deg, var(--cg-terracotta), var(--cg-terracotta-deep));
  color: #fff;
  border-color: transparent;
}
.nearby-rec-toggle.active {
  background: linear-gradient(135deg, #f2c35b, var(--cg-gold));
  color: #2b1d08;
}

/* —— Startseite: Hero —— */
.start-hero.has-logo {
  position: relative;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem clamp(1.25rem, 3vw, 2.25rem);
  margin: 0.25rem auto 1.25rem;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(255, 251, 244, 0.62), rgba(255, 238, 220, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.start-hero.has-logo::before {
  /* Sonnenhalo hinter dem Logo */
  content: "";
  position: absolute;
  left: 50%; top: -12%;
  width: min(720px, 120%); aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 233, 159, 0.75), rgba(254, 183, 111, 0.35) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: cg-sun-breathe 9s ease-in-out infinite alternate;
}
@keyframes cg-sun-breathe {
  from { opacity: 0.75; transform: translateX(-50%) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) scale(1.04); }
}
.start-hero.has-logo > * { position: relative; z-index: 1; }
.start-hero.has-logo .hero-logo-wrap {
  margin: 0 auto 0.75rem;
  transform: translate3d(0, var(--cg-parallax, 0px), 0);
  will-change: transform;
}
.start-hero.has-logo .hero-logo {
  width: clamp(220px, 30vw, 340px);
  max-width: 82vw;
  animation: cg-float 7s ease-in-out infinite;
  filter: drop-shadow(0 14px 30px rgba(140, 72, 20, 0.22));
}
@keyframes cg-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-0.6deg); }
}
.start-hero.has-logo .eyebrow { margin-top: 0.25rem; }
.start-hero.has-logo h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.02;
  margin: 0.1rem 0 0.6rem;
  background: linear-gradient(120deg, var(--cg-terracotta-deep), var(--cg-gold-deep) 55%, var(--cg-terracotta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.start-hero.has-logo .lede {
  max-width: 62ch;
  margin: 0 auto 1rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.start-hero.has-logo .insight-chips { justify-content: center; }
.insight-chip {
  padding: 0.45rem 0.85rem;
  box-shadow: 0 3px 10px rgba(120, 62, 22, 0.08);
}

/* Andere Hero-Bereiche */
.hero h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); }

/* —— Galerie —— */
.start-gallery, .photo-gallery {
  gap: 0.8rem;
}
.photo-card {
  background: rgba(255, 252, 247, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  cursor: zoom-in;
}
.photo-card img {
  transition: transform 0.8s var(--ease-out), filter 0.4s ease;
}
@media (hover: hover) {
  .photo-card:hover img { transform: scale(1.06); filter: saturate(1.08); }
}
.photo-card figcaption { color: var(--ink-soft); }

/* —— Lightbox (fx.js) —— */
.cg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: rgba(43, 30, 22, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cg-lightbox.is-open { opacity: 1; }
.cg-lightbox figure {
  margin: 0;
  max-width: min(1200px, 92vw);
  background: rgba(255, 250, 243, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 0.6rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.45s var(--ease-out);
}
.cg-lightbox.is-open figure { transform: scale(1); }
.cg-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  margin: 0 auto;
}
.cg-lightbox figcaption { padding: 0.55rem 0.4rem 0.2rem; color: var(--ink-soft); font-size: 0.92rem; text-align: center; }
.cg-lightbox-close {
  position: fixed;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 250, 243, 0.95);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.cg-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 250, 243, 0.9);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
}
.cg-lightbox-nav.prev { left: 1rem; }
.cg-lightbox-nav.next { right: 1rem; }

/* —— Buchungen: 3 Statusfarben —— */
.legend-dot.status-approved, .cal-event.status-approved, .status-badge.status-approved { background: var(--st-approved); color: #fff; border: none; }
.legend-dot.status-pending, .cal-event.status-pending, .status-badge.status-pending { background: var(--st-pending); color: #2b1e16; border: none; }
.legend-dot.status-rejected, .cal-event.status-rejected, .status-badge.status-rejected { background: var(--st-rejected); color: #fff; border: none; }
.bookings-overview .booking-card { border-left-width: 6px; }
.bookings-overview .booking-card.status-approved { border-left-color: var(--st-approved); background: color-mix(in srgb, var(--st-approved) 12%, rgba(255, 252, 247, 0.72)); }
.bookings-overview .booking-card.status-pending { border-left-color: var(--st-pending); background: color-mix(in srgb, var(--st-pending) 16%, rgba(255, 252, 247, 0.72)); }
.bookings-overview .booking-card.status-rejected { border-left-color: var(--st-rejected); background: color-mix(in srgb, var(--st-rejected) 12%, rgba(255, 252, 247, 0.72)); }
.bookings-overview {
  border: 1px solid rgba(183, 122, 41, 0.3);
  box-shadow: var(--shadow-lg);
}
.bookings-overview h2::before { content: "📅 "; }
.cal-day.has-approved { box-shadow: inset 0 -4px 0 var(--st-approved); }
.cal-day.has-pending:not(.has-approved) { box-shadow: inset 0 -4px 0 var(--st-pending); }

/* —— Ausflüge / Nähe / Detail —— */
.trip-card { background: rgba(255, 252, 247, 0.66); border: 1px solid rgba(255, 255, 255, 0.7); }
.trip-card-img, .trip-hero-img { transition: transform 0.9s var(--ease-out); }
@media (hover: hover) { .trip-card:hover .trip-card-img { transform: scale(1.06); } }
.trip-card-img-wrap, .trip-card > picture, .trip-card > img { overflow: hidden; }
.trip-kicker, .trip-distance { color: var(--cg-gold-deep); }
.trip-hero { border-radius: 26px; overflow: hidden; }
.nearby-card { background: rgba(255, 252, 247, 0.72); }
.nearby-pin span { border-color: rgba(183, 122, 41, 0.35); }

/* —— Tabellen / Formulare —— */
input, select, textarea {
  background: rgba(255, 253, 249, 0.86);
  border-color: rgba(183, 122, 41, 0.28);
}
input:focus, select:focus, textarea:focus { border-color: var(--cg-terracotta); }
th { color: var(--cg-gold-deep); }
.kpi-value, .projection-value { font-family: var(--font-display); font-weight: 700; color: var(--cg-terracotta-deep); }

/* —— Login —— */
.auth-page {
  position: relative;
  background: linear-gradient(175deg, #ffe7c4 0%, #fbc9a8 34%, #f3b49a 52%, #e9cfa6 72%, #c9c08c 100%);
  background-attachment: fixed;
}
.auth-page::before {
  background:
    radial-gradient(30vmax 24vmax at 50% 18%, rgba(255, 233, 159, 0.85), transparent 65%),
    radial-gradient(34vmax 26vmax at 12% 30%, rgba(228, 86, 20, 0.22), transparent 62%),
    radial-gradient(34vmax 26vmax at 88% 26%, rgba(243, 180, 154, 0.7), transparent 62%);
}
.auth-page::after {
  background:
    radial-gradient(44vmax 22vmax at 25% 100%, rgba(99, 88, 25, 0.35), transparent 65%),
    radial-gradient(40vmax 22vmax at 85% 100%, rgba(69, 70, 14, 0.3), transparent 65%);
}
.auth-card {
  background: rgba(255, 251, 244, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  left: 50%; top: -30%;
  width: 140%; aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 233, 159, 0.6), rgba(254, 183, 111, 0.25) 50%, transparent 72%);
  pointer-events: none;
}
.auth-card > * { position: relative; }
.auth-card .brand-logo {
  width: min(250px, 74%);
  animation: cg-float 7s ease-in-out infinite;
  filter: drop-shadow(0 12px 26px rgba(140, 72, 20, 0.22));
}
.auth-card .subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--cg-gold-deep);
}

.site-footer { color: var(--muted); }
.site-footer p { font-family: var(--font-display); font-size: 1.05rem; }

/* —— Scroll-Reveal (nur wenn fx.js aktiv) —— */
.fx .reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.fx .reveal.is-in { opacity: 1; transform: none; }

/* —— Reduzierte Bewegung respektieren —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fx .reveal { opacity: 1; transform: none; }
  .start-hero.has-logo .hero-logo-wrap { transform: none; }
}

/* —— Mobile —— */
@media (max-width: 640px) {
  .start-hero.has-logo { border-radius: 24px; margin-top: 0; }
  .start-hero.has-logo .hero-logo { width: 220px; }
  .panel h2 { font-size: 1.35rem; }
  body::before, body::after { inset: -35vmax; }
}

/* —— Startseiten-Galerie als Masonry (CSS-Spalten) —— */
.start-gallery.photo-gallery {
  display: block;
  columns: 2 180px;
  column-gap: 0.8rem;
}
.start-gallery .photo-card {
  break-inside: avoid;
  margin: 0 0 0.8rem;
  display: block;
}
.start-gallery .photo-card img { height: 170px; }
.start-gallery .photo-card:nth-child(3n + 1) img { height: 250px; }
.start-gallery .photo-card:nth-child(4n + 2) img { height: 210px; }
.start-gallery .photo-card figcaption { font-size: 0.85rem; }

.trip-card h3, .nearby-card h3, .tip-card h3 { font-size: 1.28rem; line-height: 1.2; }

/* Brand im Header = Link zur Startseite (Optik unverändert) */
a.topbar-brand { color: inherit; text-decoration: none; cursor: pointer; border-radius: 14px; }
a.topbar-brand:hover strong { color: var(--ink); }
a.topbar-brand:focus-visible { outline: 3px solid rgba(228, 86, 20, 0.55); outline-offset: 4px; }

/* —— Mobile: Startseiten-Galerie als sauberes 2-Spalten-Raster —— */
@media (max-width: 640px) {
  .start-gallery.photo-gallery {
    display: grid;
    columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .start-gallery .photo-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 14px;
  }
  .start-gallery .photo-card img,
  .start-gallery .photo-card:nth-child(3n + 1) img,
  .start-gallery .photo-card:nth-child(4n + 2) img {
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  /* ungerade Anzahl: letztes Bild über volle Breite, damit keine Lücke bleibt */
  .start-gallery .photo-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .start-gallery .photo-card:last-child:nth-child(odd) img { aspect-ratio: 16 / 9; }
  .start-gallery .photo-card figcaption {
    padding: 0.4rem 0.55rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Schildkröten-Highlight: volle Breite, ruhiges Format */
  .desc-highlight { max-width: none; }
  .desc-highlight img { height: auto; aspect-ratio: 16 / 10; }
  /* Grundriss-Vorschau: weniger Innenabstand */
  .floorplan-thumb { padding: 0.4rem; }
  .start-hero.has-logo .hero-logo { width: min(220px, 64vw); }
}

/* —— Burger: einklappbarer Admin-Bereich —— */
.burger-admin {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(183, 122, 41, 0.2);
}
.burger-section-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.burger-section-toggle:hover { background: rgba(254, 183, 111, 0.18); color: var(--ink); }
.burger-section-toggle.active { color: var(--cg-terracotta-deep); }
.burger-toggle-chev { margin-left: auto; transition: transform 0.25s var(--ease-out); }
.burger-section-toggle[aria-expanded="true"] .burger-toggle-chev { transform: rotate(90deg); }
.burger-admin .burger-section-children { border-left-color: rgba(183, 122, 41, 0.3); }
.burger-admin .burger-section-children[hidden] { display: none; }

/* —— Admin-Übersicht —— */
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.8rem;
}
.admin-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.admin-tile strong { font-family: var(--font-display); font-size: 1.2rem; }
.admin-tile .muted { font-size: 0.88rem; }
.admin-tile-ico {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 233, 159, 0.9), rgba(254, 183, 111, 0.7));
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
@media (hover: hover) {
  a.admin-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}
.admin-tile-static { cursor: default; }
.admin-overview + .panel { margin-top: 1rem; }

/* —— Rechtliches: Footer-Links —— */
.legal-links { margin: 0.35rem 0 0; font-size: 0.88rem; font-family: var(--font-body) !important; }
.legal-links a, .link-btn { color: var(--cg-terracotta-deep); }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.legal-footer { width: 100%; text-align: center; padding: 1rem 0 0.5rem; }
.auth-page .legal-footer { align-self: end; }

/* —— Impressum / Datenschutz —— */
.legal-topbar { justify-content: flex-start; }
.legal-main { max-width: 860px; }
.legal-text h2 { font-size: 1.35rem; margin: 1.4rem 0 0.4rem; }
.legal-text h2:first-child { margin-top: 0.2rem; }
.legal-text p, .legal-text li { line-height: 1.65; }
.legal-text a { overflow-wrap: anywhere; }
.placeholder {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 6px;
  background: rgba(227, 162, 26, 0.22);
  border: 1px dashed #a06f1f;
  color: #5a3b0a;
  font-weight: 700;
}
.credit-list { padding-left: 1.1rem; }
.credit-list li { margin-bottom: 0.45rem; font-size: 0.92rem; }

/* —— Consent-Banner (Glas, Abendsonne) —— */
.cg-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  padding: 0 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
}
.cg-consent-card {
  pointer-events: auto;
  width: min(760px, 100%);
  background: rgba(255, 250, 243, 0.94);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 -6px 40px rgba(120, 62, 22, 0.22), 0 4px 14px rgba(120, 62, 22, 0.1);
  padding: 1.1rem 1.25rem 1.15rem;
  color: var(--ink);
  animation: cg-consent-in 0.45s var(--ease-out);
}
@keyframes cg-consent-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cg-consent h2 { font-size: 1.4rem; margin: 0 0 0.35rem; }
.cg-consent p { margin: 0 0 0.6rem; font-size: 0.93rem; line-height: 1.5; color: var(--ink-soft); }
.cg-consent-cats { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.4rem; }
.cg-consent-cats label { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.9rem; line-height: 1.4; }
.cg-consent-cats input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--cg-terracotta); flex: 0 0 auto; }
.cg-consent-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.6rem; }
/* gleichwertige Buttons – keine Hervorhebung einer Option */
.cg-btn-equal {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--cg-terracotta);
  font-weight: 700;
  padding: 0.7rem 1rem;
}
.cg-btn-equal:hover { background: rgba(254, 183, 111, 0.22); }

/* —— Karten-Platzhalter ohne Einwilligung —— */
.cg-map-consent {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 233, 159, 0.55), transparent 60%),
    linear-gradient(160deg, rgba(255, 246, 215, 0.95), rgba(243, 180, 154, 0.55));
  border-radius: inherit;
  text-align: center;
}
.map-frame, #nearby-map, #trip-map, #apartment-map { position: relative; }
.cg-map-consent-inner { max-width: 440px; }
.cg-map-consent-ico { font-size: 2rem; display: block; margin-bottom: 0.3rem; }
.cg-map-consent p { margin: 0 0 0.7rem; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
.cg-map-consent .cg-map-consent-more { font-size: 0.8rem; margin: 0.6rem 0 0; }

/* ---------- Google Sign-In (Branding: weißer Button, offizielles G, Text „Mit Google anmelden“) ---------- */
.google-login { margin-top: 1.1rem; }
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--cg-gold-deep, #8a6a1f); font-family: var(--font-display); font-style: italic;
  margin: 0 0 1rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 74, 32, 0.35), transparent);
}
.gsi-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 16px;
  background: #fff; color: #1f1f1f;
  border: 1px solid #747775; border-radius: 999px;
  font-family: Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 15px; font-weight: 500; letter-spacing: 0.25px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(140, 72, 20, 0.12);
  transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
.gsi-btn:hover { background: #fafafa; box-shadow: 0 8px 22px rgba(168, 74, 32, 0.22); transform: translateY(-1px); color: #1f1f1f; }
.gsi-btn:focus-visible { outline: 3px solid rgba(232, 140, 50, 0.6); outline-offset: 2px; }
.gsi-btn:active { transform: none; background: #f2f2f2; }
.gsi-btn-icon { display: inline-flex; width: 20px; height: 20px; }
.google-hint { text-align: center; font-size: 0.8rem; margin: 0.6rem 0 0; }

/* ---------- Freigabe-Warteseite & Admin-Anfragen ---------- */
.pending-card { text-align: center; }
.pending-card .pending-ico { font-size: 2.4rem; margin: 0.5rem 0; }
.pending-card .pending-email { font-weight: 600; word-break: break-all; }
.pending-card .btn { margin-top: 1rem; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem; margin-left: 0.4rem;
  border-radius: 999px; background: var(--cg-terracotta, #a84a20); color: #fff;
  font-size: 0.72rem; font-weight: 700; line-height: 1;
}
.pending-list { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.pending-item {
  display: grid; gap: 0.5rem; padding: 0.85rem 1rem; border-radius: 16px;
  background: rgba(255, 251, 244, 0.75); border: 1px solid rgba(168, 74, 32, 0.18);
}
.pending-item.is-rejected { opacity: 0.7; }
.pending-item .pending-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pending-item select { min-width: 10rem; }
.google-mail-cell { font-size: 0.85rem; word-break: break-all; }

/* —— Finanzen: Eigentumszeitraum —— */
.period-note {
  margin: 0 0 0.75rem;
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.8);
  border: 1px solid rgba(183, 122, 41, 0.25);
  color: var(--cg-gold-deep);
  font-weight: 600;
  font-size: 0.9rem;
}
.ownership-period { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(183, 122, 41, 0.2); }
.ownership-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.7rem; margin: 0.4rem 0 0.6rem; }
.ownership-stats > div { background: rgba(255, 252, 247, 0.7); border: 1px solid rgba(255, 255, 255, 0.75); border-radius: 14px; padding: 0.65rem 0.8rem; }
.ownership-stats dt { font-size: 0.85rem; color: var(--ink-soft); }
.ownership-stats dd { margin: 0.2rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--cg-terracotta-deep); }

/* ==========================================================================
   Mood-Bilder Bergamo (hell, Abendsonne – kein Dark Mode)
   ========================================================================== */

/* —— Mood-Band „Bergamo – ca. 25 Min.“ —— */
.mood-band {
  position: relative;
  display: block;
  height: clamp(210px, 30vw, 300px);
  margin: 1.25rem 0;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--ink);
}
.mood-band-img, .mood-band-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mood-band-img img {
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out);
  animation: cg-band-drift 26s ease-in-out infinite alternate;
}
@keyframes cg-band-drift {
  from { transform: scale(1.04) translate3d(-1.2%, 0, 0); }
  to { transform: scale(1.1) translate3d(1.2%, -1%, 0); }
}
.mood-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 246, 230, 0.55) 0%, rgba(255, 246, 230, 0.12) 45%, rgba(255, 246, 230, 0) 70%);
  z-index: 1;
}
.mood-band-label {
  position: absolute;
  left: clamp(0.75rem, 3vw, 1.75rem);
  bottom: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: min(440px, calc(100% - 1.5rem));
  padding: 0.85rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.86);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 26px rgba(80, 40, 15, 0.2);
}
.mood-band-label .eyebrow { margin: 0; }
.mood-band-label strong { font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.1; color: var(--ink); }
.mood-band-sub { font-size: 0.92rem; color: var(--cg-terracotta-deep); font-weight: 600; }
@media (hover: hover) {
  .mood-band:hover .mood-band-img img { animation-play-state: paused; transform: scale(1.12); }
}
.mood-band:focus-visible { outline: 3px solid rgba(228, 86, 20, 0.55); outline-offset: 4px; }

/* —— Hausbereich: Balkonblick als Hintergrund —— */
.house-panel {
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.66) 0%, rgba(255, 251, 244, 0.88) 30%, rgba(255, 251, 244, 0.93) 100%),
    url("/images/mood/balkon-blick-1600.webp") center 30% / cover no-repeat;
}
@media (max-width: 800px) {
  .house-panel {
    background:
      linear-gradient(180deg, rgba(255, 251, 244, 0.82) 0%, rgba(255, 251, 244, 0.93) 30%, rgba(255, 251, 244, 0.95) 100%),
      url("/images/mood/balkon-blick-800.webp") center top / cover no-repeat;
  }
}

/* —— Ausflüge: Bergamo-Mood-Header —— */
@keyframes cg-kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}
.mood-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(5rem, 14vw, 9rem) clamp(1rem, 4vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-lg);
}
.mood-header-bg, .mood-header-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.mood-header-bg img { object-fit: cover; object-position: center 60%; animation: cg-kenburns 18s ease-out both; }
.mood-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(255, 244, 228, 0) 12%, rgba(255, 246, 232, 0.78) 48%, rgba(255, 249, 241, 0.94) 78%, rgba(255, 249, 241, 0.97) 100%);
}
.mood-header h1 { color: var(--ink); }
.mood-header .lede { color: var(--ink); max-width: 60ch; }

/* —— Bewegung reduzieren: keine Wechsel/Zoom —— */
@media (prefers-reduced-motion: reduce) {
  .mood-band-img img, .mood-header-bg img { animation: none !important; transform: none !important; }
}

@media (max-width: 640px) {
  .mood-band { border-radius: 20px; height: 290px; }
  .mood-band-label { padding: 0.65rem 0.9rem; }
  .mood-band-label strong { font-size: 1.3rem; }
  .mood-band-sub { font-size: 0.82rem; }
  .mood-header { padding-top: 10rem; }
  .mood-header::after { background: linear-gradient(180deg, rgba(255, 244, 228, 0) 18%, rgba(255, 246, 232, 0.8) 42%, rgba(255, 249, 241, 0.95) 65%, rgba(255, 249, 241, 0.97) 100%); }
  .mood-header-bg img { object-position: center 30%; }
  .mood-band::after { background: linear-gradient(0deg, rgba(255, 246, 230, 0.5), rgba(255, 246, 230, 0) 60%); }
}


/* —— Lagekarte Startseite: Haus-Logo + Orte mit Stern —— */
#apartment-map.map-frame { height: clamp(480px, 46vw, 560px); }
@media (max-width: 860px) { #apartment-map.map-frame { height: 360px; } }
.lage-house img {
  width: 100%; height: 100%; border-radius: 50%; display: block;
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(80, 36, 10, 0.45), 0 0 0 2px rgba(183, 122, 41, 0.6);
  background: #fff6d7;
}
.lage-star span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, #feb76f, #e45614); color: #fff; font-size: 17px; line-height: 1;
  border: 2px solid #fff; box-shadow: 0 4px 12px rgba(120, 50, 10, 0.4); cursor: pointer;
}
.leaflet-tooltip.lage-label {
  background: rgba(255, 250, 243, 0.95); color: var(--ink); border: 1px solid rgba(183, 122, 41, 0.45);
  border-radius: 999px; padding: 3px 10px; font: 700 13px/1.3 var(--font-body, system-ui), sans-serif;
  box-shadow: 0 3px 10px rgba(80, 40, 15, 0.22); white-space: nowrap;
}
.leaflet-tooltip.lage-label::before { display: none; }
.leaflet-tooltip.lage-label-house { color: var(--cg-terracotta-deep); font-size: 14px; }
.leaflet-container .leaflet-marker-icon:focus-visible { outline: 3px solid rgba(228, 86, 20, 0.6); outline-offset: 3px; border-radius: 50%; }
@media (max-width: 560px) {
  .leaflet-tooltip.lage-label { font-size: 11.5px; padding: 2px 8px; }
  .lage-star span { width: 26px; height: 26px; font-size: 14px; }
}

/* Admin: Nutzer bearbeiten */
.users-table input[type="email"], .users-table input[type="password"] { width: 100%; min-width: 11rem; }
.user-pw-row { display: flex; gap: 0.4rem; margin-top: 0.3rem; flex-wrap: wrap; }
.user-pw-row input { flex: 1 1 9rem; }

/* ---------- Registrierung ---------- */
.auth-switch { text-align: center; margin: 1.1rem 0 0; font-size: 0.92rem; }
.auth-switch a { font-weight: 600; color: var(--cg-terracotta, #a84a20); }
.auth-title { font-family: var(--font-display); text-align: center; margin: 0.25rem 0 0.2rem; font-size: 1.45rem; }
.auth-lede { text-align: center; font-size: 0.88rem; margin: 0 0 1rem; }
.register-card .brand-logo { width: min(170px, 52%); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 6.2rem; width: 100%; }
.pw-toggle {
  position: absolute; right: 0.45rem; top: 50%; transform: translateY(-50%);
  border: 0; background: rgba(168, 74, 32, 0.1); color: var(--cg-terracotta, #a84a20);
  border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.pw-toggle:focus-visible { outline: 2px solid rgba(232, 140, 50, 0.7); outline-offset: 2px; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.register-privacy { font-size: 0.8rem; margin: 0.6rem 0 0.4rem; }
.method-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 999px;
  padding: 0.1rem 0.5rem; margin-right: 0.35rem; vertical-align: 1px;
}
.method-google { background: #e8f0fe; color: #1a56c4; }
.method-password { background: rgba(168, 74, 32, 0.12); color: var(--cg-terracotta, #a84a20); }
