/* ===== Schweißtechnik Krüger — Modern Stylesheet ===== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #1a2a3a;
  --color-primary-light: #2d4a6a;
  --color-accent: #d4a03c;
  --color-accent-hover: #c4902c;
  --color-bg: #f5f6f8;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #6b7280;
  --color-border: #e2e5ea;
  --color-card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1100px;
  --nav-height: 64px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent-hover); }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--color-primary);
  line-height: 1.3;
  font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.05rem; margin-bottom: 0.25rem; color: var(--color-primary-light); }
p { margin-bottom: 1rem; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-content {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 3rem;
  min-height: calc(100vh - 200px);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-primary);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.navbar-links {
  display: flex;
  gap: 0.25rem;
}

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

.navbar-links a:hover,
.navbar-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.navbar-links a.active {
  background: rgba(255,255,255,0.18);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

@media (max-width: 800px) {
  .navbar-links { display: none; }
  .hamburger { display: block; }
}

/* --- Hero Section (Homepage) --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  margin-top: var(--nav-height);
  text-align: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

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

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

/* --- Cards --- */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: box-shadow 0.3s, transform 0.3s;
}

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

.card h3 {
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--color-accent);
  border-radius: 2px;
}

.card p { color: var(--color-text-light); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link::after { content: ' \2192'; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* --- Page Header --- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
  margin-top: var(--nav-height);
}

.page-header h1 {
  color: #fff;
}

.page-header p {
  color: rgba(255,255,255,0.75);
  margin-top: 0.25rem;
}

/* --- Tabs (Leistungen) --- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: var(--font);
}

.tab-btn:hover { background: var(--color-bg); color: var(--color-text); }
.tab-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Lists --- */
.styled-list {
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.styled-list li {
  padding: 0.85rem 1.25rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}

.styled-list li:last-child { border-bottom: none; }
.styled-list li:hover { background: #f8f9fb; }

.styled-list h4 {
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* --- Product Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.gallery-item {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.gallery-item picture {
  display: block;
}

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

.gallery-item figcaption {
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: var(--color-text);
  font-size: 0.9rem;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-caption {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

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

.contact-info {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.contact-info h3 { margin-bottom: 1.25rem; }

.contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.contact-item .label {
  font-weight: 600;
  min-width: 70px;
  color: var(--color-primary);
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
}

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

/* --- Referenzen --- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.ref-item {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: box-shadow 0.2s;
}

.ref-item:hover { box-shadow: var(--shadow-md); }

.ref-item::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Über Uns --- */
.about-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 1.5rem auto 0;
  line-height: 1.9;
}

/* --- Impressum --- */
.impressum-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 700px;
  margin: 1.5rem auto 0;
}

.impressum-content h3 {
  margin-top: 1.5rem;
}

/* --- Data Table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { font-weight: 600; color: var(--color-primary); white-space: nowrap; }

@media (max-width: 600px) {
  .data-table td:first-child { white-space: normal; }
}

/* --- Footer --- */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

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

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer p, .footer a { font-size: 0.9rem; }
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--color-accent); }

.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }

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

/* --- Mosaic Hero (Produktgalerie) --- */
.mosaic-hero {
  position: relative;
  margin-top: var(--nav-height);
  height: 420px;
  overflow: hidden;
}

.mosaic-masonry {
  columns: 4;
  gap: 4px;
  height: 100%;
}

.mosaic-masonry img {
  width: 100%;
  display: block;
  margin-bottom: 4px;
  border-radius: 2px;
  transition: opacity 0.8s ease-in-out;
}

.mosaic-masonry img.mosaic-fade {
  opacity: 0;
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 42, 58, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  z-index: 1;
}

.mosaic-overlay h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.mosaic-overlay p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
}

@media (max-width: 800px) {
  .mosaic-masonry {
    columns: 3;
  }
}

@media (max-width: 600px) {
  .mosaic-hero {
    height: 280px;
  }

  .mosaic-masonry {
    columns: 2;
  }
}

/* --- Enhanced Mobile Responsiveness --- */
@media (max-width: 800px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .page-header {
    padding: 2rem 0 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .tabs {
    gap: 0.25rem;
  }

  .tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

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

  .about-content,
  .impressum-content {
    padding: 1.5rem;
  }

  .lightbox-nav {
    font-size: 1.8rem;
    padding: 0.4rem 0.75rem;
  }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
}

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

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

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

  .mobile-nav a {
    padding: 1rem 1.5rem;
    min-height: 44px;
  }

  .footer-grid {
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --- Utilities --- */
.section { margin-top: 2rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
