/* ============================================================
   WEB — ESTILOS ESPECÍFICOS
   ============================================================ */

.web-projects-section {
  padding: 120px 58px 140px;
  background: var(--bone);
  border-top: 1px solid var(--line);
}

.web-projects-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.web-projects-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 90px;
}

.web-projects-heading h2 {
  max-width: 980px;
  margin: 24px 0 0;
  font-size: clamp(3rem, 6.5vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  color: #050505;
}

.web-projects-heading > p {
  max-width: 560px;
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.web-project-list {
  display: grid;
  gap: 120px;
}

.web-project {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1.55fr) minmax(310px, 0.85fr);
  gap: 26px;
  align-items: stretch;
  padding-bottom: 54px;
  border-bottom: 1px solid var(--line);
}

.web-project-index {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.web-project-index span:last-child::before {
  content: "— ";
}

.web-project-media {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--soft-gray);
  isolation: isolate;
  cursor: crosshair;
}

.web-project-images,
.web-project-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.web-project-images img {
  object-fit: cover;
  opacity: 0;
  transform: translateY(9%) scale(1.025);
  transition: opacity 0.55s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.web-project-images img.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  z-index: 1;
}

.web-project-media::after {
  content: "Recorrer vistas";
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(250, 248, 245, 0.9);
  color: var(--carbon);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.web-project-progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  height: 2px;
  overflow: hidden;
  background: rgba(250, 248, 245, 0.35);
}

.web-project-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--bone);
}

.web-project-media.is-cycling .web-project-progress span {
  animation: webProgress 1.35s linear infinite;
}

@keyframes webProgress { to { width: 100%; } }

.web-project-dots {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 6;
  display: flex;
  gap: 7px;
}

.web-project-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(250, 248, 245, 0.9);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.web-project-dot.is-active { background: var(--bone); }

.web-project-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 0 4px;
}

.web-project-kicker {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.web-project-copy h3 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.065em;
  color: #050505;
}

.web-project-copy > p {
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--text-soft);
  font-size: 1.03rem;
  line-height: 1.58;
}

.web-project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.web-project-tech span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.web-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 42px;
}

.web-project-button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--carbon);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.web-project-button:hover {
  transform: translateY(-2px);
  background: var(--carbon);
  color: var(--bone);
}

.web-project-button--primary {
  background: var(--carbon);
  color: var(--bone);
}

.web-project-button--primary:hover {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--carbon);
}

.web-capabilities-section {
  padding: 120px 58px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .web-projects-section { padding-inline: 24px; }
  .web-projects-heading { grid-template-columns: 1fr; gap: 28px; }
  .web-project { grid-template-columns: 42px minmax(0, 1fr); }
  .web-project-copy { grid-column: 2; padding-top: 18px; }
  .web-project-media { min-height: 520px; }
  .web-project-actions { margin-top: 0; }
}

@media (max-width: 700px) {
  .web-projects-section { padding: 88px 20px 110px; }
  .web-projects-heading { margin-bottom: 58px; }
  .web-projects-heading h2 { font-size: clamp(2.8rem, 14vw, 5rem); }
  .web-project-list { gap: 76px; }
  .web-project { grid-template-columns: 1fr; gap: 16px; padding-bottom: 38px; }
  .web-project-index { flex-direction: row; grid-row: 1; }
  .web-project-media { grid-row: 2; min-height: 420px; }
  .web-project-copy { grid-column: 1; grid-row: 3; }
  .web-project-copy h3 { font-size: clamp(2.5rem, 12vw, 4.2rem); }
  .web-project-media::after { display: none; }
  .web-capabilities-section { padding: 88px 24px; }
}

@media (max-width: 460px) {
  .web-project-media { min-height: 330px; }
  .web-project-actions { width: 100%; }
  .web-project-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .web-project-images img { transition: none; }
  .web-project-progress span { animation: none !important; }
}

/* ============================================================
   CORRECCIÓN DE INTERACCIÓN DE IMÁGENES
   ============================================================ */

.web-project-media.is-ready {
  cursor: ew-resize;
}

.web-project-images img {
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 8%, 0) scale(1.035);
}

.web-project-images img.is-active {
  visibility: visible;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  z-index: 2;
}

.web-project-media:hover .web-project-images img.is-active {
  transform: translate3d(0, -1.5%, 0) scale(1.015);
}

.web-project-media::before {
  content: attr(data-active-view) " / 03";
  position: absolute;
  left: 18px;
  bottom: 30px;
  z-index: 7;
  color: var(--bone);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.web-project-dots {
  pointer-events: auto;
}

.web-project-dot {
  position: relative;
  z-index: 8;
}

@media (hover: none) {
  .web-project-media::after {
    content: "Toca para cambiar";
  }
}
