/* ==========================================================================
   VENETIAN BLINDS (EFECTO PERSIANAS VENECIANAS) ENGINE STYLES
   Inspired by Architectural Slat Systems & Dintel Geometric Imagery Direction
   ========================================================================== */

.venetian-blinds-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: #061324;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  user-select: none;
}

/* 3D Scene Viewport */
.venetian-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  perspective: 1400px;
  perspective-origin: center center;
  overflow: hidden;
  cursor: grab;
}

.venetian-viewport:active {
  cursor: grabbing;
}

/* Layer 1: The Revealed Image (After / Finished Luxury Space) */
.venetian-layer-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* Layer 2: The Slat Structure (Before / Raw Renovation State) */
.venetian-slats-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: flex;
  pointer-events: none;
  transform-style: preserve-3d;
}

/* Horizontal Mode (Default: Venetian Blinds Lamas Horizontales) */
.venetian-slats-stage.mode-horizontal {
  flex-direction: column;
}

.venetian-slats-stage.mode-horizontal .venetian-slat {
  width: 100%;
  flex: 1;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: top center;
  will-change: transform, opacity;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 184, 240, 0.15);
}

/* Vertical Mode (Imagery Direction: Slat Grid) */
.venetian-slats-stage.mode-vertical {
  flex-direction: row;
}

.venetian-slats-stage.mode-vertical .venetian-slat {
  height: 100%;
  flex: 1;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: left center;
  will-change: transform, opacity;
  overflow: hidden;
  border-right: 1px solid rgba(0, 184, 240, 0.15);
}

/* Slat Inner Image Carrier */
.venetian-slat-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Realism: Slat Architectural Bevel and Depth Shadow */
.venetian-slat-shadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
  opacity: 0;
}

.mode-horizontal .venetian-slat-shadow {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(10, 31, 61, 0.2) 60%, transparent 100%);
}

.mode-vertical .venetian-slat-shadow {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(10, 31, 61, 0.2) 60%, transparent 100%);
}

/* Architectural Edge Line */
.venetian-slat::after {
  content: '';
  position: absolute;
  background: rgba(78, 211, 255, 0.25);
  pointer-events: none;
  z-index: 5;
}

.mode-horizontal .venetian-slat::after {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
}

.mode-vertical .venetian-slat::after {
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
}

/* Comparison Badges */
.slat-badge-before,
.slat-badge-after {
  position: absolute;
  z-index: 10;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--border-radius-sm);
  pointer-events: none;
  clip-path: var(--clip-diagonal-badge);
}

.slat-badge-before {
  top: 16px;
  left: 16px;
  background: rgba(10, 31, 61, 0.9);
  color: #B9CCE0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slat-badge-after {
  bottom: 16px;
  right: 16px;
  background: rgba(0, 184, 240, 0.92);
  color: var(--color-deep-navy);
  box-shadow: 0 0 15px rgba(0, 184, 240, 0.5);
}

/* Fallback / Slider Split Mode (Optional toggle) */
.venetian-split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--color-vibrant-cyan);
  box-shadow: 0 0 12px var(--color-vibrant-cyan);
  z-index: 20;
  cursor: ew-resize;
  display: none;
}

.venetian-split-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: var(--color-deep-navy);
  border: 2px solid var(--color-vibrant-cyan);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(0, 184, 240, 0.6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300B8F0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3Cpolyline points='9 18 3 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}
