/* ==========================================
   Schmiede & Bauschlosserei Behrendt
   Modern Redesign - CSS
   ========================================== */

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

:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --accent: #d4a437;
  --accent-dark: #b8891e;
  --dark: #1a1a1a;
  --gray-900: #2d2d2d;
  --gray-700: #555;
  --gray-400: #999;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font-main);
  color: var(--gray-900);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

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

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }

/* --- Header / Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26, 58, 92, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(26, 58, 92, 0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.nav-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

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

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

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

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  padding: 0.5rem 0;
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--gray-900);
  font-size: 0.88rem;
  border-radius: 0;
}
.dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,58,92,0.85) 0%, rgba(26,26,26,0.7) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  animation: fadeInUp 1s ease;
}

.hero-badge {
  display: inline-block;
  background: rgba(212,164,55,0.2);
  border: 1px solid rgba(212,164,55,0.5);
  color: var(--accent);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.btn-primary {
  background: var(--accent);
  color: var(--dark);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212,164,55,0.4);
}

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

/* --- Sections --- */
section { padding: 5rem 0; }

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

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

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

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto;
  border-radius: 3px;
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
}

.about-image img { width: 100%; height: 400px; object-fit: cover; }

.about-image::after {
  content: '';
  position: absolute;
  bottom: -15px; right: -15px;
  width: 100px; height: 100px;
  border: 3px solid var(--accent);
  border-radius: 12px;
  z-index: -1;
}

.about-text h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.about-text p { margin-bottom: 1rem; color: var(--gray-700); }

/* --- Services / Leistungen --- */
.bg-light { background: var(--gray-100); }

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

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all var(--transition);
  border: 1px solid var(--gray-200);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  border-color: var(--accent);
}

.service-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.6rem;
}

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

.service-card p { font-size: 0.9rem; color: var(--gray-700); }

/* --- Timeline (Geschichte) --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-200);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  padding: 1.5rem 0;
  display: flex;
  align-items: flex-start;
}

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

.timeline-item .content {
  width: 45%;
  background: var(--white);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200);
}

.timeline-item:nth-child(odd) .content { margin-right: auto; text-align: right; }
.timeline-item:nth-child(even) .content { margin-left: auto; text-align: left; }

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 14px;
  background: var(--accent);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--accent);
  border-radius: 50%;
  z-index: 2;
  top: 2rem;
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.timeline-item .content p { font-size: 0.9rem; color: var(--gray-700); }

/* --- Gallery / Referenzen --- */
.gallery-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.gallery-cat-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  background: var(--white);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-cat-btn:hover,
.gallery-cat-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

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

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,58,92,0.8), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

.gallery-item:hover .overlay { opacity: 1; }

.gallery-item .overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Qualifikationen --- */
.qual-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.qual-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid var(--gray-200);
}

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

.qual-card h3 { color: var(--primary); margin-bottom: 0.5rem; }
.qual-card p { color: var(--gray-700); font-size: 0.92rem; }

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-card .icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--white);
}

.contact-info-card h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.contact-info-card p { color: var(--gray-700); font-size: 0.9rem; }

.contact-form {
  background: var(--gray-100);
  padding: 2.5rem;
  border-radius: 12px;
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

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

.footer h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

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

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  line-height: 1;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* --- Page Header (Subpages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 8rem 0 3rem;
  text-align: center;
  color: var(--white);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
  font-size: 0.9rem;
  opacity: 0.8;
}

.page-header .breadcrumb a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb a:hover { color: var(--white); }

/* --- Legal Pages --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin: 2rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.legal-content h2:first-child { border-top: none; padding-top: 0; }

.legal-content p { margin-bottom: 0.75rem; color: var(--gray-700); font-size: 0.92rem; }

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

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

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

/* --- Responsive --- */
@media (max-width: 968px) {
  .nav-toggle { display: flex; }

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

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

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    display: none;
  }

  .nav-dropdown.open .dropdown-menu { display: block; }

  .dropdown-menu a {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 1.5rem;
  }
  .dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: var(--white); }

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

  .timeline::before { left: 20px; }
  .timeline-item { flex-direction: row !important; }
  .timeline-item .content { width: 100%; margin-left: 50px !important; text-align: left !important; margin-right: 0 !important; }
  .timeline-dot { left: 20px; }
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .hero { min-height: 90vh; }
  .hero h1 { font-size: 2rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 900;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}
