﻿/* =========================================================
   KARDHAM Germany – Stylesheet
   Farben & Größen zentral als Variablen
   ========================================================= */
:root {
  --red: #e8453c;
  --red-soft: #ea5a52;
  --grey-dark: #55575a;
  --grey: #6a6b6e;
  --grey-light: #f2f2f2;
  --white: #fff;
  --text: #333;

  /* Hinweis: "Open Sans" für DSGVO-Konformität lokal einbinden (@font-face) */
  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Feedback: Schrift größer, vor allem auf dem Desktop */
  --fs-base: clamp(0.95rem, 0.88rem + 0.3vw, 1.125rem);
  --fs-small: clamp(0.85rem, 0.8rem + 0.15vw, 0.95rem);
  --fs-h-service: clamp(1.05rem, 0.9rem + 0.7vw, 1.5rem);
  --fs-section: clamp(0.9rem, 0.8rem + 0.4vw, 1.15rem);

  /* Feedback: mehr Breite, größere Abstände */
  --container: 1320px;
  --gutter: clamp(16px, 3vw, 40px);
  --section-pad: clamp(2.5rem, 6vw, 5.5rem);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--red);
  padding: 8px 14px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.services :focus-visible,
.references :focus-visible { outline-color: var(--red); }

/* ================= HEADER ================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--red);
  color: var(--white);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.18); }

/* Feedback (Curved Monitor): Logo und Navigation bündig nach außen,
   nicht auf die Inhaltsbreite begrenzt */
.site-header__inner {
  max-width: none;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.site-header__logo img { width: 50px; height: 50px; }

.main-nav ul {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}
.main-nav a {
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .92;
  position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: center; /* Linie wächst aus der Mitte */
  transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav a[aria-current="true"]::after { transform: scaleX(1); }
.main-nav__lang { display: flex; gap: .35rem; font-size: .85rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--white);
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ================= HERO ================= */
.hero { background: var(--red); color: var(--white); }

/* Drei Spalten: Logo | Linie | Zitat. Die beiden äußeren Spalten sind gleich
   breit, dadurch steht die Linie immer genau in der Seitenmitte. */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "brand line quote";
  align-items: center;
  column-gap: clamp(2rem, 6vw, 6rem); /* Abstand Linie ↔ Logo bzw. Text */
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}
.hero__brand { grid-area: brand; }
.hero__inner::before {
  content: "";
  grid-area: line;
  width: 2px;
  height: clamp(110px, 14vw, 240px);
  background: rgba(255,255,255,.85);
}
.hero__brand h1 { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: min(100%, 480px); }
.hero__country {
  margin-top: .5rem;
  font-size: clamp(1rem, .85rem + .6vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero__quote {
  grid-area: quote;
  position: relative;
  max-width: 40ch;
}
.hero__quote-mark {
  position: absolute; left: -.2rem; top: -1.7rem;
  font-size: 3rem; line-height: 1; font-weight: 700;
}
.hero__quote p {
  padding-top: .8rem;
  font-size: clamp(.95rem, .85rem + .45vw, 1.3rem);
  line-height: 1.55;
}
.hero__quote strong { font-weight: 700; }

/* ---------- Diashow ---------- */
.slideshow {
  position: relative;
  height: clamp(260px, 52vw, 640px);
  overflow: hidden;
  background: var(--grey-dark);
}
.slideshow__slides { list-style: none; height: 100%; }
.slideshow__slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s; /* Fallback ohne GSAP */
}
.slideshow__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease;
}
.slideshow__slide a { display: block; height: 100%; }
.slideshow__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Bildausschnitt pro Bild im HTML wählbar: style="--focus: 50% 30%" (x y) */
  object-position: var(--focus, 50% 50%);
}

.slideshow__arrow {
  position: absolute; top: 50%; z-index: 2;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.25);
  color: var(--white);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: .8;
  transition: opacity .25s, background .25s;
}
.slideshow__arrow:hover { opacity: 1; background: var(--red); border-color: var(--red); }
.slideshow__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.slideshow__arrow--prev { left: clamp(10px, 3vw, 32px); }
.slideshow__arrow--next { right: clamp(10px, 3vw, 32px); }

.slideshow__dots {
  position: absolute; left: 50%; bottom: 22px; z-index: 2;
  transform: translateX(-50%);
  display: flex; gap: 10px;
}
.slideshow__dot {
  width: 30px; height: 4px; padding: 0;
  border: 0; border-radius: 2px;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .3s, width .3s;
}
.slideshow__dot[aria-current="true"] { background: var(--white); width: 46px; }

.slideshow__progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 3px; background: rgba(255,255,255,.2);
}
.slideshow__progress span {
  display: block; height: 100%; width: 100%;
  background: var(--red);
  transform: scaleX(0); transform-origin: left;
}

/* ================= SECTION BARS ================= */
.section-bar {
  background: var(--grey-dark);
  color: var(--white);
  padding-block: clamp(1rem, 2vw, 1.5rem);
}
.section-bar__title {
  color: var(--red-soft);
  font-size: var(--fs-section);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-bar--split .container {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center; justify-content: space-between;
}
.section-bar__claim { font-size: clamp(.95rem, .85rem + .45vw, 1.3rem); }

/* ================= LEISTUNGSFELDER ================= */
/* Feedback: weniger Weiß → hellgraue Fläche, Liste nutzt die volle Breite */
.services { background: var(--grey-light); }
.services__list {
  display: flex; flex-direction: column;
  gap: clamp(14px, 1.5vw, 22px);
  padding-block: var(--section-pad);
}

.service {
  position: relative;
  overflow: hidden;
  background: var(--red-soft);
  color: var(--white);
  transition: background-color .45s ease, box-shadow .45s ease;
}
.service.is-open {
  background: var(--grey);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

/* Hintergrundbild (Platzhalter) */
.service__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* Bildausschnitt pro Bild im HTML wählbar: style="--focus: 50% 30%" (x y) */
  object-position: var(--focus, 50% 50%);
  opacity: .22;
  mix-blend-mode: luminosity;
  pointer-events: none;
  transition: opacity .45s ease, transform 1.2s ease;
}
.service.is-open .service__bg { opacity: .3; transform: scale(1.04); }

.service__head { position: relative; }
.service__toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%;
  padding: clamp(1.1rem, 2vw, 1.75rem) clamp(1.25rem, 3vw, 2.5rem);
  background: none; border: 0;
  color: inherit;
  font: inherit;
  font-size: var(--fs-h-service);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.service.is-open .service__toggle { padding-top: clamp(1.4rem, 2.5vw, 2.25rem); }

.service__icon {
  flex: 0 0 auto;
  position: relative; width: 20px; height: 20px;
}
.service__icon::before,
.service__icon::after {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 20px; height: 2px; background: currentColor;
  transition: transform .35s ease;
}
.service__icon::after { transform: rotate(90deg); }
.service.is-open .service__icon::after { transform: rotate(0deg); }

.service__body {
  position: relative;
  height: 0;
  overflow: hidden;
}
.service.is-open .service__body { height: auto; }
.service__body ul {
  padding: 0 clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2.25rem) clamp(2.5rem, 4.5vw, 4rem);
  font-size: var(--fs-base);
  line-height: 1.7;
}
.service__body li::marker { color: var(--white); }

/* ================= REFERENZEN ================= */
/* Feedback: weniger Weiß; 3 Referenzen nebeneinander, Bereich etwas breiter
   als der Rest, damit die Bilder trotzdem groß bleiben */
.references { background: var(--grey-light); }
.references__wrap {
  position: relative;
  max-width: 1680px;
  padding-block: var(--section-pad);
  padding-inline: calc(var(--gutter) + 52px);
}
.references__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--ref-gap)) / 3);
  --ref-gap: clamp(16px, 2vw, 28px);
  gap: var(--ref-gap);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.references__track::-webkit-scrollbar { display: none; }

.ref-card { scroll-snap-align: start; }
.ref-card a { display: block; text-decoration: none; color: var(--text); }
.ref-card figure { overflow: hidden; }
.ref-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .5s ease;
}
.ref-card a:hover img { transform: scale(1.05); }
.ref-card figure { background: var(--white); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.ref-card figcaption {
  position: relative; /* bleibt beim Hover-Zoom über dem Bild */
  background: var(--white);
  padding: .8rem 1rem;
  font-size: var(--fs-base);
  text-align: right;
}

.carousel-btn {
  position: absolute; top: 50%; z-index: 2;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--grey-dark);
  background: var(--white);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.carousel-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.carousel-btn:hover { background: var(--grey-dark); color: var(--white); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-btn--prev { left: var(--gutter); }
.carousel-btn--next { right: var(--gutter); }

/* ================= KONTAKT ================= */
.contact {
  background: var(--grey-dark);
  color: var(--white);
  padding-block: var(--section-pad);
}
.contact__label {
  color: var(--red-soft);
  font-size: var(--fs-section); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 1.5rem;
}
.contact__company {
  font-size: clamp(1.2rem, 1rem + .8vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 1.75rem;
}
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  gap: 1.75rem clamp(3rem, 6vw, 6rem);
  align-items: end;
}
.contact__phone { align-self: start; grid-column: 1 / -1; }
.contact address { font-style: normal; line-height: 1.6; }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; }

.contact__social {
  display: flex; gap: 12px; justify-content: flex-end;
  list-style: none;
}
.contact__social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--white); color: var(--grey-dark);
  transition: transform .2s, background .2s, color .2s;
}
.contact__social a:hover { transform: translateY(-3px); background: var(--red); color: var(--white); }
.contact__social svg { width: 22px; height: 22px; fill: currentColor; }

/* ================= FOOTER ================= */
.site-footer { background: var(--red); color: var(--white); }
.site-footer__inner {
  max-width: none; /* wie Header: Links und Logo bündig nach außen */
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: clamp(1.1rem, 2.5vw, 1.75rem);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; list-style: none; font-size: var(--fs-small); }
.site-footer__links a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-end; }
.site-footer__brand img { width: clamp(150px, 14vw, 190px); }
.site-footer__brand span { font-size: .65rem; letter-spacing: .1em; margin-top: 2px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: repeat(2, auto) 1fr; }
  .references__track { grid-auto-columns: calc((100% - var(--ref-gap)) / 2); }
}

/* Tablet & Mobile: Hamburger-Menü mit allen Menüpunkten */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--red);
    box-shadow: 0 12px 20px rgba(0,0,0,.18);
    max-height: 0; overflow: hidden;
    transition: max-height .4s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul {
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1rem;
  }
  .main-nav li { border-top: 1px solid rgba(255,255,255,.25); }
  .main-nav li > a { display: block; padding: .85rem 0; font-size: .85rem; }
  .main-nav a::after { display: none; }
  .main-nav__lang { padding: .85rem 0; font-size: .85rem; }
}

@media (max-width: 640px) {
  :root { --header-h: 58px; }
  /* Handy: untereinander, Linie wird zum kurzen waagerechten Trenner */
  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "line" "quote";
    gap: 2rem;
  }
  .hero__inner::before { width: 60px; height: 2px; justify-self: center; }
  .hero__quote { margin-inline: auto; }
  .slideshow { height: 70vw; min-height: 240px; }
  .slideshow__arrow { width: 38px; height: 38px; }
  .slideshow__dots { bottom: 14px; }

  /* Titel und Claim auch auf dem Handy nebeneinander */
  .section-bar--split .container { flex-wrap: nowrap; gap: .75rem; }
  .section-bar--split .section-bar__title { font-size: .85rem; }
  .section-bar__claim { font-size: .85rem; white-space: nowrap; }

  .references__wrap { padding-inline: 48px; }
  .references__track { grid-auto-columns: 100%; }
  .carousel-btn--prev { left: 4px; }
  .carousel-btn--next { right: 4px; }

  .contact__grid { grid-template-columns: 1fr; }
  .contact__social { justify-content: flex-start; }

  .site-footer__inner { flex-direction: column-reverse; align-items: flex-start; }
  .site-footer__brand { align-items: flex-start; }
}

/* ===== Ergänzungen ===== */

/* Instagram-Icon als Linien-Icon */
.contact__social svg.icon-stroke {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Footer-Logo als Link */
.site-footer__brand a { display: block; transition: opacity .2s; }
.site-footer__brand a:hover { opacity: .8; }

/* Hero-Diashow: kräftigere Pfeile */
.slideshow__arrow {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.95);
  color: var(--red);
  border: 0;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.slideshow__arrow svg { width: 26px; height: 26px; stroke-width: 2.8; }
.slideshow__arrow:hover { background: var(--red); color: var(--white); }

/* Referenzen: kräftigere Pfeile */
.carousel-btn {
  width: 42px; height: 42px;
  background: var(--red);
  color: var(--white);
  border: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.carousel-btn svg { width: 22px; height: 22px; stroke-width: 2.8; }
.carousel-btn:hover { background: var(--grey-dark); color: var(--white); }
.carousel-btn:disabled { opacity: .3; box-shadow: none; }

/* Hamburger-Menü: Sprachauswahl als zwei Buttons */
@media (max-width: 960px) {
  .main-nav .main-nav__lang {
    display: flex; align-items: center; gap: .6rem;
    padding: 1rem 0;
  }
  .main-nav .main-nav__lang > span { display: none; }
  .main-nav .main-nav__lang > a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px;
    padding: .45rem .9rem;
    border: 1.5px solid rgba(255,255,255,.7);
    border-radius: 999px;
    font-size: .8rem; font-weight: 700;
  }
  .main-nav .main-nav__lang > a[aria-current="true"] {
    background: var(--white);
    color: var(--red);
    border-color: var(--white);
  }
}

@media (max-width: 640px) {
  .slideshow__arrow { width: 42px; height: 42px; }
  .slideshow__arrow svg { width: 22px; height: 22px; }
}