/* ===== 1. VARIABLEN & RESET ===== */
:root {
  --sage: #9caf88;
  --sage-dark: #6f8a5c;
  --rose: #c7a1a8;
  --rose-soft: #e8d9dc;
  --sage-soft: #bdceac;
  --dark: #2f3e2f;
  --light: #f6f6f4;
  --soft-rosa: #f4e8ea; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

/* Gemeinsame Sektions-Basis */
section {
  padding: 80px 10%;
  animation: fadeUp 1s ease both;
}

/* ===== 2. NAVIGATION ===== */
nav, .navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10%;
  z-index: 1000;
}

nav ul, .nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

nav a, .nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  transition: 0.3s;
}

nav a.active, .nav-links a.active {
  color: var(--rose);
  font-weight: 600;
}

nav a.active::after, .nav-links a.active::after {
  width: 100%;
}

nav a::after, .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: var(--rose);
  transition: 0.3s;
}
nav a:hover::after, .nav-links a:hover::after { width: 100%; }

.logo img {
  height: 2.7rem;
  width: auto;
  display: block;
  transition: 0.3s;
}
.logo img:hover { transform: scale(1.05); }

/* ===== 3. HERO & BUTTONS ===== */
.hero, .hero-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero { background: url("images/startbild.jpg") center/cover; background-attachment: scroll; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* Spezifisch für Galerie-Seite */
header .hero-section {
  height: 450px;
  background: linear-gradient(var(--rose), var(--sage-soft)); 
}

.hero-content { position: relative; z-index: 2; }
.animate-hero {
  animation: slideInUp 1.5s ease-out;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; }

.btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--sage), var(--rose));
  color: white;
  border-radius: 40px;
  text-decoration: none;
  transition: 0.4s;
}
.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* ===== 4. CONTENT KOMPONENTEN (Cards, Timeline, Table) ===== */
.cards {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  width: 280px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
  transition: 0.4s;
}
.card:hover { transform: translateY(-10px); }

/* Timeline */
.timeline { position: relative; margin-top: 50px; }
.timeline-item { position: relative; width: 50%; padding: 20px 40px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  width: 18px;
  height: 18px;
  background: var(--rose);
  border-radius: 50%;
  z-index: 5;
  animation: pulse 2s infinite;
}
.timeline-item:nth-child(odd)::before { right: -9px; }
.timeline-item:nth-child(even)::before { left: -9px; }

.timeline-item .content {
  padding: 20px;
  border-radius: 15px;
  display: inline-block;
  max-width: 350px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.timeline-item:hover .content {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.timeline-img { width: 100%; border-radius: 10px; margin-top: 10px; }

/* Tabelle */
.table-container { margin-top: 40px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
th, td { padding: 18px; text-align: left; }
thead { background: var(--sage); color: white; }
tbody tr { border-bottom: 1px solid #eee; transition: 0.3s; }
tbody tr:hover { background: var(--rose-soft); }

/* Google Maps */
.reise-karte-container {
  margin-top: 30px;
  background-color: var(--rose-soft);
  padding: 15px;
  border-radius: 15px;
}
.reise-karte-container iframe { width: 100%; height: 400px; border: 0; border-radius: 10px; display: block; }

/* ===== 5. TENNIS BEREICH (GEÄNDERT FÜR LAPTOP: EINE REIHE) ===== */
.tennis-section {
  display: grid;
  /* Drei Spalten: Bild | Text | Video */
  grid-template-columns: 1fr 1fr 1fr; 
  gap: 30px;
  align-items: center;
}

/* Wir brauchen die Flex-Column hier nicht mehr, da Grid die Anordnung übernimmt */
.tennis-visuals {
  display: contents; /* Löst den Container auf, damit Kinder direkt im Grid landen */
}

.tennis-card img, .tennis-card video {
  width: 100%;
  border-radius: 25px;
  border: 4px solid var(--sage);
  transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  display: block;
}

.tennis-card img:hover, .tennis-card video:hover { 
  transform: scale(1.03) translateY(-5px); 
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  cursor: pointer; 
}

.tennis-info {
  text-align: center;
  padding: 0 10px;
}

.tennis-info h2 { 
  font-size: 2.2rem; /* Etwas kleiner für die Dreier-Reihe */
  margin: 10px 0 20px 0; 
  color: var(--dark);
  line-height: 1.1;
}

.tennis-info span { 
  text-transform: uppercase; 
  letter-spacing: 2px;
  font-weight: bold;
  font-size: 0.8rem; 
  color: var(--sage-dark); 
}

/* Fakten-Bereich bleibt unverändert */
.tennis-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  background-color: var(--soft-rosa);
}

/* ===== 6. GALERIEN (Freunde & Familie) ===== */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 200px;
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto;
}

main.container h2 {
    text-align: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;
    font-size: 2.5rem;
}
.grid-item img, .familie-galerie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s ease;
}
.grid-item img { border-radius: 4px; }
.grid-item img:hover, .familie-galerie img:hover { transform: scale(1.05); }

.tall { grid-row: span 2; }
.wide { grid-column: span 2; }

.familie-bereich { background-color: var(--soft-rosa); text-align: center; }
.familie-galerie {
  display: flex;
  justify-content: center;
  gap: 15px;
  max-width: 1300px;
  margin: 0 auto;
}
.familie-galerie img { width: 200px; height: 180px; border-radius: 20px; }

/* ===== 7. PROJEKTE SEITE (Spezial-Design) ===== */
.projekte-page {
  background: radial-gradient(circle at top right, var(--rose-soft), transparent),
              radial-gradient(circle at bottom left, var(--sage-soft), transparent);
  background-attachment: fixed;
  padding-top: 140px;
}

.projekte-page h1 {
  font-size: 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--sage-dark), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.projekte-page section {
  margin: 40px 5%;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: 0.4s;
}
.projekte-page section:hover { transform: scale(1.01); }

.projekte-page .images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.projekte-page .img-box img { 
  border-radius: 18px; 
  transition: 0.8s; 
  width: 100%;    /* Diese Zeile sorgt dafür, dass das Bild in die Box passt */  height: 320px;
  object-fit: cover;  display: block; /* Verhindert kleine Abstände unter dem Bild */
}
.projekte-page .img-box img { border-radius: 18px; transition: 0.8s; }
.projekte-page .img-box:hover { transform: translateY(-15px) rotate(1deg); }

.projekte-page .img-box p {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--dark);
}

/* Hintergrundfarben Sektionen */
.mbk, .kmd { background: rgba(232, 217, 220, 0.4) !important; }
.om { background: rgba(189, 206, 172, 0.4) !important; }

/* ===== 8. FOOTER & IMPRESSUM ===== */
footer {
  background: var(--sage);
  color: white;
  text-align: center;
  padding: 50px 10%;
  margin-top: 50px;
}
footer a { color: white; text-decoration: none; font-weight: bold; }

/* Impressum-Seite: Footer-Link hervorheben */
.impressum-page footer a {
  color: white;
  text-decoration: underline;
  text-decoration-color: white;
  text-decoration-thickness: 2px;
}

/* Impressum */
.impressum-container {
  max-width: 800px;
  margin: 100px auto;
  padding: 40px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
}

.impressum-section {
  margin-bottom: 30px;
  text-align: left;
}

.impressum-section h2 {
  color: var(--rose);
  border-bottom: 2px solid var(--sage-soft);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

/* ===== 9. ANIMATIONEN & RESPONSIVE ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(199, 161, 168, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(199, 161, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 161, 168, 0); }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
    ===== RESPONSIVE DESIGN (HANDY) ===== 
   ========================================= */

@media (max-width: 768px) {
    .hamburger { display: block; cursor: pointer; z-index: 1001; }
    .hamburger div { width: 25px; height: 3px; background-color: var(--dark); margin: 5px; transition: 0.4s; }

    nav ul, .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: auto;
        min-width: 180px;
        padding: 25px;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
        transition: 0.4s;
    }
    nav ul.show, .nav-links.show { left: auto; right: 0; }

    .tennis-section { 
        grid-template-columns: 1fr; 
        gap: 30px;
        text-align: center;
    }
    
    .tennis-info h2 { font-size: 2rem; }

    .tennis-footer {
        display: grid;
        grid-template-columns: 1fr; 
        gap: 20px; 
        padding: 30px 5%; 
        background-color: var(--soft-rosa);
    }

    .footer-item {
        background: white; 
        padding: 25px;
        border-radius: 20px; 
        box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
        text-align: center; 
        border-left: 5px solid var(--rose); 
    }

    .footer-item h2, .footer-item h3 {
        color: var(--sage-dark); 
        font-size: 1.2rem; 
        margin-bottom: 8px;
    }

    .footer-item p {
        font-size: 0.95rem; 
        color: #666; 
    }

    .masonry-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; 
        grid-auto-rows: 150px !important; 
        gap: 12px !important;
        padding: 10px;
    }

    .grid-item.wide, .grid-item.tall {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    .familie-galerie {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    .familie-galerie img {
        width: 100% !important;
        height: 150px !important;
    }

    .familie-galerie img:last-child {
        grid-column: 1 / span 2; 
        justify-self: center; 
        width: 100%; 
        max-width: 200px; 
    }

    .projekte-page h1 {
        font-size: 2.2rem !important; 
        line-height: 1.2;
        padding: 0 15px;
        word-wrap: break-word;
        text-align: center;
    }

    .projekte-page section {
        margin: 20px 15px !important;
        padding: 20px !important;
    }

    .timeline-item { width: 100%; padding-left: 50px; left: 0 !important; text-align: left !important; }
    .timeline-item::before { left: 15px !important; }
}