/* ==========================================================
   Alicante SpA — estilos compartidos (ficha, mapa, galería)
   Cada propuesta ajusta las variables --c-* y --f-*.
   ========================================================== */
:root {
  --navy: #18315A;
  --navy-deep: #0E1E36;
  --green: #26704F;
  --green-2: #5CB884;
  --cream: #F2F0EB;
  --white: #ffffff;

  --c-bg: var(--cream);
  --c-panel: #ffffff;
  --c-ink: #14233A;
  --c-soft: #4C5A6B;
  --c-line: rgba(20, 35, 58, .14);
  --c-accent: var(--green);
  --c-accent-2: var(--green-2);
  --f-head: "Montserrat", system-ui, sans-serif;
  --f-body: "Montserrat", system-ui, sans-serif;
  --r: 18px;
  --st-exec: #E0A23B;
  --st-dev: #4F8FD6;
  --st-done: #3FAE74;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-hidden { display: none !important; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; flex-shrink: 0; }
.dot--exec { background: var(--st-exec); }
.dot--dev { background: var(--st-dev); }
.dot--done { background: var(--st-done); }

/* ---------- Marcador "renders en preparación" ---------- */
.ph { position: relative; width: 100%; height: 100%; min-height: 200px; display: grid; place-items: center; align-content: center; gap: 14px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(92,184,132,.18), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; overflow: hidden; }
.ph::before { content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: repeating-linear-gradient(60deg, #fff 0 1px, transparent 1px 22px), repeating-linear-gradient(-60deg, #fff 0 1px, transparent 1px 22px); }
.ph__iso { width: 64px; position: relative; color: #fff; }
.ph__iso svg { width: 100%; display: block; }
.ph__txt { position: relative; font-family: var(--f-body); font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }

/* ---------- Detalles premium ---------- */
.progress { position: fixed; left: 0; top: 0; z-index: 400; width: 100%; height: 3px; background: linear-gradient(90deg, var(--green-2), var(--green)); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }
html.snap .progress { display: none; }

/* ---------- Colaboradores (logos) ---------- */
.colab__title { margin: 0 0 18px; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-soft); }
.colab__item { list-style: none; display: grid; place-items: center; height: 132px; padding: 18px 26px; border-radius: 18px; background: var(--colab-bg, #fff); box-shadow: 0 1px 0 rgba(20,35,58,.06); }
.colab__item { position: relative; }
.colab__item img { max-width: 100%; max-height: 88px; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: translate .4s cubic-bezier(.16,1,.3,1); }
/* El nombre de la marca aparece debajo del logo al pasar el mouse (o al enfocar con teclado) */
.colab__name { position: absolute; left: 10px; right: 10px; bottom: 9px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--c-soft, #4c5a6b); opacity: 0; translate: 0 5px; transition: opacity .3s, translate .4s cubic-bezier(.16,1,.3,1); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.colab__item:hover .colab__name, .colab__item:focus-visible .colab__name { opacity: 1; translate: 0 0; }
.colab__item:hover img, .colab__item:focus-visible img { translate: 0 -9px; }
/* En pantallas táctiles no hay "pasar el mouse": el nombre queda siempre visible */
/* Táctil: cada tarjeta reserva una franja propia para el nombre, así nunca se encima al logo */
@media (hover: none) {
  .colab__wrap .colab__item { height: 142px; padding: 14px 14px 46px; }
  .colab__wrap .colab__item img { max-height: 66px; translate: 0 0; }
  .colab__name { opacity: 1; translate: 0 0; white-space: normal; line-height: 1.15; font-size: 13.5px; bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Cinta de una sola fila */
.colab__wrap--marquee { position: relative; width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: 6px 0; }
.colab__wrap--marquee::before, .colab__wrap--marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: clamp(24px, 8vw, 120px); z-index: 2; pointer-events: none; }
.colab__wrap--marquee::before { left: 0; background: linear-gradient(90deg, var(--colab-fade, var(--c-bg, #f2f0eb)), transparent); }
.colab__wrap--marquee::after { right: 0; background: linear-gradient(270deg, var(--colab-fade, var(--c-bg, #f2f0eb)), transparent); }
.colab__row { overflow: hidden; padding: 4px 0 6px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.colab__row.is-drag { cursor: grabbing; }
.colab__track { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; width: max-content; will-change: transform; }
.colab__wrap--marquee .colab__item { flex: 0 0 240px; height: 132px; }
@media (prefers-reduced-motion: reduce) {
  .colab__wrap--marquee { width: auto; margin-left: 0; }
  .colab__wrap--marquee::before, .colab__wrap--marquee::after { display: none; }
  .colab__track { flex-wrap: wrap; width: auto; transform: none !important; }
  .colab__track [aria-hidden="true"] { display: none; }
}

/* Carrusel que se arrastra o se avanza con flechas */
.colab__rail { list-style: none; margin: 0; padding: 4px 2px 10px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; outline-offset: 4px; -webkit-overflow-scrolling: touch; }
.colab__rail::-webkit-scrollbar { display: none; }
.colab__rail.is-drag { cursor: grabbing; scroll-snap-type: none; }
.colab__rail .colab__item { flex: 0 0 clamp(210px, 23vw, 290px); height: 150px; scroll-snap-align: start; transition: translate .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; }
.colab__rail .colab__item:hover { translate: 0 -4px; box-shadow: 0 16px 34px rgba(20,35,58,.12); }
.colab__ctrl { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.colab__bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(20,35,58,.12); overflow: hidden; }
.colab__bar i { display: block; height: 100%; border-radius: 4px; background: var(--c-accent-2, #5cb884); }
.colab__btn { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--navy); color: var(--navy); background: transparent; cursor: pointer; transition: background .3s, color .3s, opacity .3s; }
.colab__btn:hover:not(:disabled) { background: var(--navy); color: #fff; }
.colab__btn:disabled { opacity: .3; cursor: default; }
.arrow--back { transform: scaleX(-1); }

/* Cuadrícula con foco de luz que sigue al puntero y color al pasar */
.colab__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.colab__grid .colab__item { position: relative; overflow: hidden; transition: translate .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; }
.colab__grid .colab__item::after { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .35s; background: radial-gradient(220px circle at var(--x, 50%) var(--y, 50%), rgba(92,184,132,.28), transparent 70%); }
.colab__grid .colab__item:hover { translate: 0 -5px; box-shadow: 0 18px 38px rgba(20,35,58,.14); }
.colab__grid .colab__item:hover::after { opacity: 1; }
@media (max-width: 860px) { .colab__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .colab__grid { gap: 10px; } .colab__item { height: 104px; padding: 14px; } .colab__item img { max-height: 70px; } .colab__wrap--marquee .colab__item { flex-basis: 170px; } .colab__rail .colab__item { flex-basis: 70vw; } }

/* Las caras quedan siempre a la vista, aun cuando la foto se recorte */

/* ---------- Espacio para la foto de un integrante del equipo ---------- */
.foto-ph { position: relative; width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 14px; overflow: hidden; color: #fff;
  background: radial-gradient(90% 60% at 50% 28%, rgba(92,184,132,.22), transparent 70%), linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%); }
.foto-ph::before { content: ""; position: absolute; left: 50%; bottom: -4%; width: 78%; height: 78%; transform: translateX(-50%); opacity: .1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='32' r='20' fill='%23fff'/%3E%3Cpath d='M8 100c0-25 19-42 42-42s42 17 42 42z' fill='%23fff'/%3E%3C/svg%3E") center bottom / contain no-repeat; }
.foto-ph__ini { position: relative; font-family: var(--f-head); font-size: clamp(36px, 4.4vw, 60px); font-weight: 700; line-height: 1; letter-spacing: .04em; }
.foto-ph__txt { position: relative; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.14); font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Ficha de proyecto ---------- */
/* Alto fijo: siempre cabe en la pantalla. Si el texto es largo, solo ese bloque se desplaza;
   los botones de acción quedan siempre visibles abajo. */
.pm { --pm-gap: clamp(12px, 3vh, 32px); position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: var(--pm-gap) clamp(12px, 3vw, 32px); visibility: hidden; pointer-events: none; font-family: var(--f-body); }
.pm.is-open { visibility: visible; pointer-events: auto; }
.pm [hidden] { display: none !important; }
.pm__backdrop { position: absolute; inset: 0; background: rgba(10, 20, 36, .84); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; }
.pm__panel { position: relative; width: min(1180px, 100%); height: min(720px, calc(100svh - 2 * var(--pm-gap))); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); background: var(--c-panel); color: var(--c-ink); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,.4); }
.pm__media { position: relative; min-height: 0; background: var(--navy-deep); overflow: hidden; }
.pm__media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 1; background: linear-gradient(0deg, rgba(10,20,36,.6), transparent); pointer-events: none; }
.pm__slides, .pm__slides .ph { position: absolute; inset: 0; }
.pm__slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 1.4s cubic-bezier(.16,1,.3,1); }
.pm__slides img.is-active { opacity: 1; transform: scale(1); }
.pm__nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--navy); font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: scale .25s, background .25s; }
.pm__nav:hover { scale: 1.08; background: #fff; }
.pm__nav--prev { left: 14px; } .pm__nav--next { right: 14px; }
.pm__mbar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.pm__mbar > * { pointer-events: auto; }
.pm__count { padding: 9px 14px; border-radius: 999px; background: rgba(14,30,54,.72); color: #fff; font-size: 14px; font-weight: 700; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pm__zoom { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--navy); font: 700 15px/1 var(--f-body); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.pm__zoom svg { width: 18px; height: 18px; }
.pm__zoom:hover { background: #fff; }
.pm__thumbs { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.pm__thumbs:empty { display: none; }
.pm__thumbs button { width: 64px; height: 46px; padding: 0; border: 2px solid rgba(255,255,255,.55); border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .75; transition: opacity .2s, border-color .2s, translate .2s; }
.pm__thumbs button.is-active, .pm__thumbs button:hover { opacity: 1; border-color: #fff; translate: 0 -2px; }
.pm__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm__info { display: flex; flex-direction: column; min-height: 0; }
.pm__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 0 28px; }
.pm__estado { margin: 0; display: flex; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-soft); }
.pm__close { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cream); color: var(--navy); font: 700 15px/1 var(--f-body); cursor: pointer; transition: background .25s, color .25s; }
.pm__close:hover { background: var(--navy); color: #fff; }
.pm__body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px 28px 20px; }
.pm__title { margin: 0; font-family: var(--f-head); font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; color: var(--navy); }
.pm__desc { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--c-soft); }
.pm__facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm__facts div { padding: 10px 14px; border-radius: 12px; background: var(--cream); }
.pm__facts dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-soft); }
.pm__facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--navy); }
.pm__actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 28px 22px; border-top: 1px solid var(--c-line); background: var(--c-panel); }
.pm__cta, .pm__wa { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px; border-radius: 999px; font: 700 16px/1.2 var(--f-body); text-decoration: none; transition: translate .25s, filter .25s; }
.pm__cta { background: var(--c-accent); color: #fff; }
.pm__wa { background: #1fa855; color: #fff; }
.pm__wa svg { width: 22px; height: 22px; flex-shrink: 0; }
.pm__cta:hover, .pm__wa:hover { translate: 0 -2px; filter: brightness(1.06); }
@media (max-width: 1000px) { .pm__panel { grid-template-columns: minmax(0, 1.05fr) minmax(330px, 1fr); } }
@media (max-width: 880px) {
  .pm { padding: 0; place-items: stretch; }
  .pm__panel { display: flex; flex-direction: column; width: 100%; height: 100svh; border-radius: 0; overflow-y: auto; }
  .pm__media { flex-shrink: 0; width: 100%; height: min(66vw, 55svh); min-height: 220px; }
  .pm__thumbs { display: none; }
  .pm__mbar { top: auto; bottom: 12px; }
  .pm__info { flex: 1 0 auto; }
  .pm__head { padding: 16px 18px 0; }
  .pm__close { position: fixed; top: 12px; right: 12px; z-index: 5; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .pm__body { overflow: visible; padding: 10px 18px 18px; }
  .pm__actions { position: sticky; bottom: 0; margin-top: auto; grid-template-columns: 1fr auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px rgba(0,0,0,.08); }
  .pm__cta { padding: 0 16px; }
}
@media (max-width: 480px) { .pm__wa { width: 54px; padding: 0; } .pm__wa span { display: none; } .pm__wa svg { width: 26px; height: 26px; } }

/* ---------- Mapa ---------- */
.leaflet-container { font-family: var(--f-body); background: #e9e6df; }
.leaflet-tile-pane { filter: grayscale(.35) sepia(.12) saturate(.95) contrast(1.04); }
.mpin { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(24,49,90,.18); transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s; }
.mpin__dot { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; background: var(--navy); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.mpin--exec .mpin__dot { background: var(--st-exec); }
.mpin--dev .mpin__dot { background: var(--st-dev); }
.mpin--done .mpin__dot { background: var(--st-done); }
.mpin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; color: var(--navy); opacity: 0; }
.leaflet-marker-icon:hover .mpin, .is-hot .mpin { transform: scale(1.35); }
.is-hot .mpin::after { animation: mping 1.4s ease-out infinite; }
.is-dim .mpin { opacity: .25; transform: scale(.8); }
@keyframes mping { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(2.2); } }
.mtip { font: 700 14px/1.2 var(--f-body); color: var(--navy); border-radius: 8px; padding: 6px 10px; }
.mpopwrap .leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; }
.mpopwrap .leaflet-popup-content { margin: 0; }
.mpop { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; font-size: 14px; color: var(--c-soft); }
.mpop img { width: 100%; height: 120px; object-fit: cover; margin-bottom: 8px; }
.mpop > *:not(img) { margin: 0 14px; }
.mpop strong { font-size: 17px; color: var(--navy); }
.mpop__estado { display: flex; align-items: center; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.mpop__btn { margin-top: 8px !important; min-height: 44px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 700 15px/1 var(--f-body); cursor: pointer; }
.mpop__btn:hover { background: var(--c-accent); }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; font-size: 22px !important; }

/* ---------- PhotoSwipe ---------- */
.pswp { --pswp-bg: #0a1424; font-family: var(--f-body); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Modo captura (?snap): la portada mide una pantalla aunque la ventana sea muy alta */
html.snap .hero { min-height: 860px !important; }
html.snap .loader { display: none !important; }

/* Táctil: la franja del nombre manda sobre cualquier otro alto de las tarjetas de logos */
@media (hover: none) {
  .colab__wrap .colab__item { height: 146px !important; padding: 14px 14px 46px !important; }
  .colab__wrap .colab__item img { max-height: 64px; }
}

/* Nada puede ensanchar la página (las animaciones de entrada parten desplazadas hacia un costado):
   `clip` recorta sin crear una zona de scroll (no se aplica a html/body: ahí rompería `position: sticky`) */
main, footer, section { overflow-x: clip; }

@media (min-width: 881px) and (max-width: 1250px) { .pm__cta { font-size: 15px; padding: 0 14px; white-space: nowrap; } .pm__wa { padding: 0 16px; } }
