/* ============================================================
   JESTEBURGER SV – Template CSS für Joomla 5
   ============================================================ */

:root {
    --jsv-green:       #118f40;
    --jsv-green-light: #59b17a;
    --jsv-green-dark:  #0a6b2f;
    --jsv-red:         #e20917;
    --jsv-white:       #ffffff;
    --jsv-text:        #2b2b2b;
    --jsv-text-light:  #432918;
    --jsv-bg-fallback: #e1e1e1;
    --jsv-header-h:    130px;
    --jsv-box-bg:      rgba(255, 255, 255, 0.92);
    --jsv-box-border:  rgba(255, 255, 255, 0.55);
    --jsv-radius:      4px;
    --jsv-shadow:      0 2px 12px rgba(0,0,0,0.15);
    --jsv-max-width:   1000px;
    --jsv-font:        'Raleway', 'Segoe UI', Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { position: relative; min-height: 100%; }
html, body { overflow-x: hidden; width: 100%; }

body {
    font-family: var(--jsv-font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--jsv-text);
    background-color: var(--jsv-bg-fallback);
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: var(--jsv-header-h);
    padding-bottom: 60px;
    min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */
.jsv-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--jsv-header-h);
    background-color: var(--jsv-green);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    overflow: visible;
}

/* Obere Zeile: Logo links | Schriftzug mitte | Adler rechts */
.jsv-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 20px 2px 20px;
    height: 90px;
    overflow: visible;
}

.jsv-logo-left,
.jsv-logo-right {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    margin-top: auto;
}
.jsv-logo-right { justify-content: flex-end; }

.logo-stadt { height: 200px; width: auto; object-fit: contain; position: relative; z-index: 10; margin-left: 80px; margin-bottom: -60px; }
.logo-adler { height: 200px; width: auto; object-fit: contain; position: relative; z-index: 10; margin-right: 80px; margin-bottom: -60px; }

.jsv-header-title {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.header-banner {
    height: 96px;
    width: auto;
    max-width: 700px;
    object-fit: contain;
}

/* Untere Zeile: Navigation */
.jsv-header-nav {
}

.jsv-header-inner {
    max-width: var(--jsv-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: relative;
    height: 36px;
}

/* Navigation Desktop */
.jsv-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.nav-wrapper {
    display: flex;
    justify-content: center;
}

/* ============================================================
   MENÜ – Joomla 5 Klassen
   ============================================================ */
.nav-wrapper a,
.nav-wrapper a:visited {
    color: var(--jsv-white);
    text-decoration: none;
}

.nav-wrapper ul.nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 2px;
    justify-content: center;
}

.nav-wrapper ul.nav > li > a,
.nav-wrapper ul.nav > li > span {
    display: block;
    padding: 6px 12px;
    color: var(--jsv-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: var(--jsv-radius);
    transition: background-color 0.2s;
}

.nav-wrapper ul.nav > li > a:hover,
.nav-wrapper ul.nav > li.active > a,
.nav-wrapper ul.nav > li.current > a {
    background-color: var(--jsv-green-light);
}

/* Dropdown */
.nav-wrapper ul.nav > li {
    position: relative;
}

.nav-wrapper ul.nav > li > ul.mod-menu__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--jsv-green);
    min-width: 180px;
    list-style: none;
    z-index: 100;
    border-top: 2px solid var(--jsv-green-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-wrapper ul.nav > li:hover > ul.mod-menu__sub {
    display: block;
}

.nav-wrapper ul.nav > li > ul.mod-menu__sub > li > a {
    display: block;
    padding: 8px 14px;
    color: var(--jsv-white);
    text-decoration: none;
    font-size: 13px;
    border-top: 1px solid var(--jsv-green-light);
    white-space: nowrap;
    transition: background-color 0.2s;
}

.nav-wrapper ul.nav > li > ul.mod-menu__sub > li > a:hover {
    background-color: var(--jsv-green-light);
    color: var(--jsv-white);
}

/* Home und Kontakt Icons */
.nav-wrapper a.menu_icon img { height: 18px; width: auto; vertical-align: middle; }
.nav-wrapper .image-title { display: none; }
.nav-wrapper a.fa.fa-home::before { content: "🏠"; font-style: normal; }
.nav-wrapper a.fa.fa-envelope::before { content: "✉"; font-style: normal; }

/* Hamburger */
.jsv-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 26px;
    background: none;
    border: 2px solid var(--jsv-white);
    border-radius: var(--jsv-radius);
    padding: 5px 6px;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}
.jsv-hamburger span {
    display: block;
    height: 2px;
    background: var(--jsv-white);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.jsv-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jsv-hamburger.is-open span:nth-child(2) { opacity: 0; }
.jsv-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menü */
.jsv-mobile-menu { 
    background-color: var(--jsv-green-dark); 
    padding: 10px 0;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.jsv-mobile-menu[hidden] { display: none; }

.jsv-mobile-menu ul.nav { list-style: none; margin: 0; padding: 0; }
.jsv-mobile-menu ul.nav > li > a,
.jsv-mobile-menu ul.nav > li > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: var(--jsv-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--jsv-green-light);
}
.jsv-mobile-menu ul.nav > li > a:hover { background-color: var(--jsv-green-light); }

/* Untermenüs standardmäßig versteckt */
.jsv-mobile-menu ul.mod-menu__sub { 
    list-style: none; 
    background-color: var(--jsv-green); 
    display: none;
    margin: 0;
    padding: 0;
}
.jsv-mobile-menu ul.mod-menu__sub.is-open { display: block; }
.jsv-mobile-menu ul.mod-menu__sub > li > a {
    display: block;
    padding: 10px 35px;
    color: var(--jsv-white);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--jsv-green-light);
}

/* Pfeil-Indikator für Einträge mit Untermenü */
.jsv-mobile-menu li.parent > a::after,
.jsv-mobile-menu li.deeper > a::after {
    content: "▸";
    font-size: 12px;
    transition: transform 0.2s;
}
.jsv-mobile-menu li.parent.is-open > a::after,
.jsv-mobile-menu li.deeper.is-open > a::after {
    content: "▾";
}

/* ============================================================
   HAUPTINHALT
   ============================================================ */
.jsv-main { min-height: calc(100vh - var(--jsv-header-h) - 60px); }

/* Einzelner Artikel */
.com-content-article, .item-page {
    background: rgba(255,255,255,0.88);
    border-radius: var(--jsv-radius);
    padding: 20px 24px;
    box-shadow: var(--jsv-shadow);
    max-width: 900px;
    margin: 20px auto;
}

.jsv-container {
    max-width: var(--jsv-max-width);
    margin: 0 auto;
    padding: 30px 20px;
}

/* ============================================================
   CONTENT BOXES
   ============================================================ */
.box-content,
.box-content-big {
    background-color: var(--jsv-box-bg);
    border: 10px solid var(--jsv-box-border);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border-radius: var(--jsv-radius);
    padding: 22px 24px;
    margin: 0 0 25px 0;
    box-shadow: var(--jsv-shadow);
    color: var(--jsv-text-light);
    overflow: hidden;
}
.box-content { min-height: 100px; }
.box-content-big { min-height: 300px; width: 100%; }

.box-content h1, .box-content h2,
.box-content-big h1, .box-content-big h2 {
    margin: 0 0 10px 0;
    color: var(--jsv-text);
    font-weight: 300;
    font-size: 22px;
}
.box-title-line {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--jsv-green);
    margin-bottom: 10px;
}
.box-content-big hr,
.box_hr {
    margin: 0 0 20px 0;
    border: none;
    border-top: 2px solid var(--jsv-green);
}

.box-red,
.box-content.box-red,
.box-content-big.box-red {
    background-color: var(--jsv-red);
    border-color: rgba(255,255,255,0.3);
    color: var(--jsv-white);
}
.box-red h1, .box-red h2 { color: var(--jsv-white); }

.box-row { display: flex; flex-wrap: wrap; margin: 0 -10px; align-items: stretch; }
.box { padding: 0 10px; display: flex; }
.box-1   { width: 100%; }
.box-1-2 { width: 50%; }
.box-1-3 { width: 33.3333%; }

/* ============================================================
   BILDER & TABELLEN
   ============================================================ */
.box-content img,
.box-content-big img,
.item-page img,
.moduletable img,
.custom img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto 10px auto;
}

.box-content-big table,
.item-page table { width: 100%; border-collapse: collapse; }

.box-content-big td, .box-content-big th,
.item-page td, .item-page th {
    padding: 8px;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
    border-bottom: 1px solid #e0e0e0;
}

.box-content-big a { color: var(--jsv-green-dark); }
.box-content-big a:hover { color: var(--jsv-green); text-decoration: underline; }

a.button_articles {
    display: inline-block;
    background-color: var(--jsv-green);
    color: var(--jsv-white);
    padding: 6px 14px;
    border-radius: var(--jsv-radius);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}
a.button_articles:hover { background-color: var(--jsv-green-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.jsv-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: rgba(43, 52, 59, 0.95);
    color: #808589;
    padding: 8px 20px;
    font-size: 12px;
    text-align: center;
    z-index: 500;
}
.jsv-footer a { color: #aaa; text-decoration: none; }
.jsv-footer a:hover { color: var(--jsv-white); }
.jsv-footer-copy { margin-top: 2px; }

.moduletable h3 { display: none; }
.jsv-module-box { margin-bottom: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
    :root { --jsv-max-width: 100%; }
    .box-1-2, .box-1-3 { width: 100%; }
    .jsv-container { padding: 20px 10px; }
}

@media (max-width: 799px) {
    /* Header kompakt - alles in einer Zeile */
    :root { --jsv-header-h: 70px; }
    .jsv-header { height: auto; overflow: visible; }

    /* Header-Top: Logos + Icons + Hamburger in einer Zeile */
    .jsv-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 70px;
        padding: 6px 10px;
        overflow: visible;
        width: 100%;
    }

    /* Logos links nebeneinander */
    .jsv-logo-left {
        display: flex;
        flex-direction: row;
        gap: 6px;
        width: auto;
        align-items: center;
    }
    .jsv-logo-right { display: none; }

    /* Zweites Logo ins jsv-logo-left verschieben - per CSS nicht möglich,
       daher Adler und Stadtwappen beide links über index.php */
    .logo-stadt { height: 50px; margin: 0; margin-bottom: 0 !important; }
    .logo-adler { height: 50px; margin: 0; margin-bottom: 0 !important; }
    .jsv-logo-left, .jsv-logo-right { align-items: center; }
    .jsv-header-top { overflow: hidden; }
    .jsv-header { overflow: hidden; }

    /* Schriftzug ausblenden auf mobil */
    .jsv-header-title { display: none; }

    /* Mobile Icons: Haus | § | Brief - zentriert */
    .jsv-mobile-icons {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 20px;
        flex: 1;
    }
    .jsv-mobile-icons a {
        color: #fff;
        font-size: 28px;
        text-decoration: none;
        line-height: 1;
    }

    /* Hamburger rechts */
    .jsv-hamburger { display: flex; }

    /* Desktop-Nav ausblenden */
    .jsv-header-nav { display: none !important; }

    /* Boxen untereinander aber gleiche Mindesthöhe */
    .box-1-2, .box-1-3 { width: 100%; }
    .box-row { display: flex; flex-direction: column; }
    .box { padding: 0; margin-bottom: 10px; }
    .box-content, .box-content-big { 
        margin: 0; 
        padding: 14px; 
        min-height: 300px;
        width: 100%;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .box-content h1, .box-content h2,
    .box-content-big h1, .box-content-big h2 { font-size: 18px; }

    /* Container */
    .jsv-container { padding: 10px; }

    /* Footer */
    .jsv-footer { position: relative; bottom: auto; }
    body { padding-bottom: 0; padding-top: 70px; }

    /* Mobile Menü */
    .jsv-mobile-menu { display: block; }
}

@media (max-width: 370px) {
    .logo-stadt, .logo-adler { height: 40px; }
    .jsv-mobile-icons a { font-size: 22px; gap: 14px; }
}

/* ── ARTIKEL META AUSBLENDEN ──────────────────────────────── */
.article-info, .article-info-term,
.com-content-article__info, .item-meta,
dl.article-info, .createdby, .modified,
.hits, .category-name, .parent-category-name,
.com-content-article__info-block,
.info-block { display: none !important; }

/* ── HOME ICON WEISS ───────────────────────────────────────── */
.fa-home img { filter: brightness(0) invert(1) !important; }

/* ── EINZELARTIKEL ÜBERSCHRIFT ─────────────────────────────── */
.com-content-article h1,
.com-content-article h2,
.item-page h1,
.item-page h2,
.item-page h3 {
    font-family: var(--jsv-font);
    color: var(--jsv-text);
    font-weight: 300;
}
.com-content-article h1,
.item-page h1 {
    font-size: 26px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--jsv-green);
    margin-bottom: 16px;
}

/* ── BEITRAGSNAVIGATION AUSBLENDEN ─────────────────────────── */
.pager, .pagination-prev, .pagination-next,
.com-content-article__pager,
a.previous, a.next,
.item-navigation { display: none !important; }

/* ── GALERIE IFRAME AUTO-HÖHE ───────────────────────────────── */
iframe[src*="jsv_gallery"] {
    min-height: 600px;
    width: 100% !important;
    border: none;
}

/* ── MOBILE ZWEITES LOGO + HAMBURGER IM HEADER-TOP ─────────── */
.logo-adler-mobile { display: none; }
.jsv-hamburger-top { display: none; }

@media (max-width: 799px) {
    .logo-adler-mobile { 
        display: block !important; 
        height: 50px; 
        width: auto; 
        object-fit: contain;
    }
    .jsv-hamburger-top { 
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
    }
    .jsv-hamburger-top span {
        display: block;
        width: 26px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
    }
}

/* ── MOBILES DOPPELLOGO ─────────────────────────────────────── */
.logo-mobil { display: none; }

@media (max-width: 799px) {
    .logo-stadt { display: none !important; }
    .logo-adler-mobile { display: none !important; }
    .logo-mobil { 
        display: block !important; 
        height: 55px; 
        width: auto; 
        object-fit: contain;
        margin: 0;
    }
}

/* ── HOME ICON ───────────────────────────────────────────────── */
.fa-home .image-title { display: none !important; }
.fa-home::before { display: none !important; content: none !important; }
.fa-envelope img { display: none !important; }
