:root {
    --primary-color: #2d5a27;
    --secondary-color: #4e6128;
    --text-color: #f2f2f2;
    --accent-color: #8db600;
    --bg-overlay: rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../img/forest_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    caret-color: transparent; /* Entfernt den blinkenden Strich */
    user-select: none; /* Verhindert das Markieren von Text für einen sauberen Look */
}

.hero {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

.header-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 3rem;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.qr-code-trees {
    width: 100px;
    height: auto;
    border: 2px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background: white;
}

h1 {
    font-size: clamp(3.5rem, 8vw, 5rem); /* Verkleinerung auf minimal 70% (3.5rem von 5rem) */
    margin: 0;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.8);
    font-weight: 800;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    margin-top: 0.5rem;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-grow: 1;
    gap: 40px;
    align-items: center;
}

.text-section {
    flex: 1;
    max-width: 600px;
}

.text-section p {
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: 400;
    line-height: 1.4;
    margin: 0; /* Ensures uniform spacing between all lines, including paragraph breaks */
}

.modal-link {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
}

.modal-link:hover {
    color: #a3cc00;
}

.start-button {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    margin-top: 2.5rem;
    transition: transform 0.2s;
}

.start-button:hover {
    transform: scale(1.05);
}

.leaf-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.leaf-icon {
    width: 80px;
    height: auto;
}

.plan-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plan-image {
    max-width: 100%;
    height: auto;
    border: 2px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0.8; /* 20% transparency */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.plan-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    opacity: 1;
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        text-align: left;
    }
    .header-section {
        flex-direction: column;
        align-items: flex-start;
    }
    .subtitle {
        margin-top: 0.5rem;
    }
    .text-section {
        max-width: 100%;
    }
    .start-button {
        justify-content: flex-start;
    }
}

/* Tree Map Page Styles */
.map-container {
    width: 100%;
    padding: 20px;
    background-color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.map-wrapper {
    display: inline-block;
    position: relative;
    margin: 0 auto;
}

.tree-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    width: 90%;
    height: 90%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #333;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-color);
}

#wiki-frame {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .modal-content {
        width: 96%;
        height: 96%;
        margin: 2% auto;
    }
    
    h1 {
        font-size: 3.5rem; /* Festgelegtes Minimum */
    }
    .title-wrapper {
        gap: 15px;
        flex-wrap: wrap;
    }
    .qr-code-trees {
        width: 80px;
    }
    p {
        font-size: 1rem;
    }
}


/* ⭐ LEGAL FOOTER & MODAL */
.legal-footer {
    position: relative;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    margin-top: auto; 
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legal-footer a, 
.legal-footer a:link, 
.legal-footer a:visited {
    text-decoration: underline;
    color: inherit !important; /* Übernimmt die Farbe vom Footer-Text (grau-weiß) */
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.legal-footer a:hover {
    opacity: 1;
    color: white !important;
}

/* Modal fix */
.modal {
    display: none;
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.legal-modal-content {
    background-color: white; /* Helles Fenster */
    margin: 5vh auto;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    color: #333; /* Dunkle Schrift */
    max-height: 85vh;
    overflow-y: auto;
    line-height: 1.6;
    position: relative;
    user-select: text;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.legal-modal-content h2 {
    color: #2d5a27;
    margin-bottom: 20px;
}
