/* ==========================================================================
   GECOS GmbH – style.css
   Mobile-first, keine externen Abhängigkeiten
   Zieldesign: default.htm / default.css
   ========================================================================== */

/* --- Fonts (lokal) ------------------------------------------------------ */

@font-face {
  font-display: swap;
  font-family: 'Sulphur Point';
  font-style: normal;
  font-weight: 400;
  src: url('files/fonts/sulphur-point-v16-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  src: url('files/fonts/chakra-petch-v13-latin-regular.woff2') format('woff2');
}

/* --- Farben ------------------------------------------------------------- */

:root {
  --hauptfarbe:      #7bbcb8;
  --hellblau:        #d3f3f1;
  --schattenblau:    #70ada9;
  --dunkelblau:      #609490;
  --transparentblau: rgba(112, 173, 169, 0.6);
  --schrift:         #3a3a3a;
  --weiss:           #ffffff;

  --navi-hoehe: 76px; /* Platzhalter für fixierte Navigation (mobil) */
}

/* --- Basis --------------------------------------------------------------- */

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

html {
  scroll-padding-top: calc(var(--navi-hoehe) + 10px);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Sulphur Point', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--schrift);
  background: var(--weiss);
  padding-top: var(--navi-hoehe); /* Ausgleich fixierte Navigation */
}

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

h1,
h2,
h3 {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 400;
  margin: 0 0 30px 0;
}

h1 {
  color: var(--hauptfarbe);
  font-size: clamp(2rem, 6vw, 3.4375rem); /* bis 55px */
  line-height: 1.15;
}

h2 {
  font-family: 'Sulphur Point', sans-serif;
  font-size: clamp(2rem, 5vw, 2.8125rem); /* bis 45px */
  color: var(--weiss);
  text-shadow:
    -1px -1px 0 var(--schattenblau),
     0   -1px 0 var(--schattenblau),
     1px -1px 0 var(--schattenblau),
    -1px  0   0 var(--schattenblau),
     1px  0   0 var(--schattenblau),
    -1px  1px 0 var(--schattenblau),
     0    1px 0 var(--schattenblau),
     1px  1px 0 var(--schattenblau);
}

h3 {
  color: var(--hauptfarbe);
}

p {
  margin: 0 0 20px 0;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--dunkelblau);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--dunkelblau);
  outline-offset: 2px;
}

.rahmen {
  width: 90%;
  margin: 0 auto;
}

.highlight {
  font-family: 'Chakra Petch', sans-serif;
  color: var(--schattenblau);
  font-size: 1.125rem;
  margin-bottom: 20px;
}

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

/* --- Navigation (fixiert oben) ------------------------------------------ */

.navizeile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--weiss);
  border-bottom: 2px solid var(--schattenblau);
  z-index: 50;
}

.funktionen {
  display: none; /* mobil ausgeblendet, Desktop sichtbar */
}

.funktionen ul {
  display: flex;
  justify-content: flex-end;
  gap: 25px;
  padding: 8px 0;
}

.funktionen a {
  color: var(--schattenblau);
}

.navigation .rahmen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.logo {
  display: inline-block;
  flex-shrink: 1;
  min-width: 0;
}

.logo img {
  width: auto;
  max-height: 44px;
}

/* Hamburger-Button (mobil) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: none;
  border: 2px solid var(--schattenblau);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-balken,
.nav-toggle-balken::before,
.nav-toggle-balken::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--schattenblau);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-balken::before,
.nav-toggle-balken::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-balken::before { top: -7px; }
.nav-toggle-balken::after  { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-balken {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-balken::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-balken::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hauptmenü: mobil als Drawer unter der Navizeile */
.hnavi {
  display: none;
  position: fixed;
  top: var(--navi-hoehe);
  left: 0;
  width: 100%;
  max-height: calc(100vh - var(--navi-hoehe));
  overflow-y: auto;
  background: var(--weiss);
  border-bottom: 2px solid var(--schattenblau);
  padding: 10px 5%;
}

.hnavi.offen {
  display: block;
}

.hnavi > li {
  border-bottom: 1px solid var(--hellblau);
}

.hnavi > li:last-child {
  border-bottom: none;
}

.hnavi a {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.25rem;
  color: var(--schattenblau);
  display: block;
  padding: 14px 8px;
}

.hnavi .act > a {
  color: var(--dunkelblau);
  font-weight: bold;
}

/* Untermenü „Beratungen" */
.hat-unavi {
  position: relative;
}

.hat-unavi > a {
  padding-right: 56px; /* Platz für Schalter */
}

.unavi-schalter {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--schattenblau);
  border-radius: 4px;
  cursor: pointer;
}

.unavi-schalter::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto;
  border-right: 2px solid var(--schattenblau);
  border-bottom: 2px solid var(--schattenblau);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.unavi-schalter[aria-expanded="true"]::before {
  transform: translateY(2px) rotate(225deg);
}

.unavi {
  display: none;
  padding-left: 20px;
}

.unavi.offen {
  display: block;
}

.unavi a {
  font-size: 1.0625rem;
  padding: 10px 8px;
}

/* --- Headerbereich (Hero, statisch) -------------------------------------- */

.headerbereich {
  position: relative;
  max-height: 80vh;
  overflow: hidden;
}

.headerbild img {
  width: 100%;
  min-height: 320px;
  object-fit: cover;
}

.headerbereich::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(0, 0, 0, 0) 65%,
    rgba(0, 0, 0, 1) 100%);
  pointer-events: none;
}

.headertext {
  position: absolute;
  bottom: 40px;
  left: 5%;
  z-index: 2;
}

.headertext h1 {
  color: var(--weiss);
  margin: 0;
}

.headertext h1 strong {
  position: relative;
  font-weight: 400;
}

.headertext h1 strong::before {
  content: '';
  position: absolute;
  top: 0;
  right: -20px;
  bottom: 0;
  left: -100px;
  background: var(--transparentblau);
  z-index: -1;
}

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

.frame {
  padding: 50px 0;
}

#inhaltsbereich .rahmen {
  max-width: 1200px;
}

/* Spalten: mobil untereinander, Desktop nebeneinander */
.spalten {
  display: grid;
  gap: 30px;
}

/* Hintergründe */
.bg-hellblau {
  background: var(--hellblau);
}

.bg-dunkel {
  background: var(--dunkelblau);
}

.bg-bild {
  background: url('files/bg-img.jpg') center / cover no-repeat;
}

/* Dekorative Ecken (Sektionstrennung) */
.ecke-oben,
.ecke-unten {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.ecke-oben::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 28vw 100vw 0 0;
  border-color: var(--hellblau) transparent transparent transparent;
  z-index: -1;
}

.bg-hellblau.ecke-oben::before {
  border-color: var(--weiss) transparent transparent transparent;
}

.ecke-unten::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 28vw 100vw 0 0;
  border-color: transparent var(--hellblau) transparent transparent;
  z-index: -1;
}

/* Icon-Liste (Leistungsfelder) */
.icons {
  display: grid;
  grid-template-columns: repeat(4, 170px);
  gap: 20px;
  justify-content: center; /* flexibler Rand links/rechts */
}

.icons li {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: clamp(120px, 36vw, 170px);
  padding: 20px;
  text-align: center;
  border: 1px solid var(--weiss);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.2s ease;
  color: var(--weiss);
  font-size: 1.125rem;
}

.icons li:hover,
.icons li:focus-within {
  background: rgba(0, 0, 0, 0.4);
}

.icons a {
  color: var(--weiss);
  font-size: 1.125rem;
}

.icons a:hover {
  text-decoration: none;
}

/* Partnerlogos (Netzwerk) */
.partnerlogos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.partnerlogos li {
  aspect-ratio: 1 / 1;
  width: clamp(140px, 40vw, 230px);
  border: 1px solid var(--hauptfarbe);
  border-radius: 50%;
  overflow: hidden;
  background: var(--weiss);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partnerlogos img {
  width: 100%;
  filter: grayscale(1);
}

.liste ul {
  padding: 8px 0 8px 20px;
}

/* Inhaltslisten mit Icon */
.liste li,
.gecos-liste > li {
  padding: 0 0 0 35px;
  background: url('files/li-before.png') left 0.25em no-repeat;
  margin-bottom: 8px;
}

/* GECOS-Buchstabenliste */
.gecos-liste > li {
  margin-bottom: 16px;
}

.gecos-liste strong {
  font-family: 'Chakra Petch', sans-serif;
  color: var(--dunkelblau);
}

.gecos-liste ul {
  padding: 4px 0 0 20px;
}

.text-center {
  text-align: center;
}

.bg-bild h3, .bg-bild h3 a {
  color: var(--weiss);
}

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

#footer {
  background: var(--hauptfarbe);
  color: var(--weiss);
}

#footer a {
  color: var(--weiss);
}

#footer h3 {
  color: var(--weiss);
  margin-bottom: 10px;
}

#footer .frame:first-child {
  padding: 30px 0;
}

#footer .ecke-unten::before {
  border-color: transparent var(--schattenblau) transparent transparent;
  border-width: 20vw 75vw 0 0;
}

.quicklinks {
  margin-top: 20px;
}

.quicklinks li {
  display: inline-block;
  margin-right: 20px;
}

.quicklinks li:last-child {
  margin-right: 0;
}

.funktionen-unten {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

.funktionen-unten a {
  color: var(--weiss);
}

/* --- Desktop -------------------------------------------------------------- */

@media (min-width: 900px) {
  :root {
    --navi-hoehe: 132px;
  }

  /* Funktionszeile sichtbar */
  .funktionen {
    display: block;
  }

  /* Hamburger ausblenden, Menü horizontal */
  .nav-toggle {
    display: none;
  }

  .logo img {
    max-height: 66px;
  }

  .hnavi {
    display: flex;
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    background: none;
    border: none;
    padding: 0;
    border-top: 2px solid var(--schattenblau);
  }

  .hnavi > li {
    border-bottom: none;
    margin-right: 5px;
  }

  .hnavi > li:last-child {
    margin-right: 0;
  }

  .hnavi a {
    padding: 10px;
  }

  .hnavi > li:last-child > a {
    padding-right: 0;
  }

  /* Untermenü als Dropdown via Hover/Focus */
  .unavi-schalter {
    display: none;
  }

  .hat-unavi > a {
    padding-right: 20px;
  }

  .unavi {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--weiss);
    border: 2px solid var(--schattenblau);
    border-top: none;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  .hat-unavi:hover .unavi,
  .hat-unavi:focus-within .unavi,
  .unavi.offen {
    opacity: 1;
    visibility: visible;
  }

  .unavi a {
    padding: 12px 20px;
  }

  .unavi a:hover {
    background: var(--hellblau);
    text-decoration: none;
  }

  /* Hero-Text höher positionieren */
  .headertext {
    bottom: 100px;
  }

  /* Spalten nebeneinander */
  .spalten.zwei {
    grid-template-columns: 1fr 1fr;
    gap: 4%;
  }

  .spalten.drei {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4%;
  }

  /* Ecken in Originalgröße */
  .ecke-oben::before,
  .ecke-unten::before {
    border-width: 400px 1400px 0 0;
  }

  #footer .ecke-unten::before {
    border-width: 250px 1000px 0 0;
  }

  /* Footer-Quicklinks rechtsbündig */
  .quicklinks {
    text-align: right;
    margin-top: 0;
  }
}

@media (max-width: 1100px) {
  .logo img {
    width: 200px;
  }
}

@media (max-width: 970px) {
  .logo img {
    width: 150px;
  }

  .icons {
    grid-template-columns: repeat(3, 170px);
  }
}

@media (max-width: 650px) {
  .icons {
    grid-template-columns: repeat(2, 170px);
  }
}

@media (max-width: 480px) {
  .icons {
    grid-template-columns: repeat(1, 200px);
  }

  .icons li {
    width: 200px;
  }
}

/* --- Reduzierte Bewegung --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
