/* ==========================================================================
   1. PORTAL HERO & TEXT-LOGO BRANDING (Dunkelgrüner Stil)
   ========================================================================== */
.portal-hero {
    padding-top: 150px;
    padding-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

/* Das Text-Logo Branding inkl. Milchglas-Container (Zentrierungs-Fix) */
.portal-logo-branding {
    max-width: 950px; /* Perfekte Kanten-Bündigkeit mit den Haus-Karten */
    width: 100%;
    margin: 0 auto !important; /* ZWINGEND: Zentriert den Kasten exakt mittig zum Content */
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 25px 35px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(60, 53, 45, 0.05);
    box-sizing: border-box;
}

.logo-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #8b5a2b; /* Antikes Holzbraun */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.logo-line {
    height: 1px;
    width: 60px;
    background-color: #8b5a2b;
    margin: 0 auto;
    opacity: 0.6;
}

/* Flexbox-Ausrichtung für Grafik + Textüberschrift direkt nebeneinander */
.logo-title-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0 !important; /* Nahtloser Übergang zur Schrift */
    margin: 5px 0;
}

/* Formatierung für das logo-umgebinde.png mit stolzen 150px Höhe */
.logo-icon-side {
    width: auto;
    height: 150px !important;
    display: block;
    object-fit: contain;
    margin: 0 !important;
    padding: 0 !important;
    margin-right: 8px !important; /* Kleiner, feiner Abstand direkt zur Schrift */
    filter: drop-shadow(0 0 10px #ffffff) drop-shadow(0 0 20px #ffffff); 
}

/* Die H1-Überschrift: Garantiert die einzeilige Darstellung am PC */
.portal-logo-branding h1 {
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 2.3rem !important; 
    color: #2b3a1a !important; /* Historisches Dunkelgrün */
    font-weight: bold !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 10px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap; /* Verhindert ungewollten Zeilenumbruch am Monitor */
    text-shadow: 0 0 10px #ffffff, 0 0 20px #ffffff !important;
}

.portal-lead {
    font-size: 1rem;
    color: #4e443a;
    margin: 12px auto 0 auto;
    line-height: 1.6;
}

/* Edler Feinschliff für das starke Slogan-Wording */
.portal-lead strong {
    color: #8b5a2b; 
    font-size: 1.1rem;
    display: inline-block;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}


/* ==========================================================================
   2. VERTIKALE LISTE & GLEICHGROSSE HAUS-CONTAINER (Untereinander)
   ========================================================================== */
.portal-vertical-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px; /* Harmonischer Rhythmus nach unten */
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 50px;
}

/* Kompakt-Karte: Symmetrisch schmal am Desktop, Bild links, Text rechts */
.portal-card {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 30px rgba(60, 53, 45, 0.08) !important;
    padding: 0 !important;
    overflow: hidden;
    display: grid;
    grid-template-columns: 380px 1fr; /* Bild links fixiert, Text rechts elastisch */
    max-width: 950px; /* Absolut deckungsgleich mit der H1-Logobox */
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(60, 53, 45, 0.15) !important;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%; /* Streckt das Foto über die volle Kartenhöhe links */
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Regionen-Badges oben auf den Fotos */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-blue { background-color: #4a6b82; }
.badge-green { background-color: #556b2f; }
.badge-gold { background-color: #8b5a2b; }

/* Strukturierte Text-Inhalte */
.card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.card-body h2 {
    font-size: 1.35rem !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    color: #3c352d !important;
}

.house-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b5a2b;
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.house-desc {
    font-size: 0.95rem;
    color: #5a5045;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Klickbare Objekttaster */
.portal-btn {
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    color: #ffffff;
    align-self: flex-start; /* Hält den Button linksbündig statt zentriert */
    transition: background-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-blue { background-color: #4a6b82; }
.btn-blue:hover { background-color: #385264; }

.btn-green { background-color: #556b2f; }
.btn-green:hover { background-color: #3f5223; }

.btn-gold { background-color: #8b5a2b; }
.btn-gold:hover { background-color: #68421e; }


/* ==========================================================================
   3. ENVIRONMENT BOX (Naturpark Zittauer Gebirge)
   ========================================================================== */
.environment-box {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 12px 30px rgba(60, 53, 45, 0.08);
    box-sizing: border-box;
    max-width: 950px; /* Symmetrisch zur Breite des Textlogos und der Karten */
    margin: 0 auto;
}

.environment-box h2 { 
    color: #3c352d; 
    font-size: 1.5rem; 
    margin-top: 0; 
    margin-bottom: 15px; 
    text-align: center; 
}

.environment-box > p { 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto 30px auto; 
    color: #5a5045; 
    line-height: 1.6; 
}

/* Dreispaltiges Highlight-Raster für die Umgebung */
.env-highlights { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}

.env-item { 
    background: rgba(255, 255, 255, 0.3); 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.3); 
}

.env-item h3 { 
    margin-top: 0; 
    color: #8b5a2b; 
    font-size: 1.05rem; 
    margin-bottom: 8px; 
}

.env-item p { 
    font-size: 0.9rem; 
    color: #5a5045; 
    margin: 0; 
    line-height: 1.6; 
}

/* ==========================================================================
   4. FINALER MENÜ-BREAKTHROUGH & PERFEKTES DESIGN (PC & FULL-WIDTH FOOTER)
   ========================================================================== */
.portal-topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 56px !important;
    background-color: #3c352d !important;
    border-bottom: 1px solid var(--accent-light) !important;
    z-index: 999999999 !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Zentriert den Inhalt perfekt auf der Mittelachse */
.portal-topbar .switch-container {
    max-width: 1140px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 30px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    height: 100% !important;
}

/* Beschriftungstext im Menü */
.portal-topbar .switch-label {
    color: #eae5da !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-right: 20px !important;
    white-space: nowrap !important;
}

/* Die Buttons nebeneinander im feinen Rahmen-Look */
.portal-topbar .switch-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    padding: 6px 14px !important;
    border-radius: 15px !important;
    font-size: 0.85rem !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
    box-sizing: border-box !important;
}

.portal-topbar .btn-oybin { border: 1px solid #4a6b82 !important; color: #a0958a !important; }
.portal-topbar .btn-oybin:hover { background-color: rgba(74, 107, 130, 0.2) !important; color: #ffffff !important; border-color: #4a6b82 !important; }

/* dot-Farben für die Top-Bar-Punkte */
.portal-topbar .dot-blue { background-color: #4a6b82 !important; }
.portal-topbar .dot-green { background-color: #556b2f !important; }

.portal-topbar .btn-grossschoenau { border: 1px solid #556b2f !important; color: #a0958a !important; }
.portal-topbar .btn-grossschoenau:hover { background-color: rgba(85, 107, 47, 0.2) !important; color: #ffffff !important; border-color: #556b2f !important; }

.portal-topbar .btn-gold { border: 1px solid #8b5a2b !important; color: #a0958a !important; }
.portal-topbar .btn-gold:hover { background-color: rgba(139, 90, 43, 0.2) !important; color: #ffffff !important; border-color: #8b5a2b !important; }

/* FIX FOOTER NAHTLOS: Hebelt das einquetschende Container-Padding komplett aus */
footer {
    position: relative !important;
    width: 100vw !important; /* Zwingt den Kasten auf die exakte Breite des Sichtfensters */
    margin-left: calc(-50vw + 50%) !important; /* Zieht den Footer aus dem Kasten heraus */
    margin-right: calc(-50vw + 50%) !important;
    background-color: #3c352d !important;
    color: #eae5da !important;
    padding: 40px 20px !important;
    text-align: center !important;
    margin-top: 80px !important;
    margin-bottom: -50px !important; /* Schließt bündig mit der Unterkante des Dokuments ab */
    border-top: 1px solid #eae5da !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: both !important;
}

.footer-links {
    display: flex !important;
    justify-content: center !important;
    gap: 25px !important;
    flex-wrap: wrap !important;
    margin-bottom: 15px !important;
}

.footer-links a {
    color: #eae5da !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    transition: color 0.2s ease !important;
}

.footer-links a:hover {
    color: #8b5a2b !important;
}

.footer-bottom {
    font-size: 0.85rem !important;
    color: #a09a8f !important;
    margin: 0 !important;
}


/* ==========================================================================
   5. MOBIL-OPTIMIERUNG (Top-Bar entfernt & Footer-Fix)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* MOBIL KOMPLETT ENTFERNT: Die obere Leiste verschwindet auf Smartphones restlos */
    .portal-topbar, .top-switch-bar {
        display: none !important;
    }
    
    /* Reduziert den Freiraum über dem Logo, da die obere Bar mobil fehlt */
    .portal-hero {
        padding-top: 40px !important;
        padding-bottom: 20px !important;
    }

    .portal-logo-branding {
        padding: 20px;
        margin: 0 auto !important; /* Hält die Box auch mobil zentriert */
        width: 100%;
    }
    
    .logo-title-flex {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .logo-icon-side {
        height: 100px !important;
        margin-right: 0 !important;
        margin-bottom: 5px !important;
    }
    
    .portal-logo-branding h1 {
        white-space: normal !important;
        font-size: 1.4rem !important;
        text-align: center;
    }
    
    .portal-card {
        grid-template-columns: 1fr !important;
    }
    
    .card-image-wrapper {
        aspect-ratio: 16 / 10;
    }
    
    .portal-btn {
        width: 100%;
        box-sizing: border-box;
    }
    
    .env-highlights {
        grid-template-columns: 1fr !important;
    }
    
    .environment-box {
        padding: 25px 20px;
        margin: 0 auto;
    }
    
    .footer-links {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* REPARATUR: Zwingt den Footer ohne Mini-Spalt rechts nahtlos abzuschließen */
    footer {
        width: 101vw !important; /* Erhöht um 1vw, um Rundungsfehler der Displays zu killen */
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        margin-bottom: -35px !important;
        overflow-x: hidden !important; /* Schneidet den minimalen Überstand rechts sauber ab */
    }
}


/* ==========================================================================
   PORTAL UMGEBUNGS-GALERIE RASTER & LIGHTBOX (Exakt wie Hauptseiten)
   ========================================================================== */
.portal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 Bilder nebeneinander am PC */
    gap: 12px;
    margin-bottom: 10px;
}

.portal-gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.portal-gallery-item:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.portal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Aktiviert das globale Lightbox-Großansichts-Verhalten im Portal */
.lightbox { 
    display: none; 
    position: fixed; 
    z-index: 9999999999 !important; /* Überlagert alles im Portal felsenfest */
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0, 0, 0, 0.9); 
    align-items: center; 
    justify-content: center; 
}

.lightbox:target { 
    display: flex; 
}

.lightbox img { 
    max-width: 90vw; 
    max-height: 85vh; 
    object-fit: contain; 
    border-radius: 4px; 
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* Lightbox Steuerungselemente */
.close-btn { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 38px; text-decoration: none; font-family: Arial, sans-serif; transition: opacity 0.2s; }
.close-btn:hover { opacity: 0.8; }

.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 45px; text-decoration: none; padding: 20px; transition: color 0.2s; font-family: Arial, sans-serif; }
.nav-btn:hover { color: #8b5a2b; }
.prev { left: 10px; }
.next { right: 10px; }

/* MOBIL-ANPASSUNG FÜR DAS GALERIE-RASTER */
@media (max-width: 768px) {
    .portal-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Mobil bequem 2-spaltig */
        gap: 8px;
    }
    .nav-btn { font-size: 35px; padding: 10px; }
}