* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1d1d1f;
    --footer-color: #004965;
    --secondary-color: #f5f5f7;
    --accent-color: #008fc6;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --wagon1-color: #008fc6;
    --wagon2-color: #45b1aa;
    --border-radius: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 200;
}

.p-top {
    padding-top: 100px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 60vw;
    background: white;
}

.hero-container {
    display: contents;
}

.hero-content {
    padding: 80px 60px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 30px;
    padding-bottom: 12px;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--wagon1-color) 0%, var(--wagon2-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-content p {
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    font-weight: 200;
    margin-bottom: 40px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hero-image {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.hero-image .overlay {
    position: absolute;
    bottom: 0;
    padding-bottom: 10%;
    opacity: .3;
    width: 100%;
}

.hero-image .overlay svg {
    width: 50%;
    float: left;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--wagon2-color);
    transform: scale(1.05);
}

/* Section Container */
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero hat keine max-width Beschränkung */
section.hero {
    max-width: none;
    padding: 0;
    margin: 0;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.015em;
}

.section-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

/* Details Section */
.details {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.75rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item span {
    position: absolute;
    z-index: 1;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    bottom: 0;
    left: 0;
    padding: 1rem;
}

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

/* Calendar Section */

.calendar-section {
    background: white;
    padding: 0 20px 100px;
}

.calendar-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.calendar-header h3 {
    font-size: 2rem;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 15px;
}

.nav-button {
    width: 44px;
    height: 44px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-button:hover {
    background: var(--accent-color);
    color: white;
}

.calendar-legend {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.calendar-grid,
#calendarGrid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    grid-auto-flow: row;
}

/* Stelle sicher dass alle direkten Kinder Grid-Items sind */
.calendar-grid > *,
#calendarGrid > * {
    max-width: 100%;
    width: auto;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 0;
}

.calendar-day {
    min-height: 120px;
    max-height: 200px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    width: auto;
    overflow: hidden;
}

.calendar-day:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.calendar-day.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
    min-height: 80px;
}

.calendar-day.empty:hover {
    transform: none;
}

.day-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.calendar-day.today {
    background: #ffa5002b;
}

.calendar-day.today .day-number {
    color: orange;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.event-badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 200;
    color: white;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-wagon1 {
    background: var(--wagon1-color);
}

.event-wagon2 {
    background: var(--wagon2-color);
}

.event-both {
    background: linear-gradient(135deg, var(--wagon1-color) 0%, var(--wagon2-color) 100%);
}

.calendar-day.weekend {
    /* background: #fafafa; */
    color: rgba(152, 160, 166, 0.6);
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'><g fill='%23f9f9fa' fill-opacity='1' fill-rule='evenodd'><path d='M0 40L40 0H20L0 20M40 40V20L20 40'/></g></svg>");
}

.calendar-day.weekend.today {
    background-color: #ffa5002b;
    background-image: url("data:image/svg+xml,<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'><g fill='%23ffa50012' fill-opacity='1' fill-rule='evenodd'><path d='M0 40L40 0H20L0 20M40 40V20L20 40'/></g></svg>");
}

.calendar-day.empty.weekend {
    background: transparent;
}

/* Footer */
footer {
    background: var(--footer-color);
    color: white;
    padding: 80px 20px 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-cta {
    text-align: center;
    padding: 60px 40px;
    margin-bottom: 60px;
    background-image: url('./img/volksfest.jpg');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    border: 1px solid rgb(153 172 179);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 73, 101, 0.85);
    z-index: 0;
}

.footer-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--wagon2-color));
    z-index: 1;
}

.footer-cta h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.015em;
    color: white;
    position: relative;
    z-index: 2;
}

.footer-cta p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.footer-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.cta-primary:hover {
    background: #f0f0f0;
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-col p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 8px;
}

.footer-col a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    text-align: right;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-content {
        padding: 60px 40px;
        margin-left: 0;
    }

    .hero-image {
        min-height: 50vh;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero-content {
        padding: 0;
        text-align: center;
        align-items: center;
        padding: 4rem 0 10rem;
    }

    .middle {
        padding-bottom: 1rem !important;
    }

    .hero-image {
        min-height: 300px;
    }

    .calendar-container {
        padding: 20px;
    }

    .calendar-header {
        flex-direction: column;
        gap: 20px;
    }

    .calendar-day {
        font-size: 0.9rem;
        min-height: 100px;
    }

    .features-grid {
        gap: 20px;
    }

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

.middle {
    position: absolute;
    bottom: 0;
    margin-top: 4rem;
    padding-bottom: 4rem;
    left: calc(50% - 15px);
}

.mouse {
    width: 40px;
    height: 70px;
    border: 2px solid #333333;
    border-radius: 60px;
}

.mouse::before {
    content: '';
    width: 8px;
    height: 8px;
    position: absolute;
    top: 8px;
    background-color: #333;   
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    opacity: 1;
    animation: mouse 1.6s infinite;
}

@keyframes mouse {
    from {
        opacity: 1;
        top: 8px;
    }
    to {
        opacity: 0;
        top: 50px;
    }
}