/* ============================================
   FARBVARIABLEN & BASIS
   ============================================ */

:root {
  --maigruen: rgb(100, 216, 0);
  --minze: rgb(0, 172, 168);
  --azur: rgb(0, 158, 255);
  --nachtblau: rgb(0, 92, 255);
  --steingrau: rgb(116, 141, 153);
  --tiefschwarz: rgb(0, 15, 26);
  --bg: #ffffff;
  --card-bg: #fbfdfe;

  --radius: 14px;
  --max-width: 1100px;
  --ff-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: var(--ff-sans);
  color: var(--tiefschwarz);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  line-height: 1.6;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem;
}

section {
  padding: 1.5rem 25px;
}

.inline-flex {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* ============================================
   HEADER & NAVIGATION (Mobile First)
   ============================================ */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--steingrau);
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 6px 18px rgba(14, 20, 26, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Burger */
.burger {
  display: block;
  width: 32px;
  height: 24px;
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--tiefschwarz);
  border-radius: 3px;
  transition: 0.3s ease;
}

.burger span:nth-child(1) {
  top: 0;
}
.burger span:nth-child(2) {
  top: 10px;
}
.burger span:nth-child(3) {
  bottom: 0;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.main-nav {
  position: relative;
}

.nav-list {
  list-style: none;
  position: absolute;
  min-width: 180px;
  top: 60px;
  right: 0;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: 0.3s ease;
}

.nav-list.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

nav a {
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

nav a:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* CTA */
.cta {
  background: linear-gradient(90deg, var(--maigruen), var(--minze));
  color: var(--tiefschwarz);
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  font-weight: 700;
}

.cta:hover {
  box-shadow: 0 8px 20px rgba(100, 216, 0, 0.3);
}

.nav-cta-button {
  display: none;
}

/* ============================================
   HERO (Mobile First)
   ============================================ */

.hero {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

/*.hero-content {
  padding-left: 1.5rem;
}*/

.hero h1 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.hero p.lead {
  color: var(--steingrau);
  margin-bottom: 1.2rem;
}

.hero .actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-aside-text {
  text-align: center;
}

.hero-image {
  width: 100%;
  max-height: 55vh;          /* ⬅️ Mobile: begrenzen */
  object-fit: contain;      /* wichtig bei 9/16 */
  margin: 0 auto;
}

.headding_container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.headding_container img {
  display: none;
}

.secondary-button {
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
}

/* ============================================
   KARTEN & GRIDS
   ============================================ */

.card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(14, 20, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-2-img  {
  width: 100%;
  height: auto;          /* ⬅️ GANZ WICHTIG */
  object-fit: contain;   /* statt cover */
  border-radius: 15px;
  display: block;
}

.grid-2-img img {
  border-radius: 15px;
}

.slideImg {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.slideGrid {
  align-items: stretch;
}


/* ============================================
   SLIDESHOW
   ============================================ */

.slideshow {
  display: grid;
  border-radius: 10px;
  overflow: hidden;
  place-items: center;
}

.slideshow img {
  grid-area: 1 / 1;
  width: 100%;
  height: 45vh;
  object-fit: contain;
  opacity: 0;
  animation: slideShow 18s infinite;
}

.slideshow img:nth-child(1) {
  opacity: 1;
  animation-delay: 0s;
}
.slideshow img:nth-child(2) {
  animation-delay: 3s;
}
.slideshow img:nth-child(3) {
  animation-delay: 6s;
}
.slideshow img:nth-child(4) {
  animation-delay: 9s;
}
.slideshow img:nth-child(5) {
  animation-delay: 12s;
}
.slideshow img:nth-child(6) {
  animation-delay: 15s;
}

@keyframes slideShow {
  0% { opacity: 0; }
  10% { opacity: 1; }
  30% { opacity: 1; }
  40% { opacity: 0; }
  100% { opacity: 0; }
}

/* ============================================
   THEMEN SCROLLER
   ============================================ */

.services {
  position: relative;
}

.topics-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

.topics-scroll .card {
  min-width: 250px;
  max-width: 250px;
  scroll-snap-align: start;
}

.scroll-btn {
  display: none;
}

/* ==============================
   FORM
   ============================== */

.form-group {
  margin-bottom: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================
   KONTAKT
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

input,
textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.muted {
  color: var(--steingrau);
  font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--steingrau);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

/* ============================================
   DESKTOP / TABLET
   ============================================ */

/* Tablets */
@media (min-width: 700px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    min-height: auto;
  }
  .hero-aside-text {
    display: none;
  }
  .hero-image {
    max-height: none;   /* ⬅️ WICHTIG */
    width: 100%;
    height: auto;
  }

  .nav-cta-button {
    display: block;
  }
  .slideshow img {
    height: 100%;
    width: 100%;
  }
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .burger {
    display: none;
  }

  .nav-list {
    position: static;
    flex-direction: row;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    gap: 1rem;
  }

  .hero {
    grid-template-columns: 1fr 420px;
  }

  .hero aside {
  justify-content: flex-end;
}

  /*.hero-image {
    max-height: auto;
  }*/

  .headding_container img {
    display: block;
    width: 50%;
    max-width: 200px;
    padding: 10px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 380px;
  }

  .topics-scroll .card {
    min-width: 300px;
    max-width: 300px;
  }

  .scroll-btn {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .scroll-left {
    left: 0;
  }

  .scroll-right {
    right: 0;
  }
}

/* Larger desktops */

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    height: max-content;
  }

  .hero-image {
    width: 100%;
    max-width: 480px;   /* optional: verhindert „Riesenmensch“ */
    justify-self: end;  /* ⬅️ rechts neben Text */
  }

  .grid-2 {
    grid-template-columns: 35% 65%;
  }
}

/* ============================================
   ACCESSIBILITY & ANIMATION
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--azur);
  outline-offset: 2px;
}

.fade-up {
  transform: translateY(6px);
  opacity: 0;
  animation: up 0.7s ease forwards;
}

@keyframes up {
  to {
    transform: none;
    opacity: 1;
  }
}
