/* Gemeinsame Styles für alle Seiten - Kaibel Immobilien */

/* Schriftart Raleway laden */
@font-face {
    font-family: 'Raleway';
    src: url('resources/Raleway-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Farbvariablen */
:root {
    --background-color: rgb(248, 246, 242); /* Hintergrund */
    --accent-blue: rgb(0, 62, 105); /* Akzentfarbe Blau */
    --text-white: rgb(255, 255, 255); /* Weiße Schrift auf Blau */
    --text-black: rgb(0, 0, 0); /* Schwarze Schrift auf Hintergrund */
    --sandstein: rgb(179, 136, 107); /* Sandstein */
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', Arial, sans-serif;
    font-size: 14pt;
    line-height: 1.6;
    color: var(--text-black);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Überschriften */
h1 {
    font-size: 32pt;
    margin-bottom: 1rem;
}

h2 {
    font-size: 24pt;
    margin-bottom: 1rem;
}

h3 {
    font-size: 20pt;
    margin-bottom: 1rem;
}

/* Aufzählungen mit Bulletpoints */
ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Header und Navigation */
header {
    background-color: var(--accent-blue);
    height: 90px;
    min-height: 90px;
    max-height: 90px;
    display: flex;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

nav {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    gap: 1rem;
    height: 90px;
    min-height: 90px;
    max-height: 90px;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
}

.hamburger {
    display: none;
}

.logo a {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex !important;
    list-style: none;
    gap: 2rem;
    flex-wrap: nowrap;
    align-items: center;
    position: static;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-white);
    font-weight: 500;
    transition: opacity 0.3s;
    position: relative;
    display: inline-block;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-menu a.active {
    opacity: 1;
    position: relative;
    font-weight: 600;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 2px 2px 0 0;
}

/* Hauptinhalt */
main {
    flex: 1;
    padding: 2rem 0;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: left;
}

.impressum-content {
    text-align: center;
}

/* Immobilien-Liste */
.immobilie-item {
    margin-bottom: 1.2rem;
    padding-bottom: 1.0rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.immobilie-item:last-child {
    border-bottom: none;
}

.immobilie-item-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.immobilie-item.verkauft strong {
    color: var(--sandstein);
    font-weight: normal;
}

.immobilie-image {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.verkauft-image {
    cursor: pointer;
    transition: opacity 0.3s;
}

.verkauft-image:hover {
    opacity: 0.8;
}

.immobilie-item h3 {
    margin-top: 0;
    margin-bottom: 0;
}

.immobilie-item h3 a {
    text-decoration: none;
    color: var(--text-black);
    transition: color 0.3s;
}

.immobilie-item h3 a:hover {
    color: var(--accent-blue);
}

.immobilie-item-content a {
    display: block;
}

/* Objekt-Detailseiten */
/* Kachel für Objekt-Header (Bild + Eigenschaften) */
.objekt-header-kachel {
    background-color: var(--text-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.objekt-header-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.objekt-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.objekt-main-image {
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.objekt-info {
    flex: 1;
}

.objekt-info .info-group {
    margin-bottom: 1.5rem;
}

.objekt-info .info-group:last-child {
    margin-bottom: 0;
}

.objekt-info .info-group p {
    margin-bottom: 0;
}

/* Kachel für Objekt-Beschreibung */
.objekt-beschreibung-kachel {
    background-color: var(--text-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.objekt-beschreibung-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.objekt-beschreibung {
    margin-top: 0;
}

.objekt-beschreibung p {
    margin-bottom: 1rem;
}

.objekt-beschreibung p:last-child {
    margin-bottom: 0;
}

/* Responsive Anpassungen für Objekt-Kacheln */
@media (max-width: 768px) {
    .objekt-header-kachel,
    .objekt-beschreibung-kachel,
    .galerie-kachel,
    .zurueck-link-kachel,
    .sonstiges-kachel {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .objekt-header {
        flex-direction: column;
    }

    .objekt-main-image {
        max-width: 100%;
    }
}

@media (max-width: 550px) {
    .objekt-header-kachel,
    .objekt-beschreibung-kachel,
    .galerie-kachel,
    .zurueck-link-kachel,
    .sonstiges-kachel {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
}

/* Kachel für Galerie */
.galerie-kachel {
    background-color: var(--text-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.galerie-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Kachel für Zurück-Link */
.zurueck-link-kachel {
    background-color: var(--text-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.zurueck-link-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Kachel für Sonstiges */
.sonstiges-kachel {
    background-color: var(--text-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sonstiges-kachel:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Bildergalerie */
.galerie {
    margin-top: 0;
}

.galerie h3 {
    margin-bottom: 1.5rem;
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.galerie-item {
    display: flex;
    flex-direction: column;
}

.galerie-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.galerie-image:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.galerie-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80%;
    max-height: 85%;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 100%;
    padding: 0 1rem;
    line-height: 1.5;
    flex-shrink: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: var(--text-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-white);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    user-select: none;
    transition: opacity 0.3s;
    z-index: 10000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

/* Zurück-Link */
.zurueck-link {
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
}

.zurueck-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.zurueck-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Text-Lines sind standardmäßig ausgeblendet */
.carousel-slide:not(.active) .carousel-text-line {
    opacity: 0 !important;
    animation: none !important;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 62, 105, 0.3), rgba(0, 62, 105, 0.5));
}

.carousel-text-content {
    text-align: center;
    color: var(--text-white);
    padding: 2rem;
    max-width: 800px;
}

.carousel-text-line {
    line-height: 1.2;
    margin: 0.25rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .carousel-text-content {
        padding: 1.5rem;
        text-align: center;
    }

    .carousel-text-line {
        margin: 0.2rem 0;
        text-align: center;
    }
}

@media (max-width: 550px) {
    .carousel-text-content {
        padding: 1rem;
        text-align: center;
    }

    .carousel-text-line {
        margin: 0.15rem 0;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .carousel-text-content {
        padding: 1rem 50px;
        max-width: calc(100% - 100px);
        margin: 0 auto;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        box-sizing: border-box;
        text-align: center;
    }

    .carousel-text-line {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        hyphens: auto;
        text-align: center;
    }

    .carousel-text-line:nth-child(1) {
        font-size: 0.9rem;
    }

    .carousel-text-line:nth-child(2),
    .carousel-text-line:nth-child(3),
    .carousel-text-line:nth-child(4) {
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .carousel-text-content {
        padding: 0.75rem 50px;
        text-align: center;
    }

    .carousel-text-line {
        text-align: center;
    }

    .carousel-text-line:nth-child(1) {
        font-size: 0.8rem;
    }

    .carousel-text-line:nth-child(2),
    .carousel-text-line:nth-child(3),
    .carousel-text-line:nth-child(4) {
        font-size: 0.65rem;
    }
}

.carousel-text-line {
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInText 0.8s ease-out forwards;
    text-align: center;
}

.carousel-text-line:nth-child(1) {
    animation-delay: 0.5s;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.carousel-text-line:nth-child(2),
.carousel-text-line:nth-child(3),
.carousel-text-line:nth-child(4) {
    font-size: 1.5rem;
    font-weight: normal;
    line-height: 1.2;
}

.carousel-text-line:nth-child(2) {
    animation-delay: 1s;
}

.carousel-text-line:nth-child(3) {
    animation-delay: 1.5s;
}

.carousel-text-line:nth-child(4) {
    animation-delay: 2s;
}

@keyframes slideInText {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation zum Einklappen nach Anzeige - für alle Slides mit Text */
.carousel-slide.active .carousel-text-line {
    animation: slideInText 0.8s ease-out forwards, slideOutText 0.8s ease-in 4.2s forwards;
}

@keyframes slideOutText {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 62, 105, 0.7);
    color: var(--text-white);
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0, 62, 105, 0.9);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--text-white);
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Aktuelles Angebot */
.content > .carousel-container + h2 {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
}

.aktuelles-angebot {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 0;
    margin-bottom: 2rem;
}

.aktuelles-angebot a {
    display: block;
    text-decoration: none;
}

.aktuelles-angebot-image {
    max-width: 400px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.aktuelles-angebot a:hover .aktuelles-angebot-image {
    opacity: 0.85;
    transform: scale(1.02);
}

.aktuelles-angebot-text {
    flex: 1;
}

.aktuelles-angebot-text h3 {
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.aktuelles-angebot-text p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Verkaufen-Prozess-Schritte */
.verkaufen-schritt {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.verkaufen-schlagwort {
    width: 220px;
    font-weight: bold;
    color: var(--accent-blue);
    flex-shrink: 0;
    text-align: left;
}

.verkaufen-text {
    flex: 1;
}

.aktuelles-angebot-link {
    margin-top: 1.5rem;
}

.aktuelles-angebot-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.aktuelles-angebot-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.immobilie-item p {
    margin: 0;
    text-align: left;
}

.immobilie-item p a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.3s;
}

.immobilie-item p a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.immobilie-item-content {
    text-align: left;
}

.content h2 {
    margin-bottom: 1rem;
    font-size: 24pt;
}

.content p {
    margin-bottom: 1rem;
}

/* Hilfsklassen für Farben */
.text-on-blue {
    background-color: var(--accent-blue);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    display: inline-block;
}

/* Footer */
footer {
    background-color: var(--background-color);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-logo {
    height: 55px;
    width: auto;
    display: block;
}

.footer-content p {
    margin: 0;
    color: var(--text-black);
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-black);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.footer-links a:hover,
.footer-links a.active {
    color: var(--accent-blue);
    opacity: 1;
}

/* Footer Social Icons */
.footer-social-icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.footer-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    color: var(--text-white);
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.2rem;
}

.footer-social-icons a:hover {
    transform: translateY(-3px) scale(1.1);
    background-color: var(--sandstein);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-social-icons a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Responsive Design */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    header {
        height: auto;
        min-height: 90px;
        max-height: none;
    }

    nav {
        padding: 0 1.5rem;
        height: auto;
        min-height: 90px;
        max-height: none;
    }

    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.9rem;
    }

    .content {
        padding: 0 1.5rem;
    }

    .footer-content {
        padding: 0 1.5rem;
    }
}

/* Tablet Portrait und kleine Tablets (max-width: 768px) */
@media (max-width: 768px) {
    header {
        height: auto;
        min-height: 90px;
        max-height: none;
        padding: 0;
        flex-shrink: 0;
    }

    nav {
        flex-direction: row;
        gap: 1rem;
        padding: 0 1.5rem;
        justify-content: space-between;
        align-items: center;
        height: auto;
        min-height: 90px;
        max-height: none;
        flex-shrink: 0;
    }

    .logo {
        flex-shrink: 0;
    }

    .logo img {
        height: 50px;
    }

    .nav-menu {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.95rem;
        flex: 1;
        position: static;
    }

    .immobilie-item-content {
        flex-direction: column;
    }

    .immobilie-image {
        max-width: 100%;
    }

    .objekt-header {
        flex-direction: column;
    }

    .objekt-main-image {
        max-width: 100%;
        max-height: 400px;
    }

    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .galerie-image {
        height: 150px;
    }

    .carousel-slides {
        padding-bottom: 60%; /* Etwas höher für mobile Geräte */
    }

    .carousel-text-content {
        padding: 1.5rem;
    }

    .carousel-text-line:nth-child(1) {
        font-size: 1.5rem;
    }

    .carousel-text-line:nth-child(2),
    .carousel-text-line:nth-child(3),
    .carousel-text-line:nth-child(4) {
        font-size: 1rem;
    }

    .aktuelles-angebot {
        flex-direction: column;
    }

    .aktuelles-angebot-image {
        max-width: 100%;
    }

    .verkaufen-schritt {
        flex-direction: column;
        gap: 0.5rem;
    }

    .verkaufen-schlagwort {
        min-width: auto;
        width: auto;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 20px;
        padding: 10px 15px;
    }

    .carousel-indicators {
        bottom: 10px;
    }

    .lightbox-content {
        max-width: 90%;
        max-height: 80%;
    }

    .lightbox-image {
        max-height: 50vh;
    }

    .lightbox-caption {
        font-size: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }

    .lightbox-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }

    main {
        padding: 1.5rem 0;
    }

    .content {
        padding: 0 1rem;
    }

    .content h2 {
        font-size: 1.5rem;
    }

    footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 0 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}

/* Smartphone (max-width: 550px) */
@media (max-width: 550px) {
    header {
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 0;
        flex-shrink: 0;
    }

    nav {
        flex-direction: row;
        padding: 0.5rem 1rem;
        justify-content: space-between;
        align-items: center;
        height: auto;
        min-height: auto;
        max-height: none;
        flex-shrink: 0;
    }

    .logo {
        display: flex !important;
        justify-content: flex-start;
        flex-shrink: 0;
        visibility: visible !important;
    }

    .logo img {
        height: 40px;
        display: block !important;
    }

    header {
        position: relative;
        height: 64px;
        min-height: 64px;
        max-height: 64px;
    }

    nav {
        height: 64px;
        min-height: 64px;
        max-height: 64px;
    }

    .nav-menu {
        display: none !important;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--accent-blue);
        flex-direction: column;
        gap: 0;
        font-size: 0.9rem;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        margin-top: 0;
        z-index: 10000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex !important;
    }

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

    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-white);
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.15);
        font-weight: 600;
        border-left: 4px solid var(--text-white);
        padding-left: calc(1rem - 4px);
    }

    .nav-menu a.active::after {
        display: none;
    }

    .hamburger {
        display: block !important;
        background: none;
        border: none;
        color: var(--text-white);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        flex-shrink: 0;
        z-index: 1001;
    }

    .immobilie-item-content {
        flex-direction: column;
    }

    .immobilie-image {
        max-width: 100%;
    }

    .objekt-header {
        flex-direction: column;
    }

    .objekt-main-image {
        max-width: 100%;
        max-height: 300px;
    }

    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .galerie-image {
        height: 120px;
    }

    .carousel-slides {
        padding-bottom: 65%; /* Noch höher für sehr kleine Geräte */
    }

    .carousel-text-content {
        padding: 1rem;
    }

    .carousel-text-line:nth-child(1) {
        font-size: 1.2rem;
    }

    .carousel-text-line:nth-child(2),
    .carousel-text-line:nth-child(3),
    .carousel-text-line:nth-child(4) {
        font-size: 0.9rem;
    }

    .aktuelles-angebot {
        flex-direction: column;
    }

    .aktuelles-angebot-image {
        max-width: 100%;
    }

    .verkaufen-schritt {
        flex-direction: column;
        gap: 0.5rem;
    }

    .verkaufen-schritt:not(:last-child)::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .verkaufen-schlagwort {
        min-width: auto;
        width: auto;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 18px;
        padding: 8px 12px;
    }

    .carousel-indicators {
        bottom: 8px;
        gap: 8px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 75%;
    }

    .lightbox-image {
        max-height: 45vh;
    }

    .lightbox-caption {
        font-size: 0.9rem;
        margin-top: 0.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 8px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }

    main {
        padding: 1rem 0;
        min-height: calc(100vh - 250px);
    }

    .content {
        padding: 0 0.75rem;
    }

    .content h2 {
        font-size: 1.5rem;
        text-align: left;
    }

    .content p {
        font-size: 1rem;
        text-align: left;
    }

    .content ul {
        font-size: 0.95rem;
    }

    .content li {
        font-size: 0.95rem;
    }

    footer {
        padding: 1rem 0;
    }

    .footer-content {
        padding: 0 0.75rem;
    }

    .footer-content p {
        font-size: 0.85rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer-social-icons {
        gap: 1rem;
    }

    .footer-social-icons a {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Scroll to Top Button - Global */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-blue);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.scroll-to-top.visible {
    display: flex;
    opacity: 1;
}

.scroll-to-top:hover {
    background-color: rgba(0, 62, 105, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 550px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Cookie Consent Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--text-white);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    max-width: 100%;
}

#cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-black);
}

.cookie-consent-options {
    margin-top: 0.75rem;
}

.cookie-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-black);
}

.cookie-consent-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: 'Raleway', Arial, sans-serif;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn-primary {
    background-color: var(--accent-blue);
    color: var(--text-white);
}

.cookie-btn-primary:hover {
    background-color: rgba(0, 62, 105, 0.9);
}

.cookie-btn-secondary {
    background-color: var(--sandstein);
    color: var(--text-white);
}

.cookie-btn-secondary:hover {
    background-color: rgba(179, 136, 107, 0.9);
}

.cookie-btn-tertiary {
    background-color: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.cookie-btn-tertiary:hover {
    background-color: rgba(0, 62, 105, 0.05);
}

.cookie-consent-links {
    margin-top: 0.5rem;
}

.cookie-consent-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
}

.cookie-consent-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Responsive Anpassungen für Cookie Banner */
@media (max-width: 768px) {
    #cookie-consent-banner {
        padding: 1rem;
    }

    .cookie-consent-content {
        gap: 0.75rem;
    }

    .cookie-consent-text p {
        font-size: 0.9rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 550px) {
    #cookie-consent-banner {
        padding: 0.75rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-consent-checkbox {
        font-size: 0.85rem;
    }

    .cookie-btn {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }
}
