/* =========================================================
   Variables
   ========================================================= */
:root {
  --bg1: #fff7ed; /* warmes creme */
  --bg2: #ecfeff; /* leicht türkis */
  --bg3: #fdf2f8; /* rosé */

  --text: #0f172a; /* slate-900 */
  --muted: rgba(15, 23, 42, 0.68);
  --border: rgba(15, 23, 42, 0.12);

  --card: rgba(255, 255, 255, 0.72);
  --card2: rgba(255, 255, 255, 0.82);

  --shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;

  --maxw: 1100px;
  --pad: 14px;

  /* Nav shared */
  --nav-h: 62px;
  --nav-gap: 12px; /* Abstand zum Rand (floating pill) */

  /* Mobile nav sizing */
  --theme-color: rgba(249, 115, 22, 1);
  --text-color: rgba(15, 23, 42, 0.78);
  --menu-count: 4; /* kommt inline aus PHP: style="--menu-count: X" */

  --nav-size: 70px;
  --indicator-size: 50px;
  --nav-pill-pad: 10px;

  /* HERO: flüssig */
  --hero-overhang: 0px;
  --hero-reserved: 280px; /* Fallback bis JS setzt */
  --hero-img-max: 300px;

  /* Greeting band */
  --greet-h: 12em;
}

/* =========================================================
   Reset / Base
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  background: radial-gradient(
      900px 600px at 12% 0%,
      rgba(56, 189, 248, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 92% 8%,
      rgba(251, 146, 60, 0.22),
      transparent 55%
    ),
    radial-gradient(
      900px 600px at 70% 98%,
      rgba(244, 114, 182, 0.2),
      transparent 55%
    ),
    linear-gradient(180deg, var(--bg1), var(--bg2) 45%, var(--bg3));

  /* Platz für floating nav (mobile) */
  padding-bottom: calc(var(--nav-h) + (2 * var(--nav-gap)));
}

/* Links */
a {
  color: #0b4dbf;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================================================
   Layout
   ========================================================= */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad) 28px;
}

.stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

/* Desktop spacing */
@media (min-width: 900px) {
  body {
    padding-top: var(--nav-h);
    padding-bottom: 0;
  }

  .stack {
    gap: 14px;
    margin-top: 12px;
  }
}

/* =========================================================
   Decorative elements
   ========================================================= */
.floating-plane {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  pointer-events: none;
  will-change: transform;
  transform-origin: 50% 50%;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.62)
  );
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  isolation: isolate;
  z-index: 3;
  overflow: visible;
  padding-top: var(--hero-reserved);
}

.hero-img {
  position: absolute;
  top: calc(-1 * var(--hero-overhang));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - (2 * var(--pad)));
  max-width: var(--maxw);
  max-height: var(--hero-img-max);
  height: auto;
  object-fit: contain;
  display: block;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.14));
}

/* Hearts background behind the hero image (PNG swap, browser-safe) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;

  /* wichtig: clippen, da .hero overflow: visible hat */
  clip-path: inset(0 round var(--radius));

  background-image: url("/assets/img/heart64.png");
  background-color: rgba(255, 255, 255, 0.9);
  background-blend-mode: lighten;
  background-repeat: repeat;
}

/* =========================================================
   Greeting band
   ========================================================= */
.greeting-band {
  height: var(--greet-h);
  display: grid;
  place-items: center;
  margin: 10px 0 14px;
}

.greeting-text {
  margin: 0;
  text-align: center;
  font-size: clamp(1.15rem, 5vh, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 800;

  background: linear-gradient(
    90deg,
    rgba(2, 132, 199, 0.95),
    rgba(249, 115, 22, 0.95),
    rgba(236, 72, 153, 0.92)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.1));
}

/* =========================================================
   Cards / Typography
   ========================================================= */
.card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.card h2 {
  margin: 1em;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: rgb(131, 131, 131);
}

.copy {
  margin: 1em;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 90ch;
}

.hint {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.55);
}

/* =========================================================
   Quickinfo
   ========================================================= */
.quickinfo {
  text-align: center;
  margin: 6px 0 2px;
}

.quickinfo-line {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}

/* =========================================================
   Lists (Contacts / Hotels)
   ========================================================= */
.list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px; /* gleichmäßige Abstände horizontal & vertikal */
  align-items: stretch;
}

/* Contact cards */
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  /* entfernt: margin-top: 3vh; -> Spacing übernimmt grid gap */
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--card2);
}

.contact-left {
  min-width: 0;
}

.contact-name {
  font-weight: 650;
  margin: 0 0 4px;
  font-size: 15px;
}

.contact-phone {
  margin: 0;
  font-size: 14px;
}

.phone-link {
  color: rgba(15, 23, 42, 0.75);
  text-decoration: none;
}
.phone-link:hover {
  text-decoration: underline;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.btn:hover {
  background: rgba(255, 255, 255, 1);
}
.btn-disabled {
  opacity: 0.45;
  pointer-events: none;
}

button.btn {
  cursor: pointer;
}

/* Utilities */
.mt-8 {
  margin-top: 8px;
}

/* =========================================================
   Toolbar / Pager
   ========================================================= */
.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pager-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   Forms
   ========================================================= */
.form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.form-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.78);
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.88);
  padding: 10px 12px;
  font-size: 14px;
}

/* Password toggle row (login) */
.pw-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.pw-toggle {
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.pw-toggle:hover {
  background: rgba(255, 255, 255, 1);
}

/* =========================================================
   Gallery grid
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .thumb-meta {
    padding: 8px 8px 10px;
  }

  .thumb-meta-dt,
  .thumb-meta-by {
    font-size: 11.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .thumb-meta-dt {
    color: rgba(15, 23, 42, 0.82);
  }

  .thumb-meta-by {
    margin-top: 2px;
    color: rgba(15, 23, 42, 0.62);
  }
}

@media (min-width: 601px) {
  .thumb-meta {
    padding: 10px 10px 12px;
  }

  .thumb-meta-dt,
  .thumb-meta-by {
    font-size: 12.5px;
    line-height: 1.25;
  }

  .thumb-meta-dt {
    color: rgba(15, 23, 42, 0.82);
  }

  .thumb-meta-by {
    margin-top: 2px;
    color: rgba(15, 23, 42, 0.62);
  }
}

.thumb-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}
.thumb-card:hover {
  background: rgba(255, 255, 255, 0.86);
}

.thumb-img {
  width: 100%;
  height: auto;
  display: block;
}

.thumb-meta {
  padding: 10px 10px 12px;
}

.thumb-meta-line {
  display: flex;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.25;
}

.thumb-k {
  color: rgba(15, 23, 42, 0.55);
  flex: 0 0 auto;
}

.thumb-v {
  color: rgba(15, 23, 42, 0.82);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
   Viewer / Meta
   ========================================================= */
.viewer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.viewer-img {
  max-width: 100%;
  max-height: 76vh;
  height: auto;
  width: auto;
  border-radius: 12px;
  display: block;
}

.viewer-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.78);
}

.meta-row .k {
  color: rgba(15, 23, 42, 0.55);
}

.meta-row .v {
  color: rgba(15, 23, 42, 0.88);
  text-align: right;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .meta {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   Login
   ========================================================= */
.login-body {
  padding: 0 !important;
  display: flex;
  justify-content: center;
}

.login-shell {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 30vw;
  min-width: 360px;
  gap: 4em;
}

.login-title {
  margin: 0;
  text-align: center;
  font-size: clamp(3rem, 5vh, 8rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  background: linear-gradient(
    90deg,
    rgba(2, 132, 199, 0.95),
    rgba(249, 115, 22, 0.95),
    rgba(236, 72, 153, 0.92)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.login-modal {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin: 0 20px;
}

.login-modal input {
  font-size: 20px;
}

.login-modal button {
  height: 44px;
}

.login-modal input::placeholder {
  color: #c6c6c6;
}

.login-spacer {
  display: block;
  height: 16px;
}

.login-shell .hint {
  padding: 0 20px;
  text-align: center;
}

.login-error {
  border: 1px solid rgba(185, 28, 28, 0.25);
  background: rgba(185, 28, 28, 0.06);
  color: #991b1b;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* =========================================================
   Nav Overlay
   Mobile (bubble) + Desktop (top text)
   Änderung (1): Desktop-Breite entspricht Card-Spalte inkl. Nav-Padding
   ========================================================= */

/* MOBILE: floating pill + bubble indicator */
.nav-overlay {
  position: fixed;
  left: 50%;
  bottom: var(--nav-gap);
  transform: translateX(-50%);
  z-index: 9999;

  height: var(--nav-size);
  padding-inline: var(--nav-pill-pad);
  border-radius: 22px;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;

  /* aktive Position (0..menu-count-1) */
  --active-index: 0;
}

.nav-brand {
  display: none;
}

.nav-overlay ul {
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;

  /* Basisbreite = size * count */
  width: calc(var(--nav-size) * var(--menu-count));
  height: var(--nav-size);
}

.nav-overlay li.menu {
  list-style: none;
  width: var(--nav-size);
  height: var(--nav-size);
  z-index: 2;
}

.nav-overlay li.menu a {
  position: relative;
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav-overlay li.menu a .icon {
  line-height: calc(var(--nav-size) + 10px);
  color: var(--text-color);
  transition: transform 0.5s, color 0.5s;
}

.nav-overlay li.menu a .icon svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: currentColor;
}

.nav-overlay li.menu a .text {
  position: absolute;
  color: var(--theme-color);
  font-size: 0.75em;
  font-weight: 600;
  transition: transform 0.5s, opacity 0.5s;
  transform: translateY(20px);
  opacity: 0;
  white-space: nowrap;
}

.nav-overlay li.menu.active a .icon {
  transform: translateY(calc(var(--nav-size) * -0.5));
  color: #fff;
}
.nav-overlay li.menu.active a .text {
  opacity: 1;
  transform: translateY(10px);
}

/* Indicator bubble */
.nav-overlay .indicator {
  position: absolute;
  width: var(--indicator-size);
  height: var(--indicator-size);
  border-radius: 50%;
  background: var(--theme-color);

  left: calc((var(--nav-size) - var(--indicator-size)) / 2);
  top: calc(var(--indicator-size) * -0.5);

  transform: translateX(calc(var(--nav-size) * var(--active-index)));
  transition: transform 0.5s;

  z-index: 1;
  pointer-events: none;
}

.nav-overlay .indicator::before,
.nav-overlay .indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--w);
  height: var(--w);
  background: transparent;
}

/* sehr kleine Geräte */
@media (max-width: 360px) {
  :root {
    --nav-size: 62px;
  }
  .nav-overlay li.menu a .icon svg {
    width: 24px;
    height: 24px;
  }
}

/* DESKTOP: Top-Bar, Text statt Icons */
@media (min-width: 900px) {
  body {
    padding-top: calc(var(--nav-h) + 12px);
  }

  .nav-overlay {
    position: fixed;
    top: 10px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);

    /*
      Änderung (1):
      Cards sind so breit wie die .wrap Content-Box (wrap - padding links/rechts).
      Daher: Nav-Breite = min(100% - 2*pad, maxw - 2*pad)
      und Padding ist in dieser Breite enthalten (box-sizing ist global gesetzt).
    */
    width: min(
      calc(100% - (2 * var(--pad))),
      calc(var(--maxw) - (2 * var(--pad)))
    );

    height: var(--nav-h);

    padding: 0 12px; /* bleibt drin, ist aber jetzt "eingerechnet" */
    border-radius: 999px;
    z-index: 9999;

    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    overflow: visible;
  }

  .nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;

    text-decoration: none;
    color: rgba(15, 23, 42, 0.88);

    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);

    transition: transform 180ms ease, background 180ms ease,
      border-color 180ms ease;
  }

  .nav-brand:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.18);
  }

  .nav-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: block;
  }

  .nav-brand-title {
    font-weight: 750;
    letter-spacing: -0.01em;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
  }

  .nav-overlay ul {
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    flex: 1;
  }

  .nav-overlay .indicator {
    display: none;
  }

  .nav-overlay li.menu {
    width: auto;
    height: auto;
    list-style: none;
  }

  .nav-overlay li.menu a {
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;

    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.7);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    text-decoration: none;
    color: rgba(15, 23, 42, 0.82);

    transition: transform 180ms ease, background 180ms ease,
      border-color 180ms ease, box-shadow 180ms ease;
  }

  .nav-overlay li.menu a .icon {
    display: none;
  }

  .nav-overlay li.menu a .text {
    position: static;
    opacity: 1;
    transform: none;
    color: rgba(15, 23, 42, 0.82);
    font-size: 15px;
    font-weight: 650;
    transition: letter-spacing 180ms ease, transform 180ms ease;
  }

  .nav-overlay li.menu a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
    text-decoration: none;
  }

  .nav-overlay li.menu a:hover .text {
    transform: translateY(-0.5px);
    letter-spacing: 0.01em;
  }

  .nav-overlay li.menu.active a {
    background: rgba(17, 24, 39, 0.08);
    border-color: rgba(0, 0, 0, 0.28);
    box-shadow: none;
  }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .nav-overlay .indicator,
  .nav-overlay li.menu a .icon,
  .nav-overlay li.menu a .text {
    transition: none !important;
  }
}

@media (min-width: 900px) {
  .nav-overlay li.menu.active a .icon {
    transform: none !important;
  }
  .nav-overlay li.menu.active a .text {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* =========================================================
   Spinner / Animations
   ========================================================= */
.spinner {
  width: 16px;
  height: 16px;
  display: inline-block;
  z-index: 5;
  vertical-align: -3px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
