:root {
  --bg: #f3f4f2;
  --surface: #ffffff;
  --text: #1f2414;
  --muted: #596042;
  --primary: #606c24;
  --primary-dark: #485418;
  --accent: #90c0f0;
  --border: #dbe0d2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(130deg, rgba(15, 20, 8, 0.45), rgba(25, 36, 14, 0.25)),
    url("/media/homepage-bilder/hauptbild/IMG_2466.jpeg") center 35% / cover no-repeat;
  color: #fff;
}

.hero-top-actions {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.access-scope-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  max-width: min(62vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-link {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.logout-link:hover {
  background: rgba(255, 255, 255, 0.28);
}

.map-embed {
  margin-top: 0.9rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #eef2e8;
}

.map-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.35));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.hero-subline {
  margin: 0 auto;
  max-width: 760px;
  font-size: 1.05rem;
}

.hero-countdown {
  margin: 1.2rem auto 0;
  max-width: 860px;
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.hero-countdown-label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.95;
}

.hero-countdown-value {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.1;
}

.hero-countdown-sub {
  font-size: 0.95rem;
  opacity: 0.92;
}

.guest-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  background: rgba(243, 244, 242, 0.85);
  border-bottom: 1px solid var(--border);
}

.guest-nav-inner {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.55rem 0;
}

.guest-nav-link {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
  transition: all 180ms ease;
}

.guest-nav-link:hover {
  color: var(--primary-dark);
  background: #ebf0e3;
}

.guest-nav-link.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary-dark);
}

.section {
  padding: 3.5rem 0;
}

.section-highlight {
  background: #eef2e8;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hidden {
  display: none !important;
}

.auth-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  max-width: 560px;
}

.auth-panel h3 {
  margin-top: 0;
  color: var(--primary-dark);
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-logged-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.slider {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #dfe6d6;
}

.slider-track-wrapper {
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 350ms ease;
}

.slider-slide {
  min-width: 100%;
  aspect-ratio: 16 / 9;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.slider-slide img.is-portrait {
  object-fit: contain;
  background: #dfe6d6;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(32, 32, 32, 0.5);
  color: #fff;
  cursor: pointer;
  z-index: 2;
}

.slider-btn:hover {
  background: rgba(32, 32, 32, 0.75);
}

.slider-btn.prev {
  left: 12px;
}

.slider-btn.next {
  right: 12px;
}

.slider-hint {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.two-columns {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
}

.card h3 {
  color: #3d4a14;
}

.stack-list {
  display: grid;
  gap: 0.8rem;
}

.timeline-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.timeline-item strong {
  color: var(--primary-dark);
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.timeline-list-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.timeline-when {
  font-weight: 600;
  color: var(--primary-dark);
}

.timeline-title {
  font-weight: 600;
}

.timeline-detail {
  color: var(--muted);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
}

.faq-item p {
  margin: 0.65rem 0 0;
}

.rsvp-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #cfd5c3;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

button {
  margin-top: 1rem;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

.form-message {
  min-height: 1.2rem;
  margin-top: 0.7rem;
  color: var(--primary-dark);
  font-weight: 500;
}

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem 0;
  color: var(--muted);
}

.admin-title {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.4rem;
}

.admin-subtitle {
  margin-top: 0;
  color: var(--muted);
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  margin-top: 1rem;
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  align-items: end;
}

.admin-search {
  grid-column: span 2;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.admin-table th {
  background: #f8f9f6;
  color: var(--primary-dark);
}

.admin-table--compact {
  min-width: 720px;
}

.admin-table--compact th,
.admin-table--compact td {
  font-size: 0.85rem;
}

.admin-actions {
  white-space: nowrap;
}

.admin-edit-dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  max-width: min(640px, 96vw);
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.admin-edit-dialog::backdrop {
  background: rgba(20, 24, 16, 0.45);
}

.admin-edit-dialog-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.admin-edit-dialog .rsvp-form {
  padding: 1.25rem 1.4rem 1rem;
}

.admin-edit-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0 1.4rem 1.25rem;
}

.mini-btn {
  margin-top: 0;
  margin-right: 0.35rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
}

.mini-btn.danger {
  background: #9a3f3f;
}

.mini-btn.danger:hover {
  background: #7f3232;
}

.group-password-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #fbfcf9;
}

.group-password-meta {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.group-password-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: end;
}

.gallery-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}

.gallery-grid article {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.45rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
}

.gallery-grid .gallery-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2e8;
  border: 0;
  padding: 0;
  margin-top: 0;
  width: 100%;
  cursor: zoom-in;
}

.gallery-grid img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.gallery-meta {
  margin: 0.45rem 0.15rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 19, 8, 0.88);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  z-index: 200;
}

.lightbox-figure {
  margin: 0;
  max-height: 90vh;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}

.lightbox-figure img {
  max-width: min(92vw, 1200px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.lightbox-close,
.lightbox-nav {
  margin-top: 0;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.7rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .hero-top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
  }

  .access-scope-label {
    max-width: min(78vw, 520px);
  }

  .guest-nav-link {
    font-size: 0.82rem;
    padding: 0.3rem 0.62rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .gallery-grid img {
    height: 150px;
  }

  .lightbox {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 3rem;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }
}

.admin-gallery-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  background: #fbfcf9;
}

.admin-gallery-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.admin-gallery-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-gallery-actions .mini-btn {
  margin-right: 0;
}
