/* =========================================================
   Modern overlay
   Loaded AFTER css/styles.css. Refines the look with a
   modern blue palette, typography, spacing, shadows and
   improves the Fertigung tab navigation + responsiveness.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --ds-blue-950: #061a33;
  --ds-blue-900: #0b2545;
  --ds-blue-800: #13315c;
  --ds-blue-700: #1d4ed8;
  --ds-blue-600: #2563eb;
  --ds-blue-500: #3b82f6;
  --ds-blue-400: #60a5fa;
  --ds-blue-200: #bfdbfe;
  --ds-blue-100: #dbeafe;
  --ds-blue-50:  #eff6ff;

  --ds-ink-900: #0f172a;
  --ds-ink-700: #1e293b;
  --ds-ink-600: #334155;
  --ds-ink-500: #475569;
  --ds-ink-400: #64748b;
  --ds-ink-200: #cbd5e1;
  --ds-ink-100: #e2e8f0;
  --ds-ink-50:  #f1f5f9;

  --ds-bg:      #f7fafc;
  --ds-surface: #ffffff;

  --ds-radius-sm: 8px;
  --ds-radius:    14px;
  --ds-radius-lg: 20px;

  --ds-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --ds-shadow:    0 6px 18px rgba(15, 23, 42, 0.08);
  --ds-shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);

  --ds-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
html, body { background: var(--ds-bg); }

body {
  font-family: 'Inter', 'Open Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ds-ink-600);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
  color: var(--ds-ink-900);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 28px; font-weight: 700; color: var(--ds-blue-700); }
h3 { font-size: 22px; font-weight: 600; text-transform: none; color: var(--ds-blue-700); }
h4 { font-size: 20px; font-weight: 600; color: var(--ds-ink-900); }
h5 { font-size: 18px; font-weight: 600; }
h6 { font-size: 15px; font-weight: 600; color: var(--ds-ink-900); text-transform: none; }

p  { color: var(--ds-ink-500); }
a  { color: var(--ds-blue-600); transition: color .2s var(--ds-ease); }
a:hover, a:focus { color: var(--ds-blue-800); text-decoration: none; }

img { max-width: 100%; height: auto; }
hr  { background: var(--ds-ink-100); height: 1px; }

::selection { background: var(--ds-blue-100); color: var(--ds-blue-900); }

/* ---------- Header & Logo ---------- */
header {
  background: linear-gradient(180deg, var(--ds-surface) 0%, var(--ds-blue-50) 100%);
}

.top-container { padding: 16px 0 10px; }

.logo img {
  max-height: 70px;
  width: auto;
  transition: transform .3s var(--ds-ease);
}
.logo:hover img { transform: translateY(-1px); }

@media (max-width: 991px) {
  .top-container {
    float: none;
    text-align: center;
    margin: 12px 0 8px !important;
    padding: 8px 0 4px;
  }
  .top-container .logo { float: none; }
  .top-container .logo img { max-height: 48px; }
}

/* ---------- Navigation ---------- */
nav.navbar,
header nav.navbar {
  background: var(--ds-blue-900) !important;
  border: 0;
  margin-bottom: 0;
  box-shadow: 0 2px 14px rgba(13, 38, 76, .18);
  position: relative;
}

.navbar .navbar-inner { padding: 0; }

.navbar .nav.navbar-nav {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.navbar .nav > li {
  float: none;
  display: block;
}

.navbar .nav > li > a {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
  background: transparent !important;
  padding: 18px 22px;
  border: 0;
  position: relative;
  transition: color .2s var(--ds-ease), background .2s var(--ds-ease);
}

.navbar .nav > li > a::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 10px;
  height: 2px;
  background: var(--ds-blue-400);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ds-ease);
}

.navbar .nav > li:hover > a,
.navbar .nav > li > a:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}
.navbar .nav > li:hover > a::after { transform: scaleX(1); }

.navbar .nav > li.selected > a,
.navbar .nav > li.selected:hover > a,
.navbar .nav > li.selected > a:hover {
  color: #ffffff !important;
  background: var(--ds-blue-600) !important;
}
.navbar .nav > li.selected > a::after { transform: scaleX(0); }

/* Always hide the legacy tinynav <select>; we use our own toggle. */
.tinynav, .js .tinynav { display: none !important; }

/* Force the nav UL to remain visible (override legacy media query that hides #nav on small screens) */
.js #nav, #nav { display: flex !important; }

/* Mobile nav toggle button (injected by modern.js) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 14px 18px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: space-between;
}
.nav-toggle::after {
  content: "Menü";
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #cfe0ff;
}
.navbar.is-open .nav-toggle::after { content: "Schließen"; }

@media (max-width: 991px) {
  .navbar .navbar-inner > .container { padding: 0; position: relative; }

  .nav-toggle { display: inline-flex; }

  /* Collapsed by default when JS is present; opens via .navbar.is-open */
  .js #nav.nav.navbar-nav {
    display: flex !important;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ds-ease);
  }
  .js .navbar.is-open #nav.nav.navbar-nav { max-height: 600px; }

  /* No-JS fallback: render menu as a stacked list */
  html:not(.js) #nav.nav.navbar-nav {
    display: flex !important;
    flex-direction: column;
  }

  .navbar .nav > li { width: 100%; }
  .navbar .nav > li > a {
    width: 100%;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .navbar .nav > li > a::after { display: none; }
}

/* ---------- Hero / Layer slider container ---------- */
#layerslider-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}
#layerslider-container::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 80px;
  background: linear-gradient(to bottom, rgba(247,250,252,0), var(--ds-bg));
  pointer-events: none;
}
/* Mobile home hero (index.html) — replaces LayerSlider below 992px */
.home-hero-mobile {
  display: none;
}

@media (max-width: 991px) {
  #layerslider-container {
    display: none !important;
    margin: 0 !important;
  }

  .home-hero-mobile {
    display: block;
    width: 100%;
    margin: 0 0 20px;
    overflow: hidden;
    line-height: 0;
    background: var(--ds-blue-900);
  }

  .home-hero-mobile img {
    display: block;
    width: 100%;
    height: clamp(180px, 42vw, 280px);
    object-fit: cover;
    object-position: center;
  }
}

/* ---------- Breadcrumb / page title strip (Minimal Light) ---------- */
.breadcrumb-container {
  background: var(--ds-surface);
  padding: 56px 0 36px !important;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--ds-ink-100);
  position: relative;
  overflow: visible;
  color: var(--ds-ink-900);
  scroll-margin-top: 72px;
}
.breadcrumb-container > .container,
.breadcrumb-container .row,
.breadcrumb-container [class*="col-"] {
  position: relative;
  overflow: visible;
}
.breadcrumb-container > .container { z-index: 1; }

.breadcrumb-container h1 {
  color: var(--ds-ink-900);
  float: none !important;
  clear: both;
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.breadcrumb-container h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 18px;
  background: var(--ds-blue-600);
  border-radius: 3px;
}

/* Small breadcrumb trail above the title (Home > Aktuelle Seite) */
.breadcrumb-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px 0;
  padding-top: 2px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ds-ink-400);
  letter-spacing: 0.02em;
}
.breadcrumb-trail a {
  color: var(--ds-ink-400);
  text-decoration: none;
  transition: color .2s var(--ds-ease);
}
.breadcrumb-trail a:hover { color: var(--ds-blue-700); }
.breadcrumb-trail .breadcrumb-sep {
  color: var(--ds-ink-200);
  font-size: 14px;
  line-height: 1;
}
.breadcrumb-trail .breadcrumb-current {
  color: var(--ds-blue-700);
  font-weight: 600;
}

/* Sticky nav must not overlap page titles on mobile */
@media (max-width: 991px) {
  header .sticky-wrapper {
    height: auto !important;
  }
  header .sticky-wrapper.is-sticky > nav.navbar,
  header nav.navbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
  }

  .breadcrumb-container {
    padding: 28px 0 22px !important;
    padding-top: calc(28px + env(safe-area-inset-top, 0px)) !important;
    margin-bottom: 24px;
  }
  .breadcrumb-container > .container {
    padding-top: 4px;
  }
  .breadcrumb-container h1 { font-size: 30px; }
  .breadcrumb-container h1::after { width: 48px; margin-top: 12px; }
  .breadcrumb-trail {
    font-size: 12px;
    margin-bottom: 12px;
    padding-top: 0;
    line-height: 1.55;
  }
}

@media (max-width: 767px) {
  .breadcrumb-container {
    padding: 24px 0 20px !important;
    padding-top: calc(24px + env(safe-area-inset-top, 0px)) !important;
    margin-bottom: 20px;
  }
  .breadcrumb-container h1 { font-size: 26px; }
  .breadcrumb-trail { margin-bottom: 10px; }
}

/* ---------- Home: "Wir bieten" + service cards ---------- */
.container > .row > .col-md-12 > h1 {
  font-size: 30px;
  font-weight: 700;
  margin-top: 16px;
  padding-bottom: 12px;
  text-align: center;
  position: relative;
}
.container > .row > .col-md-12 > h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 14px auto 0;
  background: var(--ds-blue-500);
  border-radius: 4px;
}

.service {
  background: var(--ds-surface);
  border: 1px solid var(--ds-ink-100);
  border-radius: var(--ds-radius);
  padding: 28px 26px 26px 90px;
  position: relative;
  box-shadow: var(--ds-shadow-sm);
  transition: transform .25s var(--ds-ease),
              box-shadow .25s var(--ds-ease),
              border-color .25s var(--ds-ease);
  min-height: 170px;
  height: 100%;
}
.service:hover {
  transform: translateY(-4px);
  box-shadow: var(--ds-shadow-lg);
  border-color: var(--ds-blue-100);
}
.service h4 {
  color: var(--ds-ink-900);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.service:hover h4 { color: var(--ds-blue-700); }
.service p {
  color: var(--ds-ink-500);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.service .fa,
.service .typcn,
.service .entypo {
  position: absolute;
  top: 26px;
  left: 24px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ds-blue-50);
  color: var(--ds-blue-700);
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
  transition: background .25s var(--ds-ease),
              color .25s var(--ds-ease),
              transform .4s var(--ds-ease);
}
.service:hover .fa,
.service:hover .typcn,
.service:hover .entypo {
  background: var(--ds-blue-600);
  color: #ffffff;
  transform: rotateY(360deg);
}

@media (max-width: 991px) {
  .service { margin-bottom: 18px; }
}

/* Equal-height service cards on the home page.
   Make the row a flex container so all columns stretch to the tallest. */
.services-row {
  display: flex;
  flex-wrap: wrap;
}
.services-row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}
.services-row > [class*="col-"] > .service {
  flex: 1 1 auto;
  height: auto;
}
.services-row > [class*="col-"] > .space40 {
  flex: 0 0 auto;
}

/* ---------- Fertigung: Modern Tabs (uses Bootstrap .tabbable) ---------- */
.tabbable { margin-top: 8px; }

.tabbable .nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
  margin: 0 0 16px 0;
  padding: 0;
}

.tabbable .nav-tabs > li {
  float: none;
  margin: 0;
  display: flex;
  flex: 1 1 180px;
  min-width: 0;
}

.tabbable .nav-tabs > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  border: 1px solid var(--ds-ink-100);
  border-radius: 12px !important;
  background: var(--ds-surface);
  color: var(--ds-ink-700);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  box-shadow: var(--ds-shadow-sm);
  transition: transform .2s var(--ds-ease),
              box-shadow .2s var(--ds-ease),
              border-color .2s var(--ds-ease),
              background .2s var(--ds-ease),
              color .2s var(--ds-ease);
}

.tabbable .nav-tabs .tab-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ds-blue-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tabbable .nav-tabs .tab-thumb img {
  width: 100% !important;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.tabbable .nav-tabs .tab-label {
  flex: 1 1 auto;
  display: block;
  white-space: normal;
}

.tabbable .nav-tabs > li > a:hover,
.tabbable .nav-tabs > li > a:focus {
  border-color: var(--ds-blue-400);
  color: var(--ds-blue-800);
  background: var(--ds-blue-50);
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow);
}

/* No visible focus ring after mouse clicks. Keyboard users still get a
   subtle blue ring via :focus-visible below. */
.tabbable .nav-tabs > li > a,
.tabbable .nav-tabs > li > a:focus,
.tabbable .nav-tabs > li > a:active {
  outline: 0 !important;
  outline-offset: 0;
}
.tabbable .nav-tabs > li > a:focus:not(:focus-visible) {
  box-shadow: var(--ds-shadow-sm);
}
.tabbable .nav-tabs > li > a:focus-visible {
  outline: 2px solid var(--ds-blue-400) !important;
  outline-offset: 2px;
}

.tabbable .nav-tabs > li.active > a,
.tabbable .nav-tabs > li.active > a:hover,
.tabbable .nav-tabs > li.active > a:focus {
  background: linear-gradient(135deg, var(--ds-blue-700), var(--ds-blue-500));
  border-color: var(--ds-blue-700);
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  transform: translateY(-2px);
}
.tabbable .nav-tabs > li.active .tab-thumb {
  background: rgba(255, 255, 255, 0.18);
}

/* Tab panes as a card surface */
.tabbable .tab-content > .tab-pane {
  background: var(--ds-surface);
  color: var(--ds-ink-600);
  border: 1px solid var(--ds-ink-100);
  border-radius: var(--ds-radius);
  padding: 28px;
  box-shadow: var(--ds-shadow-sm);
  margin: 0;
}

.tabbable .tab-content > .tab-pane.active.in,
.tabbable .tab-content > .tab-pane.active {
  animation: tabFade .35s var(--ds-ease) both;
}
@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tabbable .tab-content h3 {
  color: var(--ds-blue-700);
  font-weight: 700;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ds-blue-100);
  text-transform: none;
}
.tabbable .tab-content h6 {
  color: var(--ds-ink-900);
  margin-top: 0;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.tabbable .tab-content img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--ds-shadow-sm);
  transition: transform .35s var(--ds-ease);
}
.tabbable .tab-content img:hover { transform: scale(1.015); }

.tabbable .tab-content .row { margin-bottom: 22px; }
.tabbable .tab-content .row:last-child { margin-bottom: 0; }

/* Tab pager (Zurück / Weiter), injected by modern.js */
.tab-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.tab-pager .tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-ink-100);
  border-radius: 999px;
  color: var(--ds-blue-700);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ds-ease);
  box-shadow: var(--ds-shadow-sm);
}
.tab-pager .tab-btn:hover:not([disabled]) {
  background: var(--ds-blue-700);
  border-color: var(--ds-blue-700);
  color: #fff;
  transform: translateY(-1px);
}
.tab-pager .tab-btn:focus { outline: 2px solid var(--ds-blue-400); outline-offset: 2px; }
.tab-pager .tab-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.tab-pager .tab-indicator {
  color: var(--ds-ink-500);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tab-pager .tab-indicator .tab-current { color: var(--ds-blue-700); }

/* Tablet (768-991px): horizontal scroll strip with fade indicators
   Activated by setupTabScrollIndicators() which wraps .nav-tabs in
   a .tabs-scroll-wrap and toggles is-at-start / is-at-end classes. */
@media (min-width: 768px) and (max-width: 991px) {
  .tabbable .tabs-scroll-wrap {
    position: relative;
    margin: 0 -15px 16px;
  }
  .tabbable .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 4px 15px 12px;
  }
  /* Fallback when JS hasn't wrapped nav-tabs yet */
  .tabbable > .nav-tabs { margin: 0 -15px 16px; }

  .tabbable .nav-tabs::-webkit-scrollbar { height: 6px; }
  .tabbable .nav-tabs::-webkit-scrollbar-thumb {
    background: var(--ds-ink-200);
    border-radius: 6px;
  }
  .tabbable .nav-tabs > li {
    flex: 0 0 230px;
    scroll-snap-align: start;
  }
  .tabbable .nav-tabs > li > a {
    min-height: 64px;
    padding: 14px 16px;
  }

  /* Fade indicators on left/right edges (visual hint that more tabs exist) */
  .tabbable .tabs-scroll-wrap::before,
  .tabbable .tabs-scroll-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 42px;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    transition: opacity .25s var(--ds-ease);
  }
  .tabbable .tabs-scroll-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--ds-bg) 0%, rgba(247, 250, 252, 0) 100%);
  }
  .tabbable .tabs-scroll-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--ds-bg) 0%, rgba(247, 250, 252, 0) 100%);
  }
  .tabbable .tabs-scroll-wrap.is-at-start::before { opacity: 0; }
  .tabbable .tabs-scroll-wrap.is-at-end::after { opacity: 0; }
}

/* Smartphone (<=767px): Accordion mode
   Activated by setupMobileAccordion() which sets data-accordion="on"
   on the .tabbable element. Without JS, the standard tab layout
   continues to render as a fallback. */
@media (max-width: 767px) {
  .tabbable[data-accordion="on"] .nav-tabs,
  .tabbable[data-accordion="on"] .tabs-scroll-wrap { display: none; }
  .tabbable[data-accordion="on"] .tab-pager { display: none; }

  .tabbable[data-accordion="on"] .tab-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .tabbable[data-accordion="on"] .tab-content > .tab-pane {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0;
    margin: 0;
    background: var(--ds-surface);
    border: 1px solid var(--ds-ink-100);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow-sm);
    overflow: hidden;
    animation: none;
  }

  .accordion-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 12px 16px;
    background: var(--ds-surface);
    border: 0;
    border-radius: var(--ds-radius);
    color: var(--ds-ink-700);
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .2s var(--ds-ease), color .2s var(--ds-ease);
  }
  .accordion-header:hover { background: var(--ds-blue-50); }
  .accordion-header:focus { outline: 0; }
  .accordion-header:focus-visible {
    outline: 2px solid var(--ds-blue-400);
    outline-offset: -2px;
  }

  .accordion-header .tab-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ds-blue-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .accordion-header .tab-thumb img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
  }
  .accordion-header .tab-label {
    flex: 1 1 auto;
    white-space: normal;
    color: inherit;
  }
  .accordion-header .tab-chevron {
    flex: 0 0 24px;
    text-align: right;
    color: var(--ds-ink-400);
    font-size: 14px;
    transition: transform .25s var(--ds-ease), color .2s var(--ds-ease);
  }

  .tabbable[data-accordion="on"] .tab-pane.is-open .accordion-header {
    background: linear-gradient(135deg, var(--ds-blue-700), var(--ds-blue-500));
    color: #ffffff;
  }
  .tabbable[data-accordion="on"] .tab-pane.is-open .accordion-header .tab-thumb {
    background: rgba(255, 255, 255, 0.18);
  }
  .tabbable[data-accordion="on"] .tab-pane.is-open .accordion-header .tab-chevron {
    color: #ffffff;
    transform: rotate(180deg);
  }

  .tabbable[data-accordion="on"] .tab-pane > .pane-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height .35s ease, padding .25s ease;
  }
  .tabbable[data-accordion="on"] .tab-pane.is-open > .pane-body {
    max-height: 6000px;
    padding: 16px 16px 22px;
  }

  .tabbable[data-accordion="on"] .pane-body h3 {
    margin-top: 0;
    padding-top: 0;
  }
  .tabbable[data-accordion="on"] .pane-body img { border-radius: 10px; }
  .tabbable[data-accordion="on"] .pane-body .row { margin-bottom: 14px; }
  .tabbable[data-accordion="on"] .pane-body .row:last-child { margin-bottom: 0; }
}

/* Very small phones: tighter pane padding, smaller pager (when shown) */
@media (max-width: 575px) {
  .tabbable .tab-content > .tab-pane { padding: 20px; }
  .tabbable[data-accordion="on"] .tab-content > .tab-pane { padding: 0; }
  .tabbable[data-accordion="on"] .tab-pane.is-open > .pane-body {
    padding: 14px 14px 20px;
  }
  .accordion-header { padding: 12px 14px; }
  .tab-pager .tab-btn { padding: 9px 14px; font-size: 13px; }
}

/* ---------- Produkte page ---------- */
.col-md-12 > img.ls-bg {
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow);
}
.container .row > [class*="col-md-3"] > img,
.container .row > [class*="col-md-3"] > a > img {
  border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow-sm);
  margin-bottom: 16px;
  transition: transform .3s var(--ds-ease), box-shadow .3s var(--ds-ease);
}
.container .row > [class*="col-md-3"] > img:hover,
.container .row > [class*="col-md-3"] > a > img:hover {
  transform: translateY(-3px);
  box-shadow: var(--ds-shadow);
}

/* Equal-height product tiles: crop each image to a uniform aspect ratio
   so the four cards in the row line up perfectly. */
.produkte-grid > [class*="col-"] {
  margin-bottom: 24px;
}
.produkte-grid > [class*="col-"] > img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0;
}
@media (max-width: 991px) {
  .produkte-grid > [class*="col-"] > img { height: 240px; }
}
@media (max-width: 575px) {
  .produkte-grid > [class*="col-"] > img { height: 200px; }
}

/* ---------- Kontakt page ---------- */
#map {
  height: 380px;
  border: 0;
  display: block;
  width: 100%;
  box-shadow: var(--ds-shadow);
}

.contact-data {
  background: var(--ds-surface);
  border: 1px solid var(--ds-ink-100);
  border-radius: var(--ds-radius);
  padding: 26px;
  box-shadow: var(--ds-shadow-sm);
}
.contact-data h4 {
  color: var(--ds-blue-700);
  font-size: 20px;
  margin-bottom: 14px;
  font-weight: 600;
}
.contact-data .fa {
  color: var(--ds-blue-600);
  width: 18px;
  margin-right: 6px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ds-blue-900);
  color: rgba(255, 255, 255, 0.72);
}
.footer h6 {
  color: #ffffff;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}
.footer .footer-info { padding: 56px 0 28px; }
.footer .item-icon { padding-left: 26px; }
.footer .item-icon i {
  color: var(--ds-blue-400);
  top: 6px;
}
.footer .list-5 li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0 8px 18px;
}
.footer .list-5 li i {
  color: var(--ds-blue-400);
  margin-right: 6px;
}
.footer a, .footer a:visited { color: rgba(255, 255, 255, 0.78); }
.footer a:hover { color: var(--ds-blue-400); }
.footer .copyright {
  background: var(--ds-blue-950);
  padding: 18px 0;
  font-size: 13px;
}
.footer .copyright-info { color: rgba(255, 255, 255, 0.55); }

@media (max-width: 767px) {
  .footer .footer-info { padding: 40px 0 8px; }
  .footer .copyright-info { text-align: center; padding-top: 10px; }
  .footer .logo-footer { text-align: center; }
}

/* ---------- Back-to-top ---------- */
.back-to-top {
  width: 44px;
  height: 44px;
  background: var(--ds-blue-600) !important;
  border-radius: 50% !important;
  bottom: 24px;
  right: 24px;
  box-shadow: var(--ds-shadow);
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s var(--ds-ease),
              transform .2s var(--ds-ease),
              background .2s var(--ds-ease);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--ds-blue-800) !important; color: #fff; }
.back-to-top:after { color: #fff; }

/* ---------- Bootstrap row fix on tab-pane for legacy nested col-md-* layout ---------- */
@media (max-width: 767px) {
  .tabbable .tab-content .row > [class*="col-md-"] { margin-bottom: 16px; }
  .tabbable .tab-content .row > [class*="col-md-"]:last-child { margin-bottom: 0; }
}

/* ---------- Small mobile typography ---------- */
@media (max-width: 575px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .service { padding: 24px 22px 22px 84px; }
  .service .fa,
  .service .typcn,
  .service .entypo { width: 46px; height: 46px; font-size: 20px; }
}

/* Ensure Bootstrap 3 container doesn't shrink-wrap awkwardly on mobile */
@media (max-width: 767px) {
  .container { width: auto; }
}
