/* ===========================
   Glogau Bauunternehmen
   Modern Responsive Stylesheet
   =========================== */

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #d4841a;
  --color-primary-dark: #b06e12;
  --color-dark: #1a1a2e;
  --color-dark-light: #2d2d44;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #f8f9fa;
  --color-white: #ffffff;
  --color-border: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   Header / Navigation
   =========================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(26, 26, 46, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--color-primary);
}

.logo:hover {
  color: var(--color-white);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

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

.nav-link:hover {
  color: var(--color-white);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('../assets/img/wall1.jpg') center/cover no-repeat;
  color: var(--color-white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(45, 45, 68, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  opacity: 0.9;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 132, 26, 0.4);
}

/* ===========================
   Sections Common
   =========================== */

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ===========================
   Leistungen / Services
   =========================== */

.leistungen {
  background: var(--color-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.service-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--color-border);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

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

.service-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.services-note {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1rem;
  padding: 1.5rem 2rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

/* ===========================
   Galerie / Gallery
   =========================== */

.galerie {
  background: var(--color-bg);
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0);
  transition: background var(--transition);
}

.gallery-item:hover::after {
  background: rgba(26, 26, 46, 0.2);
}

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

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

/* ===========================
   Lightbox
   =========================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
  animation: fadeIn 0.3s ease-out;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 2rem;
  padding: 1rem;
  transition: opacity var(--transition), transform var(--transition);
  opacity: 0.7;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
}

.lightbox-prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) translateX(-3px);
}

.lightbox-next:hover {
  transform: translateY(-50%) translateX(3px);
}

/* ===========================
   Kontakt / Contact
   =========================== */

.kontakt {
  background: var(--color-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}

.contact-card p {
  color: var(--color-text-light);
  line-height: 1.8;
}

.contact-card a {
  color: var(--color-primary);
  font-weight: 500;
}

/* ===========================
   Footer
   =========================== */

.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand p {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition);
}

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

/* ===========================
   Legal Pages (Impressum, DSGVO)
   =========================== */

.legal-page {
  padding-top: 100px;
  padding-bottom: 4rem;
  min-height: 100vh;
  background: var(--color-bg);
}

.legal-page .container {
  max-width: 800px;
}

.legal-page h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--color-dark);
}

.legal-page h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}

.legal-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-dark-light);
}

.legal-page h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.legal-page p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.legal-page ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-page li {
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.legal-page a {
  word-break: break-word;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-weight: 500;
  color: var(--color-primary);
}

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

/* ===========================
   Animations
   =========================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .section {
    padding: 3.5rem 0;
  }

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

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

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-container {
    height: 60px;
  }

  .nav {
    top: 60px;
  }
}
