/* =========================================
   VARIABLES & SETUP
   ========================================= */
:root {
  /* Brand Colors from Logo */
  --primary-color: #00509B;      /* Schüco Blue */
  --accent-red: #E30613;         /* Accent Red */
  --accent-yellow: #FFCC00;      /* Accent Gold/Yellow */
  
  /* Neutral Palette for High-End Look */
  --text-main: #1A1A1A;
  --text-light: #F5F5F5;
  --text-muted: #737373;
  --bg-body: #FAFAFA;
  --bg-dark: #0A0F16;
  --bg-card: #FFFFFF;
  --bg-light: #F0F3F5;
  
  /* Fonts */
  --font-text: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
  
  /* Geometry & Effects */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 32px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  
  --transition-fast: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-text);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }

.highlight {
  position: relative;
  display: inline-block;
  color: var(--primary-color);
}
.highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 0.2em;
  background-color: var(--accent-yellow);
  opacity: 0.4;
  z-index: -1;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
  width: 100%;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  margin-right: auto;
  margin-left: auto;
}

.section-padding {
  padding: 6rem 0;
}

@media (min-width: 992px) {
  .section-padding {
    padding: 10rem 0;
  }
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); color: var(--text-light); }

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: #003a73;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 80, 155, 0.4);
}

.btn-outline-light {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  backdrop-filter: blur(5px);
}

.btn-outline-light:hover {
  background-color: #fff;
  color: var(--text-main);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 80, 155, 0.25);
}

.btn-full { width: 100%; }

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: var(--bg-light);
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.badge-red {
  background: rgba(227, 6, 19, 0.1);
  color: var(--accent-red);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-normal);
  background: transparent;
}

.main-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 130px;
  width: auto;
  transition: all var(--transition-normal);
}

/* Default: show light logo (hero-transparent state), hide dark */
.logo-light {
  display: block;
}

.logo-dark {
  display: none;
}

/* Scrolled state: swap to dark logo */
.main-header.scrolled .logo-light {
  display: none;
}

.main-header.scrolled .logo-dark {
  display: block;
}

/* Revert explicitly when NOT scrolled (ensures reliable revert on scroll up) */
.main-header:not(.scrolled) .logo-light {
  display: block;
}

.main-header:not(.scrolled) .logo-dark {
  display: none;
}

.main-nav {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.d-none-mobile {
  display: none;
}

/* Burger Menu */
.burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
}

.main-header:not(.scrolled) .burger-menu span {
  background-color: #fff;
}

/* Offcanvas Menu */
.offcanvas-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background-color: #fff;
  z-index: 1002;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.offcanvas-menu.active {
  right: 0;
}

.offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.offcanvas-logo {
  height: 95px;
}

.close-menu {
  background: none;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
}

.offcanvas-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: auto;
}

.offcanvas-link {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

.offcanvas-link:hover {
  color: var(--primary-color);
}

.contact-info-sm p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.contact-info-sm i {
  color: var(--primary-color);
  width: 20px;
}

.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.offcanvas-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  color: #fff;
  padding-top: 6rem;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.hero-slider .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 8s linear;
  transform: scale(1);
}

.hero-slider .slide.active {
  opacity: 1;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradient overlay for better text readability */
  background: linear-gradient(to right, rgba(0, 19, 43, 0.85) 0%, rgba(0, 42, 92, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* =========================================
   USPs / ABOUT SECTION
   ========================================= */
.section-header {
  margin-bottom: 3rem;
}

.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.usp-card {
  background: var(--primary-color);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  color: #fff;
}

.usp-card h3 {
  color: #fff;
}

.usp-card p {
  color: rgba(255, 255, 255, 0.85);
}

.usp-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  background: #003a73;
}

.usp-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-yellow);
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
}

.usp-card:hover .usp-icon {
  background: var(--accent-yellow);
  color: var(--primary-color);
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.section-kicker {
  display: block;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.service-image {
  width: 100%;
}
.service-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.service-content {
  padding: 2rem;
}

.feature-list {
  list-style: none;
  margin-top: 1.5rem;
}

.feature-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.feature-list i {
  margin-right: 0.75rem;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.service-card.dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.service-card h4 {
  color: #fff;
}

.service-card .icon-wrap {
  font-size: 2rem;
  color: var(--accent-yellow);
  margin-bottom: 1rem;
}

/* =========================================
   SECURITY SECTION
   ========================================= */
.security-wrapper {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a2530 100%);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.security-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(227,6,19,0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.security-list {
  list-style: none;
}

.security-list li {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.security-list .icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-red);
}

.security-list h5 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.security-list span {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-logo {
  height: 45px;
  filter: brightness(0) invert(1);
}

.main-footer h4 {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.main-footer ul {
  list-style: none;
}

.main-footer ul li {
  margin-bottom: 0.75rem;
}

.main-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.main-footer a:hover {
  color: var(--primary-color);
}

.contact-col address {
  font-style: normal;
  line-height: 1.8;
}

.contact-col p {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 10px;
}

.contact-col i {
  color: var(--primary-color);
  margin-top: 5px;
}

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

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: #fff;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

/* About Grid & Image */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.img-fluid { max-width: 100%; height: auto; }
.rounded { border-radius: var(--radius-md); }
.shadow-sm { box-shadow: var(--shadow-sm); }

/* Submenu / Dropdown */
.has-submenu { position: relative; }
.submenu {
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  list-style: none;
  padding: 1rem 0;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.has-submenu:hover .submenu {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.submenu li { margin: 0; }
.submenu .nav-link {
  color: var(--text-main);
  padding: 0.5rem 1.5rem;
  display: block;
}
.submenu .nav-link::after { display: none; }
.submenu .nav-link:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}
.submenu-icon { font-size: 0.8rem; margin-left: 5px; }

/* Mobile Submenu */
.has-submenu-mobile .submenu-toggle {
  display: flex; justify-content: space-between; align-items: center;
  margin: 0; cursor: pointer;
}
.submenu-mobile {
  list-style: none; padding-left: 1rem; margin-top: 1rem;
  display: none; flex-direction: column; gap: 1rem;
}
.submenu-mobile.open { display: flex; }
.offcanvas-link.sub { font-size: 1.25rem; font-weight: 500; color: var(--text-muted); }

/* =========================================
   ANIMATIONS
   ========================================= */
[data-reveal] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-reveal="fade-up"] {
  transform: translateY(40px);
}

[data-reveal="scale-up"] {
  transform: scale(0.95);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================
   MEDIA QUERIES (Mobile First - min-width)
   ========================================= */

/* Tablet Portrait & larger */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero-buttons {
    flex-direction: row;
  }

  .usp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .security-wrapper {
    padding: 4rem;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop & larger */
@media (min-width: 1024px) {
  .container {
    max-width: 1140px;
  }

  .hero h1 {
    font-size: 4.5rem;
  }
  
  .d-none-mobile {
    display: inline-flex;
  }

  /* Navigation adjustments */
  .burger-menu {
    display: none;
  }

  .main-nav {
    display: block;
    margin-left: auto;
    margin-right: 2rem;
  }

  .nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
  }

  .nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
  }

  .main-header.scrolled .nav-link {
    color: var(--text-main);
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-fast);
  }

  .nav-link:hover::after {
    width: 100%;
  }

  .usp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }

  .service-item {
    flex-direction: row;
    align-items: center;
    border-radius: var(--radius-lg);
  }
  
  .service-item.reverse {
    flex-direction: row-reverse;
  }

  .service-image {
    flex: 1;
  }
  
  .service-image img {
    height: 100%;
    min-height: 400px;
  }

  .service-content {
    flex: 1;
    padding: 4rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

/* Extra Large */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* =========================================
   SUBPAGE & CONTENT STYLES
   ========================================= */
.content-hero {
  padding: 14rem 0 8rem;
  background-color: var(--bg-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.content-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(0,19,43,0.8), rgba(0,19,43,0.8));
  z-index: 1;
}

.content-hero .container {
  position: relative;
  z-index: 2;
}

.content-hero h1,
.content-hero h2,
.content-hero h3,
.content-hero p,
.content-hero .lead {
  color: #fff;
}

.placeholder-img {
  width: 100%;
  height: 400px;
  background-color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: #888;
  font-weight: 500;
  border: 2px dashed #ccc;
  margin-bottom: 2rem;
}

.placeholder-img i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.placeholder-img.sm { height: 250px; }
.placeholder-img.lg { height: 600px; }

.content-section {
  padding: 8rem 0;
}

@media (max-width: 768px) {
  .content-section {
    padding: 5rem 0;
  }
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
}

.legal-content h2 { margin-top: 2rem; }
.legal-content h3 { margin-top: 1.5rem; }

/* =========================================
   COOKIE BANNER
   ========================================= */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  z-index: 2000;
  padding: 1.5rem 0;
  transition: bottom 0.5s ease;
}

.cookie-banner.active {
  bottom: 0;
}

.cookie-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.cookie-text {
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cookie-container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
}

/* =========================================
   404 PAGE
   ========================================= */
.error-page {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content h1 {
  font-size: 8rem;
  color: var(--primary-color);
  margin-bottom: 0;
}

/* =========================================
   HELPER / UTILITY EXTENSIONS
   ========================================= */
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.font-weight-bold { font-weight: 700; }
.link-reset { text-decoration: none; color: inherit; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--primary-color);
  transition: gap var(--transition-fast);
}
.link-arrow:hover { gap: 0.8rem; }

/* Subpage: force dark logo visible (no scroll trigger needed) */
body.subpage .main-header .logo-dark { display: block; }
body.subpage .main-header .logo-light { display: none; }

/* Clickable card-cover link */
.card-cover-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.service-card { position: relative; }

/* Google Map container sizing */
.gmap-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 300px;
  position: relative;
  z-index: 0;
}
.gmap-container.tall { height: 500px; }
.gmap-container.medium { height: 400px; margin-top: 1.5rem; }
.gmap-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* Leaflet: Karte muss die volle Fläche des Containers ausfüllen */
#leaflet-map { width: 100%; height: 100%; }
#leaflet-map.gmap-container { background: transparent; }
.leaflet-container { background: #eaeef2 !important; }

/* Standort-Card (statt Google-Maps-Embed) */
.location-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.location-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.location-body {
  padding: 1.75rem 1.75rem 2rem;
}
.location-address {
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  color: var(--text-main);
}
.location-address i {
  color: var(--primary-color);
  margin-right: 0.4rem;
}
.location-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.location-actions .btn {
  justify-content: center;
}
.location-actions .btn i {
  margin-right: 0.5rem;
}

/* Job cards (Karriere) */
.job-card {
  background: #fff;
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.job-card h4 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.job-card .job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.job-card .job-meta i { color: var(--primary-color); margin-right: 0.4rem; }

/* Reference cards */
.ref-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .ref-grid { grid-template-columns: repeat(3, 1fr); }
}
.ref-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}
.ref-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.ref-card .placeholder-img {
  margin-bottom: 0;
  border-radius: 0;
  border: none;
  height: 220px;
}
.ref-card-body { padding: 1.5rem 1.75rem; }
.ref-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.ref-card .ref-meta {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.ref-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .form-row.two { grid-template-columns: 1fr 1fr; }
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d9dee3;
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 80, 155, 0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form-check input { margin-top: 0.25rem; }

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}
.stat-item {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-item .stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stat-item .stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Benefits grid (Karriere) */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 600px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}
.benefit {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
}
.benefit i {
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.3rem;
}

/* Content images on subpages */
.content-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: block;
}
.content-image.tall { height: 500px; }
.content-image.wide { height: 450px; }

/* Info row (Process steps) */
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .process-grid { grid-template-columns: repeat(4, 1fr); }
}
.process-step {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.process-step .step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.process-step h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.9rem; margin-bottom: 0; color: var(--text-muted); }

/* =========================================
   REFERENZEN-GALERIE
   ========================================= */
.reference-filter {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6rem;
  row-gap: 0.7rem;
  justify-content: center;
  /* Max-Breite ist bewusst so gesetzt, dass die 9 Kategorie-Buttons
     auf Desktop kontrolliert auf zwei Zeilen umbrechen (etwa 5 + 4),
     statt dass nur ein einzelner Button alleine in Zeile 2 landet.
     Mobile (kleinere Container) brechen wie gewohnt natürlich um. */
  max-width: 880px;
  margin: 2rem auto 0;
}
.reference-filter-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #d6d8de;
  background: #fff;
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.reference-filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.reference-filter-btn.is-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
.reference-filter-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
.reference-card.is-hidden {
  display: none;
}

.reference-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 600px) {
  .reference-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .reference-grid { grid-template-columns: repeat(3, 1fr); }
}

.reference-grid.compact {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 960px) {
  .reference-grid.compact { grid-template-columns: repeat(2, 1fr); }
}

.reference-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: #e9e9e9;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.reference-card:hover,
.reference-card:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  outline: none;
}
.reference-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.reference-card:hover img,
.reference-card:focus-visible img {
  transform: scale(1.06);
}
.reference-card .ref-overlay {
  position: absolute;
  inset: 0;
  /* Helleres Overlay: nur der untere Bereich wird leicht abgedunkelt,
     damit der Titel lesbar bleibt. Das Bild selbst bleibt unverändert hell. */
  background: linear-gradient(to top, rgba(10, 15, 22, 0.55) 0%, rgba(10, 15, 22, 0.05) 50%, rgba(10, 15, 22, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  transition: background 0.3s ease;
}
.reference-card:hover .ref-overlay,
.reference-card:focus-visible .ref-overlay {
  /* Beim Hover wird das Overlay deutlich dunkler */
  background: linear-gradient(to top, rgba(10, 15, 22, 0.85) 0%, rgba(10, 15, 22, 0.3) 60%, rgba(10, 15, 22, 0.1) 100%);
}
.reference-card .ref-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.35rem;
}
.reference-card .ref-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.reference-card .ref-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 22, 0.96);
  z-index: 1000;
  display: none;
  flex-direction: column;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  display: flex;
  opacity: 1;
}
.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  padding: 0 0.5rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.lightbox-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}
.lightbox-counter {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.05em;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { opacity: 1; transform: scale(1.1); }

.lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.08); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav[disabled] { opacity: 0.3; cursor: not-allowed; }

.lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0 0;
  overflow-x: auto;
  justify-content: flex-start;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.lightbox-thumbs::-webkit-scrollbar { height: 6px; }
.lightbox-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
.lightbox-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  background: transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumb:hover { opacity: 0.85; }
.lightbox-thumb.is-active { opacity: 1; border-color: var(--primary-color); }

body.lightbox-open { overflow: hidden; }

/* Footer Partners */
.footer-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
}
.footer-partner {
  display: inline-flex;
  align-items: center;
}
.footer-partner img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 100%;
  opacity: 0.95;
  transition: opacity var(--transition-fast);
}
.footer-partner img:hover {
  opacity: 1;
}

/* =========================================
   UTILITIES & LIGHT-CARD OVERRIDES
   ========================================= */
.text-red { color: var(--accent-red); }

/* Brand-/Einbruchschutz-Liste im hellen Service-Card-Stil (Startseite).
   Scoped auf .service-content, damit die ursprünglichen (dunklen)
   .security-list-Regeln unangetastet bleiben. */
.service-content .security-list {
  margin-top: 1.5rem;
}
.service-content .security-list .icon {
  background: var(--bg-light);
}
.service-content .security-list span {
  color: var(--text-muted);
}

/* =========================================
   TEAM & EINBLICKE SECTION (Startseite)
   ========================================= */
.team-section {
  background: var(--bg-body);
}

.section-intro {
  max-width: 640px;
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.team-subhead {
  margin-top: 4.5rem;
}

.team-portraits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 420px;
  margin: 0 auto;
}

.team-portrait {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.team-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.team-portrait:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.insights-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.insight-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.insight-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.insight-card:hover img {
  transform: scale(1.05);
}

.insight-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(to top, rgba(10, 15, 22, 0.85), rgba(10, 15, 22, 0));
}

@media (min-width: 600px) {
  .team-portraits {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
  .insights-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   JOOMLA-OVERRIDES  (Werbeagentur Hoffmann)
   Alles ab hier ist NUR fuer den Joomla-Betrieb noetig.
   Die statische HTML-Version braucht diesen Block nicht.
   ========================================================= */

/* Content-Wrapper des Templates: volle Breite, kein Extra-Rand.
   Kein 100vw – das erzeugt einen horizontalen Scrollbalken. */
html, body { margin: 0; padding: 0; }
#container { width: 100%; overflow-x: hidden; }

/* Joomla-Artikelwrapper neutralisieren (sonst Abstaende/Chrome um den Content) */
.item-page,
.com-content-article,
.content-item { margin: 0; padding: 0; }

/* Sicherheitsnetz: Joomlas eigener Artikelkopf bleibt unsichtbar,
   auch falls Menuepunkt-Parameter je verstellt werden. */
#container .page-header,
#container .article-info,
#container .icons,
#container .pagenavigation,
#container .content_rating,
#container .article-index,
#container .tags { display: none; }

/* WYSIWYG-Rettung: der Editor macht aus <i class="fa-…"> gern ein <em> */
em[class*="fa-"] { font-style: normal; }

/* Fallback-Slides des Heros (Inline-Styles gehoeren nicht in den Artikel).
   Pfade relativ zu dieser Datei: templates/werbeagentur/css/ -> Joomla-Root */
.hero-slider .slide-1 { background-image: url('../../../images/startslider/slide-1.jpg'); }
.hero-slider .slide-2 { background-image: url('../../../images/startslider/slide-2.jpg'); }
.hero-slider .slide-3 { background-image: url('../../../images/startslider/slide-3.jpg'); }

/* Google-Maps-Platzhalter: iframe wird per JS eingesetzt (Joomla filtert iframes) */
.gmap-container { width: 100%; min-height: 500px; border-radius: var(--radius-md); overflow: hidden; }
.gmap-container iframe { display: block; width: 100%; height: 500px; border: 0; }

/* Agentur-Zeile im Footer (vormals Inline-Style) */
.agency-branding { text-align: center; padding: 20px; }
.agency-branding .fa-heart { color: var(--accent-red); }

/* Joomla-Systemmeldungen dezent in den Content einpassen */
#system-message-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem 0; }
#system-message-container:empty { display: none; padding: 0; margin: 0; }
