/* =========================================================
   BASIS
========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    color: #222;
    background-color: #f9f9f9;
}

h1, h2, h3 {
    font-family: "Playfair Display", serif;
    font-weight: 500;
}

section {
    margin-bottom: 40px;
}

main {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.welcome-image {
    display: block;
    width: 50%;
    margin: 30px auto 0;
    border-radius: 6px;
}

/* =========================================================
   PORTRAIT (Bild + Text bündig)
========================================================= */

.portrait-wrapper {
    width: 50%;
    margin: 30px auto 0;
    text-align: left;   /* zentriert wie das Bild */
}

.portrait-wrapper img {
    width: 100%;
    display: block;
    border-radius: 6px;
}

.portrait-text {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 20px 40px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 40px;
}

.site-title {
    margin: 0;
    font-family: "Amatic SC", sans-serif;
    font-size: 2rem;
    color: #222;
}

.main-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #b89b5e;
}

.header-logo {
    height: 36px;
    width: auto;
}

/* =========================================================
   NAVIGATION – aktiver Menüpunkt
========================================================= */

.main-nav a {
    position: relative;
}

/* Aktiver Menüpunkt */
.main-nav a.active {
    color: #b89b5e;
}

/* Feine Linie unter aktiven Punkt */
.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background-color: #b89b5e;
    opacity: 0.8;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    background-image: url("../images/bild-innen.jpeg");
    background-size: cover;
    background-position: center;
    min-height: 45vh;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); /* helligkeit startbild 0.3 */
}

.hero-text {
    position: relative;
    transform: translateY(-10px);
}


/* =========================================================
   SOCIAL LINKS
========================================================= */

.social-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 22px 0 10px;
}

.social-links a {
    color: #8a8a8a;
    display: inline-flex;
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: #b89b5e;
    transform: translateY(-2px);
}

.social-links svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}


/* =========================================================
   GALERIE
========================================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*.gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
*/


/* =========================================================
   LIGHTBOX
========================================================= */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    cursor: pointer;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    right: 25px;
    color: #ffffff;
    font-size: 0.9rem;
}

/* =========================================================
   LIGHTBOX – Navigation Pfeile
========================================================= */

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    
    width: 38px;
    height: 38px;

    font-size: 22px;
    line-height: 1;
    color: #222;

    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;

    z-index: 1001;
}

.lightbox-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

#lightbox:not(.active) .lightbox-nav {
    display: none;
}

/* =========================================================
   LIGHTBOX – sanfter Bildwechsel
========================================================= */

#lightbox img {
    transition: opacity 0.25s ease;
}

#lightbox img.is-fading {
    opacity: 0;
}


/* =========================================================
   TIMELINE
========================================================= */

.timeline {
    margin-top: 50px;
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    background: linear-gradient(
        to bottom,
        #e6dccb,
        #d8cbb4,
        #e6dccb
    );
}


.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

/* Linie hebt sich leicht hervor beim Hover eines Eintrags */
.timeline-item:hover ~ .timeline::before {
    background: #d0c6b5;
}
/* Timeline-Jahres-Kreis: immer exakt gleich (wie bei 2024) */
.timeline-year {
    width: 60px;           /* feste Breite */
    height: 60px;          /* feste Höhe -> garantiert rund */
    flex: 0 0 60px;        /* verhindert “zusammendrücken” durch Flex */
    border-radius: 50%;

    background: #ffffff;
    border: 2px solid #b89b5e;
    color: #b89b5e;

    display: flex;         /* zentriert Text wirklich */
    align-items: center;
    justify-content: center;

    font-family: "Playfair Display", serif;
    font-weight: 500;

    z-index: 1;            /* bleibt über der Timeline-Linie */
}


.timeline-image {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    border-radius: 8px;
}

/* =========================================================
   TIMELINE – dezente Interaktion
========================================================= */

/* Jahres-Kreis reagiert beim Hover */
.timeline-item:hover .timeline-year {
    border-color: #8f7442;           /* etwas kräftiger Goldton */
    color: #8f7442;
    transform: scale(1.05);          /* minimal grösser */
}

/* sanfter Übergang */
.timeline-year {
    transition:
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
}


/* =========================================================
   VIDEO
========================================================= */

.video-wrapper {
    position: relative;
    margin: 0 auto 40px;
    border-radius: 8px;
    overflow: hidden;
}

.video-wrapper video {
    width: 50%;
    display: block;
    margin: 0 auto;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;

    background: rgba(255, 255, 255, 0.85);
    font-size: 26px;
    cursor: pointer;
}

.video-wrapper.playing .video-play-btn {
    opacity: 0;
    pointer-events: none;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    color: #666;
    margin-top: 40px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    main {
        padding: 20px;
    }

    .site-header {
        grid-template-columns: 1fr auto;
        row-gap: 10px;
    }

    .main-nav {
        grid-column: 1 / -1;
    }

    .video-wrapper video {
        width: 100%;
    }

    .portrait-wrapper {
        width: 100%;
    }
}

/* =========================================================
   LINKS – dezent & im Stil der Website
========================================================= */

a {
    color: #b89b5e;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

/* feine Linie unter dem Link (nicht klassisch unterstrichen) */
a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background-color: #b89b5e;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

a:hover {
    color: #8f7442; /* etwas dunkler beim Hover */
}

a:hover::after {
    opacity: 1;
}

/* =========================================================
   SCROLL-ANIMATIONEN (dezentes Fade-in)
========================================================= */

/* Startzustand: unsichtbar & minimal verschoben */
.reveal {
    opacity: 0;
    transform: translateY(15px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

/* Sichtbar, sobald im Viewport */
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Wenn Timeline-Item sichtbar wird */
.timeline-item.reveal.is-visible .timeline-year {
    border-color: #8f7442;
    color: #8f7442;
}

/* =========================================================
   BILDER – ruhiger Magazin-Hover
========================================================= */

/* Basis für alle hochwertigen Bilder */
.image-hover {
    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}

/* Hover-Effekt (nur Desktop) */
@media (hover: hover) {
    .image-hover:hover {
        transform: scale(1.02);
        filter: brightness(1.05);
    }
}

.flyer-download {
    text-align: center;
    margin-top: 12px;
    font-size: 0.9rem;
}

.flyer-download {
    position: relative;
    z-index: 2;
}

.flyer-download a {
    pointer-events: auto;
}


.welcome-image {
    position: relative;
    z-index: 1;
}

/* Flyer-Bild darf keine Klicks blockieren */
/*.welcome-image {
    pointer-events: none;
}*/

.qr-code {
    width: 220px;       /* Größe anpassen nach Wunsch */
    height: 220px;      /* quadratisch */
    object-fit: contain;
    display: block;
    margin: 20px auto;  /* zentriert */
}

.hero-logo {
    width: 220px;
    display: block;
    margin: 0 auto 10px auto;

    filter: brightness(0) invert(1);
}

/* =========================================================
   STARTSEITE – 3 BILDER
========================================================= */

.start-gallery {
    display: flex;
    gap: 18px;
    margin-top: 20px;
}

.start-gallery img {
    width: calc((100% - 36px) / 3);
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
}

/* =========================================================
   MOBILE – STARTSEITE BILDER
========================================================= */

@media (max-width: 768px) {

    .start-gallery {
        gap: 12px;
    }

    .start-gallery img {
        width: calc((100% - 24px) / 3);
        height: 200px;
    }

}

/* sehr kleine Handys */

@media (max-width: 480px) {

    .start-gallery {
        flex-wrap: wrap;
    }

    .start-gallery img {
        width: calc((100% - 12px) / 2);
        height: 200px;
    }

    .portrait-wrapper {
        width: 100%;
        margin: 30px auto;
    }

    .portrait-wrapper img {
        width: 100%;
        border-radius: 8px;
    }

    .welcome-image {
        width: 100%;
        max-width: 100%;
        margin: 30px auto 0;
        display: block;
    }
}


section.reveal {
    font-family: "Playfair Display", serif;
}

section.reveal p {
    font-size: 1.05rem;
    line-height: 1.7;
}

.soli-deo {
    font-family: "Great Vibes", cursive;
    font-size: 2rem;
    text-align: center;
    margin-top: 30px;
}

h1.farmhouse-title {
    font-family: "Amatic SC", sans-serif;
    letter-spacing: 3px;
    font-size: 3rem;
}

h3.farmhouse-title {
    font-family: "Amatic SC", sans-serif;
    letter-spacing: 3px;
    font-size: 2rem;
}