/* --- Globale Variablen und Grund-Setup --- */
:root {
    --primary-color: #10481a;
    --secondary-color: #0e8e14;
    --background-color: #f8f9fa;
    --text-color: #343a40;
    --headline-color: #07270b;
    --light-gray-color: #e9ecef;
    --white-color: #ffffff;
    --accent-color: #a49438;

    --font-family-base: 'Helvetica Neue', Arial, sans-serif;
    --font-family-headline: 'Georgia', serif;

    --container-width: 1140px;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

h1, h2, h3 {
    font-family: var(--font-family-headline);
    color: var(--headline-color);
    margin-top: 0;
}

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

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--white-color);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-family-headline);
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 500;
    padding: 0.5rem;
    border-bottom: 2px solid transparent;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.cta-nav-button {
    display: inline-block; 
    background-color: var(--accent-color);
    color: var(--headline-color);
    padding: 1em; 
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-nav-button:hover {
    background-color: #b8a54a;
    color: var(--headline-color);
    border-bottom-color: transparent;
    transform: translateY(-2px);
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white-color);
    min-width: 200px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    z-index: 1;
    border-top: 3px solid var(--primary-color);
    margin-top: 2px;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--light-gray-color);
    color: var(--primary-color);
    border-bottom: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Add a class to the nav item to indicate it's a dropdown trigger */
.nav-dropdown > a {
    cursor: default;
    position: relative; /* Needed for positioning the icon */
    padding-right: 1.5rem; /* Make space for the icon */
}

.nav-dropdown > a::after {
    content: '▼'; /* Down arrow icon */
    font-size: 0.7em;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.dropdown:hover .nav-dropdown > a::after {
    transform: translateY(-50%) rotate(180deg); /* Rotate arrow on hover */
}



/* --- Hero Sektion --- */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/Landing.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white-color);
    padding: 10rem 0;
    text-align: center;
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--headline-color);
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    margin-top: 1rem;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #b8a54a;
    color: var(--headline-color);
    transform: translateY(-2px);
}

/* --- Mitglied Werden Page --- */
.mitglied-image-container {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.pricing-section {
    padding: 4rem 0;
}

.pricing-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.pricing-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 5px solid var(--primary-color);
}

.pricing-card h3 {
    font-size: 1.5rem;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.pricing-card .period {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.join-us-section {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--light-gray-color);
}

.join-us-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}


/* --- Veranstaltungs-Vorschau (Karten) --- */
.events-preview {
    padding: 4rem 0;
}

.events-preview h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.event-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.event-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.card-link {
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
}

.card .card-image {
    height: 350px;
    width: 100%;
    object-fit: cover;
}

/* --- Allgemeine Seiten-Header --- */
.page-header {
    background-color: var(--light-gray-color);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    font-size: 2.8rem;
}

/* --- Detailseite (Veranstaltung) --- */
.event-detail {
    padding: 4rem 0;
}

.event-header {
    text-align: center;
    margin-bottom: 2rem;
}

.event-main-image {
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.visual-form input, .visual-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    background-color: #f1f1f1;
}

.visual-form button {
    cursor: not-allowed;
}

/* --- Kalender --- */
.calendar-section {
    padding: 4rem 0;
}

.calendar {
    background: var(--white-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 2rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h2 {
    margin: 0;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.day-name {
    font-weight: bold;
    color: var(--headline-color);
    padding-bottom: 0.5rem;
}

.day {
    padding: 1rem 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.day.event-highlight {
    background-color: var(--accent-color);
    color: var(--white-color);
    font-weight: bold;
}

.event-list {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray-color);
}

/* --- Jugend-Seite --- */
.youth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}


.content-with-image {
    display: flex;
    gap: 3rem;
    align-items: center;
}
.content-with-image .text-content {
    flex: 1;
}
.content-with-image .image-content {
    flex: 1;
    max-width: 500px;
}
.content-section.bg-light {
    background-color: var(--white-color);
    padding: 4rem 0;
    margin-top: 4rem;
}

/* --- Youth Page Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--accent-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.feature-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--headline-color);
    margin-bottom: 1rem;
}


/* --- Instagram-Galerie --- */
.instagram-gallery {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.overlay-text {
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- Archiv-Galerie (Masonry) --- */
.archive-gallery {
    padding: 4rem 0;
}

.masonry-gallery {
    column-count: 2;
    column-gap: 1.5rem;
}

.masonry-item {
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}
.masonry-item img {
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--headline-color);
    color: #adb5bd;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.main-footer a {
    color: var(--white-color);
    font-weight: 500;
}

/* --- Aktuelles Section Layout --- */
.aktuelles-content {
    display: flex;
    gap: 3rem; /* Adjust gap between columns */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.calendar-column {
    flex: 1; /* For mobile, take full width */
    min-width: 300px; /* Minimum width for calendar before wrapping */
}

.articles-column {
    flex: 2; /* For mobile, take full width */
    min-width: 300px; /* Minimum width for articles before wrapping */
}

/* --- Chronik Timeline --- */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 1rem 2rem;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--secondary-color);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
    padding-right: 3rem;
}

.timeline-item.right {
    left: 50%;
    padding-left: 3rem;
}

.timeline-item.right::after {
    left: -17px;
}

.timeline-item::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    border: medium solid var(--light-gray-color);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--light-gray-color) transparent transparent;
}

.timeline-item.left::before {
    right: 30px;
}

.timeline-item.right::before {
    left: 30px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--light-gray-color);
}


.timeline-content {
    padding: 20px 30px;
    background-color: var(--light-gray-color);
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.timeline-year {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* --- Lightbox Modal --- */
.lightbox-trigger {
    cursor: pointer;
}
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}
.close-button {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
}

/* --- Article Page --- */
.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-image {
    margin-bottom: 2rem;
}

/* --- Article Controls (Sort & Filter) --- */
.article-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 1rem; /* Space between sort and filter sections */
}

.sort-by label {
    margin-right: 0.5rem;
    font-weight: bold;
}

.sort-by select {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray-color);
    background-color: var(--white-color);
    font-size: 1rem;
    cursor: pointer;
}

.filter-keywords {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--light-gray-color);
    color: var(--text-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #dee2e6;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: bold;
}

/* --- Vorstandschaft Page --- */
.board-sections {
    padding: 4rem 0;
}

.board-section {
    margin-bottom: 4rem;
}

.board-section-title-wrapper {
    text-align: center;
    margin-bottom: 2.5rem;
}

.board-section-title-wrapper h2 {
    font-size: 2.2rem;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.board-card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: center;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.board-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.board-card h3 {
    font-size: 1.3rem;
    color: var(--headline-color);
    margin-bottom: 0.5rem;
}

.board-card p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0;
}

@media (max-width: 992px) {
    .board-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .board-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .article-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-keywords {
        margin-top: 1rem;
    }
}


/* --- Responsive & Mobile Navigation --- */
.nav-toggle {
    display: none; /* Hidden by default */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Ensure it's above other content */
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: background 0.2s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: transform 0.2s ease-in-out;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide the nav by default on mobile */
    }

    .nav-toggle {
        display: block; /* Show the hamburger button on mobile */
    }
    
    .main-header .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .main-nav.nav-active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(7, 39, 11, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .main-nav.nav-active ul {
        flex-direction: column;
        gap: 2rem;
    }

    .main-nav.nav-active a {
        color: var(--white-color);
        font-size: 1.5rem;
    }

    .main-nav.nav-active .dropdown-content {
        position: static;
        background-color: transparent;
        box-shadow: none;
        border-top: none;
    }

    .main-nav.nav-active .dropdown-content a {
        color: var(--white-color);
        padding: 10px 0;
        text-align: center;
    }

    .main-nav.nav-active .dropdown-content {
        display: none; /* Hide by default */
    }

    .main-nav.nav-active .nav-dropdown.dropdown-open .dropdown-content {
        display: block; /* Show when parent is opened */
    }

    body.nav-open {
        overflow: hidden; /* Prevent scrolling when nav is open */
    }

    /* Animate hamburger to X */
    .nav-active .hamburger {
        background: transparent;
    }

    .nav-active .hamburger::before {
        transform: rotate(45deg);
        background: var(--white-color);
    }

    .nav-active .hamburger::after {
        transform: rotate(-45deg);
        background: var(--white-color);
    }
}


/* --- Original Responsive Anpassungen --- */
@media (min-width: 993px) { /* Desktop */
    .calendar-column {
        flex: 0 0 calc(33.333% - 1.5rem);
        max-width: calc(33.333% - 1.5rem);
    }
    .articles-column {
        flex: 0 0 calc(66.666% - 1.5rem);
        max-width: calc(66.666% - 1.5rem);
    }
}

@media (max-width: 992px) {
    .content-with-image {
        flex-direction: column;
    }
    .aktuelles-content {
        flex-direction: column;
        gap: 2rem;
    }
    .calendar-column, .articles-column {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 25px;
    }
    .timeline-item.right {
        left: 0%;
        padding-left: 60px;
        padding-right: 25px;
    }
    .timeline-item.left::before,
    .timeline-item.right::before {
        left: 60px;
        border: medium solid var(--light-gray-color);
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--light-gray-color) transparent transparent;
    }
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 15px;
    }
}

@media (max-width: 768px) {
    /* The hamburger menu already handles header layout, so this can be simplified */
    .hero h1 {
        font-size: 2.5rem;
    }

    .masonry-gallery {
        column-count: 2;
    }

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

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .masonry-gallery {
        column-count: 1;
    }
}

/* --- Year Filter --- */
#year-filter-container {
    margin-top: 2rem;
}
#year-filter .filter-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
}

/* --- Calendar Embed Styling --- */
.calendar-embed {
    padding-top: 4rem;
}