/* ============================================================
   B&G Stahlhandel GmbH – Custom Stylesheet
   Ergänzt Tailwind CDN um Animationen, spezielle Backgrounds
   und Komponenten-Styles
   ============================================================ */

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Navigation ---------- */
#header {
  background: transparent;
}

#header.scrolled {
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ---------- Hero Background ---------- */
.hero-bg {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(26, 101, 119, 0.30) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(26, 101, 119, 0.15) 0%, transparent 40%),
    linear-gradient(135deg, rgba(17,17,17,0.94) 0%, rgba(28,28,28,0.90) 100%),
    url('../assets/images/allgemein/betonstahl_staebe.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ---------- About Card Background ---------- */
.about-card-bg {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(255,255,255,0.05) 8px,
    rgba(255,255,255,0.05) 9px
  );
}

/* ---------- Section Labels ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #1a6577;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: #1a6577;
  border-radius: 2px;
}

.section-label-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3da0b8;
  margin-bottom: 1rem;
}

.section-label-light::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: #1a6577;
  border-radius: 2px;
}

/* ---------- Product Cards ---------- */
.product-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.09);
}

/* Product image area */
.product-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.product-img-bg {
  width: 100%;
  height: 100%;
  background: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img {
  transform: scale(1.04);
}

.product-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,17,0.85) 0%, rgba(8,15,26,0.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  gap: 0.375rem;
}

.product-lager-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background: #1a6577;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.product-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Spec block inside product card */
.prod-spec-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
}

.prod-spec-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.625rem;
}

.prod-spec-hint {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 400;
}

.prod-spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.prod-spec-list li {
  font-size: 0.875rem;
  color: #334155;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.prod-spec-list li::before {
  content: '—';
  color: #1a6577;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Weight table for Betonstahl */
.prod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.prod-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0 0.5rem 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.prod-table td {
  padding: 0.3rem 0.5rem 0.3rem 0;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.prod-table tbody tr:last-child td {
  border-bottom: none;
}

.prod-table td:last-child {
  color: #334155;
  text-align: right;
}

.prod-table th:last-child {
  text-align: right;
}

/* 2-column list for Formstahl */
.prod-spec-list-2col {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.5rem;
}

.prod-spec-list-2col li {
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.prod-spec-list-2col li::before {
  content: '—';
  color: #1a6577;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* Matten-Tabelle (4 Spalten, kompakter) */
.prod-table-matten th,
.prod-table-matten td {
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem 0.25rem 0;
}

.prod-table-matten td:not(:first-child),
.prod-table-matten th:not(:first-child) {
  text-align: right;
}

.prod-table-matten td:last-child,
.prod-table-matten th:last-child {
  color: #64748b;
  font-weight: 500;
}

/* Badge row for Mattentypen */
.prod-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.prod-badge {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Inter', monospace;
  color: #475569;
  background: white;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ---------- Service Cards ---------- */
.service-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.875rem;
  padding: 1.25rem 1.5rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.service-icon {
  width: 40px;
  height: 40px;
  background: rgba(26, 101, 119, 0.12);
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Reference Cards ---------- */
.ref-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ref-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.12);
}

.ref-card:focus-visible {
  outline: 2px solid #1a6577;
  outline-offset: 3px;
}

.ref-image {
  position: relative;
  height: 200px;
}

.ref-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.4) 100%);
}

.ref-content {
  padding: 1.5rem;
}

/* ---------- Form Inputs ---------- */
.form-input {
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  background: white;
}

/* ---------- Fade-in Animations (Hero) ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.7s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.30s; }
.fade-in.delay-3 { animation-delay: 0.45s; }
.fade-in.delay-4 { animation-delay: 0.60s; }
.fade-in.delay-5 { animation-delay: 0.75s; }

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

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.12s; }
.scroll-reveal.delay-2 { transition-delay: 0.24s; }
.scroll-reveal.delay-3 { transition-delay: 0.36s; }
.scroll-reveal.delay-4 { transition-delay: 0.48s; }

/* ---------- Focus Visible (Accessibility) ---------- */
:focus-visible {
  outline: 2px solid #1a6577;
  outline-offset: 3px;
}

/* ---------- Selection Color ---------- */
::selection {
  background: #1a6577;
  color: white;
}

/* ---------- Scrollbar (subtle) ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #111111;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ---------- Mobile Menu transition ---------- */
#mobile-menu {
  transition: all 0.2s ease;
}

/* ---------- Reference Card – Gallery Hint on Hover ---------- */
.ref-gallery-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(17, 17, 17, 0.55);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.ref-card:hover .ref-gallery-hint {
  opacity: 1;
}

/* ---------- Galerie-Modal (Lightbox) ---------- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#lightbox.open {
  display: flex;
}

#lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

#lightbox-caption {
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
}

#lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.15s;
}

#lightbox-close:hover {
  background: rgba(255,255,255,0.16);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.15s;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.16);
}

#lightbox-prev { left: 1.25rem; }
#lightbox-next { right: 1.25rem; }

/* Thumbnail row in lightbox */
#lightbox-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 1rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
}

#lightbox-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.lb-thumb.active,
.lb-thumb:hover {
  opacity: 1;
  border-color: #1a6577;
}


/* ---------- Map Placeholder (2-Klick-Lösung) ---------- */
.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: #111111;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: #94a3b8;
}

.map-placeholder-inner svg {
  opacity: 0.4;
}

.map-placeholder-inner p {
  font-size: 0.875rem;
  max-width: 280px;
  line-height: 1.6;
}

.map-load-btn {
  margin-top: 0.25rem;
  padding: 0.6rem 1.4rem;
  background: #1a6577;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.map-load-btn:hover {
  background: #155360;
}


/* ---------- Cookie-Banner ---------- */
#cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 2rem);
  max-width: 680px;
  background: #2d2d2d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
  z-index: 9000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 1.25rem 1.5rem;
}

#cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
}

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 560px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }
}

.cookie-banner-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.6;
  flex: 1;
}

.cookie-banner-text strong {
  color: #e2e8f0;
}

.cookie-link {
  color: #3da0b8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-link:hover {
  color: #3da0b8;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.cookie-btn-decline {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(255,255,255,0.15);
}

.cookie-btn-decline:hover {
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
}

.cookie-btn-accept {
  background: #1a6577;
  color: white;
  border-color: #1a6577;
}

.cookie-btn-accept:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

