/* =============================================================================
   EMlines — PRODUKTY: showcase carousel (úvod) + product explorer (produkty.html)
   Načítavané po styles.css. Používa rovnaké --em-* tokeny a komponenty
   (.device-frame, .feat-list, .btn, .eyebrow, .config-note).

   Spoločný princíp: jeden produkt aktívny, ostatné ostávajú v DOM. CSS skrýva
   neaktívne LEN pod .js → bez JS sú všetky produkty čitateľné pod sebou
   (prístupnosť + SEO). Vstupné animácie a prepínač rešpektujú reduced-motion.
   ============================================================================= */

/* ---- Spoločné pomôcky ---------------------------------------------------- */
.section-head--left { text-align: left; max-width: 760px; margin-inline: 0; }
.section-head--left .eyebrow { justify-content: flex-start; }
.section-head--left .lead { margin-inline: 0; }

.crumbs {
  display: flex; align-items: center; gap: var(--em-sp-2);
  font-family: var(--em-font-head); font-size: 0.82rem; font-weight: 700;
  color: var(--em-text-muted); margin-bottom: var(--em-sp-5);
}
.crumbs a { color: var(--em-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--em-teal); }
.crumbs span[aria-hidden] { color: var(--em-n-300); }

.link-arrow {
  font-family: var(--em-font-head); font-weight: 800; color: var(--em-teal);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.link-arrow:hover { color: var(--em-teal-700); text-decoration: underline; text-underline-offset: 3px; }

.products-intro { padding-bottom: var(--em-sp-7); }
.products-explorer-section { padding-top: var(--em-sp-4); }

/* =========================================================================
   HOMEPAGE CAROUSEL (.product-carousel / .pc-*)
   ========================================================================= */
.product-carousel {
  margin-top: var(--em-sp-8);
  background: var(--em-surface);
  border: 1px solid var(--em-border);
  border-radius: var(--em-r-lg);
  box-shadow: var(--em-shadow-sm);
  padding: var(--em-sp-6);
  overflow: hidden;
}
.pc-viewport { position: relative; }

.pc-slide {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-sp-6);
  align-items: center;
}
.js .pc-slide:not(.is-active) { display: none; }
.pc-slide.is-active { animation: pc-fade-in var(--em-dur-slow) var(--em-ease) both; }
@keyframes pc-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Médiá: pevná výška „pódia" → prepínanie bez skoku layoutu */
.pc-media {
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}
.pc-media .device-frame { width: auto; max-width: 290px; padding: 10px; }
.pc-media .device-frame img {
  width: auto; max-width: 100%; max-height: 270px;
  object-fit: contain; border-radius: 4px;
}

.pc-body .eyebrow { justify-content: flex-start; margin-bottom: var(--em-sp-3); }
.pc-body h3 {
  font-family: var(--em-font-head); font-weight: 900; letter-spacing: -0.025em;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.08;
  color: var(--em-text-primary); margin-bottom: var(--em-sp-3);
}
.pc-body > p { color: var(--em-text-secondary); max-width: 46ch; margin-bottom: var(--em-sp-5); }
.pc-chips { display: flex; flex-wrap: wrap; gap: var(--em-sp-2); margin-bottom: var(--em-sp-6); }
.pc-chips li {
  font-family: var(--em-font-head); font-weight: 700; font-size: 0.8rem;
  color: var(--em-teal-700); background: var(--em-surface-alt);
  border: 1px solid rgba(0,102,102,0.16); border-radius: var(--em-r-pill);
  padding: 6px 13px;
}

/* Selektor produktov (taby s progresom) */
.pc-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--em-sp-4) var(--em-sp-5);
  margin-top: var(--em-sp-8); padding-top: var(--em-sp-6);
  border-top: 1px solid var(--em-border);
}
.pc-tab {
  position: relative; cursor: pointer; text-align: left;
  background: transparent; border: 0; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--em-font-head);
}
.pc-tab-idx { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: var(--em-n-400); transition: color var(--em-dur-base) var(--em-ease); }
.pc-tab-name { font-weight: 750; font-size: 0.92rem; line-height: 1.2; color: var(--em-text-secondary); transition: color var(--em-dur-base) var(--em-ease); }
.pc-tab.is-active .pc-tab-idx,
.pc-tab.is-active .pc-tab-name { color: var(--em-teal); }
.pc-tab:hover .pc-tab-name { color: var(--em-teal); }
.pc-bar { display: block; height: 3px; margin-top: var(--em-sp-2); border-radius: var(--em-r-pill); background: var(--em-n-100); overflow: hidden; }
.pc-bar-fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--em-teal); transform: scaleX(0); transform-origin: left center; }
.pc-tab:focus-visible { outline: 2px solid var(--em-focus); outline-offset: 4px; border-radius: var(--em-r-xs); }

@media (min-width: 860px) {
  .product-carousel { padding: var(--em-sp-9); }
  .pc-slide { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr); gap: var(--em-sp-11); }
  .pc-media { min-height: 380px; }
  .pc-media .device-frame { max-width: 330px; }
  .pc-media .device-frame img { max-height: 340px; }
  .pc-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--em-sp-6); }
}

/* =========================================================================
   PRODUCTS PAGE EXPLORER (.product-explorer / .pe-*)
   ========================================================================= */
.product-explorer { margin-top: var(--em-sp-7); }

.pe-tabs {
  position: relative;
  display: flex; gap: var(--em-sp-1);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  border-bottom: 1px solid var(--em-border);
}
.pe-tabs::-webkit-scrollbar { display: none; }
.pe-tab {
  flex: 1 0 auto; min-width: 156px;
  display: flex; align-items: center; gap: var(--em-sp-3);
  cursor: pointer; background: transparent; border: 0;
  padding: var(--em-sp-4) var(--em-sp-4);
  text-align: left; font-family: var(--em-font-head);
  border-radius: var(--em-r-sm) var(--em-r-sm) 0 0;
  transition: background var(--em-dur-base) var(--em-ease);
}
.pe-tab:hover { background: var(--em-surface-alt); }
.pe-tab-idx { font-size: 1rem; font-weight: 900; color: var(--em-n-300); transition: color var(--em-dur-base) var(--em-ease); }
.pe-tab-text { display: flex; flex-direction: column; gap: 1px; }
.pe-tab-name { font-weight: 800; font-size: 0.98rem; line-height: 1.15; color: var(--em-text-secondary); transition: color var(--em-dur-base) var(--em-ease); }
.pe-tab-kind { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--em-text-muted); }
.pe-tab.is-active .pe-tab-idx,
.pe-tab.is-active .pe-tab-name { color: var(--em-teal); }
.pe-tab:focus-visible { outline: 2px solid var(--em-focus); outline-offset: -3px; }
.pe-indicator {
  position: absolute; bottom: -1px; left: 0; height: 3px; width: 0;
  background: var(--em-teal); border-radius: var(--em-r-pill); transform: translateX(0);
  transition: transform var(--em-dur-slow) var(--em-ease), width var(--em-dur-slow) var(--em-ease);
}

.pe-stage { margin-top: var(--em-sp-9); }
.pe-panel {
  display: grid; grid-template-columns: 1fr; gap: var(--em-sp-7); align-items: center;
}
.js .pe-panel:not(.is-active) { display: none; }
.pe-panel.is-active { animation: pe-panel-in var(--em-dur-slow) var(--em-ease) both; }
@keyframes pe-panel-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
/* Stagger checklistu pri vstupe panela */
.pe-panel.is-active .feat-list li { animation: pe-feat-in 0.5s var(--em-ease) both; }
.pe-panel.is-active .feat-list li:nth-child(1) { animation-delay: 0.12s; }
.pe-panel.is-active .feat-list li:nth-child(2) { animation-delay: 0.19s; }
.pe-panel.is-active .feat-list li:nth-child(3) { animation-delay: 0.26s; }
.pe-panel.is-active .feat-list li:nth-child(4) { animation-delay: 0.33s; }
@keyframes pe-feat-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

.pe-media { margin: 0; display: flex; align-items: center; justify-content: center; }
.pe-media .device-frame { max-width: 460px; width: 100%; }
.pe-body .eyebrow { justify-content: flex-start; margin-bottom: var(--em-sp-3); }
.pe-body h2 {
  font-family: var(--em-font-head); font-weight: 900; letter-spacing: -0.025em;
  font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.06;
  color: var(--em-text-primary); margin-bottom: var(--em-sp-4);
}
.pe-lead { color: var(--em-text-secondary); font-size: 1.06rem; margin-bottom: var(--em-sp-6); }
.pe-usecase { margin: var(--em-sp-6) 0; font-family: var(--em-font-head); font-weight: 700; color: var(--em-text-primary); }
.pe-usecase-label {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 800; color: var(--em-text-muted); margin-right: var(--em-sp-2);
}
.pe-body .config-note { margin-top: var(--em-sp-5); }

@media (min-width: 860px) {
  .pe-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--em-sp-11); }
  .pe-body { order: 1; }
  .pe-media { order: 2; min-height: 460px; }
  .pe-media .device-frame img { max-height: 440px; width: auto; max-width: 100%; object-fit: contain; margin-inline: auto; }
}

/* =========================================================================
   ZÁVEREČNÝ CTA BAND (tmavý) — produkty.html
   ========================================================================= */
.cta-section { padding-block: var(--em-sp-9); }
.cta-band {
  position: relative; overflow: hidden;
  background:
    linear-gradient(to right, rgba(5,28,28,0.18) 0%, rgba(5,28,28,0.5) 42%, rgba(5,28,28,0.88) 65%, #051c1c 82%),
    url('assets/images/foto-zastavka-cestujuca.png') left center / cover no-repeat;
  color: #fff;
  border-radius: var(--em-r-xl); padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--em-sp-7); align-items: center;
}
.cta-band::before { display: none; }
.cta-band-text { position: relative; }
.cta-band-text h2 { color: #fff; font-family: var(--em-font-head); font-weight: 900; letter-spacing: -0.025em; margin: var(--em-sp-3) 0; }
.cta-band-text p { color: rgba(255,255,255,0.80); max-width: 52ch; }
.cta-band-actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--em-sp-3); }
.cta-band--infopoint {
  background:
    linear-gradient(to right, rgba(5,28,28,0.55) 0%, rgba(5,28,28,0.72) 42%, rgba(5,28,28,0.92) 65%, #051c1c 82%),
    url('assets/images/foto-infopoint-cyklista.png') left center / cover no-repeat;
}
.cta-band--infopoint .cta-band-text p { color: rgba(255,255,255,0.95); }

.eyebrow-on-dark { color: var(--em-teal-200); }
.eyebrow-on-dark::before { background: var(--em-teal-300) !important; }

@media (min-width: 860px) {
  .cta-band { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); padding: var(--em-sp-11) var(--em-sp-10); }
  .cta-band-actions { justify-content: flex-end; }
}

/* =========================================================================
   reduced-motion — vypni vstupné animácie a prechody prepínača
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .pc-slide.is-active,
  .pe-panel.is-active,
  .pe-panel.is-active .feat-list li { animation: none !important; }
  .pe-indicator { transition: none !important; }
  .pc-bar-fill { transition: none !important; }
}

/* =========================================================================
   VÝVESKA EM 860 — rozšírený panel (zastávky + stanice)
   ========================================================================= */
.pe-panel--wide { display: block; }

/* Hlavná spec sekcia */
.vyveska-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-sp-8);
  padding-bottom: var(--em-sp-10);
  border-bottom: 1px solid var(--em-border);
  margin-bottom: var(--em-sp-10);
}
@media (min-width: 720px) {
  .vyveska-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
}

.pe-model {
  font-family: var(--em-font-head);
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--em-teal);
  margin: 0 0 var(--em-sp-2);
}

/* Spec tabuľka */
.spec-grid {
  display: flex; flex-wrap: wrap; gap: var(--em-sp-5) var(--em-sp-8);
  margin: var(--em-sp-6) 0;
}
.spec-item { display: flex; flex-direction: column; gap: 2px; }
.spec-label {
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--em-text-muted);
}
.spec-val {
  font-size: 1rem; font-weight: 700; color: var(--em-text-primary);
}
.spec-val--big {
  font-size: 2rem; font-weight: 900; letter-spacing: -0.03em;
  color: var(--em-teal); line-height: 1;
}
.spec-sub { font-size: 0.78rem; color: var(--em-text-muted); }

/* Možnosti napojenia */
.napojenie-block { margin-bottom: var(--em-sp-7); }
.napojenie-list {
  display: flex; flex-wrap: wrap; gap: var(--em-sp-4);
  list-style: none; margin: var(--em-sp-3) 0 0; padding: 0;
}
.napojenie-list li {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; font-size: 0.78rem; font-weight: 600;
  color: var(--em-text-secondary); text-align: center;
}
.napojenie-list li svg {
  color: var(--em-teal);
  background: var(--em-teal-50, rgba(0,153,153,0.08));
  border-radius: 50%; padding: 8px; width: 38px; height: 38px; box-sizing: border-box;
}

/* Zastávky / Stanice varianty */
.vyveska-variants {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--em-sp-8);
}
@media (min-width: 860px) {
  .vyveska-variants { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.vyveska-variant {
  border: 1px solid var(--em-border);
  border-radius: var(--em-r-lg);
  overflow: hidden;
}
.vyveska-variant-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.vyveska-variant-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.vyveska-variant-badge {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--em-sp-5);
  background: linear-gradient(0deg, rgba(10,18,17,0.82) 0%, rgba(10,18,17,0) 55%);
}
.vv-type {
  font-family: var(--em-font-head);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--em-teal-bright, #5fd6d6);
}
.vv-name {
  font-family: var(--em-font-head);
  font-size: 1.15rem; font-weight: 900; color: #fff;
  line-height: 1.15;
}
.vyveska-variant-body {
  padding: var(--em-sp-6);
}
.vv-perex {
  font-size: 0.88rem; color: var(--em-text-secondary);
  margin-bottom: var(--em-sp-5); line-height: 1.6;
}
.vyveska-variant-body h3 {
  font-size: 0.96rem; font-weight: 800; margin: var(--em-sp-5) 0 var(--em-sp-3);
  color: var(--em-text-primary);
}
