/* --- 1. FONTS --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/includes/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/includes/fonts/playfair-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/includes/fonts/playfair-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- 2. GLOBAL STYLES & SCROLLBAR --- */
html {
  scroll-behavior: smooth;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #FDFCFB;
  color: #333;
  overflow-x: hidden;
  font-display: swap;
  hyphens: inherit;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #FDFCFB;
}

::-webkit-scrollbar-thumb {
  background: #C5A059;
  border-radius: 10px;
  border: 2px solid #FDFCFB;
}

::-webkit-scrollbar-thumb:hover {
  background: #A68545;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #C5A059 #FDFCFB;
}

[id] {
  scroll-margin-top: 100px;
}

/* --- 3. TYPOGRAPHY & COLORS --- */
h1,
h2,
h3,
h4,
.serif {
  font-family: 'Playfair Display', serif;
}

.gold-text {
  color: #9E7D35;
}

.gold-bg {
  background-color: #C5A059;
}

.bg-cream {
  background-color: #F9F7F2;
}

.hero-text-shadow {
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.4);
}

.deep-text {
  line-height: 1.8;
  font-size: 1.15rem;
  color: #4b5563;
}

/* Spezifische Italic-Regel aus der alten Datei */
i,
em,
.italic:not(.gold-text) {
  color: #4b5563 !important;
}

/* --- 4. LAYOUT COMPONENTS --- */
.hero-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8rem;
  background-color: #ffffff;
  background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('/i/Hochzeitsansprache-Braeutigam-Vater.webp');
  background-size: cover;
  background-position: center 25%;
  background-attachment: fixed;
}

.hero-bg-end {
  background-color: #FEF9F0;
  background-image: linear-gradient(rgba(254, 249, 240, 0.5), rgba(254, 249, 240, 0.8)),
    url('/i/braeutigamvater-rede-lustig.webp');
  background-size: cover;
  background-position: center 25%;
  background-attachment: fixed;
}

header h1 span,
#redegold h2 span,
.hero-bg-end h2 span {
  color: #C5A059;
}

#spezialfaelle h2 {
  font-size: 28px;
  line-height: 1.3;
  font-style: italic;
  font-weight: normal;
}

#spezialfaelle h3 {
  font-size: 24px;
  line-height: 1.4;
  font-style: italic;
  font-weight: normal;
}

.byline-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  padding: 2rem;
  width: 90%;
  max-width: 42rem;
  margin: -5rem auto 3rem auto;
  position: relative;
  z-index: 20;
}

.byline-portrait {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-left: 0 !important;
  /* Fix aus der alten Datei */
}

.content-section {
  margin-bottom: 7rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.content-section h2 {
  max-width: 100%;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  word-break: normal;
}

/* --- 5. INTERACTIVE & UI ELEMENTS --- */
.progress-bar {
  height: 4px;
  background: #C5A059;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: width 0.1s;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.media-logo {
  filter: grayscale(100%);
  opacity: 0.4;
  transition: all 0.4s ease;
  max-height: 25px;
}

.media-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.diagram-dot {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  stroke: white;
  stroke-width: 2;
}

.diagram-dot:hover {
  r: 14;
}

.image-container {
  position: relative;
  width: 100%;
  margin: 3rem 0;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  background-color: #eee;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
  transition: opacity 0.5s ease;
}

/* Forms & Textarea */
.custom-textarea {
  padding: 2rem !important;
  line-height: 1.7;
  font-size: 1.1rem;
  min-height: 320px;
  background-color: #FAFAFA;
  border: 2px solid #e5e7eb;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.custom-textarea:focus {
  background-color: #fff;
  border-color: #C5A059;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #C5A059;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

/* Quiz & Testimonials */
.quiz-inverted {
  background-color: #FEF9F0;
  border: 1px solid rgba(197, 160, 89, 0.15);
  color: #111;
}

.quiz-button {
  border: 1px solid rgba(17, 17, 17, 0.1);
  background-color: white;
  color: #111;
  transition: all 0.3s ease;
  width: 100%;
  text-align: left;
}

.quiz-button:hover {
  background-color: #C5A059;
  color: white;
  border-color: #C5A059;
  transform: translateY(-2px);
}

.testimonial-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.testimonial-slide {
  min-width: 100%;
  padding: 0 2rem;
}

.comparison-card {
  transition: all 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.comparison-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

/* Timeline */
.timeline-step {
  position: relative;
  padding-left: 3rem;
}

.timeline-step::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 2.5rem;
  bottom: 0;
  width: 2px;
  background: rgba(197, 160, 89, 0.2);
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 2rem;
  height: 2rem;
  background: #C5A059;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  z-index: 2;
  border: 4px solid #FDFCFB;
}

/* Misc Utilities */
details summary::-webkit-details-marker {
  display: none;
}

.text-green-600 {
  color: #16a34a !important;
}

.text-orange-500 {
  color: #f97316 !important;
}

.text-red-500 {
  color: #ef4444 !important;
}

/* Animations */
.animate-bounce-slow {
  animation: bounceSlow 3s infinite ease-in-out;
}

@keyframes bounceSlow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(15px);
  }
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .byline-container {
    margin-top: -2rem;
    padding: 1.5rem;
    width: 95%;
  }

  .hero-bg {
    padding-bottom: 4rem;
  }
}

/* Mobile Optimierung fuer den Overlap */
@media (max-width: 768px) {
  .byline-container {
    margin-top: -2rem;
    /* Weniger Overlap auf kleinen Screens */
    padding: 1.5rem;
    width: 95%;
  }

  .hero-bg {
    padding-bottom: 4rem;
  }
}

/* --- Erg�nzung f�r Mini-Testimonial im Hero --- */
.mini-testimonial-float {
  /* Erzeugt den �berlappungs-Effekt (�hnlich wie die Byline) */
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.15);
}

/* Positionierung auf sehr gro�en Bildschirmen korrigieren, damit es nicht zu weit au�en klebt */
@media (min-width: 1600px) {
  .absolute.right-6.md-right-9 {
    right: calc(50% - 750px);
  }
}

/* Sicherstellen, dass die Schrift im Mini-Slider wirklich klein und elegant ist */
.mini-testimonial-float p {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* Sanftes Schweben-Animation f�r das Element */
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.mini-testimonial-float {
  animation: float 6s ease-in-out infinite;
}

/* --- FIX: POSITIONIERUNG TRUST-BADGE --- */
/* 1. Wrapper-Verhalten anpassen */
/* Wir entfernen 'relative' vom Container, damit sich das absolute Badge
   am gesamten Header (.hero-bg) orientiert und nicht am zentrierten Container. */
.hero-bg .max-w-7xl {
  position: static !important;
}

/* 2. Das Badge fixieren */
.hero-bg .max-w-7xl>a[href="#kundenstimmen"] {
  position: absolute !important;
  top: 1rem;
  /* Abstand von oben */
  /* WICHTIG: Damit die wei�e Box nur so breit ist wie der Text */
  width: -moz-fit-content !important;
  width: fit-content !important;
  /* DIE MAGISCHE FORMEL F�R DIE LINKSB�NDIGKEIT:
       Wir berechnen den linken Abstand:
       - Auf kleinen Screens: einfach 1.5rem (entspricht dem Padding px-6)
       - Auf gro�en Screens: Mitte des Bildschirms (50vw) minus halbe Containerbreite (40rem) plus Padding.

       Die Funktion max() nimmt automatisch den gr��eren (passenden) Wert.
    */
  left: max(1.5rem, calc(50vw - 40rem + 1.5rem)) !important;
  /* Transform entfernen, da wir 'left' jetzt exakt berechnen */
  transform: none !important;
  /* Margins entfernen */
  margin: 0 !important;
  z-index: 30;
}

/* 3. Sicherheitshalber: Inhalt-Layering */
/* Da der Wrapper nun 'static' ist, geben wir dem Text-Inhalt sicherheitshalber
   wieder 'relative', damit er z-index technisch korrekt �ber Hintergr�nden liegt. */
.hero-bg .max-w-7xl>div {
  position: relative;
  z-index: 10;
}

/* --- 6. FOOTER --- */
footer {
  /* py-24 in Tailwind sind 6rem. Die Hälfte für unten sind 3rem. */
  padding-bottom: 3rem !important;
}

/* Entfernt den zusätzlichen Abstand der letzten Inhaltszeile (oft mb-20), damit nur das Padding wirkt */
footer .max-w-7xl>div:last-child {
  margin-bottom: 0 !important;
}

/* Box für Profi-Tipps (schmalere Variante) */
.tipps-box {
  margin-top: 3rem;
  /* mt-12 */
  margin-left: 0.5rem;
  /* mx-2 */
  margin-right: 0.5rem;
  padding: 2.5rem;
  /* p-10 */
  background-color: #F9F7F2;
  /* bg-cream */
  border-radius: 40px;
  /* rounded-[40px] */
  border: 1px solid rgba(197, 160, 89, 0.1);
  /* border border-[#C5A059]/10 */
}

@media (min-width: 768px) {
  .tipps-box {
    margin-left: 1.5rem;
    /* md:mx-6 */
    margin-right: 1.5rem;
    padding: 3.5rem;
    /* md:p-14 */
  }
}

.rg-author-link {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
  color: #9E7D35;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.rg-author-link:hover {
  text-decoration: underline;
}

/* --- AUTHOR BOX DESKTOP LAYOUT --- */
@media (min-width: 1280px) {
  .author-flex-wrapper {
    flex-direction: row !important;
    gap: 3rem !important;
  }

  .author-flex-main {
    flex: 1 1 0% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
  }
}
