:root {
  --primary: #1e3a5f;
  --primary-dark: #142b47;
  --primary-light: #2c5282;
  --accent: #ffcc00;
  --accent-dark: #e6b800;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a2e;
  --text: #333;
  --text-light: #666;
  --white: #fff;
  --shadow: 0 2px 20px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* NAVIGATION */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(30, 58, 95, 0.97);
  backdrop-filter: blur(10px);
  padding: 0 2rem;
  transition: var(--transition);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.navbar .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.navbar .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.navbar .logo-text small {
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.8;
  display: block;
}

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

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.nav-links a.active {
  background: var(--accent);
  color: var(--primary-dark);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 5px;
  background: none;
  border: none;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: var(--transition);
}

/* HERO */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/pictures/startseite-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-light);
  clip-path: ellipse(70% 100% at 50% 100%);
}

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

.hero-badge {
  display: inline-block;
  background: rgba(232, 168, 56, 0.2);
  color: var(--accent);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(232, 168, 56, 0.3);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(232, 168, 56, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* SECTIONS */
.section {
  padding: 5rem 2rem;
}

.section-alt { background: var(--bg-light); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* LEISTUNGEN CARDS */
.leistungen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.leistung-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  display: block;
  position: relative;
  overflow: hidden;
}

.leistung-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.leistung-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.leistung-card:hover::before { transform: scaleX(1); }

.leistung-card .icon {
  width: 56px;
  height: 56px;
  background: rgba(232, 168, 56, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.leistung-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.leistung-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.leistung-card .arrow {
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item h3 span { color: var(--accent); }

.stat-item p {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

/* COMPANY TIMELINE */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--primary));
  top: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  z-index: 1;
  top: 0;
}

.timeline-content h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* REFERENCES */
.references-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.reference-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-left: 4px solid var(--accent);
}

.reference-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-hover);
}

.reference-item h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.reference-item p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* CONTACT SECTION */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.contact-detail {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-detail .icon-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(232, 168, 56, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.contact-detail strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
}

.contact-detail span {
  color: var(--text);
  font-weight: 500;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group label em { color: #e53e3e; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--white);
}

/* FOOTER */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer p, .footer a {
  font-size: 0.9rem;
  line-height: 1.8;
}

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

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

.footer-brand .logo-text {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p {
  max-width: 300px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* PAGE HEADER */
.page-header {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
  position: relative;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
}

.page-header p {
  color: rgba(255,255,255,0.7);
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* CONTENT PAGE */
.content-page .section-inner {
  max-width: 900px;
}

.content-page h2 {
  color: var(--primary);
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
}

.content-page h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.content-page p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.content-page ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-light);
}

.content-page ul li { margin-bottom: 0.4rem; }

.content-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.content-page td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.content-page td:first-child {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  width: 35%;
}

/* MAP */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.75rem 1rem;
    border-radius: 8px;
  }

  .hero h1 { font-size: 2.2rem; }

  .hero p { font-size: 1rem; }

  .section { padding: 3rem 1.25rem; }

  .section-header h2 { font-size: 1.8rem; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .timeline::before { left: 20px; }

  .timeline-item,
  .timeline-item:nth-child(odd) {
    flex-direction: row;
    padding-left: 50px;
  }

  .timeline-content { width: 100%; }

  .timeline-year {
    left: 20px;
    transform: translateX(0);
    top: 0;
  }

  .page-header h1 { font-size: 2rem; }

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

  .content-page td {
    display: block;
    width: 100%;
  }

  .content-page td:first-child {
    width: 100%;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .navbar .logo-text { font-size: 0.95rem; }
  .navbar { padding: 0 1rem; }
  .hero h1 { font-size: 1.8rem; }
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* REFERENCE DETAIL PAGE */
.ref-detail-page {
  padding: 2rem 2rem 4rem;
}

.ref-detail-page .section-inner {
  max-width: 1000px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--bg-light);
  transition: var(--transition);
}

.back-link:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.ref-detail-header {
  margin-bottom: 2.5rem;
}

.ref-detail-header h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.ref-detail-header .client {
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 500;
}

.ref-detail-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 800px;
}

/* GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-grid.single-col {
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  aspect-ratio: 4/3;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* LIGHTBOX */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: 0.7;
  transition: var(--transition);
}

.lightbox-close:hover { opacity: 1; }

/* REFERENCE CARDS (main page) */
.ref-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.ref-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.ref-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.ref-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--bg-light);
}

.ref-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ref-card-body h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.ref-card-body .client-name {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ref-card-body p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.ref-card-body .ref-detail-link {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .gallery-grid.single-col {
    grid-template-columns: 1fr;
  }
  .ref-cards-grid {
    grid-template-columns: 1fr;
  }
  .ref-detail-header h1 {
    font-size: 1.5rem;
  }
}
