/* ─────────────────────────────────────────────────────────────────────────────
   Work Slider – Premium Night Sky Edition
   Apple / Vercel / AI-startup inspired. Deep space feel.
───────────────────────────────────────────────────────────────────────────── */

:root {
  --ws-bg: #020617;
  --ws-bg2: #0b1220;
  --ws-accent: #0675e8;
  --ws-accent-glow: rgba(6, 117, 232, 0.4);
  --ws-comet: #00e5c8;
  --ws-text: #ffffff;
  --ws-text-dim: rgba(255, 255, 255, 0.55);
  --ws-glass-border: rgba(255, 255, 255, 0.09);
  --ws-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ── Outer section ───────────────────────────────────────────────────────── */
.saas-product-section {
  position: relative;
  background: linear-gradient(155deg, var(--ws-bg) 0%, var(--ws-bg2) 100%);

  height: 72vh;
  min-height: 500px;
  max-height: 780px;

  /* Rounded card */
  border-radius: 20px;
  margin: 0 20px 56px;
  /* 56px bottom margin – glow shows, doesn't bleed */
  overflow: visible;
  /* let box-shadow/glow show outside rounded edges */

  /* Clip inner content without hiding outer glow */
  isolation: isolate;

  /* Soft blue outer glow */
  box-shadow:
    0 0 0 1px rgba(6, 117, 232, 0.12),
    0 0 60px rgba(6, 117, 232, 0.13),
    0 28px 90px rgba(2, 6, 23, 0.75);

  display: flex;
  align-items: stretch;
}

/* Inner content clip (keeps canvas + slides contained inside rounded box) */
.saas-product-section>* {
  border-radius: inherit;
  overflow: hidden;
}

/* ── Galaxy canvas ───────────────────────────────────────────────────────── */
#ws-galaxy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

/* ── Ambient orbs ────────────────────────────────────────────────────────── */
.ambient-lights {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.light-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}

/* Pure blue – left top */
.orb-1 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(6, 117, 232, 0.28) 0%, transparent 70%);
  top: -100px;
  left: -80px;
  opacity: 1;
}

/* Teal – bottom right */
.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(6, 117, 232, 0.15) 0%, transparent 70%);
  bottom: -80px;
  right: -60px;
  opacity: 1;
}

/* Blue center */
.orb-3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(6, 117, 232, 0.10) 0%, transparent 70%);
  top: 35%;
  left: 35%;
  opacity: 1;
}

/* ── Swiper layout ───────────────────────────────────────────────────────── */
.saas-layout {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 0;
}

.saas-main-swiper {
  width: 100%;
  height: 100%;
}

.saas-slide {
  height: 100%;
  display: flex;
  align-items: stretch;
}

.saas-slide-inner {
  display: flex;
  width: 100%;
  height: 100%;
}

/* ── LEFT: image panel – 40% ─────────────────────────────────────────────── */
.ws-image-panel {
  flex: 0 0 45%;
  /* increased from 40% */
  height: 100%;
  position: relative;
  overflow: visible;
  /* changed from hidden to let 3D tilt overflow slightly if needed */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Grid overlay - reduced opacity to avoid grey look */
.ws-image-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
}

/* Right edge fade – updated to use a darker transparent black to prevent grey leak */
.ws-image-panel::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(2, 6, 23, 0.2));
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* ── Mockup wrapper ──────────────────────────────────────────────────────── */
.ws-mockup-wrapper {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px 0px 30px;
  /* reduced padding to let image grow */
  perspective: 800px;
  /* reduced from 1400px for more dramatic 3D depth */
}

/* Blue radial glow behind the device – no grey */
.ws-mockup-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse at center,
      rgba(6, 117, 232, 0.22) 0%,
      rgba(6, 117, 232, 0.06) 50%,
      transparent 75%);
  z-index: -1;
  border-radius: 50%;
  transition: opacity 0.9s var(--ws-ease);
  opacity: 0.6;
}

.swiper-slide-active .ws-mockup-wrapper::before {
  opacity: 1;
}

/* ── Product image ───────────────────────────────────────────────────────── */
.ws-product-img {
  max-height: 110%;
  /* allow it to fill more */
  max-width: 120%;
  /* allow it to burst out a bit */
  width: auto;
  height: auto;
  object-fit: contain;

  /* Force subpixel layer without shared 3D context */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  /* Reset rendering hints - let browser decide for smoother scaling without blur artifacts */
  image-rendering: auto;

  /* Enhanced drop-shadow - refined to be sharper and blue-tinted */
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 50px rgba(6, 117, 232, 0.4));

  /* Use Z-offset to stay above glow without preserve-3d clipping */
  transform: rotateY(5deg) rotateX(1.5deg) scale(0.96) translateZ(0);
  transition: transform 0.9s var(--ws-ease);
  display: block;
}

.swiper-slide-active .ws-product-img {
  transform: rotateY(0deg) rotateX(0deg) scale(1.05) translateZ(0);
  /* slightly bigger base scale */
}

/* ── RIGHT: content panel – 60% ─────────────────────────────────────────── */
.ws-content-panel {
  flex: 0 0 55%;
  /* adjusted from 60% to accommodate larger image panel */
  display: flex;
  align-items: center;
  padding: 0 5% 0 2%;
  height: 100%;
  transition: filter 0.6s var(--ws-ease), opacity 0.6s var(--ws-ease);
}

.is-focus-mode .ws-content-panel {
  filter: blur(5px);
  /* reduced from 8px to prevent heavy bleed */
  opacity: 0.2;
}

.saas-content {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.9s var(--ws-ease) 0.2s, transform 0.9s var(--ws-ease) 0.2s;
  width: 100%;
  max-width: 600px;
}

.swiper-slide-active .saas-content {
  opacity: 1;
  transform: translateX(0);
}

/* ── Badge – glass style ─────────────────────────────────────────────────── */
.saas-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  background: rgba(6, 117, 232, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(6, 117, 232, 0.30);
  color: #5ba8ff;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.saas-title {
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  color: var(--ws-text);
  line-height: 1.1;
  margin-bottom: 14px;
  letter-spacing: -1.5px;
}

/* Accent divider */
.ws-divider {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ws-accent), transparent);
  margin-bottom: 16px;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.saas-description {
  font-size: clamp(0.85rem, 1.05vw, 0.97rem);
  line-height: 1.82;
  color: var(--ws-text-dim);
  margin-bottom: 0;
  max-width: 88%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.saas-description.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

/* ── Read more button ────────────────────────────────────────────────────── */
.ws-readmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--ws-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.3px;
  transition: opacity 0.2s ease;
  margin-bottom: 0;
}

.ws-readmore-btn:hover {
  opacity: 0.75;
}

.ws-readmore-btn .ws-rm-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  /* smaller chevron */
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  /* ↓ default: closed */
  transition: transform 0.3s var(--ws-ease);
  margin-top: -4px;
  /* optical vertical alignment */
  flex-shrink: 0;
  margin-left: 2px;
}

.ws-readmore-btn.open .ws-rm-arrow {
  transform: rotate(-135deg);
  /* ↑ open */
  margin-top: 2px;
}

/* ── Bottom bar: pagination | counter | arrows ───────────────────────────── */
.saas-pagination-container {
  position: absolute;
  bottom: 24px;
  left: 4%;
  z-index: 10;
}

.saas-pagination.swiper-pagination-bullets {
  text-align: left;
  bottom: 0;
  position: static;
}

.saas-pagination .swiper-pagination-bullet {
  width: 44px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
  border-radius: 2px;
  margin: 0 5px 0 0 !important;
  transition: all 0.4s ease;
}

.saas-pagination .swiper-pagination-bullet-active {
  background: var(--ws-accent);
  width: 72px;
}

/* Focus mode blurs for other UI elements */
.saas-pagination-container,
.ws-slide-counter,
.ws-nav-arrows {
  transition: filter 0.5s var(--ws-ease), opacity 0.5s var(--ws-ease) !important;
}

.is-focus-mode .saas-pagination-container,
.is-focus-mode .ws-slide-counter,
.is-focus-mode .ws-nav-arrows {
  filter: blur(4px);
  /* slightly reduced blur */
  opacity: 0.1;
}

/* Counter – centered, well-separated from both pagination and arrows */
.ws-slide-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 3px;
  white-space: nowrap;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  backdrop-filter: blur(6px);
}

/* Nav arrows */
.ws-nav-arrows {
  position: absolute;
  bottom: 18px;
  right: 4%;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.ws-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.ws-nav-btn:hover {
  background: var(--ws-accent);
  border-color: var(--ws-accent);
  color: #fff;
  transform: scale(1.08);
}

/* Mobile styles moved to mobile-work-slider.css */