/* Reset & Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #36A9E1;
    --primary-dark: #115293;
    --secondary: #f57c00;
    --success: #4caf50;
    --danger: #f44336;
    --dark: #333;
    --light: #f5f5f5;
    --border: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #fff;
    overflow-x: hidden;
}

.logo img {
  transition: transform 0.5s ease;
}

.logo img:hover {
  transform: rotate(15deg);
}

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

.section {
    padding: 40px 20px;
}

/* Navigation - Mobile First */
nav {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    z-index: 1001;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 25px;
    justify-content: center;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: white;
    flex-direction: column;
    list-style: none;
    padding: 80px 0 40px 0;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
}

.nav-menu li {
    width: 100%;
}

.nav-menu a {
    display: block;
    padding: 15px 30px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--light);
    border-left-color: var(--primary);
    color: var(--primary);
}

.nav-menu a.admin-link {
    margin-top: 20px;
    background: var(--primary);
    color: white !important;
    border-left: 3px solid var(--primary-dark);
}

.nav-menu a.admin-link:hover {
    background: var(--primary-dark);
}

/* Hero Section - Mobile First */


.hero {
            background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.35)),
                              url('<?= htmlspecialchars(loadData('home.json')['hero_image'] ?? '') ?>');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-color: #e5e7eb;
            min-height: 100vh;
            height: 100vh;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
			background-position-y: -2px;
        }
        .hero-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.25);
            z-index: 1;
        }
        .hero-content {
            position: relative;
            z-index: 2;
            max-width: 900px;
            padding: 2rem;
        }
        .hero h1 {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
        }
        .hero p {
            font-size: 1.4rem;
            margin-bottom: 2rem;
            text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
        }
        /* Mobile Anpassungen */
        @media (max-width: 768px) {
            .hero {
                background-attachment: scroll;
                background-position: center 30%;
                height: 85vh;
            }
            .hero h1 {
                font-size: 2.4rem;
            }
            .hero p {
                font-size: 1.2rem;
            }
        }

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

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

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Sections */
.section-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

/* =========================================
   FOOTER
========================================= */

footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 25px;
    align-items: center;
}

/* Sponsoren Bereich */
.footer-sponsoren h3 {
    margin-bottom: 20px;
}

.sponsoren-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 5px;
    align-items: center;
}

.sponsor-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sponsor-item img {
    max-width: 130px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.sponsor-item img:hover {
    transform: scale(1.05);
}

/* Kontaktblock */
.footer-kontakt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
}

.footer-kontakt h3 {
    margin-bottom: 15px;
}

.footer-kontakt p {
    margin-bottom: 8px;
    opacity: 0.85;
}

/* Footer Links Styling */
footer a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

footer a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Spezielle Styling für E-Mail Links */
footer a[href^="mailto:"] {
    color: var(--primary);
    font-weight: 500;
}

footer a[href^="mailto:"]:hover {
    color: #ffffff;
}

/* Spezielle Styling für Telefon Links */
footer a[href^="tel:"] {
    color: var(--primary);
    font-weight: 500;
}

footer a[href^="tel:"]:hover {
    color: #ffffff;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 900px) {

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Kontakt soll oben erscheinen */
    .footer-kontakt {
        order: -1;
        align-items: flex-start;
        text-align: left;
    }
}

/* Event Modal */
.event-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.event-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-modal:hover {
    color: black;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Tablet */
@media (min-width: 768px) {
    .section {
        padding: 60px 20px;
    }

    .hero {
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

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

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

    .hamburger {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: static;
        height: auto;
        width: auto;
        max-width: none;
        flex-direction: row;
        gap: 30px;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }

    .nav-menu li {
        width: auto;            /* optional, aber sauber */
    }

    .nav-menu a {
        padding: 8px 0;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: transparent;
        border-left: none;
        border-bottom-color: var(--primary);
    }

    .nav-menu a.admin-link {
        margin-top: 0;
        padding: 8px 20px;
        border-radius: 20px;
        border: none;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .hero {
        min-height: 80vh;
        background-attachment: fixed;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

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

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }


/* ============================================
   HOME PAGE SPECIFIC STYLES
   ============================================ */
/* About Section */
.about-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f4f8 100%);
}

.about-content {
    display: grid;
    gap: 30px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Bike Swap Section */
.bikeswap-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
}

.bikeswap-content {
    display: grid;
    gap: 40px;
    align-items: center;
}

.bikeswap-title {
    text-align: left;
}

.bikeswap-text p {
    line-height: 1.8;
}

.bikeswap-date { }

.bikeswap-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.bikeswap-subtitle       { font-size: 1.3rem; color: #555; margin: 0.5em 0 0.5em; }
.bikeswap-details        { }
.bikeswap-details br     { }
.bikeswap-location       { color: #444; margin: 1em 0; }
.bikeswap-actions        { }
.bikeswap-btn            { padding: 0.9em 2em; font-size: 1.1rem; }
.bikeswap-goodsreceipt,.bikeswap-sell {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
    background: rgba(39, 174, 96, 0.06);
    border-left: 4px solid var(--primary, #27ae60);
    border-radius: 6px;
    line-height: 1.55;
}

.bikeswap-goodsreceipt strong,
.bikeswap-sell strong {
    color: var(--primary, #27ae60);
}

/* Rechner */
label { display: block; margin: 15px 0 5px; font-weight: bold; }
input[type="number"] { width: 100%; padding: 10px; font-size: 1.2em; box-sizing: border-box; border: 2px solid #bdc3c7; border-radius: 6px; }
.btn-rechner { width: 100%; padding: 14px; margin-top: 25px; background: #2980b9; color: white; border: none; border-radius: 6px; font-size: 1.1em; cursor: pointer; }
.btn-rechner:hover { background: #1f6391; }
/* Ergebnisfeld klein halten bis Inhalt da ist */
#result {
    min-height: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    transition: all 0.35s ease;
}

#result:not(:empty) {
    min-height: 120px;
    height: auto;
    padding: 1rem;
    margin: 1.5rem 0 1rem;
    opacity: 1;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

/* Grüner Aufruf-Button */
.bikeswap-provision-btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background-color: #27ae60;
    color: white;
    font-weight: bold;
    font-size: 1.05rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.bikeswap-provision-btn:hover {
    background-color: #219653;
}

.bikeswap-provision-link-wrapper {
    margin: 0.5rem 0;
}
.line { margin: 12px 0; font-size: 1.1em; }
.provision { color: #c0392b; font-weight: bold; }
.auszahlung { color: #27ae60; font-weight: bold; font-size: 1.4em; }
.info { font-size: 0.9em; color: #7f8c8d; margin-top: 25px; line-height: 1.5; }

/* Gelbe Hervorhebung für die Annahmegebühr */
.provision-calculator .line span[style*="color:#e67e22"] {
    color: #e67e22 !important;
    font-weight: 600;
}

/* Hinweis bei Mindestgrenze 0 */
.provision-calculator .line[style*="font-style:italic"] {
    margin-top: 0.8rem;
    padding: 0.6rem;
    background: rgba(230, 126, 34, 0.08);
    border-left: 4px solid #e67e22;
    border-radius: 4px;
}

/* Auszahlung noch etwas stärker hervorheben */
.line.auszahlung {
    font-size: 1.4rem;
    font-weight: bold;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
    padding: 0.9rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.2rem 0 0.5rem;
}

@media (min-width: 768px) {
    .bikeswap-content {
        grid-template-columns: 1fr 1fr;
    }
}



/* Last Events Section */
.lastevents-section {
    background: linear-gradient(135deg, #f5f5f5 0%, #fff5e8 100%);
}

/* Next Events Section */
.events-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f0ff 100%);
}

/* Events Show All Button */
.events-show-all {
    text-align: center;
    margin-top: 30px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, black 100%);
    color: white;
    padding: 60px 20px;
}

.cta-title {
    color: white;
    margin-bottom: 15px;
}

.cta-text {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Text Center Utility */
.text-center {
    text-align: center;
}

/* =============================================
   Modal – Grundstruktur (muss vorhanden sein)
   ============================================= */

.modal {
    display: none;                /* standardmäßig versteckt */
    position: fixed;
    z-index: 1000;                /* hoch genug, über allem anderen Inhalt */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;               /* Scrollen falls Inhalt zu groß */
    background-color: rgba(0, 0, 0, 0.5);   /* halbtransparenter dunkler Hintergrund */
    backdrop-filter: blur(3px);   /* optional: schöner Blur-Effekt (moderne Browser) */
}

/* Modal-Inhalts-Box (zentriert) */
.modal-content {
    background-color: #fefefe;    /* weißer Hintergrund */
    margin: 10% auto;             /* vertikal zentriert */
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;             /* nicht zu breit auf Mobilgeräten */
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    position: relative;
}

/* Schließen-Button (×) */
.modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
    text-decoration: none;
}

/* Rechner-spezifische Anpassungen */
.provision-calculator {
    margin-top: 1.5rem;
}

.provision-calculator label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: bold;
}

.provision-calculator input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.provision-calculator button {
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    margin: 1rem 0;
}

.provision-calculator button:hover {
    background-color: #219653;
}

.result-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.line {
    margin: 0.6rem 0;
    font-size: 1.05rem;
}

.provision {
    color: #e74c3c;
    font-weight: bold;
}

.auszahlung {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
}

.info {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}