/* ============================================================
   LAYOUT.CSS — Container, Grid, Header, Footer, Hero, Page-Header
   ============================================================ */

/* ------------------------------------------------------------
   SITE CHROME + SKIP LINK
   ------------------------------------------------------------ */
/* display: contents – Wrapper erzeugt keine eigene Box, damit der sticky
   Header seinen Containing-Block vom body bekommt und über die ganze Seite klebt */
.site-chrome {
  display: contents;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10001;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.6rem 1.4rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-md);
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container-narrow {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ------------------------------------------------------------
   GRID UTILITIES
   ------------------------------------------------------------ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-xl); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------------------
   TOP BAR
   ------------------------------------------------------------ */
.topbar {
  background: var(--color-topbar-bg);
  color: var(--color-topbar-text);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 200;
  margin: 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-topbar-text);
}

.topbar-item a {
  color: var(--color-topbar-link);
  transition: color var(--transition-fast);
}
.topbar-item a:hover { color: var(--color-accent-light); }

.topbar-item svg,
.topbar-item i {
  width: 13px; height: 13px;
  flex-shrink: 0;
  fill: var(--color-accent-light);
  font-size: 13px;
  line-height: 1;
  color: var(--color-accent-light);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.topbar-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--color-topbar-text);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.topbar-social:hover {
  background: var(--color-accent);
  color: var(--color-white);
}
.topbar-social svg,
.topbar-social i {
  width: 13px; height: 13px;
  fill: currentColor;
  font-size: 13px;
  line-height: 1;
}

@media (max-width: 768px) {
  .topbar { display: none; }
}

/* ------------------------------------------------------------
   SITE HEADER / NAVIGATION
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--color-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition-base);
  overflow: visible;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.navbar {
  height: var(--header-height);
  display: flex;
  align-items: center;
  overflow: visible;
}

.navbar .container {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  height: 100%;
  overflow: visible;
}

/* Logo – überragt die Header-Leiste (Header-Höhe bleibt konstant) */
.navbar-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.navbar-brand a {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.navbar-logo-img {
  height: 110px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  /* Logo hängt nach unten über die 80px-Leiste, ohne die Header-Höhe zu vergrößern */
  margin-bottom: -32px;
  transition: height var(--transition-base), margin-bottom var(--transition-base);
}

/* Beim Scrollen: Logo verkleinert sich, bleibt innerhalb der Leiste */
.site-header.scrolled .navbar-logo-img {
  height: 60px;
  margin-bottom: 0;
}

/* Footer logo – white invert for dark bg */
.footer-logo img {
  height: 52px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

/* Nav */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 var(--sp-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-anthracite);
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 3px;
  background: var(--color-accent);
  transition: left var(--transition-base), right var(--transition-base);
}

.nav-item > a:hover,
.nav-item > a.active {
  color: var(--color-accent);
}

.nav-item > a:hover::after,
.nav-item > a.active::after {
  left: 0; right: 0;
}

.nav-item > a svg.chevron {
  width: 12px; height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-fast);
  margin-top: 1px;
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border-top: 3px solid var(--color-accent);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: var(--sp-sm) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 300;
}

.nav-item:hover > .dropdown-menu,
.nav-item.open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item:hover > a svg.chevron,
.nav-item.open > a svg.chevron {
  transform: rotate(180deg);
}

.dropdown-menu li a {
  display: block;
  padding: 10px var(--sp-lg);
  font-size: var(--fs-sm);
  color: var(--color-text);
  transition: background var(--transition-fast), color var(--transition-fast), padding var(--transition-fast);
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: var(--color-accent-pale);
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  padding-left: calc(var(--sp-lg) + 4px);
}

/* CTA Button in Nav */
.nav-cta {
  margin-left: var(--sp-md);
  flex-shrink: 0;
}

/* Hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
  padding: 4px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-anthracite);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
  transform-origin: center;
}

.navbar-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
.navbar-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Navigation */
@media (max-width: 1100px) {
  .navbar-toggle { display: flex; }

  .navbar-logo-img {
    height: 80px;
    max-width: 220px;
    margin-bottom: -22px;
  }

  .site-header.scrolled .navbar-logo-img {
    height: 52px;
    margin-bottom: 0;
  }

  .navbar-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: auto;
    overflow-y: auto;
    padding: var(--sp-md) 0 var(--sp-2xl);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    z-index: 140;
  }

  .navbar-nav.open {
    transform: translateX(0);
  }

  .nav-item {
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item > a {
    height: auto;
    padding: 14px var(--sp-xl);
    border-bottom: 1px solid var(--color-border);
    justify-content: space-between;
  }

  .nav-item > a::after { display: none; }

  .dropdown-menu {
    position: static;
    border-top: none;
    border-left: 4px solid var(--color-accent);
    box-shadow: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding: 0;
    margin: 0;
    background: var(--color-off-white);
  }

  .nav-item.open > .dropdown-menu { display: block; }

  .dropdown-menu li a {
    padding: 12px var(--sp-xl) 12px calc(var(--sp-xl) + var(--sp-md));
    border-left: none;
    border-bottom: 1px solid var(--color-border);
  }

  .dropdown-menu li a:hover {
    padding-left: calc(var(--sp-xl) + var(--sp-md) + 4px);
  }

  .nav-cta { margin: var(--sp-lg) var(--sp-xl); }
}

@media (max-width: 768px) {
  :root { --header-height: 68px; }
}

/* ------------------------------------------------------------
   SECTION WRAPPER
   ------------------------------------------------------------ */
.section {
  padding-block: var(--sp-section);
}

.section-white  { background: var(--color-white); }
.section-light  { background: var(--color-off-white); }
.section-dark   { background: var(--color-anthracite); color: var(--color-white); }
.section-accent { background: var(--color-accent); color: var(--color-white); }

.section-dark .section-title,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}
.section-dark .section-title::after { background: var(--color-accent-light); }

/* Section Header (text block above content) */
.section-header {
  margin-bottom: var(--sp-3xl);
}

.section-header.centered {
  text-align: center;
}

/* ------------------------------------------------------------
   PAGE CONTENT HEADER (subpages)
   ------------------------------------------------------------ */
.page-header {
  position: relative;
  height: clamp(220px, 30vw, 360px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-anthracite);
}

.page-header-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(44,44,44,0.88) 0%,
    rgba(44,44,44,0.55) 60%,
    rgba(58,125,30,0.30) 100%
  );
}

.page-header-content {
  position: relative;
  z-index: 2;
}

.page-header-title {
  font-size: var(--fs-4xl);
  color: var(--color-white);
  margin-bottom: var(--sp-sm);
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.page-header-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.92);
  max-width: 42rem;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  margin: 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  font-size: var(--fs-sm);
}

.breadcrumb a {
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--color-white); }

.breadcrumb-sep {
  color: rgba(255,255,255,0.4);
  font-size: 0.75em;
}

.breadcrumb-current {
  color: var(--color-accent-light);
  font-weight: 600;
}

/* ------------------------------------------------------------
   HERO SLIDER
   ------------------------------------------------------------ */
.hero-slider {
  position: relative;
  height: calc(100vh - var(--topbar-height) - var(--header-height));
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  background: var(--color-anthracite);
}

.hero-slides {
  position: relative;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: transform 6s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.04);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(28,38,20,0.80) 0%,
    rgba(28,38,20,0.55) 50%,
    rgba(44,44,44,0.30) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-label {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--sp-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s 0.3s ease, transform 0.5s 0.3s ease;
}

.hero-slide.active .hero-label {
  opacity: 1; transform: translateY(0);
}

.hero-title {
  font-size: var(--fs-hero);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--sp-lg);
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s 0.5s ease, transform 0.6s 0.5s ease;
}

.hero-slide.active .hero-title {
  opacity: 1; transform: translateY(0);
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
  font-family: var(--font-body);
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s 0.7s ease, transform 0.5s 0.7s ease;
}

.hero-slide.active .hero-subtitle {
  opacity: 1; transform: translateY(0);
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s 0.9s ease, transform 0.5s 0.9s ease;
}

.hero-slide.active .hero-actions {
  opacity: 1; transform: translateY(0);
}

/* Slider Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
  backdrop-filter: blur(4px);
}

.slider-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.slider-btn svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.slider-btn-prev { left: var(--sp-xl); }
.slider-btn-next { right: var(--sp-xl); }

.slider-dots {
  position: absolute;
  bottom: var(--sp-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--sp-sm);
  z-index: 10;
}

.slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base);
  border: none;
}

.slider-dot.active {
  background: var(--color-accent);
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .slider-btn { width: 40px; height: 40px; }
  .slider-btn-prev { left: var(--sp-md); }
  .slider-btn-next { right: var(--sp-md); }
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--color-anthracite);
  color: rgba(255,255,255,0.75);
}

.footer-main {
  padding-block: var(--sp-4xl) var(--sp-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--sp-3xl);
}

.footer-col-title {
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.footer-logo {
  margin-bottom: var(--sp-lg);
}

.footer-tagline {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--sp-lg);
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-nav a::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--color-white);
  padding-left: 4px;
}

.footer-nav a:hover::before { transform: scale(1.4); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
}

.footer-contact-item svg {
  width: 16px; height: 16px;
  fill: var(--color-accent-light);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.65);
  transition: color var(--transition-fast);
}
.footer-contact-item a:hover { color: var(--color-accent-light); }

.footer-social {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.footer-social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  transition: background var(--transition-base), color var(--transition-fast);
}

.footer-social-link:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.footer-social-link svg {
  width: 16px; height: 16px;
  fill: currentColor;
}

/* Footer Bottom Bar */
.footer-bottom {
  background: rgba(0,0,0,0.25);
  padding-block: var(--sp-md);
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
}

.footer-legal-nav {
  display: flex;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.footer-legal-nav a {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
  transition: color var(--transition-fast);
}
.footer-legal-nav a:hover { color: var(--color-accent-light); }

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2xl);
  }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
}
