/* ============================================
   Neuchl Anwesen - Modern Design
   ============================================ */

:root {
    --color-primary: #2c5f2d;
    --color-primary-light: #4a8b4c;
    --color-primary-dark: #1a3d1b;
    --color-accent: #c4a35a;
    --color-accent-light: #ddc88a;
    --color-bg: #faf9f6;
    --color-bg-alt: #f0ede6;
    --color-text: #2d2a26;
    --color-text-light: #6b6560;
    --color-white: #ffffff;
    --color-border: #e0ddd6;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

    --radius: 8px;
    --radius-lg: 16px;

    --transition: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header / Navigation
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--color-primary);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--color-text-light);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: rgba(44, 95, 45, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* WebP mit JPEG-Fallback; start_neu.jpg (650px) bleibt als Original erhalten */
    background: url('Bilder/bilder_2012/start_neu_2200.jpg') center/cover no-repeat;
    background-image: image-set(
        url('Bilder/bilder_2012/start_neu_2200.webp') type('image/webp'),
        url('Bilder/bilder_2012/start_neu_2200.jpg') type('image/jpeg')
    );
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    padding: 48px 40px;
}

/* Weicher Scrim nur hinter dem Text – das Foto selbst bleibt unverfaerbt */
.hero-content::before {
    content: '';
    position: absolute;
    inset: -6% -10%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        rgba(18, 38, 18, 0.62) 0%,
        rgba(18, 38, 18, 0.45) 45%,
        rgba(18, 38, 18, 0) 72%
    );
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--color-white);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.55), 0 4px 28px rgba(0,0,0,0.45);
}

.hero-subtitle {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 2px 14px rgba(0,0,0,0.7);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ============================================
   Sections
   ============================================ */

.section {
    padding: 96px 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 24px;
}

.section-desc {
    color: var(--color-text-light);
    max-width: 600px;
    margin-bottom: 32px;
}

/* ============================================
   Welcome
   ============================================ */

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.welcome-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 20px;
}

.welcome-text p {
    margin-bottom: 16px;
    color: var(--color-text-light);
}

.welcome-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Timeline (Geschichte)
   ============================================ */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 48px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-year {
    flex-shrink: 0;
    width: 80px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    text-align: right;
    padding-top: 4px;
}

.timeline-content {
    position: relative;
    padding-left: 32px;
    padding-bottom: 8px;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-bg-alt);
}

.timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--color-primary-dark);
}

.timeline-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.history-credit {
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 48px;
}

/* ============================================
   Gallery
   ============================================ */

.gallery-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 10px 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.gallery-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.gallery-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gallery-grid.hidden {
    display: none;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Two Column Layout
   ============================================ */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.two-col h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 16px;
}

.two-col h3 {
    font-size: 1.15rem;
    margin-top: 28px;
    margin-bottom: 12px;
}

.two-col ul {
    padding-left: 20px;
    color: var(--color-text-light);
}

.two-col li {
    margin-bottom: 8px;
}

/* ============================================
   Board Members (Foerderverein)
   ============================================ */

.board-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.board-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.board-role {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.board-name {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.info-box {
    margin-top: 28px;
    padding: 20px;
    background: var(--color-white);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.info-box h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.info-box p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================
   Content Card (Arbeitsgruppe)
   ============================================ */

.content-card {
    max-width: 800px;
    margin: 0 auto;
}

.content-card h3 {
    font-size: 1.15rem;
    margin-top: 32px;
    margin-bottom: 16px;
}

.content-card p {
    color: var(--color-text-light);
}

.member-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 18px;
    background: var(--color-bg-alt);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary-dark);
}

.project-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.project-card {
    padding: 24px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    text-align: center;
}

.project-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.project-card h4 {
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.9rem;
}

.cta-text {
    margin-top: 32px;
    padding: 24px 28px;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    font-size: 1.05rem;
}

.cta-text strong {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.cta-text a {
    color: var(--color-primary-dark);
    font-weight: 700;
    text-decoration: underline;
}

/* ============================================
   Opening Hours & Events
   ============================================ */

.date-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.date-card {
    text-align: center;
    padding: 16px 8px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: border-color var(--transition);
}

.date-card:hover {
    border-color: var(--color-primary);
}

.date-month {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
}

.date-day {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.small-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 24px;
}

.contact-list {
    list-style: none;
    margin-top: 8px;
}

.contact-list li {
    padding: 4px 0;
    font-size: 0.95rem;
}

/* Events */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.event-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.event-date {
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}

.event-day {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.event-month {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.event-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.event-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Abgelaufene Termine (siehe zeigeVergangene in termine.json) */
.event-card.is-past {
    background: var(--color-bg-alt);
    box-shadow: none;
    border: 1px solid var(--color-border);
}

.event-card.is-past .event-day,
.event-card.is-past .event-info h4 {
    color: var(--color-text-light);
}

.event-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--color-border);
    color: var(--color-text-light);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.event-empty {
    padding: 20px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ============================================
   Link Cards
   ============================================ */

.link-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.link-card {
    display: block;
    padding: 28px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    transition: all var(--transition);
    position: relative;
}

.link-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
}

.link-card h4 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.link-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.link-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 1.3rem;
    color: var(--color-primary);
    transition: transform var(--transition);
}

.link-card:hover .link-arrow {
    transform: translateX(4px);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 64px 0 32px;
}

.footer h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.footer a {
    color: var(--color-accent-light);
}

.footer a:hover {
    color: var(--color-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.footer p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    color: rgba(255,255,255,0.7);
    margin-top: 16px;
    font-size: 0.95rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 968px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        transition: transform var(--transition);
    }

    .nav.open {
        transform: translateY(0);
    }

    .welcome-grid,
    .two-col,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-cards {
        grid-template-columns: 1fr;
    }

    .project-cards {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 60px;
    }

    .timeline-year {
        width: 60px;
        font-size: 0.95rem;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 64px 0;
    }

    .hero {
        height: 70vh;
        min-height: 400px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .date-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        left: 50px;
    }

    .timeline-year {
        width: 50px;
        font-size: 0.85rem;
    }

    .timeline-content {
        padding-left: 24px;
    }

    .board-member {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
