/* ==========================================================================
   gatebiz.biz — statischer Nachbau der Alt-Seite (Strato-CMS, Stand 2017)
   Optik bewusst nah am Original, aber responsiv, barrierearm, ohne jQuery.
   ========================================================================== */

:root {
  --c-brand: #118082;
  --c-brand-dark: #0c5f61;
  --c-page: #d7d6d7;
  --c-surface: #ffffff;
  --c-text: #444c52;
  --c-heading: #666666;
  --c-muted: #83888e;
  --c-line: #e3e4e5;
  --c-line-strong: #c7c9cb;
  --font: Arial, Helvetica, sans-serif;
  --w-site: 910px;
  --w-side: 256px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--c-brand);
}

:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  padding: 8px 14px;
  background: var(--c-surface);
  color: var(--c-brand);
  font-weight: bold;
}

.skip-link:focus {
  top: 8px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  max-width: var(--w-site);
  margin: 0 auto;
  background: var(--c-surface);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.site-header__logo {
  display: block;
  width: 160px;
}

.nav-toggle {
  display: none;
  padding: 8px 14px;
  border: 1px solid var(--c-line-strong);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit;
  cursor: pointer;
}

.has-js .nav-toggle {
  display: inline-block;
}

/* Hauptnavigation — mobil als Liste */
.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav {
  border-top: 1px solid var(--c-line);
}

.has-js .nav:not(.is-open) {
  display: none;
}

.nav a {
  display: block;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-text);
  text-decoration: none;
}

.nav ul ul a {
  padding-left: 32px;
  color: var(--c-muted);
}

.nav ul ul ul a {
  padding-left: 48px;
}

.nav a:hover,
.nav [aria-current="page"],
.nav .is-trail > a {
  color: var(--c-brand);
}

@media (min-width: 860px) {
  .site-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-right: 10px;
  }

  .site-header__bar {
    padding: 20px 30px 0;
    align-items: flex-end;
  }

  .site-header__logo {
    width: 194px;
    margin-bottom: 18px;
  }

  .has-js .nav-toggle {
    display: none;
  }

  .nav,
  .has-js .nav:not(.is-open) {
    display: block;
    border: 0;
  }

  .nav > ul {
    display: flex;
    gap: 0 30px;
  }

  .nav li {
    position: relative;
  }

  .nav > ul > li > a {
    padding: 0 0 10px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .nav > ul > li > a:hover,
  .nav > ul > li > a[aria-current="page"],
  .nav > ul > li.is-trail > a {
    border-bottom-color: var(--c-brand);
  }

  /* Dropdown (2. Ebene), 3. Ebene nur in der Seitennavigation */
  .nav ul ul {
    display: none;
    position: absolute;
    left: -13px;
    top: 100%;
    z-index: 150;
    min-width: 220px;
    padding: 10px 13px;
    background: var(--c-surface);
    box-shadow: 0 6px 16px rgb(0 0 0 / 0.12);
  }

  .nav li:hover > ul,
  .nav li:focus-within > ul {
    display: block;
  }

  .nav ul ul ul,
  .nav li:hover > ul ul,
  .nav li:focus-within > ul ul {
    display: none;
  }

  .nav ul ul a {
    padding: 3px 0;
    border: 0;
    white-space: nowrap;
  }

  .nav ul ul a:hover,
  .nav ul ul [aria-current="page"] {
    color: var(--c-brand);
  }
}

/* --------------------------------------------------------------------------
   Kopfbild / Slider
   -------------------------------------------------------------------------- */

.hero {
  background: var(--c-brand);
}

.hero__inner {
  position: relative;
  max-width: var(--w-site);
  margin: 0 auto;
}

.hero__image {
  display: block;
  width: 100%;
  aspect-ratio: 910 / 322;
  object-fit: cover;
}

.hero__border {
  position: absolute;
  right: 6.6%;
  bottom: 0;
  width: 70%;
  height: 9px;
  background: var(--c-brand);
}

.slider {
  position: relative;
}

.slider__track {
  position: relative;
  aspect-ratio: 910 / 322;
  overflow: hidden;
}

.slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s;
}

.slider__slide.is-active {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .slider__slide {
    transition: none;
  }
}

.slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 36px;
  height: 48px;
  margin-top: -24px;
  border: 0;
  background: rgb(0 0 0 / 0.25);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.slider__arrow:hover {
  background: rgb(0 0 0 / 0.45);
}

.slider__arrow--prev {
  left: 0;
}
.slider__arrow--next {
  right: 0;
}

@media (min-width: 1040px) {
  .slider__arrow {
    background: transparent;
    font-size: 34px;
  }

  .slider__arrow:hover {
    background: transparent;
    color: var(--c-page);
  }

  .slider__arrow--prev {
    left: -60px;
  }
  .slider__arrow--next {
    right: -60px;
  }
}

.slider__dots {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 8px 20px;
  background: var(--c-surface);
  list-style: none;
}

.slider__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--c-muted);
  border-radius: 50%;
  background: var(--c-surface);
  color: var(--c-muted);
  font: 12px/22px var(--font);
  text-align: center;
  cursor: pointer;
}

.slider__dot[aria-current="true"] {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* --------------------------------------------------------------------------
   Inhaltsbereich
   -------------------------------------------------------------------------- */

.page {
  max-width: var(--w-site);
  margin: 0 auto;
  background: var(--c-surface);
}

.layout {
  display: flex;
  flex-direction: column;
}

.layout__side {
  order: 2;
  padding: 0 16px 24px;
}

.layout__main {
  order: 1;
  min-width: 0;
}

.section-title {
  margin: 0;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--c-line-strong);
  color: var(--c-text);
  font-size: 16px;
  font-weight: normal;
  text-align: center;
}

.subnav {
  margin-top: 10px;
  padding: 0 7px 17px;
  border: 1px solid var(--c-line);
}

.subnav ul {
  margin: 0;
  padding: 12px 7px 0;
  list-style: none;
}

.subnav ul ul {
  padding: 0 0 0 20px;
}

.subnav a {
  display: block;
  border-bottom: 1px dotted var(--c-muted);
  color: var(--c-text);
  line-height: 3;
  text-decoration: none;
}

.subnav a:hover,
.subnav [aria-current="page"] {
  border-bottom: 1px solid var(--c-brand);
  color: var(--c-brand);
}

@media (min-width: 860px) {
  .layout {
    flex-direction: row;
    padding: 0 14px;
  }

  .layout__side {
    order: 1;
    flex: 0 0 var(--w-side);
    padding: 0;
  }

  .layout__side .section-title {
    height: 42px;
    padding: 0;
    line-height: 42px;
  }

  .layout__main {
    order: 2;
    flex: 1 1 auto;
  }

  .layout--with-side .layout__main {
    margin-left: 14px;
  }

  .layout--spacer .layout__main {
    margin-left: 270px;
  }

  .layout--spacer .layout__main::before,
  .layout--with-side .layout__main::before {
    content: "";
    display: block;
    height: 42px;
    border-bottom: 1px solid var(--c-line-strong);
  }
}

.content {
  padding: 10px 16px 1px;
}

@media (min-width: 860px) {
  .content {
    padding: 10px 20px 1px;
  }
}

.content__head {
  margin: 10px 0 24px;
}

.content h1 {
  margin: 0 0 5px;
  color: var(--c-brand);
  font-size: 24px;
  font-weight: normal;
  line-height: 1.25;
}

.content h2 {
  margin: 0;
  color: var(--c-heading);
  font-size: 20px;
  line-height: 1.3;
}

.content h3 {
  margin: 24px 0 4px;
  color: var(--c-heading);
  font-size: 16px;
  line-height: 1.5;
}

.content h4 {
  margin: 0;
  color: var(--c-brand);
  font-size: 14px;
  line-height: 1.6;
}

.content p,
.content ul,
.content ol,
.content address {
  margin: 0 0 22px;
}

.content address {
  font-style: normal;
}

.content ul {
  padding-left: 26px;
  list-style: none;
}

.content li {
  position: relative;
  padding-left: 16px;
}

.content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--c-brand);
}

.content a {
  color: var(--c-brand);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.content .legal h2 {
  margin: 32px 0 8px;
  font-size: 18px;
}

.content .legal h3 {
  margin-top: 18px;
}

/* Text mit Bild (gerahmt, wie im Original) */
.media {
  display: flow-root;
  margin-bottom: 20px;
}

.media__figure {
  margin: 0 0 20px;
}

.media__figure img {
  display: block;
  padding: 20px;
  border: 1px solid var(--c-line);
}

.media__figure img + img {
  margin-top: 20px;
}

/* Startseite: Bild links, Text als eigene Spalte (wie im Original) */
@media (min-width: 600px) {
  .media--columns {
    display: grid;
    grid-template-columns: 222px 1fr;
    gap: 0 40px;
    align-items: start;
  }

  .media--columns .media__figure {
    float: none;
    margin: 0;
  }
}

@media (min-width: 600px) {
  .media__figure--left {
    float: left;
    margin-right: 40px;
  }

  .media__figure--right {
    float: right;
    margin-left: 40px;
  }
}

.link-list {
  padding-left: 0 !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 36px 14px 25px;
  background: var(--c-surface);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 45px;
  padding: 8px 20px;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #5d6469;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--c-brand);
  text-decoration: underline;
}
