/*
Theme Name:   Ferienhof Claussen (Divi Child)
Theme URI:    https://bauernhof-claussen.de
Description:  Child Theme für Divi 5. Header-Fix, Zeitstrahl, wenige globale Feinheiten und Shortcodes. Inhalte, Bilder und Farben pflegt ihr im Divi Builder.
Author:       Ferienhof Claussen
Template:     Divi
Version:      1.2.0
Text Domain:  claussen-child
*/

/* ---------- Header: transparent über dem Titelbild, auch vor dem ersten Scrollen ----------
   Seit Divi 5.19 wird der Sticky-Header erst beim Scrollen transparent. */
.et-l--header .et_pb_section.et_pb_section_0_tb_header {
  background-color: transparent !important;
}
/* Header immer über dem Inhalt: der Hero wird unter den Header gezogen (margin-top -240px)
   und würde ihn sonst überdecken. */
header.et-l--header { position: relative; z-index: 1000; }

/* ---------- Überschriften: Montserrat, etwas enger ---------- */
#et-main-area .et_pb_section h1,
#et-main-area .et_pb_section h2 { letter-spacing: -0.02em; text-wrap: balance; }
/* Neue Seiten: Überschriften immer Montserrat, ohne Großbuchstaben
   (die Divi-Grundeinstellung nutzt eine Schmuckschrift in Versalien) */
.cl-sec h1, .cl-sec h2, .cl-sec h3, .cl-sec h4,
.cl-sec .et_pb_module_header, .cl-sec .et_pb_toggle_title {
  font-family: 'Montserrat', Helvetica, Arial, sans-serif !important;
  text-transform: none !important;
}

/* ---------- Browser-Details aus der Markenpalette ---------- */
::selection { background: var(--gcid-cl-sonne, #ffc53d); color: var(--gcid-cl-tief, #0e3a5c); }
:focus-visible { outline: 3px solid var(--gcid-cl-sonne, #ffc53d); outline-offset: 3px; }
#et-main-area a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Buttons: kein Divi-Pfeil, kein Springen beim Hover ---------- */
body #page-container .et_pb_section.cl-sec .et_pb_button::after,
body #page-container .et_pb_section.cl-sec .et_pb_button::before { display: none !important; content: none !important; }
body #page-container .et_pb_section.cl-sec .et_pb_button_module_wrapper .et_pb_button,
body #page-container .et_pb_section.cl-sec .et_pb_button_module_wrapper .et_pb_button:hover {
  padding: 14px 28px !important;
  letter-spacing: 0 !important;
  text-align: center;
  box-shadow: none !important;
  text-shadow: none !important;
  transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out;
}
@media (max-width: 767px) {
  .cl-sec .et_pb_button_module_wrapper,
  .cl-sec .et_pb_button { width: 100%; text-align: center; }
}

/* ---------- Bilder: einheitlicher Zuschnitt (Fallback) ---------- */
.cl-img img { width: 100%; object-fit: cover; display: block; }
.cl-r43 img { aspect-ratio: 4 / 3; }
.cl-r32 img { aspect-ratio: 3 / 2; }
.cl-r45 img { aspect-ratio: 4 / 5; }
.cl-r11 img { aspect-ratio: 1 / 1; }

/* ---------- Hero ---------- */
.cl-hero-text { justify-content: flex-end; }
.cl-hero-text .et_pb_text:last-child { border-top: 1px solid rgba(255,255,255,.4); padding-top: 16px; }

/* ---------- Fotowand: Bild zoomt beim Überfahren leicht, die Kachel selbst bleibt stehen ---------- */
.cl-kachel { box-shadow: 0 0 0 1px var(--gcid-cl-linie, #d5e3ee); }
.cl-kachel-sonne { box-shadow: none; }
.cl-kachel .et_pb_image_wrap { overflow: hidden; border-radius: 6px; display: block; }
.cl-kachel .et_pb_image_wrap img { transition: transform .7s cubic-bezier(.16,1,.3,1); }
.cl-kachel:hover .et_pb_image_wrap img { transform: scale(1.04); }

/* ---------- Listen ---------- */
.cl-sec .et_pb_text ul { padding-left: 1.1em; margin: 0; }
.cl-sec .et_pb_text li { margin: .3em 0; }
.cl-sec .et_pb_text li::marker { color: var(--gcid-cl-meer, #1478bd); }
.cl-kachel-sonne .et_pb_text li::marker { color: var(--gcid-cl-tief, #0e3a5c); }

/* ---------- Gästestimmen ---------- */
.cl-stimme blockquote { border: 0; padding: 0; margin: 0; font-size: 18px; line-height: 1.6; }
.cl-stimme .cl-cite { font-size: 14px; font-weight: 700; color: var(--gcid-cl-meer, #1478bd); margin-top: 16px; }

/* ---------- FAQ (Divi-Toggles) ---------- */
.cl-faq.et_pb_toggle,
.cl-faq.et_pb_toggle_close,
.cl-faq.et_pb_toggle_open { background-color: #fff !important; padding: 18px 22px; }
.cl-faq .et_pb_toggle_title::before { color: var(--gcid-cl-meer, #1478bd); }
.cl-faq .et_pb_toggle_content { padding-top: 12px; }

/* ---------- Belegungskalender ---------- */
.cl-sec .bkc-mount { margin: 8px 0 4px; }

/* ---------- Zeitstrahl (Spalte mit Klasse cl-zeit, Stationen = Gruppen mit Klasse cl-stopp) ---------- */
.cl-stopp{position:relative}
.cl-stopp::before,.cl-stopp::after{content:"";position:absolute;left:12px;top:6px;bottom:-6px;width:4px;border-radius:2px}
.cl-stopp::before{background:var(--gcid-cl-linie,#d5e3ee)}
.cl-stopp::after{background:var(--gcid-cl-meer,#1478bd);transform-origin:top;transform:scaleY(1)}
.cl-stopp-ende::before,.cl-stopp-ende::after{display:none}
.cl-km{position:relative;margin:0!important;font-size:15px;color:var(--gcid-cl-text,#33475b)}
.cl-km strong{display:inline-block;background:var(--gcid-cl-sonne,#ffc53d);color:var(--gcid-cl-tief,#0e3a5c);font-size:20px;font-weight:700;line-height:1;padding:8px 14px;border-radius:999px;margin-right:6px;font-variant-numeric:tabular-nums}
.cl-km::before{content:"";position:absolute;left:-63px;top:4px;width:26px;height:26px;border-radius:50%;box-sizing:border-box;background:var(--gcid-cl-sonne,#ffc53d);border:4px solid var(--gcid-cl-meer,#1478bd);z-index:1}
.cl-stopp-start .cl-km strong{background:var(--gcid-cl-tief,#0e3a5c);color:#fff}
.cl-stopp-start .cl-km::before{width:34px;height:34px;left:-67px;top:0;background:var(--gcid-cl-tief,#0e3a5c);border-color:var(--gcid-cl-sonne,#ffc53d)}
.cl-route{font-weight:700;color:var(--gcid-cl-tief,#0e3a5c)}
.cl-route::after{content:" \2192";}
/* Bewegung: erst wenn das Skript den Zeitstrahl scharf schaltet; ohne Skript ist alles sichtbar und gefüllt */
.cl-zeit-armed .cl-stopp::after{transform:scaleY(0);transition:transform 1.1s cubic-bezier(.16,1,.3,1)}
.cl-zeit-armed .cl-stopp:not(.cl-stopp-start) .cl-km::before{background:#fff;border-color:var(--gcid-cl-linie,#d5e3ee);transform:scale(.7);transition:transform .45s cubic-bezier(.16,1,.3,1),background-color .3s ease-out,border-color .3s ease-out}
.cl-zeit-armed .cl-stopp:not(.cl-stopp-start) .cl-km strong{background:var(--gcid-cl-himmel,#e8f4fc);transition:background-color .4s ease-out}
.cl-zeit-armed .cl-stopp.is-da:not(.cl-stopp-start) .cl-km::before{background:var(--gcid-cl-sonne,#ffc53d);border-color:var(--gcid-cl-meer,#1478bd);transform:scale(1)}
.cl-zeit-armed .cl-stopp.is-da:not(.cl-stopp-start) .cl-km strong{background:var(--gcid-cl-sonne,#ffc53d)}
.cl-zeit-armed .cl-stopp.is-weiter::after{transform:scaleY(1)}
.cl-sticky{position:sticky;top:140px;align-self:flex-start}
@media (max-width:980px){.cl-sticky{position:static}}
@media (max-width:767px){
  .cl-km::before{left:-51px}
  .cl-stopp-start .cl-km::before{left:-55px}
  .cl-km strong{font-size:18px}
}


/* ---------- Belegungskalender in den neuen Farben ----------
   frei = Sonne (das sucht man), belegt = gedämpftes Blau (tritt zurück) */
html body .bkc-mount {
  --frei: #ffe08a;
  --belegt: #b9cad9;
  --accent: var(--gcid-cl-meer, #1478bd);
  --line: rgba(14, 58, 92, .14);
  color: var(--gcid-cl-tief, #0e3a5c);
}
html body .bkc-mount .bkc-day.bkc-full { color: var(--gcid-cl-tief, #0e3a5c); }
html body .bkc-mount .bkc-legend { color: var(--gcid-cl-text, #33475b); }

/* ---------- Fotowand auf Tablet und Handy (falls Divi die Rasterspalten nicht umstellt) ---------- */
@media (max-width: 980px) {
  .cl-sec .et_pb_row:has(> .cl-kachel) { display: grid !important; grid-template-columns: 1fr 1fr !important; }
  .cl-sec .et_pb_row:has(> .cl-kachel) > .cl-kachel { width: auto !important; max-width: none !important; grid-row: auto !important; grid-column: auto !important; }
  .cl-sec .et_pb_row:has(> .cl-kachel) > .cl-kachel:first-child { grid-column: 1 / -1 !important; }
}
@media (max-width: 767px) {
  .cl-sec .et_pb_row:has(> .cl-kachel) { grid-template-columns: 1fr !important; }
  .cl-sec .et_pb_row:has(> .cl-kachel) > .cl-kachel:first-child { grid-column: auto !important; }
}


/* ---------- Eyecatcher FehMare (Text-Modul mit <div class="cl-badge">) ---------- */
.cl-badge {
  position: relative; display: inline-flex; align-items: center; gap: 18px;
  background: var(--gcid-cl-meer, #1478bd); color: #fff !important;
  border-radius: 16px; padding: 18px 24px 30px; overflow: hidden;
  transform: rotate(-1.5deg); margin: 4px 0 8px;
}
.cl-badge strong { font-size: 44px; line-height: 1; font-weight: 800; color: var(--gcid-cl-sonne, #ffc53d); white-space: nowrap; }
.cl-badge span { font-size: 16px; line-height: 1.4; font-weight: 600; color: #fff; }
.cl-badge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='12' viewBox='0 0 60 12'%3E%3Cpath d='M0 6 Q15 0 30 6 T60 6' fill='none' stroke='white' stroke-opacity='.45' stroke-width='2.5'/%3E%3C/svg%3E") repeat-x;
  background-size: 60px 12px; animation: clWelle 3.5s linear infinite;
}
@keyframes clWelle { to { background-position: 60px 0; } }
@media (max-width: 767px) { .cl-badge { transform: none; } .cl-badge strong { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { .cl-badge::after { animation: none; } }


/* ---------- Ausflüge: Tagesausflug-Karten ---------- */
.cl-sec .cl-ort { font-size: 14px !important; font-weight: 700; letter-spacing: 0; color: var(--gcid-cl-meer, #1478bd); margin-bottom: 8px; }
.cl-sec ul.cl-fakten { list-style: none !important; padding: 16px 0 0 !important; margin: 8px 0 0 !important; border-top: 1px solid var(--gcid-cl-linie, #d5e3ee); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cl-sec ul.cl-fakten li { list-style: none !important; padding: 0 !important; font-size: 13px; line-height: 1.35; color: var(--gcid-cl-text, #33475b); }
.cl-sec ul.cl-fakten li::before { display: none !important; }
.cl-sec ul.cl-fakten strong { display: block; font-size: 17px; color: var(--gcid-cl-tief, #0e3a5c); }
.cl-sticky .cl-badge { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .cl-kachel .et_pb_image_wrap img, .cl-sec .et_pb_button { transition: none !important; }
}
