@font-face {
  font-family: 'Eyesome Duo Script';
  src: url('fonts/eyesome-duo-script.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg: #f5f8fa;
  --accent: #2f5060;
  --muted: #6e8188;
  --light-blue: #eaf2f7;
  --lighter-blue: #f7fafc;
  --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Serif Display", serif;
  color: #21343b;
  background: var(--bg);
  line-height: 1.45;
  scroll-behavior: smooth;
}

/* ---------- NAV ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'Breathing Personal Use', sans-serif;
  font-size: 1.8em;
  color: var(--accent);
}

.ampersand {
  font-family: 'Eyesome Duo Script', cursive;
  font-size: 1.8em;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 18px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: color .2s, background .2s;
}

nav a:hover {
  color: var(--accent);
}

nav a.active {
  color: var(--accent);
  background: rgba(180, 210, 230, 0.25);
}

.hamburger {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--accent);
}

.mobile-menu {
  display: none;
  background: rgba(255, 255, 255, 0.95);
}

.mobile-menu a {
  display: block;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--muted);
}

/* ---------- HERO ---------- */
.hero {
  width: 100%;
  height: 48vh;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}

.hero img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .overlay-box {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.6);
  padding: 26px 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transform: translateY(-60px); /* Verschiebt die Box px nach oben/unten */
}

.hero h1 {
  margin: 0;
  font-family: 'Breathing Personal Use', sans-serif;
  font-size: 44px;
  color: var(--accent);
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- SECTIONS ---------- */
section {
  width: 100%;
  padding: 60px 0;
  scroll-margin-top: 90px;
}

.bg-white {
  background: var(--lighter-blue);
}

.bg-lightblue {
  background: var(--light-blue);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- ABOUT ---------- */
.about {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.about .photo {
  flex: 0 0 260px;
  height: 360px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.about img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*object-fit: contain; /* Zeigt das ganze Bild statt Zuschneiden */
  /*background: var(--lighter-blue); /* Hintergrund für leere Bereiche */
}

.about .text {
  flex: 1 1 360px;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.85);
  padding: 22px;
  border-radius: 8px;
}

.about h3 {
  margin-top: 0;
  color: var(--accent);
}

/* ---------- WHEN & WHERE ---------- */
.grid-3 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.card {
  flex: 1 1 220px;
  min-width: 200px;
  background: white;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--card-shadow);
}

.card svg {
  width: 44px;
  height: 44px;
  color: var(--accent);
  flex-shrink: 0;
}

.card h4 {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
}

.card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- FORM ---------- */
form.rsvp {
  background: white;
  padding: 24px;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

label {
  font-size: 13px;
  color: #33494d;
  margin-bottom: 6px;
  display: block;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #33494d;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}

.btn {
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s;
}

.btn:hover {
  background: #3b6475;
}

.note {
  color: var(--muted);
  font-size: 13px;
}

.full {
  grid-column: 1/-1;
}

#begleitungNameContainer {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, max-height 0.4s ease;
}

#begleitungNameContainer.visible {
  opacity: 1;
  max-height: 200px;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--light-blue);
  padding: 40px 18px 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.contact {
  min-width: 260px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.map {
  flex: 1 1 420px;
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

h2.section-title {
  color: var(--accent);
  margin: 0 0 16px;
  font-size: 22px;
}

/* ---------- COPYRIGHT BAR ---------- */
.copyright-bar {
  background: #1a3644;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 20px 18px;
  font-size: 15px;
}

.copyright-bar p {
  margin: 0;
}

.copyright-bar a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  transition: color 0.2s;
}

.copyright-bar a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}


/* ========== MOBILE OPTIMIERUNGEN ========== */

/* Tablets und kleinere Laptops */
@media(max-width: 900px) {
  .about {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    flex-direction: column;
  }

  nav ul {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

/* Smartphones */
@media(max-width: 600px) {
  /* Navigation */
  .brand {
    font-size: 1.4em;
  }
  
  .ampersand {
    font-size: 1.4em;
  }
  
  .nav-inner {
    padding: 10px 15px;
  }

  /* Hero Section */
  .hero {
    height: 40vh;
    min-height: 280px;
  }

  .hero .overlay-box {
    padding: 20px;
    margin: 0 15px;
    max-width: calc(100% - 30px);
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 13px;
  }

  /* Sections - weniger Padding */
  section {
    padding: 40px 0;
  }

  .container {
    padding: 0 15px;
  }

  /* About Section */
  .about .photo {
    flex: 1 1 100%;
    max-width: 100%;
    height: 480px;
  }

  .about .text {
    padding: 18px;
  }

  .about h3 {
    font-size: 20px;
  }

  /* Cards - bessere Lesbarkeit */
  .card {
    flex-direction: row;
    padding: 15px;
  }

  .card svg {
    width: 36px;
    height: 36px;
  }

  .card h4 {
    font-size: 15px;
  }

  .card p {
    font-size: 13px;
    line-height: 1.4;
  }

  /* Form */
  form.rsvp {
    padding: 18px;
  }

  .form-grid {
    gap: 14px;
  }

  input,
  textarea {
    font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    padding: 12px;
  }

  textarea {
    min-height: 100px;
  }

  .btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
  }

  /* Form Footer - stacken auf Mobile */
  .full > div[style*="display:flex"] {
    flex-direction: column !important;
    gap: 12px;
    align-items: stretch !important;
  }

  .note {
    text-align: center;
    font-size: 12px;
  }

  /* Section Titles */
  h2.section-title {
    font-size: 20px;
  }

  /* Footer */
  footer {
    padding: 30px 15px 40px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .contact {
    min-width: 100%;
  }

  .map {
    height: 250px;
  }

  .contact h3 {
    font-size: 18px;
  }

  .contact p {
    font-size: 14px;
  }
}

/* Sehr kleine Smartphones */
@media(max-width: 380px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero .overlay-box {
    padding: 16px;
  }

  .brand {
    font-size: 1.2em;
  }

  .ampersand {
    font-size: 1.2em;
  }

  .card {
    padding: 12px;
  }

  form.rsvp {
    padding: 15px;
  }
}