/* CSS Reset */
* {
    margin: 0;
    padding: 0;
     /*Statt width = Inhalt + Padding + Border ==> width = fix, egal wie viel Padding oder Border dazukommt.*/
    box-sizing: border-box;
}

/* CSS Variablen für Farben und Schatten */
:root {
    --primary-color: #FF6B35;
    --primary-hover: #E55A2B;
    --secondary-color: #4A5568;
    --text-dark: #1A202C;
    --text-light: #718096;
    --background: #F7FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background);
}

.container {
    max-width: 90%; /*Bildschirmbreite*/
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
    /* Ein Element hat die Klasse container und befindet sich innerhalb eines Elements mit der Klasse 
        header <header class="header">
                    <div class="container"> */
    .header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}


/* Buttons */
.btn-primary, .btn-secondary, .btn-cta {
    padding: 12px 24px;
    border-radius: 8px;
    /*100 – Thin
      200 – Extra Light
      300 – Light
      400 – Normal
      500 – Medium
      600 – Semi Bold
      700 – Bold
      800 – Extra Bold
      900 – Black*/
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    /* Es sollen alle CSS-Eigenschaften animiert werden, die sich ändern können 
        (z. B. opacity, transform, background-color, border-color, box-shadow …) 
        Dauer: 0.3 Sekunden, Timing-Funktion: ease = langsam am Anfang, schneller in der Mitte,
        langsam am Ende
    */
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

    .btn-primary:hover {
        background: var(--primary-hover);

        /* Der Button bewegt sich 2px nach oben, also ein „Lift-up“-Effekt. */
        transform: translateY(-2px);

        /*Gleichzeitig wird der Schatten tiefer (mehr Tiefe).*/
        box-shadow: var(--shadow-lg);
    }

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border);
}

    .btn-secondary:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

.btn-cta {
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 32px;
    font-size: 18px;
}

    .btn-cta:hover {
        background: var(--primary-hover);
        transform: scale(1.05);
        box-shadow: var(--shadow-lg);
    }

.btn-full {
    width: 100%;
}

.btn-center {
    display: block;
    margin: 30px auto 0;
}

/* Hero Section */
.hero {
    /* Bild MIT dunklem Overlay für bessere Lesbarkeit */
    background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%), url('/images/HausVonAussen/Casa.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 80px 20px 120px 20px; /* Mehr Padding unten */
    text-align: center;
    min-height: clamp(500px, 80vh, 1200px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* <-- DER TRICK: Alles nach unten */
    padding: 0px 10px 0px; /* etwas Luft zum Rand */
    position: relative;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    z-index: 10; /* Über dem Hintergrund */
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.address {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.quick-facts {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.fact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 24px;
}

.price-section {
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-dark);
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: var(--shadow-lg);
}

.price {
    margin-bottom: 20px;
}

    .price .label {
        display: block;
        color: var(--text-light);
        font-size: 14px;
        margin-bottom: 5px;
    }

    .price .amount {
        font-size: 42px;
        font-weight: 700;
        color: var(--primary-color);
    }

.price-section button {
    margin: 10px;
}

/* Details Section */
.details-section, .description-section, .gallery-section, .contact-section {
    padding: 60px 20px;
}
    .details-section h2, .description-section h2, .gallery-section h2, .contact-section h2 {
        font-size: 36px;
        margin-bottom: 30px;
        color: var(--text-dark);
    }

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease;
}

    .detail-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

.detail-icon {
    font-size: 32px;
}

.detail-label {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Description Section */
.description-section {
    background: var(--white);
}

.description-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.description-section p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

/* Ziel: <div id="Lage" class="description-section"> */
#Lage .description-section {
    /* Layout */
    display: block;

    /* Optik */
    background: #ffffff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(10, 20, 30, 0.06);
    /* Text */
    color: var(--text-dark);
    --card-padding: 20px;
}

.features-list {
    list-style: none;
}

    .features-list li {
        padding: 12px 0;
        color: var(--text-light);
        border-bottom: 1px solid var(--border);
    }

        .features-list li:last-child {
            border-bottom: none;
        }

.privacy-note {
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 10px;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #C6F6D5;
    color: #22543D;
    border: 2px solid #9AE6B4;
}

.alert-error {
    background: #FED7D7;
    color: #742A2A;
    border: 2px solid #FC8181;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 30px;
}

    .footer-links a {
        color: var(--white);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: var(--primary-color);
        }

.copyright {
    color: var(--text-light);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 900px) {
    #Lage.description-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
        padding: 20px;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .quick-facts {
        flex-direction: column;
        align-items: center;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .description-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .gallery-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-header {
        flex-direction: column;
        gap: 10px;
    }

    /* Lightbox mobile */
    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

}

@media (max-width: 480px) {
    #Lage.description-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.lazy-img {
    filter: blur(20px);
    transform: scale(1.02);
    transition: filter 0.6s ease-out, transform 0.6s ease-out;
}

.lazy-img.loaded {
    filter: blur(0);
    transform: scale(1);
}

