:root {
  --legacy-red: #e2000f;
  --legacy-red-dark: #b30000;
  --legacy-blue: #010e2a;
  --legacy-text: #222;
  --legacy-muted: #777;
  --legacy-bg: #f3f7f9;
  --legacy-line: #f2f2f2;
  --legacy-white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--legacy-text);
  background: var(--legacy-bg);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 400ms, background-color 400ms;
}

a:hover,
a:focus {
  color: var(--legacy-red);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Arial, sans-serif;
  font-weight: 600;
  line-height: 1.25;
}

.wrap {
  width: min(1140px, calc(100% - 30px));
  margin-inline: auto;
}

.skip-link,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  left: 16px;
  top: 16px;
  z-index: 50;
  padding: 10px 14px;
  background: #000;
  color: #fff;
}

.site-header {
  position: relative;
  z-index: 20;
  background: #fff;
  box-shadow: none;
}

.legacy-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  min-height: 128px;
}

.legacy-header__left {
  display: grid;
  gap: 20px;
  align-content: center;
}

.legacy-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  color: var(--legacy-red);
  list-style: none;
  font-size: 14px;
}

.legacy-contact li {
  display: inline-flex;
  align-items: center;
}

.legacy-contact li::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  color: #7f8893;
  font-size: 18px;
  font-weight: 400;
}

.legacy-contact__phone::before { content: "☎"; }
.legacy-contact__mail::before { content: "✉"; }
.legacy-contact__facebook::before { display: none !important; }

.legacy-contact a {
  color: var(--legacy-red);
}

.legacy-logo {
  justify-self: end;
  display: block;
  width: min(260px, 34vw);
}

.legacy-logo img {
  width: 248px;
  max-height: 95px;
  object-fit: contain;
}

.primary-nav ul {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 -15px;
  padding: 0;
  list-style: none;
}

.primary-nav li {
  position: relative;
}

.primary-nav > ul > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 15px;
  color: #3f485d;
  font-size: 16px;
  font-weight: 500;
}

.primary-nav > ul > li:hover > a,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-ancestor > a {
  background: rgba(0, 0, 0, .12);
  color: var(--legacy-red);
}

.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 25;
  display: none;
  width: 240px;
  margin: 0;
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 40px rgba(0, 0, 0, .1);
}

.primary-nav li:hover > .sub-menu {
  display: block;
}

.primary-nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

.primary-nav .sub-menu li {
  border-bottom: 1px solid #f6f6f6;
}

.primary-nav .sub-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  font-size: 14px;
  line-height: 30px;
}

.primary-nav .sub-menu li:hover > a {
  background: #f6f6f6;
  color: var(--legacy-red);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--legacy-blue);
}

.site-main {
  min-height: 62vh;
}

.content-band {
  padding: 50px 0;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--legacy-text);
  font-size: 1.5rem;
}

.home-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .08)),
    url("../img/titelbild-feuerwehr-1.jpg") center / cover no-repeat;
  overflow: hidden;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -76px;
  height: 170px;
  background: rgba(226, 0, 15, .74);
  transform: rotate(-4deg);
  transform-origin: left bottom;
}

.home-hero::after {
  bottom: -116px;
  height: 210px;
  background: linear-gradient(90deg, rgba(171, 21, 32, .92), rgba(226, 0, 15, .92));
  transform: rotate(-1.4deg);
}

.home-hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
}

.home-hero h1 {
  max-width: none;
  margin: -20px 0 0;
  font-size: clamp(2.7rem, 4.3vw, 4.25rem);
  line-height: 1.05;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .28);
}

.home-hero p {
  max-width: 650px;
  margin: 18px 0 0;
  font-size: 18px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  color: #fff;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font-weight: 500;
}

.button--primary {
  background: var(--legacy-red);
}

.button--ghost {
  background: #fff;
  color: #000;
}

.button:hover,
.text-link:hover {
  background: var(--legacy-red);
  color: #fff;
}

.legacy-cta {
  min-height: 220px;
  display: grid;
  align-items: center;
  background: linear-gradient(90deg, #ab1520 0%, var(--legacy-red) 100%);
  color: #fff;
}

.legacy-cta__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.legacy-cta p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.legacy-cta strong {
  color: #fff;
}

.legacy-cta__button {
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  background: #fff;
  color: var(--legacy-blue);
  text-align: center;
  font-weight: 600;
}

.legacy-cta__button span {
  font-size: 1.25em;
  line-height: 1;
  transform: translateY(-1px);
}

.legacy-cta__button:hover,
.legacy-cta__button:focus {
  background: #000;
  color: #fff;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.post-card {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #e7ecef;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e7ecef, #cfd8dd);
}

.post-card__body {
  padding: 25px;
}

.post-card__meta,
.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--legacy-muted);
  font-size: 14px;
}

.badge {
  color: var(--legacy-red);
  font-weight: 600;
}

.post-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
}

.post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover,
.post-card h2 a:focus {
  color: var(--legacy-red);
}

.post-card p,
.post-card__excerpt {
  margin: 0 0 18px;
  color: #444;
}

.post-card__excerpt {
  white-space: normal;
  max-height: 8.7em;
  overflow: hidden;
}

.post-card__excerpt br {
  display: block;
  content: "";
  margin-top: 3px;
}

.post-card__excerpt strong,
.post-card__excerpt b {
  font-weight: 700;
}

.page-child-overview {
  margin-top: 32px;
}

.page-child-overview__grid {
  margin-top: 10px;
}

.article-shell {
  margin-top: 50px;
  margin-bottom: 50px;
  padding: 30px 27px;
  background: #fff;
}

.article-header {
  margin: 0 0 18px;
  background: transparent;
}

.article-header h1 {
  margin: 0;
  padding-bottom: 15px;
  font-size: 1.5rem;
}

.article-header__image {
  margin: 0 auto 24px;
  max-width: 760px;
}

.article-header__image img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.article-content {
  max-width: none;
  padding: 0;
  background: #fff;
}

.article-content::after {
  content: "";
  display: block;
  clear: both;
}

.article-content p {
  margin: 0 0 1rem;
}

.article-content a {
  color: var(--legacy-red);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 10px;
  border: 1px solid var(--legacy-line);
}

.article-content img {
  display: inline-block;
  margin: 4px;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.fwdh-gallery {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 28px 0;
}

.fwdh-gallery__item {
  margin: 0;
  background: #eef2f4;
}

.fwdh-gallery__item a {
  display: block;
}

.fwdh-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
}

.article-content .gallery {
  clear: both;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 28px 0 !important;
}

.article-content .gallery br {
  display: none;
}

.article-content .gallery-item {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left;
}

.article-content .gallery-icon {
  display: block;
}

.article-content .gallery-icon a {
  display: block;
}

.article-content .gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border: 0 !important;
  border-radius: 0;
}

.article-content .gallery-caption {
  margin: 6px 0 0;
  color: var(--legacy-muted);
  font-size: 13px;
  line-height: 1.35;
}

.droppicsgallery {
  margin: 28px 0;
}

.droppicsgallery .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  transform: none !important;
}

.droppicsgallery .swiper-slide,
.droppicsgallery .wimg {
  width: auto !important;
  height: auto !important;
  background: #eef2f4;
}

.droppicsgallery .swiper-slide img,
.droppicsgallery .wimg img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
}

.droppicsgallery .droppicsSwiperPager,
.droppicsgallery .swiper-button-next,
.droppicsgallery .swiper-button-prev {
  display: none !important;
}

.article-content .fwdh-lightbox-trigger {
  cursor: zoom-in;
}

.article-content .fwdh-lightbox-trigger:focus {
  outline: 3px solid var(--legacy-red);
  outline-offset: 3px;
}

.has-lightbox {
  overflow: hidden;
}

.fwdh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px 78px;
  background: rgba(1, 14, 42, .92);
}

.fwdh-lightbox.is-open {
  display: flex;
}

.fwdh-lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: min(1120px, 100%);
  max-height: 100%;
  margin: 0;
}

.fwdh-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

.fwdh-lightbox__caption {
  max-width: 900px;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.fwdh-lightbox__close,
.fwdh-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(255, 255, 255, .92);
  color: var(--legacy-blue);
  cursor: pointer;
  font: inherit;
}

.fwdh-lightbox__close:hover,
.fwdh-lightbox__close:focus,
.fwdh-lightbox__nav:hover,
.fwdh-lightbox__nav:focus {
  background: var(--legacy-red);
  color: #fff;
}

.fwdh-lightbox__close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  font-weight: 700;
}

.fwdh-lightbox__nav {
  top: 50%;
  width: 52px;
  height: 72px;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.fwdh-lightbox__nav--prev {
  left: 18px;
}

.fwdh-lightbox__nav--next {
  right: 18px;
}

.split-band {
  padding: 50px 0;
  background: #fff;
}

.split-band__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-stack {
  display: grid;
  gap: 15px;
}

.info-panel {
  padding: 24px;
  background: var(--legacy-bg);
}

.site-footer {
  background: var(--legacy-blue);
  color: #fff;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

.site-footer a {
  color: #fff;
}

.legacy-news {
  padding: 150px 0 62px;
  background: #fff;
}

.legacy-news .posts-grid {
  gap: 30px;
}

.legacy-news .post-card__body {
  padding: 18px 14px 0;
}

.legacy-news .post-card h2 {
  color: var(--legacy-red);
  font-size: 1.5rem;
}

.legacy-news .post-card h2 a {
  color: var(--legacy-red);
}

.legacy-news .post-card p {
  color: #596174;
}

.legacy-news .post-card .text-link {
  display: inline;
  padding: 0;
  background: transparent;
  color: var(--legacy-red);
  font-weight: 400;
}

.legacy-missions {
  background: #fff;
  overflow: hidden;
}

.legacy-missions__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.legacy-mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
  background: #fff;
}

.legacy-mission--image-first img {
  order: -1;
}

.legacy-mission__text {
  display: flex;
  align-items: center;
  padding: 40px;
}

.legacy-mission h2 {
  margin: 0;
  color: #333;
  font-size: 1.65rem;
}

.legacy-mission img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  filter: grayscale(100%) sepia(12%) hue-rotate(180deg) saturate(120%);
}

.legacy-team {
  position: relative;
  padding: 84px 0 92px;
  background: #fff;
  z-index: 1;
}

.legacy-team__heading {
  margin-bottom: 58px;
  text-align: center;
}

.legacy-team__heading h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #06163a;
  font-size: 2rem;
  font-weight: 300;
}

.legacy-team__heading strong {
  display: block;
  font-weight: 600;
}

.legacy-team__heading h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 60px;
  border-bottom: 3px solid #ff5e14;
  transform: translateX(-50%);
}

.legacy-team__heading h2::before {
  content: "";
  position: absolute;
  left: calc(50% + 38px);
  bottom: -26px;
  width: 17px;
  border-bottom: 3px solid #cacaca;
}

.legacy-team-slider {
  position: relative;
}

.legacy-team-slider__viewport {
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.legacy-team-slider__viewport::-webkit-scrollbar {
  display: none;
}

.legacy-team__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 90px) / 4);
  gap: 30px;
}

.legacy-person {
  scroll-snap-align: start;
  border: 1px solid #f2f2f2;
  background: #fff;
}

.legacy-person img {
  width: 100%;
  aspect-ratio: 3 / 4.5;
  object-fit: cover;
  object-position: top center;
}

.legacy-person__placeholder {
  aspect-ratio: 3 / 4.5;
  background: linear-gradient(135deg, #f1f1f1, #d8dde4);
}

.legacy-person__body {
  position: relative;
  margin: 0;
  padding: 16px 20px 30px;
  background: #fff;
}

.legacy-person h3 {
  margin: 0 0 10px;
  color: #333;
  font-size: 1.45rem;
  line-height: 1.2;
}

.legacy-person__unit {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--legacy-red);
  font-size: .78rem;
  font-weight: 600;
}

.legacy-person p {
  margin: 0;
  color: #999;
  font-size: .95rem;
}

.legacy-person p::after {
  content: "";
  display: block;
  width: 70px;
  margin-top: 22px;
  border-bottom: 1px solid #eee;
}

.legacy-team-slider__controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  transform: translateX(-50%);
}

.legacy-team-slider__arrow {
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(255, 255, 255, .92);
  color: #c7c7c7;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.legacy-team-slider__arrow:hover {
  color: var(--legacy-red);
}

.legacy-team-slider__dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.legacy-team-slider__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  background: #fff;
}

.legacy-team-slider__dots button.is-active {
  border-color: var(--legacy-red);
  background: var(--legacy-red);
}

@media (max-width: 991px) {
  .legacy-header__inner {
    grid-template-columns: 1fr auto;
    min-height: 90px;
  }

  .legacy-contact {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 100%;
    display: none;
    background: #fff;
    box-shadow: 0 15px 60px rgba(0, 0, 0, .12);
    z-index: 50;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    display: block;
    margin: 0;
  }

  .primary-nav > ul > li > a,
  .primary-nav .sub-menu a {
    display: block;
    min-height: 0;
    padding: 12px 16px;
    color: #333;
    line-height: 1.4;
    border-bottom: 1px solid #f2f2f2;
  }

  .primary-nav .sub-menu,
  .primary-nav .sub-menu .sub-menu {
    position: static;
    display: block;
    width: auto;
    padding-left: 15px;
    box-shadow: none;
  }

  .posts-grid,
  .split-band__grid {
    grid-template-columns: 1fr 1fr;
  }

  .legacy-team__track {
    grid-auto-columns: calc((100% - 30px) / 2);
  }

  .legacy-missions__grid,
  .legacy-mission {
    grid-template-columns: 1fr;
  }

  .legacy-mission--image-first img {
    order: 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 24px, 1140px);
  }

  .legacy-logo {
    width: 190px;
  }

  .home-hero {
    min-height: 430px;
  }

  .legacy-mission {
    min-height: 0;
  }

  .legacy-mission__text {
    min-height: 150px;
    padding: 34px 24px;
  }

  .legacy-mission img {
    display: block;
    height: 260px;
    min-height: 0;
  }

  .legacy-team {
    clear: both;
    padding: 62px 0 72px;
  }

  .legacy-team__heading {
    margin-bottom: 46px;
  }

  .posts-grid,
  .split-band__grid {
    grid-template-columns: 1fr;
  }

  .legacy-team__track {
    grid-auto-columns: 100%;
  }

  .legacy-cta__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .article-shell {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 22px 18px;
  }

  .fwdh-lightbox {
    padding: 62px 14px 24px;
  }

  .fwdh-lightbox__image {
    max-height: calc(100vh - 150px);
  }

  .fwdh-lightbox__nav {
    top: auto;
    bottom: 16px;
    width: 48px;
    height: 48px;
    transform: none;
  }
}
