/* =============================================================================
   xilox.de – UI-Relaunch 2026 · css/v2/pages/index.css (Phase 1)
   -----------------------------------------------------------------------------
   Seiten-spezifische Styles für die Public-Seiten Phase 1:
     index.php    – Hero-BG/Overlay, Portfolio-/Vergleichs-/CTA-Sektionen
     about.php    – About-Hero, Prozess-/Zielgruppen-/Why-/FAQ-/CTA-Blöcke
     formate.php  – Format-Cards (Media-Vorschau, Spezifikations-Box)
     impressum.php– Fließtext (Gast) + .imprint-card (eingeloggte App-Variante)
     news.php     – News-Feed-Karten

   Lade-Reihenfolge: nach components.css (siehe incl/layout/head.php).
   Alle Werte greifen auf die Design-Tokens in css/v2/tokens.css zu.
   ============================================================================= */

/* --- 1. index.php · Hero ------------------------------------------------------ */
/* Hero-Hintergrund als Variable: User tauscht später NUR die Datei aus
   (designdir/bg_main.jpg) – Dateiname bleibt austauschbar, Pfad hier zentral. */
.hero {
  --hero-bg: url('../../../designdir/bg_main.jpg');
}

/* Dark-Overlay/Gradient liegt in layout-public.css (.hero-bg::after);
   die BG-Bilder-Ebene erhält zusätzlich einen leichten Vignette-Farbverlauf,
   damit der Text auch bei hellem Asset lesbar bleibt. */
.hero .hero-bg {
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center right;
}

/* --- 2. index.php · Sektions-Layout (Portfolio / Vergleich) ------------------- */
.v2-section {
  max-width: var(--content-maxwidth);
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--space-6);
}
.section-head .section-title {
  margin-bottom: var(--space-3);
}
.section-head .subline {
  font-size: 1.0625rem;
}

/* Zwei-Spalten-Sektion „Für alle, die mehr erreichen wollen.“ (Text links, Cards rechts) */
.network-split {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 991.98px) {
  .network-split {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* =============================================================================
   ERKLÄRCLIPS (designdir/explained) – 1x Querformat (Lead) + 7x Hochformat 9:16
   Die Hochformat-Karten absichtlich im Seitenverhaeltnis 9:16: sie wirken wie
   die Infoscreens selbst. Kein Autoplay im Seitenfluss – der Clip laeuft erst
   bei Hover (js/v2-explained.js), per Klick oeffnet die Lichtbox mit Ton.
   Raster: 5 Spalten; 7 Hochformat + der querformatige Clip (spannt 3 Spalten)
   fuellen genau zwei Reihen. Die Clip-Zahl in index.php ist variabel – es
   werden nur auf dem Server vorhandene Dateien gerendert.
   ============================================================================= */
.explained-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

/* Querformat-Clip (Lead, erste Position): 3 der 5 Spalten, die beiden freien
   Spalte fuellen die naechsten Hochformat-Clips -> exakt zwei Reihen.
   Den Wert liefert index.php als --xi-wide-span (abhhaengig von der Anzahl der
   Hochformat-Clips); auf Tablet/Mobil wird er unterhalb ignoriert, damit kein
   span groesser als die Spaltenzahl entsteht. */
.explained-card.is-wide {
  grid-column: span var(--xi-wide-span, 3);
}
.explained-card.is-wide .explained-frame {
  aspect-ratio: 16 / 9;
}

.explained-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* Rahmen = schwarze "Display"-Flaeche; object-fit:cover fuellt sie randlos */
.explained-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: #05080d;
  box-shadow: var(--shadow-card, 0 1px 2px rgba(0, 0, 0, .4));
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.explained-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #05080d;
}
.explained-card:hover .explained-frame,
.explained-card:focus-visible .explained-frame {
  border-color: var(--accent-border, var(--border-strong));
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.explained-card:focus-visible {
  outline: none;
}

/* Play-Badge: verschwindet, sobald der Clip laeuft (Klasse vom Script) */
.explained-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background-color: rgba(8, 12, 20, .62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--accent-text, var(--text-primary));
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast);
}
/* Hover: Badge bleibt sichtbar und faerbt sich hell (Spielaufforderung);
   laeuft der Clip (Klasse is-playing), ist die Aufforderung erfuellt -> weg. */
.explained-card:hover .explained-play,
.explained-card:focus-visible .explained-play {
  background-color: rgba(143, 227, 136, .92);
  color: #06220c;
  transform: scale(1.06);
}
.explained-card.is-playing .explained-play {
  opacity: 0;
  transform: scale(.85);
}

/* Laufzeit-Etikett oben rechts */
.explained-dur {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  padding: 2px 7px;
  border-radius: var(--radius-input);
  background-color: rgba(8, 12, 20, .72);
  color: var(--text-secondary);
  font-family: var(--font-mono, inherit);
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  pointer-events: none;
}

.explained-caption {
  display: block;
  margin-top: var(--space-3);
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.45;
}
.explained-card:hover .explained-caption {
  color: var(--text-primary);
}

.explained-hint {
  margin: var(--space-6) 0 0;
  color: var(--text-muted);
  font-size: .8125rem;
}

/* Schmal: 3 bzw. 2 Spalten – die 9:16-Karten bleiben handy-gross.
   Der Querformat-Clip braucht hier keine Rechnung mehr: er faellt auf eine
   ganze Zeile zurueck (1 / -1), weil ein span groesser als die Spaltenzahl
   vom Grid sonst implizite Spalten anlegen wuerde. */
@media (max-width: 991.98px) {
  .explained-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .explained-card.is-wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 575.98px) {
  .explained-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }
  .explained-caption {
    font-size: .8125rem;
  }
}

/* --- Lichtbox fuer die Erklaerclips (Musterverwandter: media.php .media-lightbox) --- */
.explained-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background-color: rgba(0, 0, 0, .74);
}
.explained-lightbox.is-open {
  display: flex;
}
.explained-lightbox-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background-color: var(--bg-elevated, #1d2b3a);
  box-shadow: var(--shadow-hover);
  font-family: var(--font-sans);
  color: var(--text-primary);
  animation: explained-in .18s ease-out;
}
@keyframes explained-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .explained-lightbox-dialog { animation: none; }
}
.explained-lightbox-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.explained-lightbox-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: .8125rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Hochformat-Clips: Dialog schmaler, sonst klebt rechts ein leerer Streifen
   neben dem Bild (Klasse setzt js/v2-explained.js). */
.explained-lightbox.is-portrait .explained-lightbox-dialog {
  max-width: 560px;
}
.explained-lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.explained-lightbox-close:hover {
  background-color: var(--bg-inset);
  color: var(--text-primary);
}
.explained-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--space-4);
  background-color: var(--bg-inset);
}
.explained-lightbox-stage video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 152px);
  border-radius: var(--radius-input);
  background-color: #05080d;
}

/* Anker-Punkt unter dem fixen Topnav (=76px) – "Video ansehen" landet sonst
   hinter der Navigation */
.v2-explained {
  scroll-margin-top: calc(76px + var(--space-4));
}

/* Zielgruppen-/Vergleichs-Cards (.card-basiert, Inhalte 1:1 aus $ts) */
.v2-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 991.98px) {
  .v2-card-grid {
    grid-template-columns: 1fr;
  }
}

.v2-item-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5); /* .card hat kein Padding (liegt bei .card-body) – hier direkt im Artikel */
}
.v2-item-card .card-label {
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.v2-item-card h3 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
}
.v2-item-card .card-price {
  color: var(--accent-text);
  font-size: 1.25rem;
  font-weight: 600;
}
.v2-item-card .card-price small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: .8125rem;
  font-weight: 400;
}

/* Medien-Vorschau (Video/Bild) mit Overlay-Label */
.v2-showcase {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 4px);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background-color: var(--bg-inset);
}
.v2-showcase video,
.v2-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v2-showcase .showcase-label {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-input);
  background-color: rgba(14, 20, 32, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-primary);
  font-size: .8125rem;
  line-height: 1.45;
}

/* Feature-Listen (mit Akzent-Dash, wie im Zieldesign) */
.v2-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.v2-feature-list li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) calc(var(--space-3) + 14px);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .9375rem;
}
.v2-feature-list li:last-child {
  border-bottom: none;
}
.v2-feature-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-text);
}

/* Vergleichs-Card „xilox Digital Signage“ (Akzent-Rahmen) */
.v2-item-card.is-highlight {
  border-color: rgba(143, 227, 136, .35);
  box-shadow: var(--shadow-card);
}

/* --- 3. index.php · CTA-Sektion ------------------------------------------------- */
.cta-block {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.cta-block .section-title {
  margin-bottom: var(--space-4);
}
.cta-block .subline {
  max-width: 600px;
  margin: 0 auto var(--space-5);
  font-size: 1.0625rem;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.cta-note {
  color: var(--text-muted);
  font-size: .875rem;
}

/* ============================================================================= */
/* --- 4. about.php (Dual-Mode) ---------------------------------------------------- */
/* ============================================================================= */

.about-hero {
  max-width: 860px;
  margin: 0 auto;
  /* Fixed Navbar (min-height 76px, transparent über Hero) freihalten + Luft nach unten */
  padding: calc(76px + var(--space-8)) var(--space-5) var(--space-7);
  text-align: center;
}
.about-hero .section-title {
  margin-bottom: var(--space-4);
}
.about-hero .subline {
  font-size: 1.0625rem;
}

/* Prozess-Schritte (4er-Grid) */
.process-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 991.98px) {
  .process-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .process-grid-v2 {
    grid-template-columns: 1fr;
  }
}
.process-step-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5); /* .card hat kein Padding (liegt bei .card-body) – hier direkt im Artikel */
}
/* Zielgruppen-Cards (vollflächig, Feature-Listen optional zweispaltig) */
.target-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.tg-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 767.98px) {
  .tg-plan-grid {
    grid-template-columns: 1fr;
  }
}
.tg-plan h4 {
  margin-bottom: var(--space-3);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-text);
}

/* „Warum xilox“ – Why-Kacheln als .card-Grid */
.why-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
@media (max-width: 991.98px) {
  .why-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .why-grid-v2 {
    grid-template-columns: 1fr;
  }
}
.why-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5); /* .card hat kein Padding (liegt bei .card-body) – hier direkt im Artikel */
}
.why-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.why-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.55;
}

/* FAQ */
.faq-list-v2 {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.faq-card h3 {
  margin-bottom: var(--space-2);
  font-size: 1rem;
  font-weight: 600;
}
.faq-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .9375rem;
  line-height: 1.65;
}

/* About-CTA */
.about-cta-note {
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: .875rem;
}

/* ============================================================================= */
/* --- 5. formate.php (Dual-Mode) ---------------------------------------------------- */
/* ============================================================================= */

.format-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.format-card .card-header .format-label {
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.format-media {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-card) - 4px);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background-color: var(--bg-inset);
}
.format-media video,
.format-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.format-media .showcase-label {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-input);
  background-color: rgba(14, 20, 32, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-primary);
  font-size: .8125rem;
}

/* Spezifikations-Box (Format/Auflösung/Dauer) */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-input);
  background-color: var(--bg-inset);
  border: 1px solid var(--border);
}
.spec-grid .spec-item {
  text-align: center;
}
.spec-grid .spec-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--accent-text);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.spec-grid .spec-value {
  display: block;
  color: var(--text-secondary);
  font-size: .9375rem;
}

/* ============================================================================= */
/* --- 6. impressum.php (Dual-Mode) ---------------------------------------------------- */
/* ============================================================================= */

/* Gast-Variante: Fließtext in max-width-Spalte */
.imprint-prose {
  max-width: 820px;
  margin: 0 auto;
}
.imprint-prose h1 {
  font-size: var(--text-page-h1-size);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.imprint-prose .imprint-company-lines {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}
.imprint-prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}
.imprint-prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}
.imprint-prose p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* App-Variante: zwei .imprint-cards nebeneinander (Firma / Kontakt) */
.imprint-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 991.98px) {
  .imprint-card-grid {
    grid-template-columns: 1fr;
  }
}
.imprint-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}
.imprint-card .imprint-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.imprint-card .imprint-row:last-child {
  border-bottom: none;
}
.imprint-card .imprint-row .lucide {
  margin-top: 2px;
  color: var(--accent-text);
}
.imprint-card .imprint-label {
  display: block;
  margin-bottom: 2px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.imprint-card .imprint-value {
  display: block;
  color: var(--text-primary);
  font-size: .9375rem;
  line-height: 1.5;
}

/* ============================================================================= */
/* --- 7. news.php (Public) ------------------------------------------------------------- */
/* ============================================================================= */

.news-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.news-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.news-item-head h2 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
}
.news-date {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: .8125rem;
  white-space: nowrap;
}
