/* =============================================================
   QUEBRADA EL AMOLADERO / ACTORES Y PROCESOS
   Página exclusivamente (bloques nativos de Gutenberg)
   CSS: assets/css/pages/actores-procesos.css
   ============================================================= */

/* Entrada alineada a toda la ventana sin cambiar la plantilla global */
.wp-block-post-content .amoladero-actores.alignfull,
.entry-content .amoladero-actores.alignfull,
.amoladero-actores.alignfull {
  position: relative;
  display: block;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: clip;
  color: #00594f;
}
.amoladero-actores,
.amoladero-actores * { box-sizing: border-box; }
.amoladero-actores > .wp-block-group { margin-block: 0 !important; max-width: none !important; }

/* Hero: reutiliza las fuentes y los colores del tema */
.amoladero-actores .amoladero-actores__hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .1rem;
  min-height: clamp(240px, 27vw, 350px);
  margin: 0 !important;
  padding: clamp(118px, 11vw, 160px) 20px 46px;
  text-align: center;
  background: #00594f;
  color: #fff;
}
.amoladero-actores .amoladero-actores__eyebrow {
  font-family: var(--amoladero-font-heavy, var(--wp--preset--font-family--nexa-heavy, Arial)), sans-serif;
  font-size: clamp(.91rem, 1.7vw, 1.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 !important;
  color: #fff;
}
.amoladero-actores .amoladero-actores__title {
  font-family: var(--amoladero-font-display, var(--wp--preset--font-family--emaro, sans-serif)) !important;
  font-size: clamp(2.6rem, 6.6vw, 6.35rem) !important;
  font-weight: 400 !important;
  line-height: 1.03 !important;
  color: #fff !important;
  letter-spacing: .012em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0 !important;
}

/* Área completa de línea de tiempo: cenefas verticales */
.amoladero-actores .amoladero-actores__stage {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1.09fr) minmax(340px, .91fr);
  gap: clamp(15px, 2.7vw, 50px);
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 clamp(38px, 4.8vw, 75px);
  background: #dce5df;
  isolation: isolate;
}
.amoladero-actores .amoladero-actores__stage::before,
.amoladero-actores .amoladero-actores__stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: clamp(19px, 2.7vw, 40px);
  pointer-events: none;
  background: url("../../svg/linea-decorativa-hero.svg") center top / 100% auto repeat-y;
  opacity: .95;
}
.amoladero-actores .amoladero-actores__stage::before { left: 0; }
.amoladero-actores .amoladero-actores__stage::after { right: 0; }

/* Ribera con SVG del río. Cada nodo es un bloque Botón editable. */
.amoladero-actores .amoladero-actores__river-area {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: var(--amoladero-points-desktop, 1120px);
  margin: 0 !important;
  background-image: url("../../svg/linea-tiempo-rio.svg");
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: 56% center;
}
.amoladero-actores .amoladero-actores__point {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  width: clamp(128px, 14vw, 240px);
  margin: 0 !important;
  transition: transform .18s ease;
}
.amoladero-actores .amoladero-actores__point--1 {top: 15%;}
.amoladero-actores .amoladero-actores__point--2 {top: 32%;}
.amoladero-actores .amoladero-actores__point--3 {top: 49%;}
.amoladero-actores .amoladero-actores__point--4 {top: 66%;}
.amoladero-actores .amoladero-actores__point--5 {top: 83%;}
.amoladero-actores .amoladero-actores__point--left { right: 47%; justify-content: flex-end; }
.amoladero-actores .amoladero-actores__point--right { left: 64%; justify-content: flex-start; }
.amoladero-actores .amoladero-actores__point-button,
.amoladero-actores .amoladero-actores__point-button .wp-block-button__link { width: 100%; }
.amoladero-actores .amoladero-actores__point-button .wp-block-button__link {
  display: block;
  border: none !important;
  border-radius: 100px !important;
  padding: .49rem .8rem !important;
  background: #27a560 !important;
  color: #fff !important;
  font: 800 clamp(.73rem, 1.1vw, 1.03rem)/1.2 Arial,sans-serif !important;
  text-decoration: none !important;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 13px rgba(0,70,60,.07);
  transition: background .16s ease, box-shadow .16s ease;
}
.amoladero-actores .amoladero-actores__point::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #dce5df;
  border: 5px solid #00594f;
  box-shadow: 0 0 0 4px rgba(255,255,255,.7);
  pointer-events: none;
  transition: background .16s ease, box-shadow .16s ease;
}
.amoladero-actores .amoladero-actores__point--left::after {right: -48px;}
.amoladero-actores .amoladero-actores__point--right::after {left: -49px;}
.amoladero-actores .amoladero-actores__point.is-active::after,
.amoladero-actores .amoladero-actores__point:hover::after {background:#27a560;box-shadow:0 0 0 7px rgba(39,165,96,.2);}
.amoladero-actores .amoladero-actores__point.is-active .wp-block-button__link,
.amoladero-actores .amoladero-actores__point .wp-block-button__link:hover { background: #087a54 !important; }
.amoladero-actores .amoladero-actores__point-button .wp-block-button__link:focus-visible {
  outline: 3px solid #00594f !important;
  outline-offset: 4px;
}

/* Fichas: panel derecho, visible durante el scroll en escritorio */
.amoladero-actores .amoladero-actores__details {
  position: sticky;
  top: clamp(85px, 10vh, 130px);
  align-self: start;
  min-width: 0;
  margin: clamp(28px, 6vw, 95px) 0 60px !important;
}
.amoladero-actores .amoladero-actores__card {
  position: relative;
  width: 100%;
  max-width: 570px;
  margin: 0 auto !important;
  padding: clamp(16px, 2.3vw, 30px);
  border-radius: 10px;
  background: #00594f;
  color: #fff;
  box-shadow: 0 22px 45px rgba(0,60,51,.13);
  scroll-margin-top: 80px;
}
html.amoladero-actores-js .amoladero-actores .amoladero-actores__card:not(.is-active) {display:none !important;}
html.amoladero-actores-js .amoladero-actores .amoladero-actores__card.is-active {animation: amoladero-actores-fadein .25s ease both;}
@keyframes amoladero-actores-fadein {from{opacity:0;transform:translateY(7px);}to{opacity:1;transform:translateY(0);}}
.amoladero-actores .amoladero-actores__date {
  margin: 0 0 10px !important;
  font: 800 clamp(.8rem, 1.25vw, 1rem)/1.2 Arial,sans-serif;
  text-align: right;
  color: #fff;
}
.amoladero-actores .amoladero-actores__photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4/3;
  padding: 12px;
  border: rgba(255,255,255,.3);
  border-radius: 4px;
  overflow: hidden;
}
.amoladero-actores .amoladero-actores__photo-caption {
  font: 700 .83rem/1.4 Arial,sans-serif;
  color: #00594f;
  text-align: center;
}
.amoladero-actores .amoladero-actores__photo-placeholder img,
.amoladero-actores .amoladero-actores__photo-placeholder .wp-block-image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  object-fit: cover;
}
.amoladero-actores .amoladero-actores__photo-placeholder .wp-block-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.amoladero-actores .amoladero-actores__card-title {
  margin: clamp(14px, 2.5vw, 27px) 0 .5rem !important;
  font: 800 clamp(1.22rem, 2.5vw, 2rem)/1.12 Arial,sans-serif !important;
  color: #fff !important;
}
.amoladero-actores .amoladero-actores__description {
  font: 400 clamp(.9rem, 1.16vw, 1.04rem)/1.5 Arial,sans-serif !important;
  margin: 0 !important;
  color: #fff !important;
}

/* Evitar superponer al título el encabezado ya existente en la plantilla */
@supports selector(body:has(.amoladero-actores)) {
  body:has(.amoladero-actores) .amoladero-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    background: transparent;
    color: #fff;
  }
  body.admin-bar:has(.amoladero-actores) .amoladero-header {top:32px;}
}

@media (max-width: 900px) {
  .amoladero-actores .amoladero-actores__stage {grid-template-columns: minmax(0,1fr);padding-inline:clamp(22px,5vw,50px);gap:0;}
  .amoladero-actores .amoladero-actores__river-area { min-height: var(--amoladero-points-mobile, 700px); background-position: 50% center; }
  .amoladero-actores .amoladero-actores__point--left {right:52%;}
  .amoladero-actores .amoladero-actores__point--right {left:58%;}
  .amoladero-actores .amoladero-actores__details {position:relative;top:auto;max-width:650px;width:100%;margin:0 auto 48px !important;}
  .amoladero-actores .amoladero-actores__card{max-width:none;}
}
@media (max-width: 560px) {
  .amoladero-actores .amoladero-actores__hero {padding:110px 16px 35px; min-height:220px;}
  .amoladero-actores .amoladero-actores__title {font-size: clamp(2.1rem, 10.5vw, 4rem) !important;}
  .amoladero-actores .amoladero-actores__stage {padding:0 22px;}
  .amoladero-actores .amoladero-actores__stage::before,
  .amoladero-actores .amoladero-actores__stage::after { width: 17px; }
  .amoladero-actores .amoladero-actores__river-area {min-height:var(--amoladero-points-mobile,640px); background-size: auto 100%;}
  .amoladero-actores .amoladero-actores__point {width: clamp(88px,30vw,150px);}
  .amoladero-actores .amoladero-actores__point--left {right:56%;}
  .amoladero-actores .amoladero-actores__point--right {left:57%;}
  .amoladero-actores .amoladero-actores__point--left::after{right:-30px;}
  .amoladero-actores .amoladero-actores__point--right::after{left:-30px;}
  .amoladero-actores .amoladero-actores__point::after{width:22px;height:22px;border-width:4px;}
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link{font-size:.72rem!important;padding:.42rem .5rem!important;}
  .amoladero-actores .amoladero-actores__card{padding:18px;}
}
@media (max-width: 782px) {
  body.admin-bar:has(.amoladero-actores) .amoladero-header {top:46px;}
}
@media (prefers-reduced-motion: reduce) {
  html.amoladero-actores-js .amoladero-actores .amoladero-actores__card.is-active {animation:none;}
  .amoladero-actores .amoladero-actores__point {transition:none;}
}

/* =============================================================
   V2 — INTERACCIÓN SOLO POR CLIC / TOOLTIP / RESPONSIVE
   Todo limitado a .amoladero-actores.
   ============================================================= */
.amoladero-actores .amoladero-actores__card[hidden] { display: none !important; }
.amoladero-actores .amoladero-actores__river-instruction {
  position: absolute;
  z-index: 5;
  top: clamp(16px, 2.3vw, 35px);
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 430px);
  margin: 0 !important;
  padding: 10px 18px;
  text-align: center;
  color: #00594f;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,89,79,.15);
  border-radius: 99px;
  font: 700 clamp(.75rem,1vw,.94rem)/1.3 Arial,sans-serif;
  box-shadow: 0 9px 25px rgba(0,60,45,.08);
  pointer-events: none;
}
.amoladero-actores.has-interacted .amoladero-actores__river-instruction { display: none; }
.amoladero-actores .amoladero-actores__hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 265px;
  padding: clamp(26px,3vw,48px);
  color: #00594f;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(0,89,79,.13);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 16px 35px rgba(0,60,45,.06);
}
.amoladero-actores .amoladero-actores__hint-symbol {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 5px solid #00594f;
  border-radius: 50%;
  background: #dce5df;
  font: 800 2rem/1 Arial,sans-serif;
}
.amoladero-actores .amoladero-actores__hint strong {
  font-family: var(--amoladero-font-heavy, Arial, sans-serif);
  font-size: clamp(1.05rem,1.7vw,1.4rem);
  line-height: 1.25;
}
.amoladero-actores .amoladero-actores__hint span:last-child { max-width: 350px; font: 400 .97rem/1.6 Arial,sans-serif; }
.amoladero-actores .amoladero-actores__details:not(.is-empty) > .amoladero-actores__hint { display: none; }
.amoladero-actores .amoladero-actores__close {
  position: absolute;
  z-index: 6;
  top: 13px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: rgba(0,45,40,.75);
  color: #fff;
  font: 400 30px/1 Arial,sans-serif;
  cursor: pointer;
  transition: background .15s ease;
}
.amoladero-actores .amoladero-actores__close:hover { background: #2d8956; }
.amoladero-actores .amoladero-actores__close:focus-visible { outline: 3px solid #dce5df; outline-offset: 3px; }
/* Tooltip visible con mouse o teclado sin activar la ficha. */
@media (hover: hover) and (pointer: fine) {
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link {position:relative;}
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link::after {
    content: attr(data-ayuda);
    position:absolute;
    z-index: 20;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translate(-50%, 5px);
    width: max-content;
    max-width: 190px;
    padding: 7px 12px;
    border-radius: 6px;
    white-space: normal;
    font: 600 .75rem/1.35 Arial,sans-serif;
    text-align:center;
    color: #fff;
    background:#00483f;
    box-shadow: 0 5px 12px rgba(0,0,0,.15);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  }
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link:hover::after,
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link:focus-visible::after {
    opacity:1;
    visibility:visible;
    transform:translate(-50%,0);
  }
}
@media (max-width: 900px) {
  .amoladero-actores .amoladero-actores__hint {min-height:170px; margin: 0 0 20px; padding:24px 18px;}
  .amoladero-actores .amoladero-actores__details {scroll-margin-top:90px;}
  .amoladero-actores .amoladero-actores__card {scroll-margin-top:92px;}
}
@media (max-width: 560px) {
  .amoladero-actores .amoladero-actores__river-instruction { top: 10px; width: min(94%,360px); padding:8px 12px; font-size:.73rem; }
  .amoladero-actores .amoladero-actores__hint {font-size:.88rem;}
  .amoladero-actores .amoladero-actores__close { width: 37px; height:37px; top:10px; left:10px; }
  .amoladero-actores .amoladero-actores__stage {overflow-x:clip;}
}
@media (prefers-reduced-motion: reduce) {
  .amoladero-actores .amoladero-actores__close,
  .amoladero-actores .amoladero-actores__point-button .wp-block-button__link::after {transition:none;}
}

/* ==========================================================
   AMOLADERO — ACTORES Y PROCESOS
   SVG LÍNEA DE TIEMPO

   Desktop: 560px
   Tablet:  440px
   Móvil:   290px

   No modifica otros elementos de la página.
   ========================================================== */

/* Mantener H1 accesible sin mostrar el texto original */
.amoladero-actores__hero
.amoladero-actores__title--sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Centrado del bloque Imagen */
.amoladero-actores__hero
figure.amoladero-actores__timeline-svg {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-left: auto !important;
    margin-right: auto !important;

    float: none !important;
    text-align: center !important;
}

/* Ordenador */
.amoladero-actores__hero
figure.amoladero-actores__timeline-svg img {
    display: block !important;

    width: 560px !important;
    max-width: calc(100% - 32px) !important;
    height: auto !important;

    margin-left: auto !important;
    margin-right: auto !important;

    object-fit: contain !important;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .amoladero-actores__hero
    figure.amoladero-actores__timeline-svg img {
        width: 440px !important;
    }
}

/* Móvil */
@media (max-width: 767px) {
    .amoladero-actores__hero
    figure.amoladero-actores__timeline-svg img {
        width: 290px !important;
        max-width: calc(100% - 24px) !important;
    }
}
