/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* ==========================================================================
   Color Palette Definitions (Custom Properties)
   ========================================================================== */

/* Regular Variable Font */
@font-face {
  font-family: 'Saira';
  src: url('../fonts/Saira-VariableFont_wdth,wght.woff2') format('woff2 supports variations'),
  url('../fonts/Saira-VariableFont_wdth,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 50% 125%; /* Maps the width axis available in these files */
  font-style: normal;
  font-display: swap;
}

/* Italic Variable Font */
@font-face {
  font-family: 'Saira';
  src: url('../fonts/Saira-Italic-VariableFont_wdth,wght.woff2') format('woff2 supports variations'),
  url('../fonts/Saira-Italic-VariableFont_wdth,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Main Colors */
  --primary-color: #f97316; /* Pumpkin Spice */
  --secondary-color: #ea580c; /* Cayenne Red */
  --accent-color: #27272a; /* Gunmetal */

  /* Neutral Colors */
  --bg-color: #09090b; /* Zinc Black */
  --sidebar-bg: rgba(24, 24, 27, 0.9); /* Dark Gunmetal */
  --text-color: #fafafa; /* Bright White */
  --text-muted: #a1a1aa; /* Zinc Gray */
  --border-color: #3f3f46; /* Gunmetal Edge */

  /* Fonts */
  --font-family: 'Saira', sans-serif;
}

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg-color);
  font-family: var(--font-family);
  overflow-x: hidden;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: var(--primary-color);
  color: black;
  text-shadow: none;
}

::selection {
  background: var(--primary-color);
  color: black;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}


@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}


/* ==========================================================================
   Hero Section
   ========================================================================== */

/* Car transitioning colors */
.car {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 400px;
  opacity: 0;
  visibility: hidden;
  transform: translate(calc(-50% + 120px), 0) scale(0.9);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 1.2s;
  filter: blur(10px);
  will-change: transform, opacity, filter;
}

[data-car="old"] .old,
[data-car="super"] .super,
[data-car="sprinter"] .sprinter,
[data-car="camper"] .camper,
[data-car="combi"] .combi,
[data-car="excavator"] .excavator,
[data-car="compact"] .compact,
[data-car="suv"] .suv,
[data-car="bike"] .bike {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
  filter: blur(0);
  z-index: 2;
}

/* Target the rectangle inside the clip path */
#clip-rect {
  transform: scaleX(0);
  transform-origin: left;
}

/* Trigger the left-to-right fill */
.painting #clip-rect {
  transform: scaleX(1);
  transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

#car-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  min-height: 140px;
  margin-bottom: 2rem;
  margin-top: 2rem;
  border-bottom: 4px solid white;
}

.social-media-links {
  display: flex;
  gap: 3rem;
}

/* ==========================================================================
   Responsive Sidebar Layout & Theme Styles
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Typography & General */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Layout Wrapper */
.layout-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 96vh;
}

/* Mobile Header */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.logo-mobile {
  font-size: 1.5rem;
  flex-grow: 1;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  position: relative;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  left: 0;
  transition: all 0.3s ease;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Topbar / Sidebar */
.sidebar {
  width: 100%;
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  z-index: 200;
}

.sidebar-header {
  padding: 1rem 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.sidebar-header img {
  height: 40px;
  width: auto;
}

.sidebar-header .logo {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-header .tagline {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  margin-right: max(2rem, calc((100vw - 1400px) / 2));
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
}

.sidebar-nav li {
  margin-bottom: 0;
}

.sidebar-nav a {
  display: block;
  padding: 1.5rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text-color);
  background: linear-gradient(0deg, rgba(234,88,12,0.1) 0%, transparent 100%);
  border-bottom-color: var(--primary-color);
}

.sidebar-footer {
  display: none;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  width: 100%;
  max-width: 1400px;
  /*background: radial-gradient(circle at top right, #111827, var(--bg-color));*/
}

.space {
  height: 2rem;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  background-color: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Sections & Components */
.split-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  align-items: center;
}

.split-section h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.split-section p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

.split-text {
  flex: 1;
  width: 100%;
  padding: 1rem;
}

.split-image {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.split-image img {
  width: clamp(200px, 100%, 400px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.karriere-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: stretch;
  height: 100%;

  & div {
    width: 100%;
    max-width: 1200px;
  }
}

@media (min-width: 1081px) {
  .split-section {
    flex-direction: row;
    gap: 4rem;
  }

  .karriere-page .split-section {
    align-items: flex-start;
  }
}

.btn-primary {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4);
}

.services-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  background-color: rgba(30, 41, 59, 0.8);
  border-color: var(--primary-color);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Top Info Bar*/
.top-info-bar {
  background-color: var(--secondary-color);
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  color: #ffffff;
  gap: 1.5rem;
  border-radius: 0 0 8px 8px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-title {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 400;
}

.info-detail {
  font-size: 13px;
  font-weight: 400;
}

#logo_animated {
  display: flex;

  & object {
    margin: 0 auto;
  }
}

.leasing-ruecklaeufer {
  & img {
    height: 500px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}



/* Responsive Media Queries */
@media (max-width: 1080px) {
  .mobile-header {
    display: flex;
  }

  .split-text {
    container-type: inline-size;
    &:has(#meister) {
      padding-top: 0;
    }
  }

  .split-section.short-gap {
    gap: 0;
  }

  #meister {
    font-size: clamp(1rem, 11cqi, 3rem);
    white-space: nowrap;          /* prevent wrapping while scaling */
    width: 100%;
  }

  .split-section.reverse {
    flex-direction: column-reverse;
  }

  .sidebar {
    transform: translateX(-100%);
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    align-items: flex-start;
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    position: static;
    transform: none;
    padding: 1.5rem 2rem;
  }

  .sidebar-header img {
    height: auto;
    max-width: 100%;
  }

  .sidebar-nav {
    justify-content: flex-start;
    margin-right: 0;
    width: 100%;
    flex-grow: 0;
  }

  .sidebar-nav ul {
    flex-direction: column;
    width: 100%;
  }

  .sidebar-nav li {
    margin-bottom: 0.5rem;
  }

  .sidebar-nav a {
    border-bottom: none;
    border-left: 3px solid transparent;
    padding: 0.75rem 2rem;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(234,88,12,0.1) 0%, transparent 100%);
    border-bottom-color: transparent;
    border-left-color: var(--primary-color);
  }

  .sidebar-footer {
    display: block;
    width: 100%;
    overflow: hidden;
    padding-bottom: 1rem;
  }

  .main-content {
    margin-left: 0;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  .split-section h2 {
    font-size: 2.2rem;
  }

  .top-info-bar {
    display: grid;
    justify-content: center;
    justify-items: start;
    order: 99;
    border-radius: 0;
    padding: 1.5rem 0;
  }
}

/* ==========================================================================
   Page Transitions
   ========================================================================== */

/* Modern Native View Transitions (Cross-Document) */
@view-transition {
  navigation: auto;
}

#sidebar {
  view-transition-name: sidebar;
}

#mobile-header {
  view-transition-name: mobile-header;
}

.main-content {
  view-transition-name: main;
}

/* ==========================================================================
   Image Gallery & Lightbox
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4 / 3;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  user-select: none;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1010;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--primary-color);
}

.lightbox-prev, .lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -30px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 4px;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  z-index: 1010;
}

.lightbox-prev:hover, .lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
  color: var(--primary-color);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width: 768px) {
  .lightbox-prev, .lightbox-next {
    font-size: 20px;
    padding: 12px;
  }
  .lightbox-close {
    top: 10px;
    right: 20px;
  }
}

