/* ---------------------------------------------
   PROJECT LINK MODULE STYLES – subgrafica (final + icon support)
--------------------------------------------- */

.still-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 0;
  overflow: hidden;
  opacity: 0.90;
}

.still-background {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease-in-out; /* suaviza entrada y salida */
}

.et_pb_project_link_wrapper {
  position: relative;
}

.still-meta {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0;
  background: none;
  opacity: 1;
  transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.still-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.still-title,
.still-subtitle,
.still-category {
  font-family: var(--ffa);
  font-size: var(--fs-h2);
  font-weight: var(--fwl-reg);
  line-height: var(--flh1);
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  cursor: default;
  text-decoration: none;
  color: var(--bl); /* color base fijo (evita flicker) */
  transition: color 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.still-title {
  font-size: var(--fs-h1) !important;
  font-weight: var(--fwl-med);
}

.still-category {
  align-self: flex-end;
}

/* ---------------------------------------------
   INTERACTIVIDAD / HOVERS
--------------------------------------------- */

/* A. Hover sobre la imagen */
.et_pb_project_link_wrapper.has-link .still-image-wrapper:hover .still-background {
  opacity: 0.85;
}

/* B. Hover sobre el bloque de texto */
.et_pb_project_link_wrapper.has-link .project-link-trigger:hover .still-meta {
  color: var(--bl); /* color hover global */
  text-decoration: underline;
  opacity: 1;
}

/* Aplicar color también a íconos o pseudo-elementos dentro del meta */
.et_pb_project_link_wrapper.has-link .project-link-trigger:hover .still-meta svg,
.et_pb_project_link_wrapper.has-link .project-link-trigger:hover .still-meta::before,
.et_pb_project_link_wrapper.has-link .project-link-trigger:hover .still-meta::after {
  fill: var(--bl2);
  color: var(--bl2);
}

/* C. Control de clics */
.still-image-wrapper img {
  pointer-events: none;
}

.project-link-trigger {
  display: block;
  pointer-events: auto;
}

/* Cursor tipo mano solo en texto */
.project-link-trigger:hover,
.project-link-trigger .still-title,
.project-link-trigger .still-subtitle,
.project-link-trigger .still-category {
  cursor: pointer;
}

/* ---------------------------------------------
   SIN ENLACE (no interactividad)
--------------------------------------------- */

.et_pb_project_link_wrapper.no-link .still-background {
  opacity: 1 !important;
  transition: none !important;
}

.et_pb_project_link_wrapper.no-link .still-image-wrapper:hover .still-background {
  opacity: 1 !important;
}

.et_pb_project_link_wrapper.no-link .still-meta,
.et_pb_project_link_wrapper.no-link .still-title,
.et_pb_project_link_wrapper.no-link .still-subtitle,
.et_pb_project_link_wrapper.no-link .still-category {
  cursor: default !important;
  pointer-events: none;
  color: var(--bl) !important;
}

/* ---------------------------------------------
   RESPONSIVE
--------------------------------------------- */

@media (max-width: 767px) {
  .still-meta {
    left: 14px;
    right: 14px;
    bottom: 12px;
  }
  .still-title    { font-size: 16px; }
  .still-subtitle { font-size: 13px; }
  .still-category { font-size: 13px; }
}

/* ---------------------------------------------
   ICONO CENTRADO – basado en video popup
--------------------------------------------- */

.project-link-icon-trigger,
.project-link-icon-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  display: block;
  z-index: 4;
  pointer-events: auto;
}

.project-link-icon {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Hover sobre wrapper con link activa atenuación del ícono */
.et_pb_project_link_wrapper.has-link:hover .project-link-icon {
  opacity: 0.85;
}

/* Si no hay link, no mostramos mano ni interacción */
.et_pb_project_link_wrapper.no-link .project-link-icon-trigger {
  cursor: default !important;
  pointer-events: none !important;
}

/* El meta siempre por encima del ícono */
.still-meta {
  z-index: 5;
}
