@import url(/assets/fonts/fontawesome/css/all.min.css);
@import url(/assets/fonts/google/googlefonts.css);
@import url(/assets/css_reset.css);

:root {
  --nav-bg: #ffffff;
  --nav-text: #000000;
  --nav-accent: hsl(46, 69%, 44%);
  --nav-accent-hover: hsl(46, 97%, 25%);
  --grau: #ccc;
  --bg-header-footer: rgb(242, 239, 239);
  --container-max-width: 960px;
  --nav-height: 120px;
}
/* --- Basis Setup --- */
html,
body {
  font-family: "Source Serif Pro", serif;
  color: #000000;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;

  display: grid;
  /* header | main | footer */
  grid-template-rows: auto 1fr auto;

  background: #fff url(/media/dominik-lange-VUOiQW4OeLI-unsplash.jpg) top center no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

/* Der Wrapper für den eigentlichen Seiteninhalt */
.wrapper {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* --- Sticky Header --- */
header {
  position: -webkit-sticky; /* Support für Safari */
  position: sticky;
  top: 0;
  padding: 1rem 0 0 0;
  border-bottom: 1rem solid transparent;
  width: 100%;
  /* background-color: var(--bg-header-footer); */
  z-index: 10000;
  background: #fff url(/media/dominik-lange-VUOiQW4OeLI-unsplash.jpg) top center no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

.abstand {
  height: 1rem;
  border-bottom: 0; /* Alten Border entfernen */

  /* Der Verlauf als Hintergrundbild */
  background-image: linear-gradient(to right, transparent, var(--grau) 15%, var(--grau) 85%, transparent);

  /* Die Magie: */
  background-repeat: no-repeat;
  background-size: 100% 1px; /* 100% Breite, aber nur 1px Höhe */
  background-position: bottom; /* Positioniert die 1px-Linie ganz unten im Element */
}

/* --- Navigation Layout --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  max-width: var(--container-max-width);
  margin: 0;
  /* background-color: var(--nav-bg); */
  position: relative;
}

.logo img {
  max-height: var(--nav-height);
  max-width: 250px;
  display: block;
  height: auto;
}

.menu-rechts {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.kontakt {
  align-self: flex-end;
}

.menu-wrapper {
  display: flex;
  align-self: flex-end;
}

.menu ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.menu ul li a {
  color: var(--nav-text);
  text-decoration: none;
  /* font-weight: bold; */
  font-size: 1rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu ul li a:hover,
.menu ul li a.rex-current {
  color: var(--nav-accent);
}

/* Mobile Toggle */
.on-off {
  display: none;
}

.on-off a {
  font-size: 3rem;
  color: var(--nav-text);
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

main {
}

/* --- Content & Extras --- */

/* ! Grid Bildergalerie */

.grid-galerie {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 0 1.5rem 0;
}

.grid-galerie-item {
  border: 0.2rem solid transparent;
  outline: 1px solid #aaa;
  overflow: hidden;
}
.grid-galerie-item > a > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 1s ease;
}

.grid-galerie-item > a > img:hover {
  transform: scale(1.25);
}

.content a,
.footer a {
  color: var(--nav-accent);
}
.content a:hover,
.footer a:hover {
  color: var(--nav-accent-hover);
  transition: color 0.3s ease;
}

a.tel {
  text-decoration: none;
  font: inherit;
  color: var(--nav-text);
  padding-left: 0.5rem;
}
a.tel:hover {
  color: var(--nav-accent);
  transition: color 0.3s ease;
}

b,
strong {
  font-weight: bold;
}

hr {
  max-width: 100%;
  margin: 1rem auto 1rem auto;
  height: 1px;
  border: 0;
  background: var(--grau);
}

h1 {
  font:
    normal 1.8em/1.1em "Source Serif Pro",
    serif;
  text-wrap: balance;
  margin-bottom: 1rem;
}
h2 {
  font:
    normal 1.5em/1.35em "Source Serif Pro",
    serif;
  margin-bottom: 1rem;
}

p {
  font:
    400 1.125em/1.35em "Source Serif Pro",
    serif;
  padding: 0;
  margin: 0 0 1rem 0;
  /* text-wrap: pretty; */
}

p:last-of-type {
  margin-bottom: 0;
}

.content ul {
  list-style-type: disc;
  margin-left: 20px;
  /* margin-bottom: 1rem; */
}
.content ol {
  list-style-type: decimal;
  margin-left: 20px;
  /* margin-bottom: 1rem; */
}
.content ul li,
.content ol li {
  font:
    400 1.125rem/1.35em "Source Serif Pro",
    serif;
  margin-bottom: 0.75rem;
}
/* Den vom CK5 generierten Absatz im Listenpunkt neutralisieren */
.content ul li p,
.content ol li p {
  display: inline; /* Macht den Absatz unschädlich, er verhält sich wie Text */
  font-size: inherit; /* Erbt die 1.125rem vom li */
  line-height: inherit;
  margin: 0; /* Entfernt das margin-left:0px vom Editor */
  padding: 0;
}

.content ul li:last-child,
.content ol li:last-child {
  margin-bottom: 0;
}

figure img {
  border: 3px solid var(--grau);
  box-shadow: -1px 4px 27px -11px rgba(0, 0, 0, 0.52);
}

/* --- Tabellen Styling --- */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #000;
  color: #fff;
}

thead th {
  text-align: left;
  padding: 1rem;
  background-color: #111;
  color: var(--nav-text);
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: bold;
  border-bottom: 1px solid #6d6d6d;
}

tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #222;
  vertical-align: middle;
}

tbody tr:hover {
  background-color: #111;
}

table td a {
  color: #fff;
  transition: color 0.3s;
}

table td a:hover {
  color: var(--nav-accent);
}

/* --- Footer --- */

.footer {
  background-color: var(--bg-header-footer);
  padding: 1rem;
  border-top: 1px solid var(--grau);
}
.footer p {
  font-size: 1em;
  margin-bottom: 0.5rem;
}
.footer p:last-of-type {
  margin-bottom: 0;
}
.footer-hr {
  max-width: 70%;
  margin: 0 auto 1rem auto;
  height: 1px;
  border: 0;
  background: linear-gradient(to right, transparent, var(--nav-accent) 20%, var(--nav-accent) 80%, transparent);
}
.footer ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.footer ul li a {
  color: var(--nav-text);
  text-decoration: none;
  /* font-weight: bold; */
  font-size: 0.8em;
  transition: color 0.3s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer ul li a:hover,
.footer ul li a.rex-current {
  color: var(--nav-accent);
}

/* --- Responsive Rules (Mobile) --- */
@media screen and (max-width: 700px) {
  nav {
    align-items: flex-start;
    height: auto;
  }
  .kontakt {
    display: none;
  }

  .logo img {
    /* max-height: 60px; */
  }

  .on-off {
    display: block;
    margin-top: -10px;
  }

  .menu-wrapper {
    padding-bottom: 0;
    align-self: flex-start;
  }

  .menu {
    /* display: none; ENTFERNEN - Verhindert die Animation */
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    width: 100%;
    background-color: var(--bg-header-footer);
    z-index: 9999;

    /* Animation-Setup */
    overflow: hidden;
    visibility: hidden; /* Element ist für Screenreader/Maus weg */
    max-height: 0; /* Startwert für Höhe */
    opacity: 0; /* Startwert für Sichtbarkeit */

    transition:
      max-height 0.4s ease-in-out,
      opacity 0.3s ease,
      visibility 0.4s;
  }

  /* Diese Klasse wird per JS getoggled */
  .menu.is-open {
    /* display: block; NICHT NÖTIG */
    visibility: visible;
    min-height: 100vh; /* Muss höher sein als der Inhalt */
    opacity: 1;
  }

  .menu ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0 0 1rem 0;
  }

  .menu ul li {
    width: 100%;
    text-align: center;
  }

  .menu ul li a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--grau);
  }

  h1 {
    font-size: 1.5em;
  }
  h2 {
    font-size: 1.1em;
  }
  p,
  ul,
  li {
    font-size: 1em !important;
  }
  .footer p {
    font-size: 0.8em !important;
  }
  .footer-navi ul li a {
    font-size: 0.7em !important;
  }
}

/* --- Responsive Tabelle --- */
@media screen and (max-width: 600px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none; /* Kopfzeile verstecken */
  }

  tr {
    margin-bottom: 1.5rem;
    border: 1px solid #333;
    background: #080808;
  }

  td {
    border: none;
    border-bottom: 1px solid #111;
    position: relative;
    padding: 12px 15px 12px 40%; /* Padding links für Label Platz */
    text-align: left; /* Text linksbündig für bessere Lesbarkeit */
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  td:last-child {
    border-bottom: none;
  }

  /* Label-Generierung */
  td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    width: 35%;
    font-weight: bold;
    color: var(--nav-accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

/* --- Universal-Grid --- */

.gt-universal-grid {
  width: 100%;
  clear: both;
  margin-bottom: 1rem;
}
.gt-wrapper {
  display: block;
}
.gt-column {
  width: 100%;
  margin-bottom: 1rem;
}

/* Bild-Fix: Zwingt Bilder in die Spalte */
.gt-column img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}
.gt-column figure {
  width: 100% !important;
  margin: 0 !important;
}

@media (min-width: 600px) {
  .gt-wrapper {
    display: grid !important;
    gap: 1.5rem;
    margin-bottom: 0;
  }
  .gt-column {
    margin-bottom: 0;
    min-width: 0;
  }

  .gt-1 .gt-wrapper {
    grid-template-columns: 1fr !important;
  }
  .gt-2 .gt-wrapper {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .gt-3 .gt-wrapper {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .gt-4 .gt-wrapper {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .gt-5 .gt-wrapper {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  .gt-6 .gt-wrapper {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .gt-7 .gt-wrapper {
    grid-template-columns: 80% 1fr !important;
  }
  .gt-8 .gt-wrapper {
    grid-template-columns: 20% 1fr !important;
  }
  .gt-9 .gt-wrapper {
    grid-template-columns: 70% 1fr !important;
  }
  .gt-10 .gt-wrapper {
    grid-template-columns: 30% 1fr !important;
  }
  .gt-11 .gt-wrapper {
    grid-template-columns: 60% 1fr !important;
  }
  .gt-12 .gt-wrapper {
    grid-template-columns: 40% 1fr !important;
  }
  .gt-13 .gt-wrapper {
    grid-template-columns: 25% 1fr 25% !important;
  }
  .gt-14 .gt-wrapper {
    grid-template-columns: 1fr 25% 25% !important;
  }
  .gt-15 .gt-wrapper {
    grid-template-columns: 25% 25% 1fr !important;
  }
  .gt-16 .gt-wrapper {
    grid-template-columns: 16.66% 1fr 16.66% !important;
  }
  .gt-17 .gt-wrapper {
    grid-template-columns: 1fr 16.66% 16.66% !important;
  }
  .gt-18 .gt-wrapper {
    grid-template-columns: 16.66% 16.66% 1fr !important;
  }
}
