/* =====================================================
   БЛОК 0 — ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ
===================================================== */

:root {
  --mint: #2fc2a9;
  --bg-light: #ffffff;
  --bg-dark: #0e0e0e;
  --text-light: #ffffff;
  --text-dark: #111111;
  --muted: #777777;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  transition: background 0.3s, color 0.3s;
}

/* темы */
body.theme-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

body.theme-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none;
}

/* =====================================================
   БЛОК 1 — HERO (ГЛАВНЫЙ ЭКРАН)
===================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  background: url("images/hero-light.jpg") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

body.theme-dark .hero {
  background-image: url("images/hero-dark.jpg");
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* header внутри hero */
.hero-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* логотип */
.logo {
  font-size: 26px;
  font-weight: 700;
  color: inherit;
}

.logo span {
  color: var(--mint);
}

/* =====================================================
   БЛОК 2 — HERO CONTENT
===================================================== */

.hero-content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-bottom: clamp(20px, 5vh, 56px);
}

.hero-text {
  max-width: 560px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-text h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.15;
}

.hero-text p {
  font-size: clamp(15px, 2.2vw, 18px);
}

/* =====================================================
   БЛОК 3 — CTA КНОПКИ
===================================================== */

.cta,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--mint);
  color: #000;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover,
.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   БЛОК 4 — УСЛУГИ
===================================================== */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  padding: 80px 24px;
}

.service-card {
  text-align: center;
}

.service-card img {
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* =====================================================
   БЛОК 5 — НАВИГАЦИОННЫЕ КНОПКИ
===================================================== */

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 40px 20px 80px;
  flex-wrap: wrap;
}

/* =====================================================
   БЛОК 6 — СОЦСЕТИ
===================================================== */

.socials {
  text-align: center;
  padding: 48px 20px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-icons img {
  width: 28px;
  height: 28px;
}

body.theme-dark .social-icons img {
  filter: invert(1);
}

/* =====================================================
   БЛОК 7 — FOOTER
===================================================== */

.footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 28px 20px;
  text-align: center;
}

body.theme-dark .footer {
  border-color: rgba(255, 255, 255, 0.1);
}

.copy {
  font-size: 14px;
  color: var(--muted);

}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 36px;
  /* было мало — теперь нормально */
  margin-bottom: 10px;
}

/* =====================================================
   БЛОК 8 — GOOGLE MAPS
===================================================== */

.map {
  padding: 48px 20px;
  text-align: center;
}

.map h2 {
  margin-bottom: 24px;
}

.map-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.map-link {
  margin-top: 16px;
}

.map-link a {
  color: var(--mint);
  font-weight: 500;
}

/* =====================================================
   БЛОК 9 — FADE-IN
===================================================== */

.fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   БЛОК 10 — АДАПТИВ
===================================================== */

@media (min-width: 769px) {
  .hero-content {
    align-items: flex-start;
  }
  .hero-text {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .hero-content {
    align-items: center;
  }
  .hero-text {
    text-align: center;
  }
  .cta,
  .action-btn {
    min-width: 100%;
  }
}

/* =====================================================
   БЛОК 11 — CONTROL-БЛОК
   РАСПОЛОЖЕН ТОЛЬКО В HEADER
===================================================== */

.hero-header {
  position: relative;
}

#ui-controls {
  position: absolute;
  top: 12px;
  right: 12px;

  width: 96px;
  height: 96px;

  display: grid;
  grid-template-columns: 48px 48px;
  grid-template-rows: 48px 48px;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 20px;

  overflow: hidden;
  z-index: 10;
}

/* левая колонка — тема */
#theme-slider {
  grid-row: 1 / span 2;
  position: relative;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

#theme-thumb {
  position: absolute;
  left: 4px;
  width: 40px;
  height: 40px;
  background: var(--mint);
  border-radius: 14px;
  transition: top 0.25s ease;
}

body.theme-light #theme-thumb {
  top: 4px;
}
body.theme-dark #theme-thumb {
  top: 52px;
}

#theme-slider .icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  opacity: 0.85;
  pointer-events: none;
}

#theme-slider .icon.top {
  top: 16px;
}
#theme-slider .icon.bottom {
  bottom: 16px;
}

/* правая колонка — язык */
#ui-controls .lang-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#ui-controls .lang-btn.active {
  background: var(--mint);
  color: #000;
}

/* =====================================================
   БЛОК 12 — CAROUSEL ARBEITEN
   ВАРИАНТ A — БЕЗ ПУСТОГО МЕСТА
===================================================== */

.works-carousel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 24px;
  cursor: grab;
  user-select: none;
  transition: transform 0.35s ease;
  will-change: transform;
  padding-left: 0;
  /* КЛЮЧЕВО */
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-item {
  flex: 0 0 320px;
  max-width: 320px;
}

.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

/* МОБИЛА */
@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 75%;
    max-width: 75%;
  }

  .carousel-track {
    padding-left: 20px;
  }
}

/* =====================================================
   БЛОК 13 — LIGHTBOX + ПОДПИСИ (ARBEITEN)
   СТРЕЛКИ + КЛАВИАТУРА + SWIPE
===================================================== */

.carousel-item {
  text-align: center;
}

.carousel-item figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- LIGHTBOX ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.lightbox.hidden {
  display: none;
}

.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 20px;
  user-select: none;
}

.lightbox-caption {
  margin-top: 12px;
  color: #fff;
  font-size: 15px;
}

/* ---------- КНОПКА ЗАКРЫТИЯ ---------- */

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* ---------- СТРЕЛКИ ---------- */

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.lightbox-arrow.prev {
  left: -60px;
}

.lightbox-arrow.next {
  right: -60px;
}

/* мобила — стрелки ближе */
@media (max-width: 768px) {
  .lightbox-arrow.prev {
    left: -20px;
  }
  .lightbox-arrow.next {
    right: -20px;
  }
}

/* =====================================================
   БЛОК 14 — BACK NAVIGATION
   ССЫЛКА "НАЗАД / ZURÜCK" ПЕРЕД ФУТЕРОМ
===================================================== */

.back-nav {
  display: flex;
  justify-content: center;
  margin: 32px 0 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 15px;
  font-weight: 600;

  color: var(--mint);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}


/* =====================================================
   БЛОК 15 — LEGAL PAGE (IMPRESSUM / DATENSCHUTZ)
===================================================== */

.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px;
}

/* заголовки */
.legal-page h1,
.legal-page h2 {
  margin-bottom: 16px;
}

/* текст */
.legal-page p,
.legal-page li {
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ---- ССЫЛКА "ZURÜCK ZUR STARTSEITE" ---- */
/* именно она сейчас у тебя слева */

.legal-page a {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin: 32px auto 0;
  /* ЦЕНТРИРОВАНИЕ */
  text-align: center;

  font-size: 15px;
  font-weight: 600;
  color: var(--mint);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}