/* Corrección UX V2. Este CSS debe cargarse DESPUÉS de estilos.css. */
/* Las reglas se aplican al contenedor real que genera app.js: #projects-grid. */
#projects-grid {
  width:100%;
  margin-left:auto !important;
  margin-right:auto !important;
  justify-content:center;
}
#projects-grid.projects-grid-pair,
#projects-grid.projects-grid-four,
#projects-grid:has(> .project-card:nth-child(2):last-child),
#projects-grid:has(> .project-card:nth-child(4):last-child) {
  display:grid !important;
  width:100% !important;
  max-width:980px !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  justify-items:stretch !important;
  gap:20px !important;
}
#projects-grid.projects-grid-single,
#projects-grid:has(> .project-card:first-child:last-child) {
  max-width:850px !important;
  margin-inline:auto !important;
}
#projects-grid > .project-card {
  min-width:0;
  max-width:100%;
}
/* El círculo de acción debe parecer un icono, no un botón flotante gigante. */
#projects-grid .project-media > .card-action {
  box-sizing:border-box !important;
  width:32px !important;
  height:32px !important;
  min-width:32px !important;
  min-height:32px !important;
  max-width:32px !important;
  max-height:32px !important;
  aspect-ratio:1 / 1 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:50% !important;
  position:absolute !important;
  right:14px !important;
  bottom:14px !important;
  display:grid !important;
  place-items:center !important;
  align-content:center !important;
  justify-content:center !important;
  background:#c8fa75 !important;
  color:#07131b !important;
  font-size:0 !important;
  line-height:1 !important;
  transform:none !important;
  transition:transform 160ms ease !important;
  box-shadow:0 4px 12px #050b1490 !important;
  pointer-events:none;
}
#projects-grid .project-media > .card-action::before {
  content:'+' !important;
  display:block !important;
  position:static !important;
  width:auto !important;
  height:auto !important;
  border-radius:0 !important;
  background:none !important;
  transform:none !important;
  font:700 22px / 1 Arial, sans-serif !important;
  color:#07131b !important;
}
#projects-grid .project-media > .card-action::after {
  content:none !important;
  display:none !important;
}
#projects-grid .project-media > .card-action-play::before {
  content:'▶' !important;
  font-size:14px !important;
  margin-left:2px !important;
}
#projects-grid .project-card:hover .project-media > .card-action {transform:scale(1.05) !important;}
/* Los títulos solo se ocultan si una animación está activada. */
@keyframes enric-v2-entrada-titulo {
 from {opacity:0;transform:translateY(16px);filter:blur(2px)}
 to {opacity:1;transform:translateY(0);filter:blur(0)}
}
html.first-visit-titles [data-enter-title]:not(.title-entered){
 opacity:0;
 transform:translateY(16px);
}
html.first-visit-titles [data-enter-title].title-entered{
 animation:enric-v2-entrada-titulo 700ms cubic-bezier(.22,1,.36,1) both;
 animation-delay:var(--title-enter-delay,0ms);
}
@media(max-width:700px){
  #projects-grid.projects-grid-pair,
  #projects-grid.projects-grid-four,
  #projects-grid:has(> .project-card:nth-child(2):last-child),
  #projects-grid:has(> .project-card:nth-child(4):last-child){
    grid-template-columns:1fr !important;
    max-width:560px !important;
    gap:16px !important;
  }
}
@media(prefers-reduced-motion:reduce){
  html.first-visit-titles [data-enter-title]{
    opacity:1 !important;transform:none !important;filter:none !important;animation:none !important;
  }
  #projects-grid .project-media > .card-action{transition:none!important}
}
