/* =========================================================
   Hanseatisches Gutachterkontor
   Lokale Webfonts – Open Sans & Playfair Display (WOFF2)
========================================================= */

/* ---------------------------------------------------------
   Webfonts
--------------------------------------------------------- */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* =========================================================
    Hanseatisches Gutachterkontor – Hauptstylesheet
========================================================= */

/* ---------------------------------------------------------
    0. Grundlayout
--------------------------------------------------------- */
html {
  height: 100%;
  overflow-y: scroll;
}

body {
  margin: 0;
  padding-top: 110px;
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--text, #2b2b2b);
  line-height: 1.6;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.main-content,
body > main {
  flex: 1;
}

/* ---------------------------------------------------------
    1. Farben / Design Tokens
--------------------------------------------------------- */
:root {
  --primary: #1f2f3d;
  --primary-light: #2f4457;
  --gold: #caa45e;
  --gold-dark: #b8944f;
  --text: #2b2b2b;
  --border: #e0e0e0;
  --whatsapp-green: #25d366;
}

/* ---------------------------------------------------------
    2. Links
--------------------------------------------------------- */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold);
}

/* ---------------------------------------------------------
    3. Typografie
--------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--primary);
}

/* ---------------------------------------------------------
    4. Navbar / Header
--------------------------------------------------------- */
.navbar {
  background-color: #ffffff;
  height: 110px;
  border-bottom: 2px solid var(--gold);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.navbar-logo {
  max-height: 106px;
  height: auto;
  width: auto;
  display: block;
}

.header-info {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  white-space: nowrap;
}

.header-info .days {
  color: var(--gold);
  font-weight: 600;
}

.header-info .contact-icons a {
  display: flex;
  align-items: center;
}

.navbar-nav .nav-link {
  color: var(--primary) !important;
  font-weight: 600;
  margin-left: 1rem;
}

.navbar-nav .nav-link:hover {
  color: var(--gold) !important;
}

/* ---------------------------------------------------------
    5. HERO – Startseite
    FOUC-FIX: Elemente sind standardmäßig SICHTBAR.
    Animation wird nur ausgeführt wenn .js-ready auf <html>.
    Das Inline-Script in header.php setzt diese Klasse sofort,
    bevor der Body gerendert wird → kein Blitzen.
--------------------------------------------------------- */
.hero-hamburg {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background-color: var(--primary);
}

/* LCP-optimiertes Hero-Bild: echtes <img>-Element statt CSS background */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: heroZoom 20s ease-in-out infinite alternate;
  z-index: 1;
}

.hero-hamburg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(31, 47, 61, 0.45);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 140px 20px;
  color: #ffffff;
}

.hero-hamburg h1 {
  color: #ffffff;
  max-width: 900px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-lead {
  color: #f1f1f1;
  font-size: 1.1rem;
  max-width: 1000px;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Standard: sichtbar (für den Fall ohne JS oder vor JS-Load) */
.hero-hamburg h1,
.hero-hamburg .hero-lead,
.hero-hamburg a.btn-gold {
  opacity: 1;
  transform: translateY(0);
}

/* Animation nur wenn js-ready Klasse vorhanden (gesetzt per Inline-Script) */
.js-ready .hero-hamburg h1,
.js-ready .hero-hamburg .hero-lead,
.js-ready .hero-hamburg a.btn-gold {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1.2s ease forwards;
}

.js-ready .hero-hamburg h1 {
  animation-delay: 0.2s;
}
.js-ready .hero-hamburg .hero-lead {
  animation-delay: 0.4s;
}
.js-ready .hero-hamburg a.btn-gold {
  animation-delay: 0.6s;
}

@keyframes heroZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
    6. Buttons
--------------------------------------------------------- */
.btn {
  border-radius: 4px;
  padding: 12px 26px;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-gold {
  background-color: var(--gold);
  color: #ffffff;
  border: none;
}

.btn-gold:hover {
  background-color: var(--gold-dark);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
    7. Cards
--------------------------------------------------------- */
.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

/* ---------------------------------------------------------
    8. Content-Seiten & FAQ Fix (FENSTEREFFEKT)
--------------------------------------------------------- */
.content-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    url("../img/hintergrund.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 80px 0;
}

.content-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 50px;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.12);
}

.content-card p {
  margin-bottom: 1.25rem;
}

/* Blocksatz ohne automatische Silbentrennung */
.text-justify {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

/* FIX: Lange Links umbrechen auf allen Geräten */
.content-card a {
  overflow-wrap: break-word;
  word-break: break-all;
}

/* Größerer Abstand zwischen zwei Absätzen innerhalb von content-card */
.content-card p.p-gap {
  margin-bottom: 2rem !important;
}

/* Letzter Absatz in Karte – kein unterer Abstand */
.content-card p.p-last {
  margin-bottom: 0 !important;
}

/* Einleitungstext: etwas mehr Abstand zur Überschrift */
.intro-text-gap {
  margin-top: 2rem !important;
}

/* "Unsere Angebote": gleicher Abstand wie Kooperationspartner (mt-3 pt-3) */
.section-title-gap {
  margin-top: 1rem !important;
  padding-top: 1rem !important;
}

/* Spaltenabstand 1,5 cm im Zweispalter (Warum-Abschnitt) */
@media (min-width: 768px) {
  .row.col-gap-wide > .col-md-6:first-child {
    padding-right: 0.75cm;
  }
  .row.col-gap-wide > .col-md-6:last-child {
    padding-left: 0.75cm;
  }
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

.service-window {
  height: 150px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin: 20px 0;
}

/* Hintergrundbild als <img> – funktioniert auf Desktop & Mobile/iOS Safari */
.service-window-img {
  position: absolute;
  /* Bild ist deutlich größer als das Fenster → nur ein Ausschnitt sichtbar */
  left: -10%;
  width: 120%;
  top: 50%;
  height: auto; /* natürliche Höhe behalten – viel größer als 150px */
  min-height: 400%; /* mind. 4x so hoch wie das Fenster */
  transform: translateY(-50%);
  object-fit: cover;
  object-position: center;
  will-change: transform;
  pointer-events: none;
  user-select: none;
}

.accordion-item.rounded {
  overflow: hidden;
  border: 1px solid var(--border) !important;
}

.accordion-button {
  border-radius: inherit !important;
  box-shadow: none !important;
  font-size: 1.15rem;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(31, 47, 61, 0.03);
  color: var(--gold);
  border-bottom: 1px solid var(--border);
}

/* ---------------------------------------------------------
    9. Checklisten & Spezial-Listen
--------------------------------------------------------- */
ul.checklist {
  list-style: none;
  padding-left: 0;
}

ul.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

ul.checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* Square-Bullet-Variante (leistungen.php) – behält ✔ wie die normale Checkliste */

/* ---------------------------------------------------------
    10. Footer
--------------------------------------------------------- */
footer {
  background: linear-gradient(180deg, #223b5c 0%, #1f2f3d 100%);
  color: #ffffff;
  font-size: 0.85rem;
  line-height: 1.25;
  padding: 20px 0;
  margin-top: auto;
  position: relative;
  z-index: 10;
}

footer p {
  margin: 0 0 5px 0;
}
footer a {
  color: var(--gold);
}
footer a:hover {
  color: #ffffff;
}

/* ---------------------------------------------------------
    10a. Footer – Social Media Icons
--------------------------------------------------------- */

.footer-social-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.footer-social-link:hover {
  opacity: 0.8;
}

.footer-social-icon {
  flex-shrink: 0;
  display: block;
}

/* ---------------------------------------------------------
    11. Kontakt-Icons & Kontakt-Logo
--------------------------------------------------------- */
.contact-icons i {
  color: var(--primary);
  transition:
    color 0.3s ease,
    transform 0.2s ease;
  margin-right: 5px;
  display: inline-block;
}

.contact-icons .bi-whatsapp {
  color: var(--whatsapp-green) !important;
}

footer .contact-icons i {
  color: #ffffff;
}

.contact-icons i:hover {
  color: var(--gold) !important;
  transform: scale(1.2);
}

.contact-logo-container {
  text-align: center;
  /* margin-bottom: 2.5rem; */
}

.contact-logo-img {
  height: 180px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  backface-visibility: hidden;
  object-fit: contain;
}

/* --- Bürozeiten (Kontaktseite) --- */
.contact-hours {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.contact-hours-label {
  display: inline-block;
  min-width: 150px;
  font-weight: 600;
}

@media (max-width: 576px) {
  .contact-hours-label {
    min-width: 100%;
    margin-bottom: 2px;
  }
}

/* ---------------------------------------------------------
    12. Formular-Anpassungen
--------------------------------------------------------- */
.content-card .form-label {
  margin-bottom: 0.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #444;
}

/* ---------------------------------------------------------
    13. Responsive
--------------------------------------------------------- */
@media (max-width: 992px) {
  body {
    padding-top: 90px;
  }

  .navbar {
    height: 90px;
    padding: 0 10px;
  }

  .navbar .container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-brand {
    flex-shrink: 1;
    margin-right: 10px !important;
  }

  .navbar-logo {
    max-height: 65px;
    width: auto;
    max-width: 100%;
    display: block;
  }

  .navbar-toggler {
    flex-shrink: 0;
    padding: 4px 8px;
  }

  .header-info {
    display: none !important;
  }

  .contact-logo-container {
    margin-top: 1rem;
  }

  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    position: absolute;
    top: 90px;
    right: 0;
    width: 250px;
    border-radius: 0 0 0 8px;
    border-left: 1px solid var(--border);
    border-bottom: 2px solid var(--gold);
    z-index: 1001;
  }

  .navbar-nav {
    text-align: right;
  }
  .navbar-nav .nav-link {
    margin-left: 0;
    margin-bottom: 0.2rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .hero-hamburg {
    min-height: 480px;
  }
  .hero-content {
    padding: 100px 20px;
  }
  .hero-lead {
    white-space: normal;
  }
  .content-card {
    padding: 30px;
  }
  .accordion-button {
    font-size: 1.05rem;
  }

  /* FIX: background-attachment: fixed funktioniert auf iOS/Mobile-Safari nicht.
     Stattdessen: background-size und -position explizit setzen damit das Bild sichtbar bleibt. */
  .content-page {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
  }

  .service-window {
    min-height: 120px;
  }
}

/* ---------------------------------------------------------
    14. Bild-Zoom Effekt
--------------------------------------------------------- */
.img-zoom-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-zoom-src {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  image-rendering: -webkit-optimize-contrast;
}

.hover-card:hover .img-zoom-src {
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .img-zoom-wrapper {
    height: 180px;
  }
  .img-zoom-src {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ---------------------------------------------------------
    15. Impressum / Kontakt – Sidebar Kontaktkarte
--------------------------------------------------------- */
.service-card-custom {
  background: #ffffff;
  position: sticky;
  top: 130px;
  transition: all 0.25s ease;
  border: 1px solid #f0f0f0;
}

.card.service-card-custom:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.btn-animate {
  transition: all 0.3s ease;
}

.btn-animate:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.impressum-logo {
  max-height: 140px;
}

.impressum-sidebar-title {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--primary);
}

.impressum-hinweis {
  font-size: 0.72rem;
  line-height: 1.1;
  margin-bottom: 0;
}

.impressum-hinweis-icon {
  font-size: 0.65rem;
}

.impressum-divider {
  margin-top: 0rem !important;
  margin-bottom: 1rem !important;
}

.btn-whatsapp {
  background-color: var(--whatsapp-green);
  border: none;
  color: #fff;
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
}

.btn-primary-custom {
  background-color: var(--primary);
  border: none;
  color: #ffffff;
}

.btn-primary-custom:hover {
  background-color: var(--primary-light);
  color: #ffffff;
}

/* ---------------------------------------------------------
    16. Über uns – Beratungsbild mit Zoom-Effekt
--------------------------------------------------------- */
.beratung-zoom-wrapper {
  width: 100%;
  overflow: hidden;
}

.beratung-zoom-img {
  height: 800px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
  display: block;
}

.beratung-zoom-wrapper:hover .beratung-zoom-img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .beratung-zoom-img {
    height: 400px;
  }
}
