/* ================================================================
   Jenaer Kernberglauf – Responsive Stylesheet (Bootstrap 5.3)
   USV Jena Farben: Orange #ef7f00  |  Dunkelblau #1B3067
   ================================================================ */

:root {
    --jkl-orange:     #ef7f00;
    --jkl-orange-dk:  #c96b00;
    --jkl-orange-lt:  #f5a030;
    --jkl-blue:       #1B3067;
    --jkl-blue-lt:    #2a4a9a;
    --jkl-bg:         #f4f4f4;
}

/* ── Allgemein ──────────────────────────────────────────────── */
body {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    color: #222;
    background-color: var(--jkl-bg);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.jkl-navbar {
    background-color: var(--jkl-blue) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.jkl-navbar .navbar-brand {
    color: #ffffff !important;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}
.jkl-navbar .navbar-brand:hover {
    color: var(--jkl-orange) !important;
}
.jkl-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

/* sm–md: Header-Bild sichtbar → Navbar-Brand ausblenden, Hamburger behalten */
@media (min-width: 576px) and (max-width: 991.98px) {
    .jkl-navbar .navbar-brand {
        display: none !important;
    }
}
/* lg+: Header-Bild + Sidebar sichtbar → gesamte Navbar ausblenden */
@media (min-width: 992px) {
    .jkl-navbar {
        display: none !important;
    }
}

/* ── Offcanvas-Header (nur mobile sichtbar) ──────────────────── */
.jkl-offcanvas-header {
    background-color: var(--jkl-blue);
    color: white;
    padding: 0.75rem 1rem;
}

/* ── Header-Bild ─────────────────────────────────────────────── */
#jkl-header {
    display: block;
    width: 100%;
}
.jkl-header-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Sidebar-Navigation ─────────────────────────────────────── */
.jkl-sidenav {
    font-size: 0.9rem;
}

/* Level 0 – Hauptmenü */
.jkl-nav-level0 {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jkl-nav-item {
    list-style: none;
}
.jkl-nav-link {
    display: block;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--jkl-orange);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.jkl-nav-link:hover,
.jkl-nav-link.jkl-nav-active {
    background-color: var(--jkl-blue);
    color: #ffffff;
}

/* Level 1 – Untermenü */
.jkl-nav-level1 {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jkl-nav-sublink {
    display: block;
    padding: 0.35rem 0.8rem 0.35rem 1.6rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #ffffff;
    background-color: var(--jkl-orange-lt);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.jkl-nav-sublink:hover,
.jkl-nav-sublink.jkl-nav-active {
    background-color: var(--jkl-blue-lt);
    color: #ffffff;
}

/* ── Hauptinhalt ─────────────────────────────────────────────── */
.jkl-content {
    background-color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07);
    min-height: 300px;
}
.jkl-content h2 {
    color: var(--jkl-blue);
    font-size: 1.65rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--jkl-orange);
}
.jkl-content h3 {
    color: var(--jkl-orange-dk);
    font-size: 1.2rem;
    margin-top: 1.2rem;
    margin-bottom: 0.4rem;
}
.jkl-content h4 {
    color: var(--jkl-blue);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
}
.jkl-content p {
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0.6rem;
}
.jkl-content a,
.jkl-content a.linkimtext {
    color: var(--jkl-orange-dk);
    text-decoration: none;
    border-bottom: 1px solid rgba(239, 127, 0, 0.35);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.jkl-content a:hover,
.jkl-content a.linkimtext:hover {
    color: var(--jkl-blue);
    border-bottom-color: var(--jkl-blue);
}
.jkl-content hr {
    border-color: var(--jkl-orange);
    opacity: 0.25;
    margin: 1rem 0;
}

/* Tabellen im Inhalt */
.jkl-content table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}
.jkl-content th,
.jkl-content td {
    font-size: 0.85em;
}
.jkl-content .tzeile0  { background-color: #f2f2f2; }
.jkl-content .tzeile1  { background-color: #e8e8e8; }
.jkl-content .tzelle,
.jkl-content .tzelle1,
.jkl-content .tzelle2  {
    border: 1px solid #b8c8e0;
    padding: 0.25rem 0.4rem;
    overflow: hidden;
}
.jkl-content .tzelle1  { width: 10%; }
.jkl-content .tzelle2  { width: 23%; }

/* ── Rechte Spalte / Unterstützer ───────────────────────────── */
.jkl-supporters {
    border: 1px solid #dde0e8;
    border-radius: 4px;
    overflow: hidden;
}
.jkl-card-header {
    background-color: var(--jkl-blue);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    text-align: center;
}
.jkl-supporters .card-body {
    padding: 0.5rem;
    background-color: #f9f9fb;
    text-align: center;
}
.jkl-supporters img {
    max-width: 100%;
    height: auto;
}

/* ── Footer ─────────────────────────────────────────────────── */
.jkl-footer {
    background-color: var(--jkl-blue);
    color: rgba(255, 255, 255, 0.85);
}
.jkl-footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s ease;
}
.jkl-footer-link:hover {
    color: var(--jkl-orange);
    text-decoration: none;
}
.jkl-footer-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.25rem;
}

/* ── Anpassungen für kleine Bildschirme ─────────────────────── */
@media (max-width: 991.98px) {
    .jkl-content {
        padding: 1rem;
        box-shadow: none;
        border-radius: 0;
    }
}
@media (max-width: 575.98px) {
    .jkl-content {
        padding: 0.75rem 0.85rem;
    }
    .jkl-content h2 {
        font-size: 1.35rem;
    }
}

/* Sicherstellen, dass der offcanvas-lg Desktop-Sidebar keine weißen Ränder hat */
@media (min-width: 992px) {
    #navSidebar {
        border-right: none;
    }
    #navSidebar .offcanvas-body {
        padding: 0 !important;
    }
}

/* ── Drucken ─────────────────────────────────────────────────── */
@media print {
    .jkl-navbar,
    .jkl-sidenav,
    .jkl-footer,
    .jkl-supporters,
    #jkl-header,
    .no_print {
        display: none !important;
    }
    .jkl-content {
        box-shadow: none;
        padding: 0;
    }
    h1, h2, h3, h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    blockquote, pre { page-break-inside: avoid; }
    ul, ol, dl     { page-break-before: avoid; }
    * { color: black !important; background-color: white !important; }
}

/* ================================================================
   Ergebnisarchiv (e02) – Responsive-Ergänzungen
   ================================================================ */

/* Tabellen-Wrapper: horizontales Scrollen auf kleinen Bildschirmen */
.jkl-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Diagramm-Bilder responsiv machen */
.jkl-content img[usemap],
.jkl-content img[src*="p_teiln"] {
    max-width: 100%;
    height: auto;
}

/* Alte Formulare responsiv gestalten */
.jkl-content form table {
    width: auto;
    max-width: 100%;
}
.jkl-content form input[type="text"],
.jkl-content form input[type="number"] {
    padding: 0.35rem 0.5rem;
    border: 1px solid #b8c8e0;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 100%;
    box-sizing: border-box;
}
.jkl-content form input[type="text"]:focus,
.jkl-content form input[type="number"]:focus {
    outline: none;
    border-color: var(--jkl-orange);
    box-shadow: 0 0 0 2px rgba(239, 127, 0, 0.2);
}
.jkl-content form input[type="submit"],
.jkl-content form button[type="submit"] {
    padding: 0.45rem 1.2rem;
    background-color: var(--jkl-orange);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.jkl-content form input[type="submit"]:hover,
.jkl-content form button[type="submit"]:hover {
    background-color: var(--jkl-blue);
}
.jkl-content .formzwingend {
    font-weight: 600;
    color: var(--jkl-blue);
}
.jkl-content .warnung {
    color: #c00;
    font-weight: 600;
}

/* Formulartabellen auf kleinen Bildschirmen linearisieren */
@media (max-width: 575.98px) {
    .jkl-content form table,
    .jkl-content form table tbody,
    .jkl-content form table tr,
    .jkl-content form table td {
        display: block;
        width: 100%;
    }
    .jkl-content form table td {
        padding: 0.15rem 0;
        text-align: left !important;
    }
    .jkl-content form input[type="text"],
    .jkl-content form input[type="number"] {
        width: 100%;
    }
}
/* ================================================================
   Slideshow (Swiper) – Custom Styling
   ================================================================ */

/* Custom Diashow Styling */
.slideshow-container {
    margin: 2rem auto;
    max-width: 100%;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: auto;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: white;
    padding: 20px;
    font-size: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.slide-caption a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}

.slide-caption a:hover {
    color: #ccc;
}

/* Hover Caption */
.slide-hover-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0));
    color: white;
    padding: 20px;
    font-size: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.swiper-slide:hover .slide-hover-caption {
    opacity: 1;
}

/* Navigation buttons */
.swiper-button-next,
.swiper-button-prev {
    background-color: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Pagination dots */
.swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, 0.5);
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    background-color: rgba(255, 255, 255, 1);
}

/* Responsive */
@media (max-width: 768px) {
    .slide-caption {
        font-size: 14px;
        padding: 15px;
        min-height: 50px;
    }
    .slide-hover-caption {
        font-size: 14px;
        padding: 15px;
        min-height: 50px;
    }
    .swiper-button-next, .swiper-button-prev {
        width: 36px;
        height: 36px;
    }
    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .slide-caption {
        font-size: 12px;
        padding: 10px;
    }
    .slide-hover-caption {
        font-size: 12px;
        padding: 10px;
    }
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
}