/* Display CSS - Für das öffentliche Schwarze Brett */
/* PRASCO Corporate Design */
/* Verwende System-Schriftarten für Offline-Betrieb */

/* Weißer Mauszeiger */
* {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="white" stroke="black" stroke-width="1" d="M3,3 L3,26 L10,19 L14,28 L18,26 L14,17 L22,17 Z"/></svg>') 0 0, auto;
}

/* ============================================
   Vortragsmodus / Presentation Mode Styles
   ============================================ */

.presentation-mode {
  cursor: pointer;
}

.presentation-controls {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  pointer-events: auto;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.pres-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer !important;
  pointer-events: auto;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pres-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.pres-btn:active {
  transform: scale(0.95);
}

.pres-prev,
.pres-next {
  background: #58585a;
}

.pres-prev:hover,
.pres-next:hover {
  background: #444446;
}

.pres-toggle {
  background: #6c6c6e;
}

.pres-toggle:hover {
  background: #58585a;
}

.pres-fullscreen {
  background: #58585a;
  font-size: 1.4rem;
}

.pres-fullscreen:hover {
  background: #444446;
}

.pres-exit {
  background: rgba(255, 255, 255, 0.1);
  font-size: 1rem;
}

.pres-exit:hover {
  background: #dc3545;
}

.pres-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  color: #fff;
  pointer-events: none;
}

.pres-mode-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

.pres-counter {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

/* Klickbare Bereiche im Vortragsmodus */
.presentation-mode .display-main {
  cursor: pointer;
}

.presentation-mode .post-container::before,
.presentation-mode .post-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  z-index: 100;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.presentation-mode .post-container::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent);
}

.presentation-mode .post-container::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(0, 0, 0, 0.1), transparent);
}

.presentation-mode .post-container:hover::before,
.presentation-mode .post-container:hover::after {
  opacity: 1;
}

/* Verstecke normalen Post-Indicator im Vortragsmodus */
.presentation-mode .post-indicator {
  display: none;
}

/* Video Stumm-Indikator (wenn globale Hintergrundmusik aktiv) */
.video-muted-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 1.5rem;
  z-index: 10001;
  backdrop-filter: blur(4px);
  animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
  0%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0.3;
  }
}

.video-muted-indicator:hover {
  opacity: 1 !important;
}

/* Offline-Modus Indikator (lokale Video-Kopie) */
.offline-mode-indicator {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 150, 64, 0.9); /* --prasco-green mit Transparenz */
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 1.2rem;
  z-index: 10001;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Arial', sans-serif;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Globale Musik Indikator */
.global-music-indicator {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 150, 64, 0.9); /* --prasco-green mit Transparenz */
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.global-music-indicator .music-icon {
  animation: pulse-music 1s ease-in-out infinite;
}

@keyframes pulse-music {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* PRASCO Primärfarben */
  --prasco-green: #009640; /* PRASCO Logo Grün */
  --prasco-dark-green: #007830; /* PRASCO Dunkelgrün */
  --prasco-black: #58585a; /* PRASCO Logo Grau */
  --prasco-white: #ffffff;

  /* Legacy-Aliases (Abwärtskompatibilität) */
  --prasco-red: var(--prasco-green);
  --prasco-dark-red: var(--prasco-dark-green);
  --prasco-light: var(--prasco-gray-bg);
  --prasco-red-light: rgba(0, 150, 64, 0.1);

  /* PRASCO Sekundärfarben */
  --prasco-gray-dark: #333333;
  --prasco-gray: #666666;
  --prasco-gray-light: #999999;
  --prasco-gray-bg: #f5f5f5;
  --prasco-border: #e0e0e0;

  /* Graustufen (für Widgets) */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;

  /* Aliases */
  --primary-color: var(--prasco-green);
  --secondary-color: var(--prasco-gray);
  --dark-color: var(--prasco-black);
  --light-color: var(--prasco-gray-bg);
  --bg-color: var(--prasco-white);
  --white: var(--prasco-white);
  --text-color: var(--prasco-gray-dark);
  --text-muted: var(--prasco-gray-light);
  --border-color: var(--prasco-border);
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;

  /* Spacing System (8px Base) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography - System-Schriftarten für Offline-Betrieb */
  --font-primary: 'Roboto', 'Segoe UI', sans-serif;
  --font-heading: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

html {
  /* Dynamische Basis-Schriftgröße: skaliert zwischen 12px (bei 720px Breite) und 20px (bei 3840px) */
  font-size: clamp(12px, calc(10px + 0.4vw + 0.3vh), 22px);
}

body {
  font-family: var(--font-primary);
  background: var(--prasco-gray-bg);
  color: var(--text-color);
  overflow: hidden;
  height: 100vh;
}

#bulletin-board {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

/* Header */
.display-header {
  background: var(--white);
  color: var(--prasco-black);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-bottom: 2px solid var(--prasco-black); /* Monochrom */
  gap: 2rem;
  min-height: 51px;
  flex-shrink: 0;
}

.logo {
  font-size: 1.275rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--prasco-black);
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.logo-image {
  max-height: 38px;
  width: auto;
  object-fit: contain;
  filter: none;
}

.header-category {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--prasco-black);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clock {
  font-size: 1.275rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--prasco-black);
  letter-spacing: 1px;
  text-shadow: none;
}

/* Main Display Area */
.display-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem;
  position: relative;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 0;
  overflow: hidden;
}

.post-container {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.post {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 5rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-height: 100%;
  /* GPU-Compositing-Layer: verhindert Ruckeln bei CSS-Animationen auf Android TV */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Sanftes Einblenden beim ersten Laden – NUR wenn kein Blend-Effekt aktiv */
.transitions-enabled .post:not(.blend-transition-in):not(.blend-transition-out) {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post h1 {
  font-size: 3.2rem;
  margin-bottom: 2.5rem;
  color: #1a1a1a;
  line-height: 1.3;
  font-family: var(--font-heading);
  font-weight: 700;
  border-left: 5px solid var(--prasco-black); /* Monochrom */
  padding-left: 2rem;
  text-align: left;
  width: 100%;
  max-width: 1300px;
}

.post p {
  font-size: 1.6rem;
  line-height: 1.9;
  color: #2c2c2c;
  max-width: 1300px;
  font-family: var(--font-primary);
  font-weight: 400;
  text-align: left;
  width: 100%;
}

.post div {
  font-size: 1.6rem;
  line-height: 1.9;
  color: #2c2c2c;
  max-width: 1300px;
  font-family: var(--font-primary);
  font-weight: 400;
  text-align: left;
  width: 100%;
}

.post strong {
  color: #1a1a1a;
  font-weight: 600;
}

.post table {
  width: 100%;
  max-width: 1300px;
  margin: 1rem 0;
  border-collapse: collapse;
}

.post table th {
  background: var(--prasco-gray-bg);
  font-weight: 600;
  color: #1a1a1a;
  padding: 1rem;
}

.post table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--prasco-border);
}

.post img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.post video {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.post iframe {
  max-width: 100%;
  width: 1200px;
  max-height: 60vh;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.loading {
  font-size: 2rem;
  color: var(--secondary-color);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Post Indicator */
.post-indicator {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.post-indicator:hover {
  opacity: 1;
}

/* Footer */
.display-footer {
  background: rgba(88, 88, 90, 0.95);
  color: var(--white);
  padding: 0.5rem 2rem;
  text-align: center;
  border-top: 2px solid var(--prasco-black); /* Monochrom */
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-info {
  font-size: 0.85rem;
  font-family: var(--font-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  opacity: 0.9;
}

.footer-info #post-counter {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.separator {
  color: rgba(255, 255, 255, 0.5);
}

/* Content Type Specific Styles */
.post.type-text {
  background: var(--white);
  color: var(--prasco-black);
}

.post.type-text h1,
.post.type-text p {
  color: var(--prasco-black);
}

.post.type-image {
  background: var(--white);
}

.post.type-image h1 {
  color: var(--prasco-black);
}

.post.type-video {
  background: var(--white);
}

.post.type-video h1 {
  color: var(--prasco-black);
}

/* Category Badge */
.category-badge {
  position: absolute;
  top: 2rem;
  left: 2rem;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--white);
  background: var(--prasco-black);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 1200px) {
  .post h1 {
    font-size: 3rem;
  }

  .post p {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .display-header {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.275rem;
  }

  .clock {
    font-size: 1.53rem;
  }

  .post h1 {
    font-size: 2rem;
  }

  .post p {
    font-size: 1.2rem;
  }

  .post-indicator {
    bottom: 1rem;
    right: 1rem;
    font-size: 1rem;
  }
}

/* ============================================
   Video Vollbild Styles
   ============================================ */

/* Container für Vollbild-Video */
.video-fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* HTML5 Video - Vollbild mit optimaler Performance für Raspberry Pi */
.video-fullscreen-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  /* Hardware-Beschleunigung für bessere Performance */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* YouTube/Vimeo iframes - volle Größe für 16:9 Aspect Ratio */
.video-fullscreen-container iframe {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

/* Video-Fehler Fallback (bei Einbettungsbeschränkungen) */
.video-error-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.8);
  padding: 2rem 3rem;
  border-radius: 8px;
}

.video-error-fallback a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #ff0000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.video-error-fallback a:hover {
  background: #cc0000;
}

/* Verstecke Header/Footer während Video */
.header.hidden-for-video,
.footer.hidden-for-video,
.display-header.hidden-for-video,
.display-footer.hidden-for-video {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Post-Container für Video-Typ anpassen */
.post.type-video {
  padding: 0;
  background: #000;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  max-height: none;
  position: static;
  width: 100vw;
  height: 100vh;
}

/* Responsive Anpassungen für verschiedene Bildschirmgrößen */
@media (max-height: 900px) {
  .post h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    max-height: 20vh;
  }
  
  .post p {
    font-size: 1.5rem;
    line-height: 1.6;
    max-height: 45vh;
    -webkit-line-clamp: 8;
  }
  
  .post img,
  .post video,
  .post iframe {
    max-height: 55vh;
    margin-top: 0.75rem;
  }
  
  .display-header {
    padding: 1rem 2rem;
  }
  
  .logo {
    font-size: 1.7rem;
  }
  
  .logo-image {
    max-height: 42px;
  }
}

@media (max-height: 720px) {
  .post h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    max-height: 18vh;
    -webkit-line-clamp: 1;
  }
  
  .post p {
    font-size: 1.3rem;
    line-height: 1.5;
    max-height: 40vh;
    -webkit-line-clamp: 6;
  }
  
  .post img,
  .post video,
  .post iframe {
    max-height: 50vh;
    margin-top: 0.5rem;
  }
  
  .display-header {
    padding: 0.75rem 1.5rem;
  }
  
  .logo {
    font-size: 1.49rem;
  }
  
  .logo-image {
    max-height: 34px;
  }
  
  .clock {
    font-size: 1.7rem;
  }
}

/* ============================================
   Blend Effects - Übergangseffekte
   ============================================ */

/* Fade Effect */
@keyframes blendFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes blendFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Slide Left Effect */
@keyframes blendSlideLeftIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes blendSlideLeftOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

/* Slide Right Effect */
@keyframes blendSlideRightIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes blendSlideRightOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Slide Up Effect */
@keyframes blendSlideUpIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blendSlideUpOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* Slide Down Effect */
@keyframes blendSlideDownIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blendSlideDownOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Zoom In Effect */
@keyframes blendZoomInIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes blendZoomInOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.85);
    opacity: 0;
  }
}

/* Zoom Out Effect */
@keyframes blendZoomOutIn {
  from {
    transform: scale(1.15);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes blendZoomOutOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.15);
    opacity: 0;
  }
}

/* Blend effect classes - immer aktiv, Dauer wird per JS gesteuert */
.blend-transition-in {
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
  animation-duration: 0.55s;
  will-change: transform, opacity;
}

.blend-transition-out {
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
  animation-duration: 0.45s;
  will-change: transform, opacity;
}

/* transitions-enabled überschreibt nichts mehr – bleibt für fadeIn-Guard */

.blend-fade-in { animation-name: blendFadeIn; }
.blend-fade-out { animation-name: blendFadeOut; }

.blend-slide-left-in { animation-name: blendSlideLeftIn; }
.blend-slide-left-out { animation-name: blendSlideLeftOut; }

.blend-slide-right-in { animation-name: blendSlideRightIn; }
.blend-slide-right-out { animation-name: blendSlideRightOut; }

.blend-slide-up-in { animation-name: blendSlideUpIn; }
.blend-slide-up-out { animation-name: blendSlideUpOut; }

.blend-slide-down-in { animation-name: blendSlideDownIn; }
.blend-slide-down-out { animation-name: blendSlideDownOut; }

.blend-zoom-in-in { animation-name: blendZoomInIn; }
.blend-zoom-in-out { animation-name: blendZoomInOut; }

.blend-zoom-out-in { animation-name: blendZoomOutIn; }
.blend-zoom-out-out { animation-name: blendZoomOutOut; }

/* ============================================
   VOLLBILD-MODUS
   ============================================ */

/* Verstecke Header, Logo, Uhr im Vollbild-Modus */
.fullscreen-mode .display-header {
  display: none !important;
}

.fullscreen-mode .logo,
.fullscreen-mode .clock,
.fullscreen-mode .header-category {
  display: none !important;
}

/* Content nimmt vollen Raum ein - komplett ohne Padding */
.fullscreen-mode .display-main {
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

.fullscreen-mode .post-container {
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

.fullscreen-mode .post {
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
}

/* Post-Inhalt auf volle Größe strecken */
.fullscreen-mode .post > * {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Für Präsentations-Iframes */
.fullscreen-mode .presentation-container,
.fullscreen-mode .presentation-container iframe {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Für Bilder im Vollbild */
.fullscreen-mode img {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Controls bleiben sichtbar aber transparenter */
.fullscreen-mode .presentation-controls {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

/* Footer auch verstecken wenn vorhanden */
.fullscreen-mode footer,
.fullscreen-mode .display-footer {
  display: none !important;
}

/* ============================================
   Live-Daten Widget (Transit/Traffic)
   Separate Vollbild-Slides
   ============================================ */

.type-livedata {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  padding: 0 !important;
  background: #f0f2f4;
}

.live-data-widget {
  width: 100%;
  height: 100%;
  background: linear-gradient(170deg, #f5f6f8 0%, #eef0f3 50%, #f0f2f4 100%);
  overflow: hidden;
  color: #2a2d32;
  font-family: var(--font-primary, 'Roboto', 'Segoe UI', sans-serif);
  display: flex;
  flex-direction: column;
}

/* --- Header (Corporate Green Accent) --- */
.live-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2vw;
  padding: 2vh 3vw;
  background: #ffffff;
  border-bottom: 3px solid #009640;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.live-header-left {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  flex: 1;
  min-width: 0;
}

.live-indicator {
  color: #ffffff;
  font-weight: 800;
  font-size: 2vh;
  animation: livePulse 2s ease-in-out infinite;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #009640;
  padding: 0.5vh 1vw;
  border-radius: 2vh;
  border: 1px solid #007830;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-title {
  font-size: 3.2vh;
  font-weight: 700;
  color: #2a2d32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.live-time {
  font-size: 2.2vh;
  color: #666666;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}

/* --- Content Area --- */
.live-widget-content {
  padding: 2vh 3vw;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* --- Fullscreen Containers pro Slide --- */
.transit-fullscreen,
.traffic-fullscreen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* === ÖPNV Departure Board Header (Corporate Green) === */
.departure-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #009640 0%, #007830 100%);
  color: white;
  padding: 2vh 2vw;
  font-size: 2.8vh;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.departure-station-name {
  font-size: 3vh;
}
.departure-clock {
  font-family: var(--font-mono, 'Courier New', monospace);
  font-size: 3vh;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

/* === ÖPNV Departure Table === */
.live-departure-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  flex: 1;
}

.type-livedata .live-departure-table thead {
  background: #58585a;
}


.type-livedata .live-departure-table thead th {
  text-align: left;
  padding: 1.8vh 1vw;
  font-weight: 700;
  color: #ffffff;
  font-size: 2vh;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: none;
  background: transparent;
}

.type-livedata .live-departure-table td {
  color: #2a2d32;
  background: transparent;
}

/* Spaltenbreiten */
.live-departure-table th:nth-child(1),
.live-departure-table td:nth-child(1) { width: 11%; } /* Linie */
.live-departure-table th:nth-child(2),
.live-departure-table td:nth-child(2) { width: 36%; } /* Richtung */
.live-departure-table th:nth-child(3),
.live-departure-table td:nth-child(3) { width: 13%; } /* Abfahrt */
.live-departure-table th:nth-child(4),
.live-departure-table td:nth-child(4) { width: 12%; } /* in min */
.live-departure-table th:nth-child(5),
.live-departure-table td:nth-child(5) { width: 10%; } /* Gleis */
.live-departure-table th:nth-child(6),
.live-departure-table td:nth-child(6) { width: 18%; } /* Status */

.type-livedata .live-departure-table tbody .dep-row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.type-livedata .live-departure-table tbody .dep-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.025);
}

.type-livedata .dep-row td {
  padding: 2vh 1vw;
  vertical-align: middle;
  border-bottom: none;
}

.dep-line {
  /* Spaltenbreite über table-layout */
}

.line-badge {
  display: inline-block;
  padding: 0.8vh 1.2vw;
  border-radius: 0.6vh;
  font-weight: 700;
  font-size: 2.6vh;
  min-width: 4vw;
  text-align: center;
  color: #ffffff;
}

/* Linienfarben — corporate-orientiert */
.line-bus { background: #7a3d82; }
.line-regional, .line-regional-express { background: #356aa0; }
.line-suburban { background: #009640; }
.line-subway { background: #2f5890; }
.line-tram { background: #8a3e3e; }
.line-national, .line-national-express, .line-nationalExpress { background: #58585a; }
.line-ferry { background: #2e6a72; }
/* Varianten-Fallbacks für unterschiedliche Datenquellen */
.line-regional-exp { background: #356aa0; }
.line-regionalExp { background: #356aa0; }

.dep-direction {
  color: #333333;
  font-size: 2.8vh;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-platform {
  text-align: center;
  color: #58585a;
  font-size: 2.4vh;
}

.dep-countdown {
  font-weight: 700;
  font-size: 3vh;
  color: #009640;
  font-variant-numeric: tabular-nums;
}

.dep-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 2.8vh;
  color: #444444;
}

/* Status Badges */
.dep-status {
  text-align: right;
}
.status-badge {
  display: inline-block;
  padding: 0.8vh 1.2vw;
  border-radius: 2vh;
  font-size: 2vh;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.status-badge.on-time {
  background: rgba(0, 150, 64, 0.12);
  color: #007830;
}
.status-badge.delayed {
  background: rgba(230, 130, 0, 0.12);
  color: #b86800;
}
.status-badge.cancelled {
  background: rgba(198, 40, 40, 0.12);
  color: #c62828;
}

/* Kräftigere Status-Farben (Legacy) */
.dep-delay.on-time { color: #009640; }
.dep-delay.delayed { color: #b86800; }
.dep-delay.cancelled { color: #c62828; text-decoration: line-through; }
.dep-row.cancelled td { opacity: 0.45; text-decoration: line-through; }

/* === Verkehrslage Traffic List (Autobahn Blue Theme) === */
.live-traffic-list {
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
}

.traffic-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5vw;
  padding: 2.5vh 2.5vw;
  border-radius: 1vh;
  background: #ffffff;
  border-left-width: 5px;
  border-left-style: solid;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Kräftigere Akzentfarben */
.traffic-row.warning { border-left-color: #d09030; }
.traffic-row.roadwork { border-left-color: #c0a830; }
.traffic-row.closure { border-left-color: #dc3545; }
.traffic-row.clear { border-left-color: #004B87; }

.traffic-icon { 
  font-size: 4vh; 
  flex-shrink: 0;
  line-height: 1;
}

.traffic-hw {
  font-weight: 700;
  min-width: 5vw;
  color: #004B87;
  font-size: 3.2vh;
  flex-shrink: 0;
}

.traffic-msg {
  flex: 1;
  color: #333333;
  line-height: 1.5;
  font-size: 2.8vh;
}

.traffic-detail {
  display: block;
  font-size: 2.2vh;
  color: #777777;
  margin-top: 0.5vh;
}

/* === Traffic Slide: Autobahn Blue Override === */
.live-data-widget.slide-traffic .live-widget-header {
  border-bottom-color: #004B87;
}
.live-data-widget.slide-traffic .live-indicator {
  background: #004B87;
  border-color: #003666;
}

/* --- Footer (Corporate Style with Page Dots) --- */
.live-widget-footer {
  padding: 1.5vh 3vw;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  flex-shrink: 0;
}

.live-footer-pages {
  display: flex;
  gap: 0.6vw;
  align-items: center;
}

.live-page-dot {
  width: 1vh;
  height: 1vh;
  border-radius: 50%;
  background: #d0d0d0;
  transition: all 0.3s ease;
}

.live-page-dot.active {
  background: #009640;
  width: 2.5vh;
  border-radius: 0.5vh;
  box-shadow: 0 0 8px rgba(0, 150, 64, 0.5);
}

.live-footer-info {
  font-size: 1.8vh;
  color: #888888;
  font-weight: 400;
}

/* --- Loading --- */
.live-widget-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999999;
}

.live-widget-loading .spinner {
  width: 5vh;
  height: 5vh;
  border: 3px solid rgba(0, 150, 64, 0.15);
  border-top-color: #009640;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 2vh;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.no-data {
  color: #999999;
  font-style: italic;
  padding: 2vh 0;
  font-size: 2.2vh;
}

/* ============================================
   Wetter-Widget — 3-Screen Design (Corporate)
   Screen 1: Heute + Stündlich
   Screen 2: 5-Tage-Vorhersage
   Screen 3: Regenradar
   ============================================ */

/* --- Gemeinsame Screen-Basis --- */
.w-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2vh 3vw;
  gap: 2vh;
  overflow: hidden;
  font-family: var(--font-primary, 'Roboto', 'Segoe UI', sans-serif);
}

.w-section-title {
  font-size: 2vh;
  font-weight: 700;
  color: #009640;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== SCREEN 1: Heute + Stündlicher Verlauf ===== */
/* ===== SCREEN 1: Wetter Heute — neues Layout ===== */
.w-screen-today {
  gap: 2vh;
}

/* Hero: 3 Spalten */
.w-today-hero {
  display: flex;
  gap: 2.5vw;
  align-items: stretch;
  flex-shrink: 0;
}

/* Spalte 1: Icon + Temperatur */
.w-hero-main {
  display: flex;
  align-items: center;
  gap: 2vw;
  flex: 0 0 auto;
  padding: 2vh 2.5vw;
  background: linear-gradient(135deg, #eaf6ff 0%, #f0faf4 100%);
  border-radius: 2vh;
  border: 1px solid #daeef8;
}

.w-big-icon {
  font-size: 11vh;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.18));
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.w-hero-temp-block {
  display: flex;
  flex-direction: column;
  gap: 0.4vh;
}

.w-big-temp {
  font-size: 9vh;
  font-weight: 900;
  color: #1a1d22;
  line-height: 1;
  letter-spacing: -0.03em;
}

.w-big-unit {
  font-size: 5vh;
  font-weight: 400;
  color: #666;
  vertical-align: super;
}

.w-big-desc {
  font-size: 2.4vh;
  color: #4a4a6a;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.w-today-location {
  font-size: 1.6vh;
  color: #009640;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Spalte 2: Stats-Grid */
.w-hero-stats {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1vh 1vw;
}

.w-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3vh;
  padding: 1.2vh 0.8vw;
  background: #ffffff;
  border: 1px solid #e8eaee;
  border-radius: 1.4vh;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.w-sc-icon {
  font-size: 2.4vh;
  line-height: 1;
}

.w-sc-val {
  font-size: 2.8vh;
  font-weight: 800;
  color: #1a1d22;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.w-sc-lbl {
  font-size: 1.2vh;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

/* Spalte 3: Max/Min + Sonnenzeiten */
.w-hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5vh;
  padding: 2vh 2vw;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 2vh;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  min-width: 12vw;
}

.w-hero-max {
  font-size: 5.5vh;
  font-weight: 900;
  color: #d94f00;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(217,79,0,0.2);
}

.w-hero-min {
  font-size: 3.8vh;
  font-weight: 700;
  color: #2a7ac0;
  letter-spacing: -0.01em;
  line-height: 1;
}

.w-hero-sun {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vh;
  font-size: 1.7vh;
  color: #888;
  font-weight: 500;
  border-top: 1px solid #e8e8e8;
  padding-top: 1vh;
  width: 100%;
  text-align: center;
}

/* --- Stündliche Chips --- */
.w-hourly-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1vh;
  min-height: 0;
  border-top: 1px solid #e8eaee;
  padding-top: 1.5vh;
}

.w-hourly-chips {
  display: flex;
  gap: 1vw;
  overflow: hidden;
  align-items: stretch;
}

.w-hour-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5vh;
  padding: 1vh 0.6vw;
  background: #ffffff;
  border: 1px solid #e8eaee;
  border-radius: 1.4vh;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  min-width: 0;
}

.w-chip-time {
  font-size: 1.5vh;
  font-weight: 700;
  color: #555;
  font-variant-numeric: tabular-nums;
}

.w-chip-icon {
  font-size: 2.5vh;
  line-height: 1;
}

.w-chip-temp {
  font-size: 2.2vh;
  font-weight: 800;
  color: #1a1d22;
  font-variant-numeric: tabular-nums;
}

/* vertikale Regenbalken */
.w-chip-rain-bar {
  width: 0.8vw;
  height: 4vh;
  background: #e5e7eb;
  border-radius: 0.4vw;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.w-chip-rain-fill {
  width: 100%;
  border-radius: 0.4vw;
  transition: height 0.4s ease;
}

.w-chip-rain {
  font-size: 1.4vh;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.w-chip-wind {
  font-size: 1.3vh;
  color: #aaa;
  font-variant-numeric: tabular-nums;
}

/* Legacy-Klassen für Rückwärtskompatibilität */
.w-today-stats { display: none; }
.w-today-minmax { display: none; }
.w-minmax-val.w-max { color: #d94f00; }
.w-minmax-val.w-min { color: #2a7ac0; }

/* ===== SCREEN 2: 5-Tage-Vorhersage ===== */
.w-screen-forecast {
  justify-content: center;
  align-items: center;
}

.w-fc-grid {
  display: flex;
  gap: 1.5vw;
  justify-content: center;
  width: 100%;
  max-width: 95%;
}

.w-fc-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2vh;
  padding: 2.5vh 1.5vw;
  background: #ffffff;
  border-radius: 1.5vh;
  border: 1px solid #e0e0e0;
  transition: background 0.2s, border-color 0.2s;
  max-width: 17vw;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.w-fc-card.w-fc-today {
  background: #f0faf4;
  border-color: #009640;
  border-width: 2px;
}

.w-fc-day-name {
  font-size: 2.2vh;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.w-fc-today .w-fc-day-name {
  color: #009640;
}

.w-fc-date {
  font-size: 1.4vh;
  color: #999999;
  font-weight: 500;
  margin-top: -0.8vh;
}

.w-fc-icon {
  font-size: 5vh;
  line-height: 1;
}

.w-fc-desc {
  font-size: 1.6vh;
  color: #777777;
  text-align: center;
  min-height: 3.5vh;
}

.w-fc-temps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3vh;
  width: 100%;
  padding: 0.8vh 0;
  background: linear-gradient(135deg, #fff8f4 0%, #f4f8ff 100%);
  border-radius: 1vh;
}

.w-fc-max {
  font-size: 4.8vh;
  font-weight: 900;
  color: #d94f00;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(217,79,0,0.15);
}

.w-fc-sep {
  display: none;
}

.w-fc-min {
  font-size: 2.8vh;
  font-weight: 700;
  color: #2a7ac0;
}

.w-fc-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4vh;
  width: 100%;
  padding-top: 1vh;
  border-top: 1px solid #eeeeee;
}

.w-fc-detail {
  font-size: 1.5vh;
  color: #666666;
  font-weight: 500;
}

.w-fc-sun {
  font-size: 1.3vh;
  color: #aaaaaa;
  margin-top: 0.3vh;
}

/* ===== SCREEN 3: Regenradar ===== */
.w-screen-radar {
  gap: 1vh;
}

.w-radar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.w-radar-frame {
  flex: 1;
  border-radius: 1.5vh;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  min-height: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  position: relative;
}

/* Radar Timeline / Animation Controls */
.radar-timeline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.2vh;
  padding: 1vh 1.5vh;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  pointer-events: none;
}

.radar-timeline-bar {
  flex: 1;
  height: 0.5vh;
  background: rgba(255,255,255,0.3);
  border-radius: 0.25vh;
  overflow: hidden;
}

.radar-timeline-progress {
  height: 100%;
  width: 0%;
  background: #009640;
  border-radius: 0.25vh;
  transition: width 0.4s ease;
}

.radar-timestamp {
  color: #fff;
  font-size: 1.8vh;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
}

/* Leaflet Container im Radar */
#rainradar-map {
  z-index: 1;
}

#rainradar-map .leaflet-tile-pane {
  /* Radar-Tiles leicht sättigen */
  filter: saturate(1.3);
}

/* Legacy weather selectors — no longer rendered */
.weather-fullscreen, .weather-redesign, .weather-top,
.weather-current-compact, .weather-main, .weather-icon-large,
.weather-temp-block, .weather-temp, .weather-desc, .weather-location,
.weather-key-stats, .weather-stat, .weather-stat-icon,
.weather-stat-text, .weather-stat-value, .weather-stat-label,
.weather-radar-container, .weather-radar-title, .weather-radar-iframe,
.weather-rain-chart, .rain-chart-title, .rain-chart-bars,
.rain-bar-col, .rain-bar-value, .rain-bar-track, .rain-bar-fill,
.rain-bar-time, .weather-forecast-5day, .weather-forecast-day,
.forecast-weekday, .forecast-icon, .forecast-temps,
.forecast-max, .forecast-min, .forecast-rain-detail,
.forecast-rain-icon, .forecast-rain-pct, .forecast-precip,
.forecast-rain, .weather-details, .weather-detail-item,
.weather-detail-icon, .weather-detail-label, .weather-detail-value,
.weather-current, .weather-forecast {
  /* Legacy — kept to prevent errors */
}

/* ============================================
   Responsive Auflösungs-Anpassungen
   Skaliert Inhalte für optimale Lesbarkeit
   auf allen Endgeräten (720p bis 4K)
   ============================================ */

/* --- Kleine Displays / Tablets (bis 1280px Breite, ~720p) --- */
@media screen and (max-width: 1280px) {
  .display-header {
    padding: 0.5rem 1rem;
    min-height: 40px;
    gap: 1rem;
  }
  .logo-image { max-height: 28px; }
  .header-category { font-size: 0.9rem; }
  .clock { font-size: 1rem; }

  .display-main { padding: 1rem; }
  .post { padding: 1.5rem 2rem; border-radius: 10px; }
  .post h1 { font-size: 1.8rem; margin-bottom: 1rem; padding-left: 1rem; border-left-width: 3px; }
  .post p, .post div { font-size: 1.1rem; line-height: 1.6; }
  .post img, .post video, .post iframe { max-height: 50vh; }

  .display-footer { padding: 0.4rem 1rem; }
  .footer-info { font-size: 0.75rem; }
  .post-indicator { font-size: 0.8rem; padding: 0.3rem 0.6rem; }

  /* Live-Daten compact */
  .live-widget-header { padding: 1vh 2vw; gap: 1.5vw; }
  .live-indicator { font-size: 1.4vh; padding: 0.4vh 0.8vw; }
  .live-title { font-size: 2.5vh; }
  .live-time { font-size: 1.8vh; }
  .live-widget-content { padding: 1vh 2vw; }
  .live-widget-footer { padding: 1vh 2vw; }
  .live-footer-info { font-size: 1.3vh; }

  /* ÖPNV */
  .departure-board-header { padding: 1.2vh 1.5vw; font-size: 2vh; }
  .departure-station-name { font-size: 2.2vh; }
  .departure-clock { font-size: 2.2vh; }
  .type-livedata .live-departure-table thead th { font-size: 1.5vh; padding: 1vh 0.8vw; }
  .type-livedata .dep-row td { padding: 1.2vh 0.8vw; }
  .line-badge { font-size: 1.8vh; padding: 0.5vh 0.8vw; min-width: 3vw; }
  .dep-direction { font-size: 2vh; }
  .dep-countdown { font-size: 2.2vh; }
  .dep-time { font-size: 2vh; }
  .dep-platform { font-size: 1.8vh; }
  .status-badge { font-size: 1.5vh; padding: 0.5vh 0.8vw; }

  /* Verkehrslage */
  .traffic-row { padding: 1.5vh 1.5vw; }
  .traffic-icon { font-size: 2.5vh; }
  .traffic-title { font-size: 2vh; }
  .traffic-subtitle { font-size: 1.5vh; }

  /* Wetter */
  .w-big-icon { font-size: 6vh; }
  .w-big-temp { font-size: 5vh; }
  .w-big-desc { font-size: 1.6vh; }
  .w-stat-pill { font-size: 1.3vh; padding: 0.5vh 0.8vw; }
  .w-hour-temp { font-size: 1.5vh; }
  .w-hour-time { font-size: 1.4vh; }
  .w-fc-icon { font-size: 3vh; }
  .w-fc-day-name { font-size: 1.6vh; }
  .w-fc-max { font-size: 2vh; }
  .w-fc-min { font-size: 1.6vh; }
  .w-fc-card { padding: 1.5vh 1vw; }
}

/* --- Small Height (720p Höhe) --- */
@media screen and (max-height: 800px) {
  .live-widget-header { padding: 1vh 2vw; }
  .live-title { font-size: 2.8vh; }
  .live-widget-content { padding: 1vh 2vw; }
  .departure-board-header { padding: 1.2vh 1.5vw; }
  .type-livedata .dep-row td { padding: 1.2vh 0.8vw; }
  .line-badge { font-size: 2vh; padding: 0.5vh 0.8vw; }
  .dep-direction { font-size: 2.2vh; }
  .dep-countdown { font-size: 2.5vh; }
  .status-badge { font-size: 1.6vh; padding: 0.5vh 0.8vw; }
  .w-big-icon { font-size: 7vh; }
  .w-big-temp { font-size: 6vh; }
  .w-stat-pill { padding: 0.5vh 0.8vw; font-size: 1.5vh; }
  .w-hour-row { padding: 0.5vh 0; }
  .w-fc-card { padding: 1.5vh 1vw; gap: 0.8vh; }
}

/* --- Full HD (1920x1080) --- */
@media screen and (min-width: 1920px) {
  .display-header {
    padding: 1.5rem 3rem;
    min-height: 80px;
    gap: 3rem;
  }
  .logo { font-size: 1.7rem; }
  .logo-image { max-height: 51px; }
  .header-category { font-size: 1.5rem; letter-spacing: 1px; }
  .clock { font-size: 1.7rem; letter-spacing: 1.5px; }

  .display-main { padding: 3.5rem; }
  .post-container { max-width: 1800px; }
  .post { padding: 5rem 6rem; border-radius: 20px; }
  .post h1 { font-size: 4.5rem; margin-bottom: 3rem; padding-left: 2.5rem; border-left-width: 6px; }
  .post p, .post div { font-size: 2rem; line-height: 2; max-width: 1600px; }
  .post img, .post video { max-height: 70vh; border-radius: 16px; }
  .post iframe { width: 1600px; max-height: 70vh; border-radius: 16px; }

  .display-footer { padding: 0.75rem 3rem; min-height: 50px; }
  .footer-info { font-size: 1.1rem; gap: 1.5rem; }
  .post-indicator { bottom: 2rem; right: 3rem; font-size: 1.2rem; padding: 0.6rem 1.2rem; }
  .category-badge { top: 3rem; left: 3rem; padding: 0.75rem 2rem; font-size: 1.4rem; }

  .presentation-controls { bottom: 3rem; padding: 1rem 2rem; gap: 1rem; }
  .pres-btn { width: 60px; height: 60px; font-size: 1.5rem; }
  .pres-info { padding: 0 1.5rem; }
  .pres-mode-label { font-size: 0.8rem; letter-spacing: 2.5px; }
  .pres-counter { font-size: 1.4rem; }

  .live-widget-header { padding: 2.5vh 3vw; }
  .post table th { padding: 1.5rem; font-size: 1.8rem; }
  .post table td { padding: 1.2rem 1.5rem; font-size: 1.6rem; }

  .video-fullscreen-container { border-radius: 20px; }
  .video-header { padding: 1.5rem 3rem; min-height: 70px; }
  .video-title { font-size: 1.8rem; }
  .video-footer { padding: 0.75rem 3rem; min-height: 50px; }
  .video-muted-indicator, .offline-mode-indicator { font-size: 1.5rem; top: 1.5rem; padding: 0.75rem 1.25rem; border-radius: 12px; }
  .global-music-indicator { bottom: 1.5rem; left: 1.5rem; font-size: 1.2rem; padding: 0.75rem 1.5rem; border-radius: 25px; }
}

/* --- Große Full-HD+ Displays (2560px+) --- */
@media screen and (min-width: 2560px) {
  .live-widget-header { padding: 2vh 2.5vw; }
  .live-title { font-size: 3.2vh; }
  .departure-board-header { padding: 2.5vh 2vw; font-size: 2.8vh; }
  .departure-station-name { font-size: 3.2vh; }
  .departure-clock { font-size: 3.2vh; }
  .type-livedata .live-departure-table thead th { font-size: 2.2vh; padding: 2vh 1.2vw; }
  .type-livedata .dep-row td { padding: 2.5vh 1.2vw; }
  .line-badge { font-size: 2.8vh; padding: 1vh 1.5vw; }
  .dep-direction { font-size: 3vh; }
  .dep-countdown { font-size: 3.5vh; }
  .dep-time { font-size: 3vh; }
  .status-badge { font-size: 2.2vh; padding: 1vh 1.5vw; }

  .w-big-icon { font-size: 12vh; }
  .w-big-temp { font-size: 10vh; }
  .w-big-desc { font-size: 3vh; }
  .w-stat-pill { font-size: 2.2vh; }
  .w-fc-icon { font-size: 6vh; }
  .w-fc-max { font-size: 3.5vh; }
  .w-fc-min { font-size: 2.5vh; }
}

/* --- 4K Displays (3840x2160) --- */
@media screen and (min-width: 3840px) {
  .display-header { padding: 2rem 4rem; min-height: 100px; }
  .logo { font-size: 2.5rem; }
  .logo-image { max-height: 80px; }
  .header-category { font-size: 2rem; }
  .clock { font-size: 2.5rem; }

  .display-main { padding: 4rem; }
  .post { padding: 6rem 8rem; }
  .post h1 { font-size: 6rem; margin-bottom: 4rem; padding-left: 3rem; border-left-width: 8px; }
  .post p, .post div { font-size: 2.5rem; line-height: 2.1; }
  .post table th { padding: 2rem; font-size: 2.2rem; }
  .post table td { padding: 1.5rem 2rem; font-size: 2rem; }
  .display-footer { padding: 1rem 4rem; min-height: 60px; }
  .footer-info { font-size: 1.3rem; }
}

/* ============================================
   News-Widget
   ============================================ */

.news-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 1.5vh;
}

.news-screen-header {
  display: flex;
  align-items: center;
  gap: 1.2vw;
  padding-bottom: 1.2vh;
  border-bottom: 2px solid #e8eaee;
  flex-shrink: 0;
}

.news-header-icon {
  font-size: 3.5vh;
  line-height: 1;
}

.news-header-title {
  font-size: 2.8vh;
  font-weight: 800;
  color: #1a1d22;
  letter-spacing: -0.01em;
}

/* Grid: 2 Spalten, erste Karte groß (lead), Rest klein */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 1.2vh 1.5vw;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 0.5vh;
  padding: 1.2vh 1.2vw;
  background: #ffffff;
  border: 1px solid #e8eaee;
  border-radius: 1.2vh;
  border-left: 4px solid #e8eaee;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* Lead-Karte: volle Breite, größerer Text */
.news-card-lead {
  grid-column: 1 / -1;
  border-left-color: #009640;
  background: linear-gradient(135deg, #f0faf4 0%, #ffffff 60%);
  padding: 1.8vh 1.6vw;
}

.news-card-lead .news-title {
  font-size: 2.8vh;
  font-weight: 800;
  line-height: 1.25;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.8vw;
}

.news-source {
  font-size: 1.2vh;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #009640;
  background: #e8f5ee;
  padding: 0.2vh 0.6vw;
  border-radius: 0.5vh;
}

.news-age {
  font-size: 1.2vh;
  color: #aaa;
  font-weight: 500;
}

.news-title {
  font-size: 1.9vh;
  font-weight: 700;
  color: #1a1d22;
  line-height: 1.3;
}

.news-desc {
  font-size: 1.5vh;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Slide-Hintergrund für News */
.slide-news.live-data-widget {
  background: #f7f8fa;
}

.slide-news .live-widget-content {
  background: transparent;
}
