/* Bibliothek Hauset – externe CSS-Datei für index.html
Informationsleiste und Navigation bleiben beim Scrollen sichtbar.
*/
/* =========================================================
1. DESIGN-SYSTEM: Farben, Abstände, Rundungen und Schatten
========================================================= */
:root {
    --blue: #2456a6;
    --dark: #173b73;
    --pale: #eaf2ff;
    --ink: #17243a;
    --muted: #5e6d82;
    --line: #d8e2f2;
    --radius: 22px;
    --shadow: 0 18px 48px rgba(23,59,115,.12)
}
/* =========================================================
2. BASISSTILE: Box-Modell, Seitenhintergrund, Links, Fokus
========================================================= */
* {
    box-sizing: border-box
}
html {
    scroll-behavior: smooth
}
body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg,#eaf2ff 0,#f7faff 420px,#f7faff 100%);
    font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    line-height: 1.6
}
a {
    color: inherit;
    text-decoration: none
}
a:focus-visible,summary:focus-visible {
    outline: 3px solid #d49a28;
    outline-offset: 4px
}
.wrap {
    width: min(1120px,calc(100% - 36px));
    margin-inline: auto
}
/* =========================================================
3. KOPFBEREICH: Infzeile, Logo und Hauptnavigation
========================================================= */
/* Informationsleiste und Navigation bleiben beim Scrollen sichtbar. */
.topline {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--dark);
    color: #ffffff;
    font-size: 1rem;
}
.topline .wrap {
    width: calc(100% - 120px);
    max-width: none;
}
.topline-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 60px;
    padding: 8px 0;
}
.topline-inner a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 5px;
    white-space: nowrap;
}
.topline-inner a:hover {
    text-decoration-thickness: 2px;
}
header {
    position: sticky;
    top: 60px;
    z-index: 19;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px)
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 84px
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0
}
.logo-placeholder {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    height: 58px;
    border: 2px dashed #8aa7d4;
    border-radius: 17px;
    color: var(--blue);
    background: var(--pale);
    font-size: .7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.15;
    padding: 5px
}
.brand-title {
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -.03em
}
.brand-sub {
    display: block;
    color: var(--muted);
    font-size: .8rem;
    margin-top: 4px
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap
}
.nav-links>a,.nav-links summary {
    display: block;
    padding: 10px 12px;
    border-radius: 999px;
    color: #31425d;
    font-size: .91rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none
}
.nav-links summary::-webkit-details-marker {
    display: none
}
.nav-links summary:after {
    content: "⌄";
    margin-left: 7px;
    color: var(--blue)
}
.nav-links>a:hover,.nav-links summary:hover,.nav-links details[open] summary {
    background: var(--pale);
    color: var(--blue)
}
.nav-links details {
    position: relative
}
.submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    padding: 8px;
    margin: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow)
}
.submenu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .9rem
}
.submenu a:hover {
    background: var(--pale);
    color: var(--blue)
}
.submenu a.submenu-selected {
    background: #173b73;
    color: #ffffff;
    font-weight: 800;
    border-radius: 10px;
}
/* =========================================================
4. STARTBEREICH: Einleitung und Bildkarte mit Öffnungszeiten
========================================================= */
.hero {
    /* Gleicher Abstand zur Kopfzeile beim direkten Laden und bei #start. */
    padding: 55px 0 42px;
    scroll-margin-top: 145px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    /* Inhalte beginnen oben, damit der Abstand nicht vom Karteninhalt abhängt. */
    align-items: start;
    gap: 44px
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: .78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .13em
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5a82f;
    box-shadow: 0 0 0 5px #fff0cd
}
h1,h2,h3,p {
    margin-top: 0
}
h1 {
    margin: 18px 0;
    max-width: 700px;
    font-size: clamp(1.3rem, 3vw, 2.4rem);
    line-height: .99;
    letter-spacing: -.065em;
}
h1 span {
    color: var(--blue)
}
.lead {
    max-width: 610px;
    color: var(--muted);
    font-size: 1.13rem
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
    border: 1px solid var(--blue)
}
.button:hover {
    background: var(--dark);
    border-color: var(--dark)
}
.button.secondary {
    background: #fff;
    color: var(--blue)
}
.hero-card {
    position: relative;
    min-height: 345px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 30px;
    border-radius: 30px;
    color: #fff;
    background: radial-gradient(circle at 80% 20%,rgba(255,255,255,.23),transparent 26%),linear-gradient(145deg,#2456a6,#173b73);
    box-shadow: var(--shadow)
}
.hero-card {
    background-image: url('../grafik/buecher_wand.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat
}
.hero-card:before,.hero-card:after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    pointer-events: none
}
.hero-card:before {
    width: 260px;
    height: 260px;
    right: -75px;
    top: -70px
}
.hero-card:after {
    width: 190px;
    height: 190px;
    right: -38px;
    top: -35px
}
.book-symbol {
    position: relative;
    z-index: 1;
    font-size: 3rem
}
.hero-card h2 {
    position: relative;
    z-index: 1;
    max-width: 360px;
    margin: 30px 0 8px;
    font-size: 1.8rem;
    line-height: 1.12
}
.hero-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #dce8ff;
    max-width: 390px
}
.hero-opening-hours {
    position: relative;
    z-index: 1;
    margin-top: 148px;
    max-width: 288px;
    padding: 10px 12px;
    border: 3px solid #2456a6;
    border-radius: 16px;
    background: rgba(220,237,255,.96);
    box-shadow: 0 4px 18px rgba(23,59,115,.20);
    color: #102b50;
    text-shadow: none
}
.hero-opening-hours>strong {
    display: block;
    margin-bottom: 6px;
    font-size: .88rem;
    color: #102b50;
    font-weight: 850
}
.hero-opening-hours p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 0;
    color: #102b50;
    font-size: .78rem
}
.hero-opening-hours p + p {
    border-top: 1px solid rgba(36,86,166,.28)
}
.hero-opening-hours b {
    color: #102b50;
    white-space: nowrap;
    font-weight: 850;
    font-size: .78rem
}
.status-pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 11px;
    border: 1px solid #9fc7f3;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 750;
    background: #dceeff;
    color: #111;
    text-shadow: none
}
/* =========================================================
5. SCHNELLZUGRIFF: Kacheln unter dem Startbereich
========================================================= */
.info-strip {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
    margin: 10px auto 54px
}
.info-tile {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px
}
.tile-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--pale);
    color: var(--blue);
    font-size: 1.2rem
}
.info-tile strong {
    display: block;
    margin-bottom: 3px
}
.info-tile p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem
}
/* =========================================================
6. INHALTSBEREICHE: Über uns, Neuigkeiten, Veranstaltungen,
Newsletter, Kontakt und Impressum
========================================================= */
section.content-section {
    padding: 30px 0
}
/* Überschrift NEUIGKEITEN nicht von der
   Navigation verdecken lassen */
#neuigkeiten {
    padding-top: 100px;
    scroll-margin-top: 150px;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px
}
.section-head h2 {
    margin: 7px 0 0;
    font-size: clamp(1.8rem,3.5vw,2.7rem);
    line-height: 1.1;
    letter-spacing: -.045em
}
.section-head p {
    max-width: 450px;
    color: var(--muted);
    margin: 0
}
.panel-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 17px
}
.panel {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 7px 24px rgba(23,59,115,.04)
}
.panel-icon {
    font-size: 1.5rem;
    margin-bottom: 12px
}
.panel h3 {
    margin-bottom: 8px;
    font-size: 1.1rem
}
.panel p {
    color: var(--muted);
    font-size: .94rem;
    margin-bottom: 0
}
.panel a.inline-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--blue);
    font-weight: 800
}
.news-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 20px;
    align-items: stretch
}
.news-list {
    display: grid;
    gap: 12px
}
.news-item {
    display: flex;
    gap: 14px;
    padding: 17px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px
}
.news-bullet {
    flex: 0 0 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--pale);
    color: var(--blue);
    font-weight: 900
}
.news-item h3 {
    margin: 0 0 4px;
    font-size: 1rem
}
.news-item p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem
}
.newsletter-layout {
    display: grid;
    grid-template-columns: 1fr .85fr;
    gap: 20px
}
.newsletter-box {
    padding: 28px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius)
}
.newsletter-box h3 {
    margin-bottom: 8px
}
.newsletter-box p {
    color: var(--muted)
}
.newsletter-image {
    display: grid;
    place-items: center;
    min-height: 240px;
    padding: 18px;
    text-align: center;
    border: 2px dashed #9bb4dd;
    border-radius: 18px;
    background: var(--pale);
    color: var(--blue)
}
.newsletter-image img {
    display: block;
    max-height: 520px;
    width: 100%;
    object-fit: contain;
    border-radius: 8px
}
.newsletter-image strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px
}
.newsletter-image code {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 8px;
    border-radius: 7px;
    background: #fff;
    font-size: .82rem
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px
}
.contact-card {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius)
}
.contact-card h3 {
    margin-bottom: 13px
}
.contact-card p {
    margin-bottom: 8px;
    color: var(--muted)
}
.contact-card strong {
    color: var(--ink)
}
/* Fußbereich: kompakter blauer Balken */
footer {
    margin-top: 30px;
    padding: 20px 0;
    color: #d9e6ff;
    background: #173B73;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: flex-start
}
.footer-brand {
    font-weight: normal;
    color: #fff
}
.footer-inner p {
    margin: 5px 0 0;
    font-size: .88rem;
    color: #c0d1f0
}
.footer-links {
    display: flex;
    gap: 14px 20px;
    flex-wrap: wrap
}
.footer-links a {
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: .9rem
}
.fine-print {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.16);
    color: #b7ccef;
    font-size: .8rem
}
/* =========================================================
7. RESPONSIVE LAYOUTS: Tablet und Smartphone
========================================================= */
@media(max-width:920px) {
    .topline .wrap {
        width: calc(100% - 36px);
    }
    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
        gap: 12px
    }
    .nav-links {
        gap: 2px
    }
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 22px
    }
    .hero-card {
        padding: 24px;
    }
    .nav-links>a,.nav-links summary {
        padding-inline: 9px;
    }
    .panel-grid {
        grid-template-columns: repeat(2,1fr)
    }
}
@media(max-width:680px) {
    /* Auf schmalen Bildschirmen keine überlappenden Sticky-Kopfzeilen. */
    .topline {
        position: relative;
    }
    header {
        position: relative;
        top: auto;
    }
    .wrap {
        width: min(100% - 28px,1120px)
    }
    .topline .wrap {
        width: calc(100% - 28px)
    }
    .topline-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 0
    }
    .topline-inner a {
        white-space: normal
    }
    header {
        top: 74px
    }
    .nav {
        position: static
    }
    .nav-links {
        align-items: flex-start
    }
    .nav-links>a,.nav-links summary {
        padding: 8px 10px
    }
    .submenu {
        position: static;
        min-width: 0;
        box-shadow: none;
        margin: 0 0 8px 8px
    }
    .hero {
        padding-top: 42px;
        scroll-margin-top: 0;
    }
    .hero-grid,.news-layout,.newsletter-layout,.contact-grid {
        grid-template-columns: 1fr
    }
    .hero-card {
        min-height: 290px
    }
    .info-strip,.panel-grid {
        grid-template-columns: 1fr
    }
    .section-head {
        align-items: flex-start;
        flex-direction: column
    }
    .footer-inner {
        flex-direction: column
    }
    section.content-section {
        padding: 38px 0
    }
}
/* =========================================================
8. ERGÄNZENDE KOMPONENTEN- UND NAVIGATIONSREGELN
========================================================= */
/* News card behaves like a button */
.news-button {
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.news-button:hover {
    transform: translateY(-2px);
    border-color: var(--blue);
    box-shadow: 0 10px 26px rgba(44, 94, 105, .12);
}
.news-button:focus-visible {
    outline: 3px solid #d49a28;
    outline-offset: 3px;
}
/* Kompakter Abstand beim Sprung zum Newsletter-Bereich */
#newsletter {
    padding-top: 34px !important;
    scroll-margin-top: 0 !important;
}
#newsletter .section-head {
    margin-top: 0;
    margin-bottom: 18px;
}
/* Kompakte Sprungpositionen für die Unterpunkte der Bibliothek */
#ueber-uns, #oeffnungszeiten, #adresse, #kontakt, #kontaktdaten {
    scroll-margin-top: 105px;
}
/* Untermenüs ausschließlich über den geöffneten details-Zustand anzeigen.
Kein zusätzlicher Hover-Zustand, der den Klick-Zustand überschreibt. */
.nav-links details > .submenu {
    display: none;
}
.nav-links details[open] > .submenu {
    display: block;
}
/* Kein Abstand zwischen Menüpunkt und Untermenü: verhindert ein
unbeabsichtigtes mouseleave beim Überqueren einer Hover-Lücke. */
.nav-links .submenu {
    top: 100%;
}


/* =========================================================
9. RESPONSIVE ABSICHERUNGEN für schmale Displays
========================================================= */
img, video, iframe, svg {
    max-width: 100%;
}
img, video {
    height: auto;
}
main, section, article, aside, .wrap, .panel, .contact-card,
.newsletter-box, .hero-grid > *, .news-layout > *, .newsletter-layout > * {
    min-width: 0;
}
p, li, a, strong, span {
    overflow-wrap: anywhere;
}
input, select, textarea, button {
    max-width: 100%;
    font: inherit;
}
input, select, textarea {
    width: 100%;
}
@media (max-width: 480px) {
    .wrap,
    .topline .wrap {
        width: calc(100% - 24px);
    }
    .topline {
        font-size: .88rem;
    }
    .nav {
        min-height: 0;
        padding: 12px 0;
    }
    .brand {
        align-items: flex-start;
        gap: 10px;
    }
    .logo-placeholder {
        flex-basis: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .brand-title {
        font-size: 1rem;
    }
    .brand-sub {
        font-size: .75rem;
    }
    .nav-links {
        width: 100%;
        gap: 3px;
    }
    .nav-links > a,
    .nav-links summary {
        padding: 8px;
        font-size: .86rem;
    }
    .submenu {
        max-width: calc(100vw - 48px);
    }
    .hero {
        padding: 30px 0 28px;
        scroll-margin-top: 0;
    }
    h1 {
        font-size: clamp(2.25rem, 11vw, 3.2rem);
        overflow-wrap: anywhere;
    }
    .hero-card {
        min-height: 260px;
        padding: 20px;
        border-radius: 22px;
    }
    .hero-opening-hours {
        max-width: 100%;
        margin-top: 28px;
    }
    .info-tile,
    .panel,
    .contact-card,
    .newsletter-box {
        padding: 18px;
    }
    .news-item {
        gap: 10px;
        padding: 14px;
    }
    .news-bullet {
        flex-basis: 34px;
        height: 34px;
    }
    .footer-links {
        gap: 10px 14px;
    }
}
/* Logo der Bibliothek Hauset */
.logo {
  max-width: 100px;
  height: auto;
  display: block;
}
