/* =====================================================
   PROCESS PAGE – FINAL STABLE
===================================================== */

/* =====================
   LAYOUT
===================== */

.process-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3em;
  max-width: 100%;
  min-width: 0;
}

/* =====================
   TOP BAR
===================== */

.process-topbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, 120px);
  justify-content: center;
  overflow: visible;
  scroll-snap-type: x mandatory;
  gap: 1.4em;
  max-width: 100%;

  padding-inline: 1rem;
   scroll-padding-inline: 1rem; 
  min-width: 0;

}


/* container musí scrollovat */
.top-bar-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* plynulé scrollování iOS */
}

/* ===== WebKit (Chrome, Safari, Edge mobile) ===== */
.top-bar-scroll::-webkit-scrollbar {
  height: 4px;
}

.top-bar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.top-bar-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(
    90deg,
    rgba(247,179,77,.7),
    rgba(247,179,77,.35)
  );
  border-radius: 999px;
}

/* hover jen pro desktop (mobile nemá hover) */
@media (hover:hover) {
  .top-bar-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
  }
}

/* ===== Firefox ===== */
.top-bar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(247,179,77,.7) transparent;
}

.top-bar-scroll {
  scroll-snap-type: x proximity;
}

.top-bar-scroll > * {
  scroll-snap-align: start;
}

.process-topbar.is-hidden {
  opacity: 0;
  pointer-events: none;
}
/* =====================
   MAIN GRID
===================== */

.process-layout {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) 2fr;
  gap: 3em;

  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* =====================
   SIDEBAR
===================== */

.process-sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-14px);
  transition: .35s ease;

  min-width: 0;
  overflow: visible;
}

.process-sidebar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.process-sidebar-inner {
  position: sticky;
  top: 50vh;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  gap: .8em;

  max-height: 80vh;
  min-width: 0;
}

/* =====================
   TOP STEP CARD
===================== */

.step-card {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45em;

  padding: 14px;
  border-radius: 32px;

  text-align: center;
  font-weight: 600;

  background: rgba(20, 20, 20, .75);

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 15px 45px rgba(0, 0, 0, 0.9);

  overflow: hidden;
  min-width: 0;
  width: 100px;
  border: 2px solid var(--color-gray);
  
}
.step-card--green .step-card::before {
  background: linear-gradient(135deg,
      rgba(60, 121, 0, 0.9),
      rgba(29, 58, 0, 0.25),
      rgba(60, 121, 0, 0.9));

}

.step-card:hover {
  transform: translateY(6px) scale(1.04);
}

/* step parts */

.step-thumb {
  width: 100%;
  min-height: 100px;
  max-height: 150px;
  border-radius: 12px;
  overflow: hidden;
}

.step-thumb img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-thumb video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.step-num {
  font-size: .85rem;
  opacity: .65;
}

.step-title {
  font-size: .9rem;
}

/* =====================
   SIDEBAR STEP
===================== */

.sidebar-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: .8em;
  align-items: center;

  padding: .6em .8em;
  border-radius: 28px;

  background: rgba(20, 20, 20, .75);

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 10px 32px rgba(0, 0, 0, 0.85);

  transition: transform .3s ease;

  overflow: hidden;
  min-width: 0;
}

.sidebar-step img,
.sidebar-step video {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.sidebar-step.scale-mid {
  transform: scale(.7);
}

.sidebar-step.scale-far {
  transform: scale(.5);
}

.sidebar-step.is-hidden {
  
  display: none;
}

/* =====================
   PROCESS SECTIONS
===================== */

.process-sections {
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
  min-width: 0;
}

.process-section {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5em;

  padding: 3em;
  margin-bottom: 4em;

  border-radius: 28px;

  background: rgba(20, 20, 20, .75);

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 15px 45px rgba(0, 0, 0, 0.9);

  min-width: 0;
}

.process-section>* {
  min-width: 0;
}

.process-text h2{
  color: var(--brand-green-lighter);
}

/* alternating */

.process-section:nth-child(even) {
  grid-template-columns: 1fr 1.6fr;
}

.process-section:nth-child(even) .process-text {
  order: 2;
}

/* =====================
   MEDIA PANEL
===================== */

.process-media {
  border-radius: 22px;
  overflow: hidden;

  background: #000;

  min-height: 260px;
  max-height: 650px;

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
}

.process-media img,
.process-media video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =====================
   SIDEBAR PROGRESS
===================== */

.sidebar-progress {
  position: absolute;
  left: 0;
  transform: translateX(-26px);

  top: 0;
  width: 4px;
  height: 100%;

  background: rgba(255, 255, 255, .08);
  border-radius: 6px;
}

.sidebar-progress-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, #ffb400, #ffd36a);
  transition: height .35s ease;
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 1000px) {

  .process-layout {
    grid-template-columns: 1fr;
  }

  .process-sidebar {
    display: none;
  }

  .process-section {
    grid-template-columns: 1fr !important;
    padding: 1em;
    gap: 10px;
  }

  .process-section>* {
    order: unset !important;
  }

  .process-media {
    min-height: unset;
    max-height: none;
  }

  .process-media img,
  .process-media video {
    height: auto;
    max-height: 70vh;
  }

  .process-topbar{
    scrollbar-width: 15px;

  }
}

@media (max-width: 800px) {

  .process-topbar {
    display: flex;
    overflow-x: auto;
    gap: 1rem;

    scroll-snap-type: x proximity;
    padding-inline: 1rem;

    justify-content: flex-start; /* důležité */
  }

  .step-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
  }
}

/* =====================
   GALLERY SAFETY
===================== */

.gallery-slider {
  max-width: 100%;
  overflow: hidden;
}

.gallery-track {
  width: 100%;
  max-width: 100%;
}

.gallery-lightbox,
.gallery-lightbox-inner {
  max-width: 100vw;
  overflow-x: hidden;
}