
/* =====================================================
   DOLLY BEATRIZ | LUXURY REAL ESTATE

   OPTIMIZACIÓN DEL CARRUSEL DE PROYECTOS

   Archivo: css/proyectos-optimizados.css
   ===================================================== */

/* =========================================
   01. TRANSICIÓN RÁPIDA DE TARJETAS
   ========================================= */

.inmersive-projects .project-card {
  transition:
    opacity 340ms ease,
    transform 420ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 420ms ease;
}

/* =========================================
   02. CAMBIO DE FOTOGRAFÍAS
   ========================================= */

.inmersive-projects .project-image {
  transition:
    opacity 380ms ease,
    transform 1800ms linear;
}

/* =========================================
   03. FONDO CINEMATOGRÁFICO
   ========================================= */

.inmersive-projects .projects-ambient-media {
  filter: blur(28px) saturate(.75);

  transition:
    opacity 450ms ease,
    transform 650ms cubic-bezier(.22, 1, .36, 1);
}

/* =========================================
   04. SELECCIÓN DE PROYECTO
   ========================================= */

.inmersive-projects .project-card::after {
  transition: border-color 350ms ease;
}

/* =========================================
   05. DESPLAZAMIENTO HORIZONTAL
   ========================================= */

.inmersive-projects .projects-viewport {
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

/* =========================================
   06. ARRASTRE CON RATÓN
   ========================================= */

.inmersive-projects .projects-viewport.is-dragging {
  cursor: grabbing;

  scroll-snap-type: none;
  scroll-behavior: auto;

  user-select: none;
}

.inmersive-projects .projects-viewport.is-dragging * {
  user-select: none;
}

/* =========================================
   07. FOTOGRAFÍAS
   ========================================= */

.inmersive-projects .project-image {
  backface-visibility: hidden;
}

.inmersive-projects .project-media img {
  pointer-events: none;
  user-select: none;
}

/* =========================================
   08. RESPONSIVE
   ========================================= */

@media (max-width: 760px) {
  .inmersive-projects .project-card {
    transition:
      opacity 300ms ease,
      transform 350ms ease,
      box-shadow 350ms ease;
  }

  .inmersive-projects .project-image {
    transition:
      opacity 350ms ease,
      transform 1600ms linear;
  }

  .inmersive-projects .projects-ambient-media {
    filter: blur(22px) saturate(.7);
    transition: opacity 350ms ease;
  }
}

/* =========================================
   09. MOVIMIENTO REDUCIDO
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  .inmersive-projects .projects-viewport {
    scroll-behavior: auto;
  }

  .inmersive-projects .project-card,
  .inmersive-projects .project-image,
  .inmersive-projects .projects-ambient-media,
  .inmersive-projects .project-card::after {
    transition: none !important;
  }
}


/* =========================================
   DOLLY BEATRIZ
   CARRUSEL INFINITO CON ARRASTRE
   ========================================= */

/* Desplazamiento horizontal elegante */

.inmersive-projects .projects-viewport {
  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  cursor: grab;

  scrollbar-width: none;
  -ms-overflow-style: none;

  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.inmersive-projects
.projects-viewport::-webkit-scrollbar {
  display: none;
}

/* Ratón presionado y arrastrando */

.inmersive-projects
.projects-viewport.is-dragging {
  cursor: grabbing !important;

  scroll-snap-type: none !important;
  scroll-behavior: auto !important;

  user-select: none;
}

.inmersive-projects
.projects-viewport.is-dragging * {
  user-select: none;
}

/* Cada tarjeta se centra al soltar */

.inmersive-projects .project-card {
  scroll-snap-align: center;
  scroll-snap-stop: normal;

  flex-shrink: 0;
}

/* Las copias también forman parte del
   movimiento circular, sin cambios visuales */

.inmersive-projects .project-clone {
  pointer-events: auto;
}

/* Las fotografías no bloquean el arrastre */

.inmersive-projects .project-media,
.inmersive-projects .project-media img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Respuesta más rápida */

.inmersive-projects .project-card {
  transition:
    opacity 300ms ease,
    transform 380ms cubic-bezier(.22, 1, .36, 1),
    box-shadow 380ms ease;
}

/* Transición de fotografías */

.inmersive-projects .project-image {
  transition:
    opacity 350ms ease,
    transform 1800ms linear;
}

/* Fondo ambiental */

.inmersive-projects .projects-ambient-media {
  transition:
    opacity 400ms ease,
    transform 600ms ease;
}

/* Móviles */

@media (max-width: 760px) {
  .inmersive-projects .projects-viewport {
    -webkit-overflow-scrolling: touch;
  }

  .inmersive-projects .project-card {
    scroll-snap-align: center;
  }
}

/* Accesibilidad */

@media (prefers-reduced-motion: reduce) {
  .inmersive-projects .projects-viewport {
    scroll-behavior: auto;
  }

  .inmersive-projects .project-card,
  .inmersive-projects .project-image,
  .inmersive-projects .projects-ambient-media {
    transition: none !important;
  }
}
