/* ========== STYLES FÜR DEN TOUCH-TERMINAL ========== */
/* Head ausblenden */
body.terminal-view header {
  display: none !important;
}

/* Footer ausblenden (optional) */
body.terminal-view footer {
  display: none !important;
}

/* Buttons und Links größer machen */
body.terminal-view a, 
body.terminal-view button, 
body.terminal-view .et_pb_button {
  font-size: 1.5em;
  padding: 20px;
}

body.terminal-view .f-button.is-close-btn {
  padding: 0;
}

body.terminal-view .hidden-on-terminal, .hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body.has-linked-kran .et_pb_post_content {
  display: none;
}


body.terminal-view .et_pb_blurb_content {
  font-size: 1.4em;
}

/* Bilder in voller Breite anzeigen */
body.terminal-view img {
  width: 100%;
  height: auto;
}

/* Maximaler Touch-Komfort: große Touch-Zonen */
body.terminal-view .et_pb_column {
  padding: 20px;
}

/* Schrift allgemein vergrößern */
body.terminal-view {
  font-size: 18px;
}

/* Seitenhintergrund leicht einfärben (optional für Touch-Lesbarkeit) */
body.terminal-view {
  background-color: #f8f8f8;
}

/* Haupt-Container strecken */
body.terminal-view #page-container {
  /*min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;*/
  padding: 20px;
}

/* Jede Sektion 100% Breite
body.terminal-view .et_pb_section {
  width: 100%;
  max-width: 1920px;
  box-sizing: border-box;
}
 */
/* Buttons angenehm groß und zentriert */
body.terminal-view .et_pb_button {
  font-size: 2em;
  padding: 25px 50px;
  margin: 20px 0;
  text-align: center;
}

/* Bildbereiche: immer an Bildschirm angepasst */
body.terminal-view img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Touch-optimierte Interaktionen */
body.terminal-view a,
body.terminal-view button {
  touch-action: manipulation;
}

/* Optionale Animationen abschalten (für bessere Performance auf Kiosk-Terminals) */
body.terminal-view * {
  /*animation: none !important;*/
  transition: none !important;
}

/*Fade In Content*/
#ajax-content-wrapper {
  transition: opacity 0.3s ease;
  opacity: 1;
}

/*Terminal Content*/
.terminal-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 50px;
	overflow: hidden;
}

.terminal-content-wrapper {
    background: rgba(255, 255, 255, 0.7);
    width: 50% !important;
    border-radius: 15px;
    top: 4vh;
    right: 25px;
    position: absolute !important;   /* war: absolute — kippt sonst gegen .et_pb_column */
    padding: 3%;
}
body.no-linked-kran .terminal-content-wrapper {
    width: 80% !important;
}
.terminal-content-wrapper .et_pb_button {
    font-size: 21px;
    font-weight: 500;
    padding: 5px 40px 5px 20px;
    line-height: 1.7em !important;
    background-color: #164194;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    border: none;
    border-radius: 0;
    -webkit-transition-duration: .2s;
    transition-duration: .2s;
    -webkit-transition-property: all !important;
    transition-property: all !important;
    color: #fff;
}
.terminal-content-wrapper .et_pb_button:after {
    line-height: inherit;
    font-size: inherit !important;
    opacity: 1;
    margin-left: .3em;
    left: auto;
    font-family: ETmodules !important;
    font-weight: 400 !important;
}
.terminal-content-wrapper .et_pb_button:hover, .terminal-content-wrapper .et_pb_module .et_pb_button:hover {
    border: none;
    padding: 5px 40px 5px 20px;
}

.terminal-produktbild {
    width: 60% !important;
    bottom: 55px;
    left: 0;
    position: absolute !important;
	z-index: 1;
}

/* Kran fährt von links rein */
.kran-animate {
	opacity: 0;
	transform: translateX(-100px);
	animation: slideInLeft 1s ease-out forwards;
	animation-delay: 0.5s; /* optional */
}
/* Keyframes für Animation */
@keyframes slideInLeft {
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* =============================
   NAVIGATION (GLASSMORPHISM)
   ============================= */

/* Hauptnavigation vertikal anordnen (Spalte) */
.et-vert-menu .et_pb_menu__menu > nav > ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  padding: 0px !important;
}

/* Top-Level LI schlank halten */
.et-vert-menu .et_pb_menu__menu nav ul li {
  margin: 0 !important;
  display: block;
  text-align: center;
  position: initial;
}

/* Reset & Glass-Kachel für die Top-Level-Links */
.et-vert-menu .et_pb_menu__menu nav > ul > li > a {
  height: 120px;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
  color: #fff !important;
  font-size: 25px;
  line-height: 1em;
  text-decoration: none;
  transition: transform .2s ease, background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.et-menu .menu-item-has-children>a:first-child:after {
  display: none;
}

/* Hover & aktive Zustände für Top-Level 
.et-vert-menu .et_pb_menu__menu nav > ul > li > a:hover,
#menu-terminal .menu-item.active > a,
#menu-terminal .current-menu-item > a {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 38px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
}*/

/* Tastatur-Fokus deutlich */
.et-vert-menu .et_pb_menu__menu nav > ul > li > a:focus {
  outline: none;
  box-shadow:
    0 16px 38px rgba(0,0,0,0.22),
    0 0 0 3px rgba(22,65,148,0.45),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

/* Submenüs als Glass-Panel rechts neben dem Hauptmenü */
#menu-terminal .sub-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0 !important;
  left: calc(100% + 50px) !important;
  z-index: 9999;
  background: rgba(255,255,255,0.10) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 18px;
  padding: 14px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
  transform: translateY(4px);
  width: 255px;
}
#menu-terminal .sub-menu.visible {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Submenü-Links als kleine „Glass-Pills“ */
#menu-terminal .sub-menu > li > a {
  display: block;
  white-space: nowrap;
  padding: 10px 14px !important;
  margin: 6px 4px;
  border-radius: 12px;
  color: #164194;
  text-decoration: none;
  background: rgba(255,255,255,1);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  transition: background .2s ease, transform .15s ease, border-color .2s ease;
}
#menu-terminal .sub-menu > li > a:hover,
#menu-terminal .sub-menu > li.active > a,
#menu-terminal .sub-menu > li.current-menu-item > a {
  background: #164194;
  color: #fff;
  opacity: 1;
}

/* RESPONSIVE ANPASSUNGEN */
@media all and (min-width: 981px) {
  .et-vert-menu .et_pb_menu__menu,
  .et-vert-menu .et_pb_menu__menu > nav {
    width: 100%;
  }

  .terminal-body {
		width: 100%;
		padding-left: 300px !important;
	}
}
@media (max-width: 1280px) {
  .et-vert-menu .et_pb_menu__menu nav > ul > li > a {
    width: 180px;
    height: 180px;
    font-size: 16px;
  }
}
@media (max-width: 980px) {
  .et-vert-menu .et_pb_menu__menu nav > ul > li > a {
    width: 160px;
    height: 160px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .et-vert-menu .et_pb_menu__menu nav > ul > li > a,
  #menu-terminal .sub-menu {
    transition: none !important;
  }
}

/* Basis für alle Icons */
#menu-terminal .terminal_menu-item > a {
  position: relative;
  padding-top: 75px !important; /* Platz für Icon über Text */
}

/* Das Icon selbst */
#menu-terminal .terminal_menu-item > a::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.9;
}

/* Beispiel-Icons */
.terminal_home > a::before {
  background-image: url('/wp-content/uploads/2025/08/terminal_home.png');
}
.terminal_produkte > a::before {
  background-image: url('/wp-content/uploads/2025/08/terminal_produkte.png');
}
.terminal_zubehoer > a::before {
  background-image: url('/wp-content/uploads/2025/08/terminal_zubehoer.png');
}
.terminal_academy > a::before {
  background-image: url('/wp-content/uploads/2025/09/terminal_academy.png');
}
.terminal_tutorial > a::before {
  background-image: url('/wp-content/uploads/2025/08/terminal_tutorials.png');
}
.terminal_unternehmen > a::before {
  background-image: url('/wp-content/uploads/2025/09/terminal_unternehmen.png');
}

/* ========== TUTORIALS CAROUSEL ========== */

:root{
  --snap-gap: 1rem;
  --snap-tile-w: 320px;     /* Basisbreite Desktop */
  --snap-ratio: 16/9;       /* Seitenverhältnis der Kacheln */
}

.snap-row{ padding: 1.5rem 0 }
.snap-row__head{
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:.75rem;
}
.snap-row__head h2{ margin:0; font-size:clamp(18px,2.2vw,24px) }

/* Pfeile */
.snap-row__nav{ display:flex; gap:.5rem }
.snap-nav{
  appearance:none; border:0; background:rgba(0,0,0,.1);
  width:2.2rem; height:2.2rem; border-radius:50%; cursor:pointer;
}
.snap-nav:hover{ background:rgba(0,0,0,.18) }

/* Track: horizontales Scroll-Snap */
.snap-track{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns: clamp(70%, 38vw, var(--snap-tile-w));
  gap: var(--snap-gap);
  overflow-x:auto; overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  padding-bottom:.5rem;
}
.snap-track::-webkit-scrollbar{ height:8px }
.snap-track::-webkit-scrollbar-thumb{ background:rgba(0,0,0,.2); border-radius:8px }

/* Card */
.snap-card{ scroll-snap-align:start }
.snap-card__link{ display:block; text-decoration:none; color:inherit }
.snap-card__poster{
  aspect-ratio: var(--snap-ratio);
  border-radius:.5rem; overflow:hidden; background:#f0f2f5;
}
.snap-card__poster img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .25s ease;
}
.snap-card__link:hover .snap-card__poster img{ transform:scale(1.04) }

.snap-card__meta{
  display:flex; justify-content:space-between; gap:.75rem;
  font-size:.95rem; margin-top:.4rem;
}

/* Responsive: größere Karten auf kleinen Screens */
@media (max-width: 900px){
  .snap-track{ grid-auto-columns: 70vw }
}
@media (max-width: 600px){
  .snap-track{ grid-auto-columns: 84vw }
}

/* ========== SCREENSAVER ========== */

#screensaver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999 !important;
  display: none;
  background-color: #000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
}

#screensaver video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
}
.screensaver-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.tap-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}
.tap-icon svg {
  animation: tapMotion 2s infinite;
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
}
.tap-ripple {
  position: absolute;
  top: 32px;
  left: 32px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: ripple 2s infinite;
  z-index: 1;
}
.screensaver-text {
  font-size: 1.6rem;
  opacity: 0.8;
  color: #fff;
}
@keyframes tapMotion {
  0%   { transform: translateY(0) scale(1); opacity: 0.7; }
  30%  { transform: translateY(10px) scale(0.95); opacity: 1; }
  50%  { transform: translateY(0) scale(1); opacity: 0.7; }
  100% { transform: translateY(0) scale(1); opacity: 0.7; }
}
@keyframes ripple {
  0% { transform: scale(0.5); opacity: 0.6; }
  50% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(0.5); opacity: 0; }
}

/* Header ausblenden, wenn Screensaver aktiv */
body.screensaver-active header.et-l--header {
  opacity: 0;
  pointer-events: none;
}

/* Screensaver Fade In/Out */
#screensaver.fade-in {
  animation: fadeIn 0.3s ease-in forwards;
}
#screensaver.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Header sanft einblenden */
header.et-l--header.fade-in-header {
  animation: fadeInHeader 0.5s ease-in;
}
@keyframes fadeInHeader {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fixierter Zurück-Button nur im Terminal-View */
body.terminal-view .terminal-back-btn {
  position: fixed;
  left: 70px;
  top: 100px; /* admin bar beachten, siehe unten */
  z-index: 1000; /* über Content, unter Screensaver */
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
  color: #164194;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, background .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .2s;
  user-select: none;
  touch-action: manipulation;
}

body.terminal-view .terminal-back-btn:hover,
body.terminal-view .terminal-back-btn:focus {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 16px 38px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
  outline: none;
}

body.terminal-view .terminal-back-btn .label {
  white-space: nowrap;
}

body.terminal-view .terminal-compare-icon {
    z-index: 99999;
}

body.terminal-view .terminal-compare-icon .kran-vergleich-icon-wrapper {
	margin: 0;
	line-height: 1;
}

body.terminal-view .terminal-compare-icon .kran-vergleich-icon-wrapper a {
	padding: 0;
	line-height: 1;
	width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
	cursor: pointer;
	user-select: none;
    touch-action: manipulation;
	position: relative;
}

body.terminal-view .terminal-compare-icon a:hover,
body.terminal-view .terminal-compare-icon a:focus {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 16px 38px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
  outline: none;
}

body.terminal-view .terminal-compare-icon a .et-pb-icon {
	font-size: 35px !important;
}

body.terminal-view .terminal-compare-icon a .kran-vergleich-counter {
    top: -11px;
    right: -17px;
    padding: 7px 11px;
    font-size: 20px;
}

body.terminal-view .terminal-intern-btn a {
	padding: 0;
	line-height: 1;
	width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.28);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.12);
	cursor: pointer;
	user-select: none;
    touch-action: manipulation;
	position: relative;
}

body.terminal-view .terminal-intern-btn a:hover,
body.terminal-view .terminal-intern-btn a:focus {
  transform: translateY(-2px) scale(1.03);
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 16px 38px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.18);
  outline: none;
}

/* Logout Button unten links fixiert */
.terminal-logout-btn{
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 1000000;
}

.terminal-logout-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #164194;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.terminal-logout-link:hover{
  opacity: .9;
}

/* Bei kleinem Viewport etwas kleiner */
@media (max-height: 700px), (max-width: 1024px) {
  body.terminal-view .terminal-back-btn {
    width: 56px; height: 56px; border-radius: 14px;
  }
  body.terminal-view .terminal-back-btn .label { display: none; } /* nur Icon */
}

/* Wenn WP-Adminbar sichtbar ist, Button minimal tiefer setzen */
body.admin-bar.terminal-view .terminal-back-btn {
  top: 156px;
}

/* Wenn der Screensaver aktiv ist, Button ausblenden */
body.screensaver-active .terminal-back-btn {
  opacity: 0; pointer-events: none;
}
