/* ===== NAVIGATION ===== */
.navbar {
    position: absolute; /* sticky beim Scrollen */
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    display: flex;
    justify-content: center; /* Buttons zentrieren */
    background: transparent; /* transparent, passt zu Overlay */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    gap: 15px; /* neu: Platz zwischen Logo/Buttons */
    align-items: center;
}

.logo {
    color: white;
    font-size: 16px;
    letter-spacing: 1px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    width: 100%;          /* Container darf volle Breite nutzen */
    max-width: 420px;     /* optional: verhindert zu breite Buttons */
}

.nav-button {
    flex: 1;              /* beide Buttons exakt gleich breit */
    min-width: 0;         /* wichtig für sauberes Flex-Verhalten */

    display: flex;              
    justify-content: center;    
    align-items: center;        
    text-align: center;         

    padding: 10px 22px;

    border: 2px solid white;
    border-radius: 6px;

    text-decoration: none;
    font-size: 14px;
    font-weight: 500;

    color: white;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    line-height: 1.6;
    background: #ffffff;
}

h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: 0.5px;
}

h4 {
    margin-top: 12px;
    margin-left: 15px;
    font-size: 16px;
    color: #444;
}

h4 + ul {
    margin-left: 15px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
}

.center {
    text-align: center;
}

.section {
    background: #fff;
}

.section.dark {
    background: #1f2a33;
    color: white;
}

.hero {
    background: url("../images/backgrounds/background_1.jpg") center center / cover no-repeat;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 100px;   /* NEU – Platz für Navbar */
}

.hero-content {
    background: rgba(0,0,0,0.4);
    padding: 10px 40px;
    border-radius: 8px;
}

.button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: #2e5e4e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: 0.3s;
}

.button:hover {
    background: #244a3d;
}

.button.light {
    background: white;
    color: #1f2a33;
}

.image-section {
    height: 90vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.image-section.summer {
    background: url("../images/backgrounds/background_2.jpg") center center / cover no-repeat;
}

.image-section.winter {
    background: url("../images/backgrounds/background_winter2.jpg") center center / cover no-repeat;
}

.overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    padding: 20px;
    color: white;
}

.overlay-content {
    background: rgba(0,0,0,0.4);
    padding: 40px;
    border-radius: 8px;
}

/* Overlay zeigt den Text +X, Hintergrund aber klickbar */
.more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    pointer-events: none; /* Hintergrund ignoriert Maus */
    cursor: pointer;      /* zeigt Hand */
}

/* Text im Overlay zeigt Hand, klick geht durch */
.more-count {
    pointer-events: none; /* sehr wichtig: Text blockiert Klick nicht */
    color: white;
    font-weight: 600;
    font-size: clamp(14px, 2.5vw, 24px);
}

.two-columns {
    display: flex;
    gap: 60px;
}

.two-columns div {
    flex: 1;
}

footer {
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    font-size: 14px;
}
.button-group {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.button.outline {
    background: transparent;
    border: 2px solid white;
}

.button.outline:hover {
    background: white;
    color: #1f2a33;
}
.navbar.solid {
    position: relative;
    background: #1f2a33;
}

.sub-hero {
    background: #2e5e4e;
    color: white;
    padding: 120px 20px 60px;
    text-align: center;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

section {
    margin-bottom: 60px;
}

section h2 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
/* ===== Google Maps Bereich ===== */

.map-link {
    display: inline-block;
    margin: 10px 0 15px;
    font-weight: 500;
    color: #2e5e4e;
    text-decoration: none;
}

.map-link:hover {
    text-decoration: underline;
}

.map-box {
    margin-top: 15px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.route-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #2e5e4e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.3s;
}

.route-button:hover {
    background: #244a3d;
}

/* ===== Kontaktkarten ===== */

.contact-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.contact-card {
    flex: 1;
    min-width: 250px;
    background: #f7f9fa;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.contact-card a {
    color: #2e5e4e;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.one-column {
    display: block; /* nur eine Spalte */
}

.one-column div {
    width: 100%;
}

/* ===== Galerie Preview Layout ===== */

.gallery {
    display: grid;
    grid-template-columns: 3fr 1fr; /* linke Spalte doppelt so breit */
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

/* Erstes Bild groß links */
.gallery-item.preview:nth-child(1) {
    grid-row: span 4; /* nimmt komplette Höhe ein */
}

.gallery-item.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
}

/* Rechte Spalte */
.gallery-item.preview:not(:first-child) {
    height: 100%;
}

/* Mini Bilder */
.gallery-item.preview:not(:first-child) img {
    height: 100%;
}

/* Alle Bilder außer den ersten 5 ausblenden */
.gallery-item:not(.preview) {
    display: none;
}

/* Bildunterschriften in Preview ausblenden */
.gallery-item.preview p {
    display: none;
}

/* ===== +X Bilder Overlay ===== */

.more-images {
    position: relative;
}

.more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.more-count {
    color: white;
    font-weight: 600;
    white-space: nowrap;          /* verhindert Zeilenumbruch */
    font-size: clamp(14px, 2.5vw, 24px);
}

/* Lightbox Overlay */
.lightbox {
    display: none; /* unsichtbar bis geklickt */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: white;
    margin-top: 10px;
    text-align: center;
    font-size: 16px;
}

.lightbox-close {
    position: fixed;          
    top: 20px;
    right: calc(20px + env(safe-area-inset-right));
    font-size: 36px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    z-index: 2100;

}
.lightbox-prev,
.lightbox-next {
    position: fixed;        
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
    padding: 15px;
    z-index: 2100;
}

.lightbox-prev {
    left: calc(20px + env(safe-area-inset-left));
}

.lightbox-next {
    right: calc(20px + env(safe-area-inset-right));
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}
html {
  scroll-behavior: smooth;
}


#toc {
  margin: 20px 0;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 6px;
}

#toc h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  cursor: pointer;
}

#toc ul {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;

  /* Animation */
  max-height: 0;       /* zu Beginn eingeklappt */
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

#toc li {
  margin: 5px 0;
}

#toc a {
  text-decoration: none;
  color: #333;
}

#toc a:hover {
  text-decoration: underline;
}

/* Button Styling */
#toc-toggle {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

/* TOC sichtbar: Animation */
#toc-list.show {
  max-height: 1000px; /* groß genug, damit alles sichtbar wird */
}

/* =================== Mobile Fixes =================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html, body {
    overflow-x: hidden; /* verhindert horizontales Scrollen */
}

/*
@media (max-width: 768px) {
    .container, .nav-container {
        padding: 0 10px; // weniger padding für kleine Screens
    }
    .two-columns {
        flex-direction: column; // Spalten untereinander
        gap: 20px;
    }
    .gallery {
        grid-template-columns: 1fr; // Galerie einspaltig
    }
    .nav-button {
        min-width: auto;
        padding: 10px 15px;
        font-size: 13px;
    }
    .hero-content, .overlay-content {
        padding: 20px; // kleinerer Overlay
    }
}
*/
/* =================== Global Scrollfix =================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html, body {
    overflow-x: hidden; /* verhindert horizontales Scrollen */
}

/* =================== Desktop Preview: 4 Bilder =================== */
.gallery.preview {
    display: grid;
    grid-template-columns: 3fr 1fr; /* links groß, rechts schmal */
    grid-template-rows: repeat(4, 1fr); /* 4 Reihen */
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

/* Erstes Bild groß links */
.gallery.preview .gallery-item.preview:nth-child(1) {
    grid-row: span 4; /* nimmt alle 4 Reihen der linken Spalte ein */
}

/* 3 kleine Bilder rechts, letztes = more-images */
.gallery.preview .gallery-item.preview:nth-child(n+2):nth-child(-n+4) {
    height: 100%; 
}

/* Bilder skalieren */
.gallery.preview .gallery-item.preview img,
.gallery.preview .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
}

/* Bildunterschriften nur bei normalen Preview-Bildern ausblenden */
.gallery-item.preview:not(.more-images) p {
    display: none;
}

/* =================== +X Overlay =================== */
.more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.more-count {
    color: white;
    font-weight: 600;
    white-space: nowrap;
    font-size: clamp(14px, 2.5vw, 24px);
}

/* =================== Mobile Anpassungen =================== */
@media (max-width: 768px) {

    /* Container & Navigation */
    .container, .nav-container {
        padding: 0 10px;
    }

    .two-columns {
        flex-direction: column;
        gap: 20px;
    }



    /* Navigation Buttons */
    .nav-button {
        min-width: auto;
        padding: 10px 15px;
        font-size: 13px;
    }

    /* Section.dark Button Fix */
    .section.dark .container {
        padding: 40px 10px 80px; /* genug Platz unten für Button */
    }

    .section.dark .button.light {
        display: inline-block;
        margin-top: 20px;
    }

    /* Vorschau-Galerie Mobile */
    .gallery.preview {
        grid-template-columns: 1fr 1fr; /* 2 Spalten */
        grid-auto-rows: auto;
        gap: 8px;
    }

    .gallery.preview .gallery-item.preview:nth-child(1) {
        grid-row: auto; /* erstes Bild nicht mehr 4 Reihen hoch */
    }

    .gallery.preview .gallery-item.preview img,
    .gallery.preview .gallery-item img {
        width: 100%;
        height: auto; /* proportional auf Mobile */
        object-fit: cover;
        border-radius: 12px;
    }

/* Portrait Smartphone */
@media (max-width: 768px) and (orientation: portrait) {

    .hero,
    .image-section {
        height: 65vh;
    }

}

/* Landscape Smartphone */
@media (max-width: 768px) and (orientation: landscape) {

    .hero,
    .image-section {
        height: 100vh;
    }

}