:root {
    --brand-color: #2c3e50;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    display: flex;
    margin: 1rem auto; 
    max-width: 1000px;
    padding: 0 20px;
}

body::before {
    content: "";
    position: fixed; /* Keeps the background static while scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Pushes the image BEHIND the text and calendar */
    
    /* Image setup */
    background-image: url('assets/img/ag/villa1.webp'); /* Replace with your image path */
    background-size: cover;                        /* Scale image to fill the screen */
    background-position: center;                  /* Center the image */
    background-repeat: no-repeat;
    
    /* Opacity Control */
    opacity: 0.20;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: end;
    gap: 4px;
}

.lang-btn {
    display: flex;
    flex-direction: row;
    height: 24px;
    width: 85px;
    gap: 4px;
    padding: 2px;
}

.lang-btn:disabled img {
    opacity: 0.4;
    /* Makes the flag/image look faded */
    transition: opacity 0.3s ease;
}

.lang-btn:disabled {
    color: #999;
    cursor: not-allowed;
}

.container {
    max-width: 1200px;
    width: 100%;
}

header {
    margin-top: 40px;
}

section {
    margin-top: 40px;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--brand-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

a {
    color: var(--brand-color)
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.2;
    color: #7f8c8d;
    margin-top: 10px;
    margin-bottom: 10px;
}

.two-column {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.description {
    line-height: 1.2;
}

/* Gallery - Mobile First (Stacking vertically) */
.pswp-gallery {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

.pswp-gallery.gallery-row {
    min-width: 305px;
}

.pswp-gallery img {
    max-width: 150px;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 50px;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block;
}

#facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 2rem auto;    
}

#facts .fact {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

#settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3px;
    max-width: 800px;
    margin: 2rem auto;    
}

.saison-grid {
        display: grid;
        /* Definiert 3 Spalten: Inhalt/Auto, Rechtsbündig/Auto, Rechtsbündig/Auto */
        grid-template-columns: auto auto auto;
        gap: 6px;
        max-width: 350px;
        font-family: Arial, sans-serif;
        margin: 10px 0;
        padding: 10px;
        background-color: rgba(255,255,255,0.6);
        border: 1px solid #e2e8f0;
        border-radius: 8px;
    }

    /* Styling für die Kopfzeile im Grid */
    .grid-header {
        font-weight: bold;
        color: var(--brand-color);
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 2px;
        text-transform: uppercase;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    /* Styling für die Daten-Zellen */
    .grid-cell {
        padding: 4px 0;
        border-bottom: 1px solid #f0f4f8;
        font-size: 15px;
        color: #4a5568;
    }

    /* Ausrichtungs-Hilfsklassen */
    .text-right {
        text-align: right;
    }

    .preis-bold {
        font-weight: bold;
        color: #1a202c;
    }

.fact .icon {
    display: inline-block;
    height: 55px;
    width: 55px;
    top: 4%;
    background-color: currentColor;

    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    mask-repeat: no-repeat;
}

.setting {
    font-size: small;
}

.setting .icon {
    display: inline-block;
    height: 13px;
    width: 13px;
    background-color: var(--brand-color);

    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-size: contain;
    mask-repeat: no-repeat;
}

#map-placeholder p {
    font-size: small;
    line-height: 0.9;
}

footer {
    margin-top: 20px;
    font-size: 0.9rem;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

footer a {
    color: var(--brand-color);
    text-decoration: none;
}

.impressum-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

/* Desktop Adjustment */
@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    p {
    margin-bottom: 0.5rem;
}

    .gallery {
        flex-direction: row;
        justify-content: space-between;
    }

    .two-column {
        flex-wrap: nowrap;
    }

    .image-wrapper {
        flex: 1;
    }

    .impressum-content {
        flex-direction: row;
    }
}

/** 
 * icons
 */
.icon-house {
    -webkit-mask-image: url('assets/svg/icons/house.svg');
    mask-image: url('assets/svg/icons/house.svg');
}

.icon-outdoor {
    -webkit-mask-image: url('assets/svg/icons/outdoor.svg');
    mask-image: url('assets/svg/icons/outdoor.svg');
}

.icon-bedrooms {
    -webkit-mask-image: url('assets/svg/icons/bed.svg');
    mask-image: url('assets/svg/icons/bed.svg');
}

.icon-persons {
    -webkit-mask-image: url('assets/svg/icons/persons.svg');
    mask-image: url('assets/svg/icons/persons.svg');
}

.icon-shower {
    -webkit-mask-image: url('assets/svg/icons/shower.svg');
    mask-image: url('assets/svg/icons/shower.svg');
}

.icon-check {
    -webkit-mask-image: url('assets/svg/icons/check.svg');
    mask-image: url('assets/svg/icons/check.svg');
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    animation: slideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--brand-color);
    font-size: 1.8rem;
}

.privacy-text {
    line-height: 1.3;
    color: #333;
}

.privacy-text p {
    margin-bottom: 10px;
}