/* ========================================================
   SajtPro — Case Study Fullscreen Overlay
   ======================================================== */

/* ========== OVERLAY ========== */

.cs-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}
.cs-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

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

.cs-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}
.cs-bar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs-bar-title .cs-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-l);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cs-bar-close {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-m);
  cursor: pointer;
  background: none;
  border: 1px solid var(--border-h);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font);
  transition: all 0.2s;
}
.cs-bar-close:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

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

.cs-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 101;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}

/* ========== SLIDES ========== */

.cs-slides {
  position: absolute;
  inset: 0;
}

.cs-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 100px;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.cs-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.cs-slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
  pointer-events: none;
}

/* ========== SLIDE: BEFORE ========== */

.cs-before {
  max-width: 900px;
  width: 100%;
}
.cs-before-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  background: rgba(239,68,68,0.15);
  color: #f87171;
}
.cs-before h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.cs-before p {
  font-size: 17px;
  color: var(--text-m);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}
.cs-before-img {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-h);
  max-width: 600px;
}
.cs-before-img img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  filter: grayscale(0.6) brightness(0.7);
}
.cs-problems {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.cs-problem-tag {
  font-size: 12px;
  font-weight: 600;
  color: #f87171;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.15);
  padding: 5px 12px;
  border-radius: 100px;
}

/* ========== SLIDE: PROCESS ========== */

.cs-process {
  max-width: 700px;
  width: 100%;
  text-align: center;
}
.cs-process h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 40px;
}
.cs-process-steps {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.cs-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 20px;
  flex: 1;
  max-width: 180px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.cs-slide.active .cs-step-card {
  opacity: 1;
  transform: translateY(0);
}
.cs-slide.active .cs-step-card:nth-child(1) { transition-delay: 0.1s; }
.cs-slide.active .cs-step-card:nth-child(2) { transition-delay: 0.25s; }
.cs-slide.active .cs-step-card:nth-child(3) { transition-delay: 0.4s; }
.cs-step-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-l);
  margin-bottom: 8px;
}
.cs-step-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.cs-step-card p {
  font-size: 13px;
  color: var(--text-m);
  line-height: 1.5;
}

/* ========== SLIDE: AFTER ========== */

.cs-after {
  max-width: 900px;
  width: 100%;
}
.cs-after-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  background: rgba(34,197,94,0.15);
  color: #4ade80;
}
.cs-after h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.cs-after p {
  font-size: 17px;
  color: var(--text-m);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
}
.cs-after-browser {
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.cs-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
}
.cs-browser-bar span { width: 8px; height: 8px; border-radius: 50%; }
.cs-browser-bar span:nth-child(1) { background: #ff5f57; }
.cs-browser-bar span:nth-child(2) { background: #febc2e; }
.cs-browser-bar span:nth-child(3) { background: #28c840; }
.cs-after-browser img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.cs-improvements {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.cs-improvement-tag {
  font-size: 12px;
  font-weight: 600;
  color: #4ade80;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.15);
  padding: 5px 12px;
  border-radius: 100px;
}

/* ========== SLIDE: RESULTS ========== */

.cs-results {
  max-width: 700px;
  width: 100%;
  text-align: center;
}
.cs-results h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 40px;
}
.cs-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.cs-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 16px;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
}
.cs-slide.active .cs-stat {
  opacity: 1;
  transform: scale(1);
}
.cs-slide.active .cs-stat:nth-child(1) { transition-delay: 0.1s; }
.cs-slide.active .cs-stat:nth-child(2) { transition-delay: 0.25s; }
.cs-slide.active .cs-stat:nth-child(3) { transition-delay: 0.4s; }
.cs-stat-num {
  font-size: 40px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: -1px;
  display: block;
}
.cs-stat-label {
  font-size: 13px;
  color: var(--text-m);
  margin-top: 4px;
}
.cs-results-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========== ARROWS ========== */

.cs-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-h);
  background: rgba(9,9,11,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-m);
  transition: all 0.25s;
  font-family: var(--font);
}
.cs-nav-arrow:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
}
.cs-nav-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.cs-arrow-left { left: 24px; }
.cs-arrow-right { right: 24px; }

/* ========== DOTS ========== */

.cs-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 8px;
}
.cs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-h);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  font-family: var(--font);
}
.cs-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  transform: scale(1.2);
}

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

@media (max-width: 768px) {
  .cs-bar { padding: 14px 16px; }
  .cs-bar-title { font-size: 13px; }
  .cs-slide { padding: 70px 20px 90px; }
  .cs-before h2, .cs-after h2, .cs-process h2, .cs-results h2 { font-size: 24px; }
  .cs-before p, .cs-after p { font-size: 15px; }
  .cs-process-steps { flex-direction: column; align-items: center; }
  .cs-step-card { max-width: 280px; }
  .cs-stats-grid { grid-template-columns: 1fr; max-width: 240px; margin: 0 auto 32px; }
  .cs-stat-num { font-size: 32px; }
  .cs-nav-arrow { width: 40px; height: 40px; }
  .cs-arrow-left { left: 12px; }
  .cs-arrow-right { right: 12px; }
  .cs-results-cta { flex-direction: column; align-items: center; }
}
