/* ==========================================================================
   custom.css – Bild- und Layout-Ergänzungen für die Lübecker Bauunternehmen
   Website. Wird NACH dem Next.js-Stylesheet geladen, nutzt !important, wo
   Tailwind-Klassen überschrieben werden müssen.
   ========================================================================== */

/* --- Hero-Sections: echtes Foto als Hintergrund --------------------------- */
/* Der bestehende Pattern-Div (opacity-10) wird zum Bild-Container umgebaut.   */
section.relative[class*="bg-gradient-to-br"] > div.absolute.inset-0[style] {
  opacity: 1 !important;
  background-image: none !important;
}

/* Lesbarkeit sicherstellen: Gradient-Overlay direkt im Section-Element */
section.relative[class*="bg-gradient-to-br"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(12, 24, 48, 0.65) 0%,
    rgba(12, 24, 48, 0.45) 60%,
    rgba(12, 24, 48, 0.25) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Der Content-Container liegt über dem Overlay (position:relative nötig für z-index) */
section.relative[class*="bg-gradient-to-br"] > div.relative,
section.relative[class*="bg-gradient-to-br"] > div.max-w-7xl,
section.relative[class*="bg-gradient-to-br"] > div {
  position: relative !important;
  z-index: 2 !important;
}

/* Hero-Texte auf Unterseiten: Weiß erzwingen, damit sie auf dem Bild lesbar sind */
section.relative[class*="bg-gradient-to-br"] h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}
section.relative[class*="bg-gradient-to-br"] p {
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55) !important;
}
/* Kleine Kicker über der Überschrift (z.B. "HAUSBAU") heller machen */
section.relative[class*="bg-gradient-to-br"] .text-brand-300,
section.relative[class*="bg-gradient-to-br"] .text-brand-400,
section.relative[class*="bg-gradient-to-br"] .text-brand-200 {
  color: #a5c2ff !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6) !important;
  font-weight: 700 !important;
}

/* Hero-Overlay etwas heller machen, damit Bilder besser zur Geltung kommen */
section.relative[class*="bg-gradient-to-br"]::after {
  background: linear-gradient(
    135deg,
    rgba(12, 24, 48, 0.65) 0%,
    rgba(12, 24, 48, 0.45) 55%,
    rgba(12, 24, 48, 0.25) 100%
  ) !important;
}

/* Das Hintergrund-Image wird per Hero-Class gesetzt (wird pro Seite inline
   im <head> via <style> in das section.relative eingespielt) */

/* --- Service-Cards auf der Startseite ------------------------------------- */
/* Drei Karten nebeneinander, je mit eigenem Bild-Banner oben.               */

/* Der Grid-Container mit genau 3 Cards */
section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card {
  position: relative;
  overflow: hidden;
  padding-top: 0 !important;
}

section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card::before {
  content: "";
  display: block;
  width: calc(100% + 3rem);
  margin: -0.02rem -1.5rem 1.5rem -1.5rem;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Card 1: Haustypen */
section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card:nth-child(1)::before {
  background-image: url("images/architekt-2.jpg");
}

/* Card 2: Sanierung */
section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card:nth-child(2)::before {
  background-image: url("images/maler-1.jpg");
}

/* Card 3: Vermietung */
section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card:nth-child(3)::before {
  background-image: url("images/mietvertrag.jpg");
}

/* Der Icon-Container soll über die Bildkante hängen */
section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card > div:first-child {
  margin-top: -2.5rem;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.15);
  z-index: 3;
  position: relative;
}

/* --- About-Section: Icon-Kacheln mit Bildern --------------------------- */
/* Die vier kleinen Kacheln (Bauleitung, Grundstückssuche, etc.) bleiben   */
/* mit Emoji-Icons bestehen – besseres Foto-Kontingent nutzen wir für die  */
/* Service-Cards und den Hero.                                             */

/* --- Zusätzlicher Stil auf Unterseiten ---------------------------------- */
/* Wenn Unterseiten einen 'relative' Hero mit pt-32 haben, stellen wir       */
/* sicher dass Text gut lesbar bleibt.                                       */
section.relative.pt-32 h1,
section.relative.min-h-screen h1 {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

section.relative.pt-32 p,
section.relative.min-h-screen p {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Kleine Bildverbesserung bei Prüfsiegel-Zeilen im Hero */
section.relative .rounded-full.bg-white\/10 {
  backdrop-filter: blur(8px);
}

/* --- Galerie-Style für neue, eigene Bildsektionen ---------------------- */
.lbu-gallery-section {
  padding: 5rem 0;
  background: #f8f7f5;
}
.lbu-gallery-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.lbu-gallery-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.lbu-gallery-kicker {
  color: #9a5a1b;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.lbu-gallery-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0.5rem 0 0.75rem;
}
.lbu-gallery-sub {
  color: #57534e;
  max-width: 42rem;
  margin: 0 auto;
}
.lbu-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .lbu-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}
.lbu-gallery-item {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  box-shadow: 0 10px 30px -16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}
.lbu-gallery-item:hover {
  transform: translateY(-3px);
}

/* --- Projekt-Banner auf Unterseiten ------------------------------------ */
.lbu-imgrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}
@media (min-width: 768px) {
  .lbu-imgrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lbu-imgrow-item {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.35);
}

/* ========================================================================
   ABRISS-SEITE: Spezifische Styles für /abriss/ Mosaik + Sektionen
   ======================================================================== */

/* Hero-Sektion (Basis-Styles) */
.lbu-abriss-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  color: #fff;
  overflow: hidden;
}
.lbu-abriss-hero .relative.z-10 {
  position: relative;
  z-index: 2;
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lbu-abriss-hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.8);
}
.lbu-abriss-hero h1 .accent {
  color: #c78431; /* Brand color */
}
.lbu-abriss-hero p.sub {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 48rem;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.lbu-abriss-hero a.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #c78431;
  color: #fff;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 2.5rem;
}
.lbu-abriss-hero a.cta:hover {
  background: #a36820;
  transform: translateY(-2px);
}
.lbu-abriss-hero .badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}
.lbu-abriss-hero .badges span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Mosaik-Grid: 2 Spalten Desktop, 1 Spalte Mobile                      */
.lbu-abriss-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 240px);
  gap: 0.75rem;
  margin: 3rem auto;
  max-width: 72rem;
}
@media (min-width: 768px) {
  .lbu-abriss-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 260px);
    gap: 1rem;
  }
}

.lbu-abriss-mosaic > div {
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease;
}
.lbu-abriss-mosaic > div:hover {
  transform: translateY(-4px);
}

/* Unique layout per tile (desktop) */
@media (min-width: 768px) {
  .lbu-abriss-mosaic > div:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.lbu-abriss-mosaic > div::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Abriss: Process-Boxen */
.lbu-abriss-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 60rem;
  margin: 2rem auto;
}
@media (min-width: 768px) {
  .lbu-abriss-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.lbu-abriss-step {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08);
}
.lbu-abriss-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: #2b56b1;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.lbu-abriss-step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 0.5rem;
}
.lbu-abriss-step p {
  color: #57534e;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

/* Abriss: Feature-Strip (Recycling / Genehmigungen / Festpreis) */
.lbu-abriss-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2.5rem auto;
  max-width: 60rem;
}
@media (min-width: 768px) {
  .lbu-abriss-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lbu-abriss-feature {
  background: linear-gradient(135deg, #fff 0%, #f8f7f5 100%);
  border-left: 4px solid #c78431;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
}
.lbu-abriss-feature b {
  display: block;
  color: #1c1917;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.lbu-abriss-feature span {
  color: #57534e;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Startseiten-Callout für Abriss (optional, nur falls wir es einbauen) */
.lbu-abriss-callout {
  background: linear-gradient(100deg, #1c2541 0%, #2b56b1 100%);
  color: #fff;
  padding: 3.5rem 1.5rem;
  border-radius: 0;
  margin: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lbu-abriss-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/abriss-1.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
}
.lbu-abriss-callout > * { position: relative; z-index: 1; }
.lbu-abriss-callout .lbu-kicker {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.lbu-abriss-callout h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}
.lbu-abriss-callout p {
  max-width: 44rem;
  margin: 0 auto 1.5rem;
  color: #dbeafe;
  font-size: 1.05rem;
  line-height: 1.55;
}
.lbu-abriss-callout a.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #c78431;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.lbu-abriss-callout a.btn:hover {
  background: #a36820;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* Mobile Hero: kompaktere Höhe + richtig positioniertes Bild          */
/* ------------------------------------------------------------------ */
@media (max-width: 767px) {
  /* Hero-Sektionen auf allen Unterseiten (inkl. Home mit min-h-screen) */
  section.relative[class*="bg-gradient-to-br"] {
    min-height: 70vh !important;
    padding-top: 5.5rem !important;
    padding-bottom: 3rem !important;
    background-position: center center !important;
  }
  /* Abriss-Hero eigene Regel (anderer Aufbau) */
  .lbu-abriss-hero {
    min-height: 60vh !important;
    padding: 5rem 1.25rem 3rem !important;
  }
  .lbu-abriss-hero h1 {
    font-size: 2rem !important;
    line-height: 1.15 !important;
  }
  .lbu-abriss-hero p {
    font-size: 1rem !important;
  }
}

@media (max-width: 480px) {
  section.relative[class*="bg-gradient-to-br"] {
    min-height: 62vh !important;
  }
}

/* ==========================================================================
   PER-PAGE HERO & CARD BILDER
   Werden über data-page am <html> gesteuert (gesetzt durch Inline-Script
   ganz oben in jedem <head>, für SPA-Nav aktualisiert durch inject-nav.js).
   Relative URLs – custom.css liegt im Site-Root, die images/ ebenfalls.
   ========================================================================== */

/* Startseite */
html[data-page="home"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/baustelle-2.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Haustypen */
html[data-page="haustypen"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/architekt-2.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}
/* Haustypen: Vorteils-Karten unten auf der Seite (Bauleitung + Festpreis) */
html[data-page="haustypen"] section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card:nth-child(2)::before {
  background-image: url("images/bauleitung.jpg") !important;
}
html[data-page="haustypen"] section.py-20.bg-stone-50 div.grid.md\:grid-cols-3 > div.card:nth-child(3)::before {
  background-image: url("images/festpreis.jpg") !important;
}

/* Sanierung */
html[data-page="sanierung"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/maler-2.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Vermietung (leichteres Overlay – das Haus soll gut sichtbar sein) */
html[data-page="vermietung"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.30), rgba(12,24,48,0.10)),
    url("images/doppelhaus-wulfsfelde.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}
html[data-page="vermietung"] section.relative[class*="bg-gradient-to-br"]::after {
  background: linear-gradient(
    135deg,
    rgba(12,24,48,0.40) 0%,
    rgba(12,24,48,0.20) 55%,
    rgba(12,24,48,0.10) 100%
  ) !important;
}

/* Über uns */
html[data-page="ueber-uns"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/architekt-1.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Kontakt */
html[data-page="kontakt"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/baustelle-3.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Impressum + Datenschutz */
html[data-page="impressum"] section.relative[class*="bg-gradient-to-br"],
html[data-page="datenschutz"] section.relative[class*="bg-gradient-to-br"] {
  background-image:
    linear-gradient(135deg, rgba(12,24,48,0.55), rgba(12,24,48,0.25)),
    url("images/bauleiter-1.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Abriss: Hero */
html[data-page="abriss"] .lbu-abriss-hero {
  background-image:
    linear-gradient(135deg, rgba(40,20,10,0.72), rgba(40,20,10,0.42)),
    url("images/abriss-lkw.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Abriss: Mosaik-Tiles */
html[data-page="abriss"] .lbu-abriss-mosaic > div:nth-child(1) {
  background-image: url("images/abriss-1.jpg");
}
html[data-page="abriss"] .lbu-abriss-mosaic > div:nth-child(2) {
  background-image: url("images/abriss-2.jpg");
}
html[data-page="abriss"] .lbu-abriss-mosaic > div:nth-child(3) {
  background-image: url("images/abriss-3.jpg");
}
