/* =========================================================
   Feuerwehr Holtriem — modernes, responsives Design
   ========================================================= */

:root {
    --red: #d81f2a;
    --red-dark: #a8121b;
    --ink: #14161c;
    --ink-2: #2a2e38;
    --grey: #5c626e;
    --line: #e6e8ee;
    --bg: #ffffff;
    --bg-soft: #f5f6f9;
    --bg-dark: #16181d;
    --white: #ffffff;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 6px 24px rgba(20, 22, 28, .08);
    --shadow-lg: 0 18px 50px rgba(20, 22, 28, .16);
    --wrap: 1180px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
.section-sub { font-size: 1.02rem; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .04em; margin: 1.4rem 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.section-sub:first-of-type { margin-top: 1rem; }

/* Downloads */
.download-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.download-item a { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); transition: .15s; }
.download-item a:hover { border-color: var(--red); box-shadow: var(--shadow); }
.download-item__icon { font-size: 1.4rem; line-height: 1; }
.download-item__text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.download-item__text strong { font-size: 1rem; }
.download-item__text small { color: var(--grey); font-size: .78rem; }
.download-item__action { color: var(--red-dark); font-weight: 700; font-size: .85rem; white-space: nowrap; }
@media (max-width: 520px) { .download-item__action { display: none; } }
p { margin: 0 0 1em; }
.muted { color: var(--grey); }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 8px; }

/* ---------- Topbar ---------- */
.topbar { background: var(--ink); color: #cfd3dc; font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar__emergency { color: #fff; background: var(--red); padding: .15rem .7rem; border-radius: 999px; }
.topbar__emergency:hover { text-decoration: none; background: var(--red-dark); }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { display: flex; align-items: center; height: 48px; }
.brand__mark img { height: 100%; width: auto; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 1.05rem; }
.brand__text small { color: var(--grey); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

.mainnav { display: flex; align-items: center; gap: .3rem; }
.mainnav a { color: var(--ink-2); padding: .55rem .7rem; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.mainnav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.mainnav__cta { background: var(--red); color: #fff !important; }
.mainnav__cta:hover { background: var(--red-dark) !important; }

/* Nav-Dropdown (Einsätze → Jahre) */
.mainnav__group { position: relative; }
.mainnav__grouplink { display: inline-flex; align-items: center; gap: .25rem; }
.mainnav__caret { font-size: .7em; color: var(--grey); }
.mainnav__sub {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s;
}
.mainnav__group:hover .mainnav__sub,
.mainnav__group:focus-within .mainnav__sub { opacity: 1; visibility: visible; transform: translateY(0); }
.mainnav__sub a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem .7rem; border-radius: 8px; font-size: .93rem; color: var(--ink-2); }
.mainnav__sub a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.mainnav__count { background: #fbe9ea; color: var(--red-dark); font-size: .72rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.3rem; border-radius: 999px; font-weight: 700; border: 2px solid transparent; cursor: pointer; font-size: .98rem; transition: .18s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--red); color: var(--red-dark); }
.btn--onred { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.btn--onred:hover { background: #fff; color: var(--red-dark); border-color: #fff; }

/* ---------- Mitmachen-Landingpage ---------- */
.lp-hero { position: relative; color: #fff; background: linear-gradient(125deg, #14161c 0%, #2a1416 55%, var(--red-dark) 130%); background-size: cover; background-position: center; overflow: hidden; }
.lp-hero--img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(20,22,28,.9) 0%, rgba(42,20,22,.82) 55%, rgba(168,18,27,.72) 130%); }
.lp-hero__inner { position: relative; z-index: 1; padding: clamp(3.5rem, 10vw, 7rem) 0; max-width: 760px; }
.lp-hero__eyebrow { color: #ffb3b8; }
.lp-hero h1 { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.6rem); line-height: 1.05; margin: .6rem 0 0; }
.lp-hero__text { color: #eceef4; font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 44ch; margin: 1.1rem 0 0; }
.lp-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.lp-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 2.2rem; }
.lp-benefit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.4rem; text-align: center; box-shadow: var(--shadow); transition: .2s; }
.lp-benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lp-benefit__icon { font-size: 2.4rem; line-height: 1; display: block; }
.lp-benefit h3 { margin: .8rem 0 .4rem; font-size: 1.15rem; }
.lp-benefit p { margin: 0; color: var(--grey); font-size: .96rem; }

.lp-kids { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.lp-kids__card { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.lp-kids__icon { font-size: 2.6rem; line-height: 1; }
.lp-kids__card h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.lp-kids__age { display: inline-block; background: #fbe9ea; color: var(--red-dark); font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; vertical-align: middle; margin-left: .3rem; }
.lp-kids__card p { margin: 0; color: var(--grey); }

.lp-cta { background: linear-gradient(125deg, var(--red-dark), var(--red)); color: #fff; }
.lp-cta__inner { padding: clamp(2.6rem, 6vw, 4.5rem) 0; text-align: center; max-width: 680px; }
.lp-cta h2 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0; }
.lp-cta p { color: #ffe3e5; font-size: 1.1rem; margin: 1rem auto 0; max-width: 52ch; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: linear-gradient(120deg, #1a1c22 0%, #2a1416 55%, var(--red-dark) 130%); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(120deg, rgba(26,28,34,.82) 0%, rgba(42,20,22,.78) 55%, rgba(168,18,27,.7) 130%); pointer-events: none; }
.hero__video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero__video iframe {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100vw; height: 56.25vw; /* 16:9 */
    min-height: 100%; min-width: 177.78vh; /* 16:9 */
    border: 0;
}
@media (max-width: 700px) { .hero__video { display: none; } }
.hero__inner { position: relative; z-index: 2; padding: clamp(3rem, 8vw, 6rem) 0; max-width: 720px; }
.hero .eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #ffb3b8; margin-bottom: 1rem; }
.hero h1 { color: #fff; }
.hero p { color: #e7e8ee; font-size: 1.15rem; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--soft { background: var(--bg-soft); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.section__head p { margin: .3rem 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 700; color: var(--red); }

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { display: block; aspect-ratio: 16/10; background: var(--bg-soft) center/cover no-repeat; position: relative; }
.card__media--placeholder { display: grid; place-items: center; color: var(--red); background: linear-gradient(135deg, #fbe9ea, #f5f6f9); }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; overflow-wrap: break-word; word-break: break-word; hyphens: auto; min-width: 0; }
.card__contact { padding: .7rem 1.2rem 1.1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .35rem; }
.card__contact-link { font-size: .82rem; color: var(--grey); display: flex; align-items: center; gap: .4rem; word-break: break-word; }
.card__contact-link:hover { color: var(--red-dark); text-decoration: underline; }
.card__meta { font-size: .8rem; color: var(--grey); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--red-dark); }
.card__excerpt { color: var(--grey); font-size: .95rem; margin: 0; }
.card__link { margin-top: auto; font-weight: 700; color: var(--red-dark); font-size: .92rem; }

.tag { display: inline-block; background: #fbe9ea; color: var(--red-dark); padding: .12rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tag--grey { background: var(--bg-soft); color: var(--grey); }

/* ---------- Stat / Feature Row ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat { text-align: center; padding: 1.4rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat strong { display: block; font-size: 2.2rem; color: var(--red); line-height: 1; }
.stat span { color: var(--grey); font-size: .9rem; }

/* ---------- Einsatz-Liste ---------- */
.einsatz-list { display: flex; flex-direction: column; gap: .7rem; }
.einsatz-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius-sm); padding: .8rem 1.1rem; }
.einsatz-row:hover { box-shadow: var(--shadow); text-decoration: none; }
.einsatz-row__date { font-weight: 800; color: var(--ink); font-size: .9rem; text-align: center; line-height: 1.1; }
.einsatz-row__date small { display: block; color: var(--grey); font-weight: 600; }
.einsatz-row h3 { font-size: 1.02rem; margin: 0; color: var(--ink); }
.einsatz-row__meta { font-size: .82rem; color: var(--grey); }

/* ---------- Article ---------- */
.article { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.article__head { max-width: 760px; margin: 0 auto 1.6rem; }
.article__cover { border-radius: var(--radius); overflow: hidden; margin: 0 auto 2rem; max-width: 960px; box-shadow: var(--shadow); }
.article__body { max-width: 760px; margin: 0 auto; font-size: 1.08rem; }
.article__body img { border-radius: var(--radius-sm); margin: 1.4rem 0; max-width: 100%; height: auto; }
.article__body h2 { margin-top: 1.8rem; }
.article__body h3 { margin-top: 1.4rem; }
.article__body ul, .article__body ol { margin: 0 0 1.1rem 1.4rem; }
.article__body li { margin-bottom: .35rem; }
.article__body a { color: var(--red-dark); text-decoration: underline; }
.article__body blockquote { border-left: 4px solid var(--red); margin: 1.4rem 0; padding: .5rem 0 .5rem 1.2rem; color: var(--grey); font-style: italic; }
/* Responsive YouTube-Einbettung */
.video-embed { position: relative; padding-top: 56.25%; margin: 1.6rem 0; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Hochgeladenes Video */
.video-file { margin: 1.6rem 0; }
.video-file video { width: 100%; max-height: 520px; border-radius: var(--radius-sm); background: #000; display: block; }
/* Bildergalerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; margin: 1.6rem 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.gallery img:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,11,14,.94); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity .2s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox__btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lightbox__btn:hover { background: rgba(255,255,255,.25); }
.lightbox__prev { left: 3vw; }
.lightbox__next { right: 3vw; }
.lightbox__close { top: 4vh; right: 4vw; transform: none; width: 46px; height: 46px; font-size: 1.4rem; }
@media (max-width: 560px) { .lightbox__btn { width: 42px; height: 42px; } .lightbox__prev { left: 1vw; } .lightbox__next { right: 1vw; } }
.breadcrumb { font-size: .85rem; color: var(--grey); margin-bottom: 1rem; }
.breadcrumb a { color: var(--grey); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.pagination .is-active { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Flash ---------- */
.flash { padding: .8rem 1.1rem; border-radius: var(--radius-sm); margin: 1.2rem 0; font-weight: 600; }
.flash--success { background: #e7f6ec; color: #1c7a3e; }
.flash--error { background: #fdecec; color: #b3261e; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #c8ccd6; margin-top: 3rem; padding: 3rem 0 1.5rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.site-footer a { color: #c8ccd6; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand--footer .brand__text strong { color: #fff; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.2rem; font-size: .84rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
/* Zwischenbreite: die Desktop-Nav passt mit neun Einträgen (inkl. zweiter
   Dropdown-Gruppe „Nachwuchs") ab ca. 1040px nicht mehr in eine Zeile, der
   Hamburger greift aber erst ab 780px. In dieser Lücke umbricht die Nav statt
   überzulaufen; bestehende Regeln bleiben unverändert. */
@media (min-width: 781px) and (max-width: 1040px) {
    .site-header__inner { height: auto; padding-block: .6rem; flex-wrap: wrap; }
    .mainnav { flex-wrap: wrap; row-gap: .3rem; justify-content: flex-end; }
    /* Nav ist hier rechtsbündig; das Dropdown folgt, sonst ragt es bei
       Gruppen nahe am rechten Rand über den Viewport hinaus. */
    .mainnav__sub { left: auto; right: 0; }
}
@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .mainnav {
        position: fixed; inset: 112px 0 auto 0; flex-direction: column; align-items: stretch;
        background: #fff; padding: 1rem 1.25rem 1.5rem; gap: .2rem; border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-lg); transform: translateY(-140%); transition: transform .28s ease; max-height: calc(100vh - 112px); overflow-y: auto;
    }
    .mainnav.is-open { transform: translateY(0); }
    .mainnav a { padding: .85rem .6rem; font-size: 1.05rem; border-radius: 8px; }
    .mainnav__cta { text-align: center; margin-top: .4rem; }
    .mainnav__group { width: 100%; }
    .mainnav__caret { display: none; }
    .mainnav__sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 .3rem 1rem; min-width: 0; }
    .mainnav__sub a { padding: .55rem .6rem; }
    .einsatz-row { grid-template-columns: 72px 1fr; }
    .einsatz-row__meta { grid-column: 2; }
}
@media (max-width: 560px) {
    .topbar__inner span { display: none; }
    .topbar__inner { justify-content: flex-end; }
    .site-footer__grid { grid-template-columns: 1fr; }
    body { font-size: 16px; }
}
