/* ================================================================
   Gaetsch.com – zentrales Stylesheet
   ================================================================ */

/* ---- Lokale Schriftarten -------------------------------------------
   Die Schriftdateien liegen im Ordner /fonts. Passe die Dateinamen
   unten an die tatsächlichen Dateien an, die dort abgelegt werden.
   (woff2 zuerst, woff als Fallback für ältere Browser)
--------------------------------------------------------------------- */
@font-face {
    font-family: 'MainFont';
    src: url('../fonts/PT_Sans/PTSans-Regular.woff2') format('woff2'),
         url('../fonts/PT_Sans/PTSans-Regular.woff')  format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MainFont';
    src: url('../fonts/PT_Sans/PTSans-Bold.woff2') format('woff2'),
         url('../fonts/PT_Sans/PTSans-Bold.woff')  format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'LogoFont';
    src: url('../fonts/Kolker_Brush/KolkerBrush-Regular.woff2') format('woff2'),
         url('../fonts/Kolker_Brush/KolkerBrush-Regular.woff')  format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---- Grundlagen / Variablen ---------------------------------------- */
:root {
    --color-taupe:       #b7a696;   /* Header/Footer Hintergrund */
    --color-bg:          #e9e4dc;   /* Seitenhintergrund */
    --color-bg-light:    #ffffff;   /* helle Flächen */
    --color-text:        #4a4a4a;
    --color-text-light:  #ffffff;
    --color-nav-bg:      #e3ded6;
    --color-nav-active:  #cabfae;
    --color-purple:      #6c4b86;
    --color-orange:      #e08a2c;
    --color-dark:        #2b2b2b;
    --max-width: 1200px;
    --nav-height: 52px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'MainFont', Arial, Helvetica, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    letter-spacing: 0.02em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================================
   HEADER + NAVIGATION (mit Scroll-Animation)
   ================================================================ */

.site-header {
    position: relative;
    background: var(--color-taupe);
    text-align: center;
    padding: 28px 20px;
    min-height: 90px;
}

/* Logo: groß und zentriert im Header. Da die Navigation per
   "position: sticky" oben fixiert wird, scrollt der Header samt Logo
   beim Herunterscrollen ganz normal aus dem Sichtbereich - kein
   zusätzliches JavaScript/keine Animation nötig. */
.site-logo {
    display: inline-block;
    font-family: 'LogoFont', cursive;
    font-size: 42px;
    color: #fff;
}
.site-logo img { height: 48px; width: auto; }

.site-nav {
    background: var(--color-nav-bg);
    border-bottom: 1px solid #d3ccc0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-nav .nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: var(--nav-height);
    padding: 0 20px;
    position: relative;
}
.site-nav ul.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.site-nav li a,
.site-nav li span {
    display: block;
    padding: 0 22px;
    height: var(--nav-height);
    line-height: var(--nav-height);
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--color-dark);
}
.site-nav li a:hover,
.site-nav li a.active {
    background: var(--color-nav-active);
}

.nav-account {
    font-size: 13px;
    padding: 0 20px;
    white-space: nowrap;
}
.nav-account a { text-decoration: underline; }

/* Hamburger-Button: standardmäßig (Desktop/Tablet) unsichtbar */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--color-dark);
    border-radius: 2px;
}

/* ---- Ab Bildschirmen kleiner als ein Tablet: Hamburger-Menü ------- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; order: 1; }
    .nav-account { order: 2; margin-left: auto; padding-right: 0; }

    .site-nav ul.nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-nav-bg);
        border-top: 1px solid #d3ccc0;
        box-shadow: 0 6px 10px rgba(0,0,0,0.08);
        z-index: 90;
    }
    .site-nav.nav-open ul.nav-links {
        display: flex;
    }
    .site-nav li a { width: 100%; }
}


/* ================================================================
   ECHTER, FIXIERTER GANZSEITEN-HINTERGRUND (robuster als
   background-attachment:fixed, funktioniert zuverlässig auch mobil)
   ================================================================ */
.fixed-page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    background: var(--color-taupe);
    color: #fff;
    text-align: center;
    padding: 14px 20px;
    font-size: 13px;
}

/* ================================================================
   HOME
   ================================================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 20px 90px;
    text-align: center;
    background-color: var(--color-bg);
}

/* karierte Fläche als eigene Ebene im Hintergrund */
.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(183,166,150,0.18) 50%, transparent 50%),
        linear-gradient(rgba(183,166,150,0.18) 50%, transparent 50%);
    background-size: 40px 40px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    color: var(--color-taupe);
    font-size: 42px;
    line-height: 1.3;
    margin: 0 0 40px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Silhouetten: eigene Ebene, per absolute Positionierung IMMER
   horizontal zentriert – unabhängig von der Fensterbreite. */
.hero-silhouettes {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60%;
    max-width: 520px;
    min-width: 260px;
    z-index: 1;
}

.hero-divider {
    width: 100%;
    height: 2px;
    background: var(--color-taupe);
    margin: 0 auto;
}

/* Karten (Home-Verweise & Reisen-Übersicht teilen sich das Grundlayout) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 50px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}
@media (max-width: 860px) {
    .card-grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--color-bg-light);
    border: 2px solid var(--color-dark);
    display: flex;
    flex-direction: column;
}
.card.card-purple { border-color: var(--color-purple); }
.card.card-orange { border-color: var(--color-orange); }
/* Modifier für Reise-Kacheln (Reisen-Übersicht): sanfter, dünnerer Rahmen
   statt des kräftigen schwarzen Standard-Rahmens. */
.card.card-trip { border: 1px solid var(--color-taupe); }

.card a.card-link,
.card a.card-image-link {
    display: block;
}

.card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

/* Modifier für Logo-Kacheln (Startseite): Logo bekommt ringsum Abstand
   und wird komplett angezeigt statt beschnitten. */
.card-image-logo {
    padding: 7%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image-logo img { width: 100%; height: 100%; object-fit: contain; }

.card-body {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-body h3 {
    margin: 0 0 10px;
    font-size: 17px;
    letter-spacing: 0.03em;
    color: var(--color-dark);
}
.card-subtitle {
    margin: -6px 0 10px;
    font-size: 12px;
    color: #999;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.card.card-purple .card-body h3 { color: var(--color-purple); }
.card.card-orange .card-body h3 { color: var(--color-orange); }

.card-body p {
    font-size: 13px;
    line-height: 1.6;
    flex: 1;
    margin: 0 0 18px;
}

.btn {
    display: inline-block;
    border: 1px solid var(--color-dark);
    background: transparent;
    padding: 8px 18px;
    font-size: 13px;
    cursor: pointer;
    align-self: flex-start;
}
.btn:hover { background: var(--color-dark); color: #fff; }
.btn-center { align-self: center; }

/* ================================================================
   REISEN – Übersichtsseite
   ================================================================ */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 55px 20px 70px;
    text-align: center;
}
.page-hero h1 {
    position: relative;
    z-index: 2;
    color: var(--color-taupe);
    font-size: 40px;
    text-transform: uppercase;
    margin: 0;
}
.page-hero .page-hero-icon {
    position: absolute;
    left: 60%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80%;
    max-width: 180px;
    z-index: 1;
}

.intro-text {
    text-align: center;
    color: var(--color-taupe);
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.9;
    font-size: 15px;
    letter-spacing: 0.03em;
}
.intro-text strong { display: block; font-size: 17px; margin-top: 14px; }

/* ================================================================
   EINZELNE REISESEITE (geschützt)
   ================================================================ */
.trip-hero {
    position: relative;
    /* Kein eigenes Hintergrundbild mehr - das liefert jetzt .fixed-page-bg
       als echt fixierter Ganzseiten-Hintergrund. Hier nur noch eine
       halbtransparente dunkle Fläche, damit der weiße Titeltext über
       dem Foto lesbar bleibt. */
    background: rgba(20, 20, 20, 0.4);
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.trip-hero-content { position: relative; z-index: 2; }
.trip-hero-content h1 {
    font-size: 44px;
    margin: 0;
    text-transform: uppercase;
}
.trip-hero-content .subtitle {
    font-size: 26px;
    margin-top: 6px;
}

.trip-day {
    max-width: 950px;
    margin: -60px auto 40px;
    background: rgba(255, 255, 255, 0.94);
    padding: 30px 35px 40px;
    position: relative;
    z-index: 3;
}
.trip-day + .trip-day { margin-top: 40px; }

.trip-day-meta {
    text-align: center;
    margin-bottom: 22px;
}
.trip-day-meta .day-label {
    font-size: 17px;
    color: #777;
    letter-spacing: 0.05em;
}
.trip-day-meta h2 {
    margin: 8px 0 0;
    font-size: 42px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.trip-day-body {
    display: block;
}

.trip-day-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.trip-image-block img {
    cursor: zoom-in;
    width: 100%;
    height: auto;
    display: block;
}
.trip-image-caption {
    font-size: 12px;
    color: #777;
    margin: 6px 0 10px;
}
.trip-image-caption strong {
    display: block;
    font-size: 14px;
    color: var(--color-dark);
    margin-bottom: 2px;
}

.trip-day-map {
    margin-top: 20px;
}
.trip-day-map iframe {
    width: 100%;
    height: 320px;
    border: 0;
}

.trip-day-description {
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* Zentrale Tages-Karte (Ort des Tages), oben im Tages-Block */
.day-hero-map {
    width: 100%;
    height: 320px;
    margin-bottom: 24px;
    background: #eee; /* Platzhalter-Farbe, bis die Karte geladen ist */
}

/* Seiten-Übersichtskarte (alle besuchten Orte) */
.overview-map {
    width: 100%;
    height: 520px;
    max-width: var(--max-width);
    margin: 0 auto 50px;
}
.overview-map-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* WICHTIG: Leaflet-Kartenkacheln bestehen aus <img>-Tags. Die globale Regel
   "img { max-width: 100%; }" würde die Kacheln sonst falsch skalieren und
   die Karte zerreißen - hier für Leaflet-Container wieder aufheben. */
.leaflet-container img { max-width: none; }

/* ================================================================
   LIGHTBOX (Vollbild-Ansicht für Reisebilder)
   ================================================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 30px;
    cursor: zoom-out;
}
.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
}
.lightbox-close:hover { opacity: 0.7; }

/* Like-Button + Kommentare je Bild */
.image-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.like-btn {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
}
.like-btn.liked { background: #f7d9d9; border-color: #e08a8a; }
.like-count { font-size: 12px; color: #888; }

.comments-list {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    font-size: 12.5px;
}
.comments-list li {
    padding: 6px 0;
    border-top: 1px solid #eee;
}
.comments-list li strong { color: var(--color-taupe); }

.comment-edit-toggle,
.comment-delete-btn {
    background: none;
    border: none;
    font-size: 11px;
    color: #999;
    text-decoration: underline;
    cursor: pointer;
    padding: 0 0 0 8px;
}
.comment-delete-btn { color: #a33; }
.comment-edit-toggle:hover,
.comment-delete-btn:hover { color: var(--color-dark); }

.comment-edit-form { margin: 6px 0; }
.comment-edit-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 12.5px;
    padding: 6px 8px;
    border: 1px solid #ccc;
}

.comment-form textarea {
    width: 100%;
    font-family: inherit;
    font-size: 12.5px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    resize: vertical;
    min-height: 40px;
}
.comment-form button {
    margin-top: 6px;
}

.login-hint-box {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
}

/* ================================================================
   LOGIN / FORMULARE ALLGEMEIN
   ================================================================ */
.form-page {
    max-width: 420px;
    margin: 60px auto;
    background: #fff;
    padding: 34px 38px;
    border: 1px solid #ddd;
}
.form-page h1 {
    font-size: 22px;
    text-align: center;
    margin-top: 0;
}
.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #666;
}
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="date"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
}
.form-field textarea { min-height: 100px; resize: vertical; }
textarea.auto-grow {
    resize: none;
    overflow: hidden;
    min-height: 42px;
    line-height: 1.4;
    transition: height 0.1s ease;
}
.form-actions { text-align: center; margin-top: 22px; }
.form-error {
    background: #fbeaea;
    color: #a33;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}
.form-success {
    background: #eaf7ec;
    color: #2c7a39;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ================================================================
   RECHTSTEXTE (Impressum / Datenschutz)
   ================================================================ */
.legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px 70px;
    line-height: 1.7;
    font-size: 14px;
}
.legal-page h1 {
    color: var(--color-taupe);
    text-transform: uppercase;
    text-align: center;
}
.legal-page h2 {
    font-size: 15px;
    text-transform: uppercase;
    margin-top: 34px;
}

/* ================================================================
   ADMIN-BEREICH
   ================================================================ */
.admin-wrapper { max-width: 780px; margin: 40px auto; padding: 0 20px 60px; }
.admin-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.admin-nav a {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 13px;
}
.admin-box {
    background: #fff;
    border: 1px solid #ddd;
    padding: 26px 30px;
    margin-bottom: 24px;
}
.admin-box h2 { margin-top: 0; font-size: 17px; }
.repeat-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}
.small-btn {
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
}
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}
