* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

@media (min-width: 2000px) {
    html {
        font-size: 22px;
    }
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: "baskerville-urw", serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    line-height: 1.4;
    overflow-x: hidden;
}

h1 {
    font-family: "baskerville-urw", serif;
    font-weight: 700;
    font-style: normal;
    text-align: center !important;
}

h2 {
    text-align: center !important;
}

a {
    color: #226b30;
    text-decoration: underline;
}

a:hover {
    color: #1a5224;
    text-decoration: none;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto auto;
    min-height: 100vh; /* Changed from height to min-height to allow scrolling */
    width: 100%;
}

.block {
    padding: 3em;
    box-sizing: border-box;
}

.instagram {
    grid-row: 2 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.instagram .elfsight-app-c6936441-9598-474b-8b98-56b8364a3b61 {
    max-width: 1300px;
    width: 100%;
    font-family: "baskerville-urw", serif;
}

.eapps-instagram-feed-posts-item-template-tile .eapps-instagram-feed-posts-item-text {
    font-size: 20px !important;
    overflow: visible !important;
}

.eapps-instagram-feed-posts-grid-load-more-text {
    color: #226b30;
    font-size: 1.3em;
    font-weight: 700;
}

.block1 {
    background-color: white;
    color: #226b30;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3em; /* Ensure consistent spacing between all elements */
}

/* Reset margins for elements inside block1 to rely on gap */
.block1 > img {
    margin: 0;
    display: block;
    width: 150px;
    height: auto; /* Allow height to adjust to aspect ratio, removing gaps if not square */
    animation: fadeInUp 1.2s ease-out forwards;
}

/* Intro Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intro Styles */
.intro-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5em; /* Reduced gap slightly for tighter feel with animations */
    width: 100%;
    max-width: 1200px;
}

.intro-headline {
    font-size: 21vw;
    line-height: 0.9;
    margin: 0 !important;
    text-align: left !important;
}

.intro-headline span {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out forwards;
}

.intro-headline span:nth-child(1) { animation-delay: 0.2s; } /* Natürlich */
/* nth-child(2) is <br> */
.intro-headline span:nth-child(3) { animation-delay: 0.5s; } /* schön */
/* nth-child(4) is <br> */
.intro-headline span:nth-child(5) { animation-delay: 0.8s; } /* leben */
/* heart is next element child (6) */
.intro-headline span:nth-child(6) { animation-delay: 1.0s; } /* ❤ */

.intro-text {
    margin: 0;
    font-size: 1.25rem;
    max-width: 800px;
    text-align: justify;
    hyphens: auto;
    opacity: 0;
    animation: fadeInUp 1.3s ease-out 1.1s forwards;
}

@media (min-width: 930px) {
    .intro-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 3em;
    }

    .intro-headline {
        font-size: 6.6rem;
        flex: 0 1 auto;
    }

    .intro-text {
        flex: 0 1 auto;
        max-width: 600px; /* Reduced specific width for better balance */
        font-size: 1.7rem;
    }
}

.block2 {

    grid-row: 3 / 4;
}

.block3 {
    margin: 3em auto;
    padding: 1em 3em;
    border: 1px solid #97d1a1;
    border-radius: 10px;
    color: white;
    background-color: #226b30;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: box-shadow 0.6s ease;
}

/* Voucher Section Styles */
.voucher-section {
    margin: 0 auto;
    text-align: center;
    max-width: calc(800px + 6em + 4px);
    padding: 3em;
    background-color: #f4fcf5;
    border: 2px solid #226b30;
    border-radius: 10px;
}

.voucher-headline {
    color: #226b30;
    margin: 0;
}

.voucher-subtitle {
    margin-bottom: 1.5em;
    color: #226b30;
}

.voucher-btn {
    display: inline-block;
    background-color: #226b30;
    color: white;
    text-decoration: none;
    padding: 15px 35px;
    font-size: 1.3rem;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.voucher-btn:hover {
    background-color: #1a5224;
    color: white;
    text-decoration: none;
    transform: scale(1.02);
}

.block3:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.block4 {
    background-color: #97d1a1;
    grid-row: 6 / 6;
}

.text-container {
    background-color: #e0ffe6;
    grid-row: 5 / 6;
    padding-bottom: 80px;
    /* Added to match previous layout */
}

.text-container p {
    max-width: 800px;
    margin: auto;
    text-align: justify;
}

/* Map Placeholder Styles */
.map-placeholder {
    background-color: #e0ffe6; 
    width: 100%; 
    max-width: 600px; 
    height: 450px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    border: 2px solid #226b30; 
    text-align: center; 
    padding: 20px; 
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.map-placeholder:hover {
    background-color: #d1f7d9;
}

.map-btn {
    background-color: #226b30; 
    color: white; 
    border: none; 
    padding: 15px 35px; /* Match voucher-btn padding */
    font-family: "baskerville-urw", serif; 
    cursor: pointer; 
    font-size: 1.3rem; /* Match voucher-btn font-size */
    margin-top: 15px;
    border-radius: 5px;
    font-weight: bold; /* Match voucher-btn weight */
    transition: background-color 0.3s, transform 0.2s; /* Match voucher-btn transition */
}

.map-btn:hover {
    background-color: #1a5224;
    color: white;
    transform: scale(1.02); /* Match voucher-btn hover effect */
}

/* Location Group */
.location-group {
    width: 100%;
}

/* Info Header Styles form block1 */
.info-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 0 auto;
}
.info-divider {
    display: inline-block;
}
@media (max-width: 600px) {
    .info-header {
        flex-direction: column;
        gap: 0;
    }
    .info-divider {
        display: none;
    }

    .block {
        padding: 1em;
    }

    .block.block1 {
        padding-top: 3em;
    }

    .voucher-section {
        padding: 1em;
    }

    .map-container.confirmation-visible {
        padding: 1em;
    }

    .voucher-btn,
    .map-btn {
        width: 100%;
        padding: 15px 10px;
        box-sizing: border-box;
    }
}

@media (max-width: 1100px) {
    html {
        font-size: 16px;
        text-align: center;
    }
}

@media (orientation: portrait),
(max-width: 1100px) {
    .container {
        grid-template-rows: auto 1fr auto auto auto;
    }
}

/* Form Container Styles */
.form-container {
    width: 100%;
    max-width: 1200px; /* Increased to use more width */
    margin: 3em auto;
}

.form-container iframe {
    width: 100%;
    border: none;
    min-height: 1200px; /* Sensible starting height */
    transition: height 0.3s ease;
}

/* Fullscreen Form Layout */
.block-fullscreen {
    padding: 0;
    max-width: 100%;
}

.block-fullscreen .form-container {
    max-width: 100%;
    margin: 0;
}


/* New Map Styles */
.address-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.address-link:hover {
    color: #154a20;
    text-decoration: underline;
}

.address-icon {
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}

/* Unified Map Container */
.map-container {
    background-color: #f4fcf5; /* Match voucher section background */
    border: 2px solid #226b30; /* Match voucher section border */
    margin: 0 auto;
    overflow: hidden;
    transition: all 0.8s ease-in-out;
    box-sizing: border-box;
    
    /* Initial Hidden State */
    border-width: 0;
    border-radius: 10px; /* Match voucher section border-radius */
    height: 0;
    padding: 0;
    width: 100%;
    margin-top: 0;
    opacity: 0;
}

.map-container.confirmation-visible {
    height: auto;
    min-height: 250px;
    opacity: 1;
    border-width: 2px; /* Match voucher section border width */
    margin-top: 3em;
    max-width: calc(600px + 6em + 4px);
    padding: 3em;
}

.map-container.map-visible {
    max-width: 600px;
    height: 450px;
    border: 0;
    background-color: transparent;
    opacity: 1;
    margin-top: 3em; 
}


.confirmation-content {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
}


