/* ==========================================================================
   ASGARD-ARCHAEA STYLESHEET
   ========================================================================== */

/* Smooth Scroll für sanftes Gleiten beim Klick auf Index-Links */
html {
    scroll-behavior: smooth;
}

/* Styling für Asgard-Archaea Abschnitte */
.asgard-header {
    text-align: center;
    padding: 20px 0 30px;
    margin-bottom: 25px;
    border-bottom: 2px solid #d9af62;
}

.asgard-header h1 {
    font-size: 2.2em;
    color: #111;
    margin-bottom: 5px;
}

.asgard-subtitle {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}

.asgard-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: #fdfdfd;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 30px;
    margin-bottom: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.asgard-article {
    flex: 1 1 60%;
    min-width: 300px;
}

/* ==========================================================================
   ISOLIERTE SIDEBAR (Bilder & Captions - Betrifft NIEMALS die Galerie)
   ========================================================================== */

.asgard-aside {
    flex: 1 1 30%;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
    justify-content: flex-start;
}

.asgard-aside .asgard-img-figure {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 280px;
    display: block;
}

.asgard-aside .asgard-img-figure a {
    display: block;
    text-decoration: none !important;
    width: 100%;
    color: inherit;
}

.asgard-aside .asgard-img-figure img,
.asgard-aside .asgard-img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover;
    border: 1px solid #D9AF62;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.asgard-aside .asgard-figcaption {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    font-size: 0.82em;
    line-height: 1.4;
    padding: 8px 10px;
    border: 1px solid #D9AF62;
    border-top: none;
    border-radius: 0 0 4px 4px;
    text-align: center;
    display: block !important;
    box-sizing: border-box;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.asgard-aside .asgard-img-figure a:hover img,
.asgard-aside .asgard-img-figure a:hover .asgard-img {
    transform: translateY(-2px);
    border-color: #ffffff;
    box-shadow: 0 6px 15px rgba(217, 175, 98, 0.4);
}

.asgard-aside .asgard-img-figure a:hover .asgard-figcaption {
    background-color: #242424 !important;
    color: #ffd768 !important;
    border-color: #ffffff;
}

/* ==========================================================================
   TEXT- & TYPOGRAFIE-STYLES
   ========================================================================== */

.asgard-article h2 {
    color: #8c1d1d;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.asgard-article h3 {
    color: #222;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.asgard-divider {
    border: 0;
    border-top: 1px solid #d9af62;
    margin: 15px 0 20px;
}

.asgard-article p {
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
}

.asgard-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.asgard-list li {
    position: relative;
    background: rgba(217, 175, 98, 0.04);
    border-left: 3px solid #d9af62;
    padding: 10px 15px;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
    line-height: 1.5;
}

.asgard-list strong {
    color: #8c1d1d;
    font-weight: 600;
}

/* Zitate */
.asgard-quote-box {
    background: #f4f1ea;
    border-left: 4px solid #d9af62;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.asgard-quote-box blockquote {
    margin: 0;
    font-size: 1.05em;
    color: #444;
}

.asgard-quote-conclusion {
    font-weight: bold;
    color: #8c1d1d;
    margin-top: 10px !important;
}

#sec-7 .asgard-article p a {
    color: #800000;
    font-weight: bold;
    text-decoration: underline;
    transition: all 0.25s ease-in-out;
}

#sec-7 .asgard-article p a:hover {
    color: #8c6d1f;
    text-decoration: none;
    border-bottom: 2px solid #8c6d1f;
}

/* Haupt-Container Layout */
.asgard-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
}

.asgard-main-body {
    flex: 1;
    min-width: 0;
}

/* ==========================================
   RESPONSIVE YOUTUBE VIDEO CONTAINER
   ========================================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    background-color: #000000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   STICKY INDEX NAV (GLOBAL)
   ========================================================================== */

.asgard-sticky-nav {
    flex: 0 0 240px;
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    background: #141414 !important;
    border: 1px solid #a77a00;
    border-radius: 6px;
    padding: 18px 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.asgard-sticky-nav h2 {
    color: #ffd768 !important;
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #a77a00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.asgard-sticky-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asgard-sticky-nav li {
    margin-bottom: 10px;
}

.asgard-sticky-nav a,
.asgard-sticky-nav ul li a {
    color: #e0e0e0 !important;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    padding: 4px 6px;
    border-radius: 3px;
    transition: all 0.25s ease-in-out;
}

.asgard-sticky-nav a:hover,
.asgard-sticky-nav ul li a:hover {
    color: #ffffff !important;
    background-color: rgba(167, 122, 0, 0.2);
    padding-left: 10px;
}

/* ==========================================================================
   LIGHTBOX STYLES (GESICHERT GEGEN MOBILE OVERRIDES)
   ========================================================================== */

.asgard-lightbox {
    display: none; 
    position: fixed; 
    z-index: 99999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.92); 
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.asgard-lightbox.show {
    display: flex !important;
}

.asgard-lightbox-body {
    display: flex;
    flex-direction: column;
    max-width: 850px;
    width: 90%;
    max-height: 90vh;
    background: #18181c;
    border: 1px solid #33333d;
    border-radius: 12px;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    margin: 20px;
}

.asgard-lightbox-content {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    background: #000;
}

.asgard-lightbox-text-container {
    padding: 20px 24px;
    color: #e0e0e0 !important;
}

/* Titel explizit für alle Mobilgeräte erzwingen */
html body .asgard-lightbox .asgard-lightbox-title,
html body .asgard-lightbox-text-container .asgard-lightbox-title,
html body .asgard-lightbox-text-container h1,
html body .asgard-lightbox-text-container h2,
html body .asgard-lightbox-text-container h3,
html body .asgard-lightbox-text-container h4,
html body .asgard-lightbox-text-container p.asgard-lightbox-title,
html body .asgard-lightbox-text-container div.asgard-lightbox-title {
    color: #ffffff !important;
    margin: 0 0 8px 0 !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    -webkit-text-fill-color: #ffffff !important; /* Verhindert Safari Mobile Color-Overrides */
}

.asgard-lightbox-caption {
    font-size: 0.9rem !important;
    color: #a0a0b0 !important;
    font-style: italic !important;
}

.asgard-lightbox-divider {
    border: 0;
    height: 1px;
    background: #33333d !important;
    margin: 14px 0 !important;
}

.asgard-lightbox-detailed-desc {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #d1d1d6 !important;
    margin-bottom: 16px !important;
}

.asgard-lightbox-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: transparent;
    color: #d4af37;
    border: 1px solid #d4af37;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.asgard-lightbox-btn:hover {
    background-color: #d4af37;
    color: #111111;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Schließen-Button mit höchster Spezifität & WebKit-Fix */
html body .asgard-lightbox-close,
html body .asgard-lightbox .asgard-lightbox-close,
html body #content .asgard-lightbox-close {
    position: fixed !important;
    top: 20px !important;
    right: 30px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; /* Erzwingt Weiß auf iOS Safari */
    font-size: 36px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 100000 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

html body .asgard-lightbox-close:hover,
html body .asgard-lightbox .asgard-lightbox-close:hover {
    color: #d4af37 !important;
    -webkit-text-fill-color: #d4af37 !important;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* 1. GLOBALE MOBIL-VERERBUNG (bis 992px) */
@media screen and (max-width: 992px) {
    html body #content .asgard-sticky-nav h2,
    .asgard-sticky-nav h2 {
        color: #ffd768 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    html body #content .asgard-sticky-nav a,
    html body #content .asgard-sticky-nav ul li a,
    html body #content .asgard-sticky-nav span,
    .asgard-sticky-nav a {
        color: #e0e0e0 !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    html body #content .asgard-sticky-nav a:hover,
    html body #content .asgard-sticky-nav ul li a:hover {
        color: #ffffff !important;
        background-color: rgba(167, 122, 0, 0.3) !important;
    }

    html body #content .asgard-sticky-nav p {
        color: #E0E0E0 !important;
    }
}

/* 2. TABLET-VIEWPORT (481px bis 768px): Sticky Oben */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .asgard-layout {
        flex-direction: column;
    }

    .asgard-section {
        flex-direction: column;
        padding: 20px;
    }
    
    .asgard-article, 
    .asgard-aside {
        flex: 1 1 100%;
    }

    .asgard-sticky-nav {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        width: 100%;
        flex: none;
        max-height: 180px;
        overflow-y: auto;
        margin-bottom: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    }
}

/* 3. SMARTPHONE-VIEWPORT (bis 480px): Fixed Unten & Kompakt */
@media screen and (max-width: 480px) {
    .asgard-layout {
        flex-direction: column;
    }

    .asgard-section {
        flex-direction: column;
        padding: 15px;
    }
    
    .asgard-article, 
    .asgard-aside {
        flex: 1 1 100%;
    }

    .asgard-sticky-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        flex: none;
        max-height: 160px;
        overflow-y: auto;
        z-index: 1000;
        border-radius: 8px 8px 0 0;
        border-bottom: none;
        margin-bottom: 0;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.6);
    }

    .asgard-main-body {
        padding-bottom: 180px;
    }

    .asgard-lightbox-body {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }

    .asgard-lightbox-text-container {
        padding: 15px;
    }
}