/*
Theme Name: Uncode Child
Theme URI: https://undsgn.com/uncode/
Author: Undsgn
Author URI: https://undsgn.com/
Description: Uncode Child Theme – PGS Freizeitmobile
Template: uncode
Version: 1.0.0
Text Domain: uncode
*/

/* ==========================================================================
   PGS Freizeitmobile

   Grundsatz: Schriftarten, Farben, Layout, Abstaende und Module kommen aus
   Uncode (Theme Options + Row-/Column-Einstellungen). Hier steht KEINE
   font-family - Schriften werden ausschliesslich im Theme gesetzt.

   Diese Datei ergaenzt nur, was sich im Backend nicht abbilden laesst:
     1. Lesbarkeit der Buehne (Verlauf statt staerkerem Overlay)
     2. Haarlinien und Hover der Tueren- und Marken-Flaechen
     3. Die Linie des PGS-Kreislaufs
     4. Kleine Feinheiten (Bild-Hover, Zahlensatz)
   ========================================================================== */

:root {
  --pgs-rule: #C6CDBC;   /* Haarlinie, entspricht color-pgsrule der Palette */
  --pgs-moss: #435331;   /* Akzent, entspricht color-pgsmoss */
  --pgs-grnd: #E7EAE2;   /* Grundflaeche, entspricht color-pgsgrnd */
  --pgs-road: #DCE1D3;   /* Fahrbahn im Kreislauf - eine Stufe unter grnd,
                            damit sie sich auch von color-pgspapr abhebt */
}

/* ------------------------------------------------------------ 1. Buehne */

/* Ein Verlauf von unten traegt den Text, ohne das ganze Bild zu verdunkeln.
   Deshalb steht das Overlay der Row bewusst niedrig. */
.pgs-hero .row-background::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  background: linear-gradient(to top, rgba(10,12,9,.82), rgba(10,12,9,0));
  pointer-events: none;
  z-index: 1;
}
.pgs-hero .row-inner { position: relative; z-index: 2; }

/* Nur Groesse und Zeilenfall - Schriftart kommt aus dem Theme */
.pgs-hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.8rem);
  line-height: 1.03;
  letter-spacing: -.02em;
}

/* ------------------------------------------- 2. Tueren und Markenwelt */

.pgs-doors .pgs-door,
.pgs-brands .pgs-brand {
  position: relative;
  overflow: hidden;
}

/* Haarlinie statt Zwischenraum */
.pgs-doors .pgs-door + .pgs-door::after,
.pgs-brands .pgs-brand + .pgs-brand::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.22);
  z-index: 4;
}

.pgs-doors .background-inner,
.pgs-brands .background-inner {
  transition: transform 1.2s cubic-bezier(.22,.61,.36,1);
}
.pgs-doors .pgs-door:hover .background-inner,
.pgs-brands .pgs-brand:hover .background-inner {
  transform: scale(1.04);
}

.pgs-doors .block-bg-overlay,
.pgs-brands .block-bg-overlay { transition: opacity .55s ease; }
.pgs-doors .pgs-door:hover .block-bg-overlay { opacity: .68 !important; }

/* Der beschreibende Satz erscheint erst beim Ueberfahren.
   Auf Touch-Geraeten (siehe unten) steht er dauerhaft. */
.pgs-doors .pgs-door .vc_column_text {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .6s cubic-bezier(.22,.61,.36,1), opacity .45s ease;
}
.pgs-doors .pgs-door:hover .vc_column_text {
  max-height: 9em;
  opacity: 1;
}

/* --------------------------------------------------- 3. PGS-Kreislauf */

/* Die Stationen liegen an einer Strasse, und die Strasse ist ein Rundkurs:
   Hinfahrbahn mit den Stationen, Kehre, Rueckfahrbahn, Kehre. Das
   Reisemobil faehrt sie ohne Ende und schaltet dabei die Station ein, an
   der es gerade steht.

   Gezeichnet wird alles von js/pgs-cycle.js als SVG, weil die Row breiter
   ist als ihr Inhalt - die Spalten tragen den Gutter als padding-left. Das
   JS misst die Punkte, deshalb liegt die Hinfahrbahn genau auf der
   Inhaltsbreite. Ohne JS bleibt der Abschnitt eine ruhige, vollstaendige
   Liste. */

.pgs-cycle .row-inner { position: relative; }

.pgs-cycle-rail {
  position: absolute;
  left: 0; top: 0;   /* js/pgs-cycle.js rueckt sie um Anlauf und Kopfhoehe */
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------------------------------- Die Strasse */

/* Vier Striche auf demselben Pfad: Bankett, Fahrbahn, Mittelstreifen und
   die unsichtbare Spur, auf der der Camper laeuft. */
.pgs-cycle-road-edge,
.pgs-cycle-road,
.pgs-cycle-lane {
  fill: none;
  stroke-linecap: butt;
}
.pgs-cycle-road-edge { stroke: var(--pgs-rule); stroke-width: 11; }
.pgs-cycle-road      { stroke: var(--pgs-road); stroke-width: 9; }
.pgs-cycle-lane {
  stroke: #fff;
  stroke-width: 1.5;
  stroke-dasharray: 9 11;   /* js/pgs-cycle.js passt das nahtlos an die Runde an */
  opacity: 0;
  transition: opacity .6s ease 1.1s;
}
.pgs-cycle.is-in .pgs-cycle-lane { opacity: 1; }

/* Gestapelt bleibt nur eine Haarlinie: keine Fahrbahn, kein Mittelstreifen,
   kein Camper. Eine senkrechte Strasse koennte er in der Seitenansicht
   ohnehin nicht befahren. */
.pgs-cycle.is-stacked .pgs-cycle-road,
.pgs-cycle.is-stacked .pgs-cycle-lane,
.pgs-cycle.is-stacked .pgs-cycle-arrow,
.pgs-cycle.is-stacked .pgs-cycle-van { display: none; }
.pgs-cycle.is-stacked .pgs-cycle-road-edge { stroke-width: 1; }

/* Die Bahn legt sich beim Eintreten in einem Zug von Station 01 aus */
.pgs-cycle-road-edge,
.pgs-cycle-road { transition: stroke-dashoffset 1.6s cubic-bezier(.65,0,.35,1); }

.pgs-cycle-line { fill: none; stroke: none; }

/* Fahrbahnmarkierung auf der Rueckfahrbahn */
.pgs-cycle-arrow {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity .6s ease 1.3s;
}
.pgs-cycle.is-in .pgs-cycle-arrow { opacity: 1; }

/* ----------------------------------------------------- Das Reisemobil */

.pgs-cycle-van {
  opacity: 0;
  transition: opacity .9s ease;
}
.pgs-cycle-van.is-on { opacity: 1; }

.pgs-cycle-van-body,
.pgs-cycle-van-wheel { fill: var(--pgs-moss); }
.pgs-cycle-van-glass,
.pgs-cycle-van-hub { fill: var(--pgs-road); }

/* -------------------------------------------------- Stationen */

.pgs-cycle .pgs-cycle-col { position: relative; z-index: 1; }

.pgs-cycle .pgs-cycle-col .uncont {
  position: relative;
  padding-top: 72px;      /* darueber liegen beide Fahrbahnen */
  padding-bottom: 8px;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}

/* Der Punkt markiert die Station auf der Fahrbahn, buendig mit der
   Textkante. Er ist einen Tick schmaler als die Strasse, damit oben und
   unten ein Streifen Asphalt stehen bleibt. */
.pgs-cycle .pgs-cycle-col .uncont::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--pgs-moss);
  transition: transform .45s cubic-bezier(.34,1.4,.64,1);
}

/* Der Ring waechst nur beim Ueberfahren */
.pgs-cycle .pgs-cycle-col .uncont::after {
  content: "";
  position: absolute;
  left: -6px; top: -3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1px solid var(--pgs-moss);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .4s ease, transform .5s cubic-bezier(.34,1.4,.64,1);
  pointer-events: none;
}

.pgs-cycle .pgs-cycle-col h6 {
  margin-bottom: .35em;
  transition: color .35s ease;
}
.pgs-cycle .pgs-cycle-col h4 { margin-bottom: .3em; }

/* Der erklaerende Halbsatz tritt zurueck und kommt beim Ueberfahren nach vorn */
.pgs-cycle .pgs-cycle-col .uncode_text_column {
  opacity: .7;
  transition: opacity .4s ease;
}

/* Zwei Wege in denselben Zustand: die Maus, oder der Camper, der gerade
   vorbeifaehrt (.is-active setzt js/pgs-cycle.js). */
.pgs-cycle .pgs-cycle-col:hover .uncont,
.pgs-cycle .pgs-cycle-col.is-active .uncont { transform: translateY(-4px); }
.pgs-cycle .pgs-cycle-col:hover .uncont::before,
.pgs-cycle .pgs-cycle-col.is-active .uncont::before { transform: scale(1.35); }
.pgs-cycle .pgs-cycle-col:hover .uncont::after,
.pgs-cycle .pgs-cycle-col.is-active .uncont::after { opacity: .5; transform: scale(1); }
.pgs-cycle .pgs-cycle-col:hover .uncode_text_column,
.pgs-cycle .pgs-cycle-col.is-active .uncode_text_column { opacity: 1; }
.pgs-cycle .pgs-cycle-col:hover h6,
.pgs-cycle .pgs-cycle-col.is-active h6 { color: var(--pgs-moss) !important; }

/* ------------------------------------------- Auftritt (nur mit JS) */

/* .pgs-anim setzt das JS, sobald es laeuft. Faellt es aus, greift keiner
   dieser Startzustaende und der Abschnitt steht trotzdem vollstaendig da. */
.pgs-cycle.pgs-anim .pgs-cycle-col .uncont > * {
  opacity: 0;
  transform: translateY(14px);
}
.pgs-cycle.pgs-anim .pgs-cycle-col .uncont::before { transform: scale(0); }

.pgs-cycle.pgs-anim.is-in .pgs-cycle-col .uncont > * {
  opacity: 1;
  transform: none;
  transition: opacity .65s ease, transform .75s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 110ms + 240ms);
}
.pgs-cycle.pgs-anim.is-in .pgs-cycle-col .uncont > *:nth-child(2) {
  transition-delay: calc(var(--i, 0) * 110ms + 310ms);
}
.pgs-cycle.pgs-anim.is-in .pgs-cycle-col .uncont > *:nth-child(3) {
  transition-delay: calc(var(--i, 0) * 110ms + 380ms);
}

/* Jeder Punkt springt auf, wenn die Linie ihn erreicht */
.pgs-cycle.pgs-anim.is-in .pgs-cycle-col .uncont::before {
  transform: scale(1);
  transition-delay: calc(var(--i, 0) * 110ms + 180ms);
}
.pgs-cycle.pgs-anim.is-in .pgs-cycle-col:hover .uncont::before,
.pgs-cycle.pgs-anim.is-in .pgs-cycle-col.is-active .uncont::before {
  transform: scale(1.35);
  transition-delay: 0s;
}

/* ------------------------------------------------------ 4. Feinschliff */

/* Fahrzeugkarten: Bild ruhig mitziehen lassen */
.pgs-car .uncode-single-media { overflow: hidden; }
.pgs-car img { transition: transform 1.1s cubic-bezier(.22,.61,.36,1); }
.pgs-car:hover img { transform: scale(1.03); }

/* Standorte durch eine Oberlinie gliedern statt durch Kaesten */
.pgs-loc { border-top: 1px solid var(--pgs-rule); padding-top: 22px; }

/* Zitate: etwas ruhiger gesetzt als eine normale Ueberschrift */
.pgs-quote h3 {
  line-height: 1.45;
  margin: 0 0 .8em;
}

/* Das Band der Vermietung ist ein Einschub, kein eigener Abschnitt */
.pgs-rental-band {
  border-top: 1px solid var(--pgs-rule);
  border-bottom: 1px solid var(--pgs-rule);
}

/* Zahlenkolonnen laufen sauber untereinander */
.uncode-pricing-list .pricing-list-value,
.pgs-car h4 { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Bewegung */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    /* Ohne das bliebe die Staffelung des Kreislaufs als Wartezeit stehen */
    transition-delay: 0s !important;
  }
}

/* --------------------------------------------------------------- Mobil */

/* Sechs Spalten nebeneinander tragen bis etwa 1000px herunter - darunter
   wird der laengste Titel zweizeilig. Ab dort stapeln die Stationen und aus
   der Strasse wird eine ruhige senkrechte Haarlinie mit den Punkten darauf
   (Pfad: js/pgs-cycle.js). */
@media (max-width: 999px) {
  .pgs-cycle .row-inner { display: block; }
  /* Eine einspaltige Liste ueber 900px zu ziehen liest sich schlecht. Am
     .row-inner greift kein max-width: es haengt in einer anonymen
     Tabellenzelle, die es auf volle Breite zieht. */
  .pgs-cycle .pgs-cycle-col {
    display: block;
    width: 100%;
    max-width: 620px;
  }
  .pgs-cycle .pgs-cycle-col .uncont {
    padding-top: 0;
    padding-bottom: 34px;
  }
  /* Linie und Punkte liegen im Rand der Row, der Text bleibt unberuehrt.
     Ein padding-left an der Spalte waere der naheliegende Weg, aber Uncode
     setzt es unter 570px mit !important auf 0 zurueck. Den genauen Abstand
     misst js/pgs-cycle.js und legt ihn in --pgs-dot-x ab. */
  .pgs-cycle .pgs-cycle-col .uncont::before {
    left: var(--pgs-dot-x, -13px);
    top: 4px;
    margin-left: -4.5px;
  }
  .pgs-cycle .pgs-cycle-col .uncont::after {
    left: var(--pgs-dot-x, -13px);
    top: -2px;
    margin-left: -10.5px;
  }
  /* Ohne Zeiger steht der Halbsatz dauerhaft */
  .pgs-cycle .pgs-cycle-col .uncode_text_column { opacity: 1; }
}

@media (max-width: 959px) {
  /* Haarlinien liegen gestapelt oben statt seitlich */
  .pgs-doors .pgs-door + .pgs-door::after,
  .pgs-brands .pgs-brand + .pgs-brand::after {
    left: 0; right: 0; top: 0; bottom: auto;
    width: auto; height: 1px;
  }
  /* Ohne Hover muss der Text dauerhaft sichtbar sein */
  .pgs-doors .pgs-door .vc_column_text { max-height: none; opacity: 1; }
}

/* ----------------------------------------------------------- Kopfzeile */

/* Uncode setzt das Logo im mobilen Kopf ohne seitliche Luft. Damit es auf
   der Hoehe der Menue-Schaltflaeche steht und nicht am Rand klebt, bekommt
   der Logo-Traeger die Abstaende der Kopfzeile. Das !important ist noetig,
   weil die Theme-Regel aus style.css spezifischer greift. */
@media (max-width: 959px) {
  .menu-container .logo-container {
    position: relative;
    padding: 17px 36px 15px 36px !important;
  }
}
