/*
Theme Name: Nouvelle Playa Cinta
Theme URI: https://nouvelleplaya.com
Author: Nouvelle Playa
Description: Portada a pantalla completa con fondo, logo arriba a la izquierda y una cinta central que se desliza sola. Portada mezclada de fotos y vídeos, proyectos de foto con su cinta y visor, vídeos en dos niveles (cliente → vídeos), páginas con texto sobre el fondo, redes sociales y ajustes numéricos independientes para móvil y ordenador.
Version: 4.0.0
License: GNU General Public License v2 or later
Text Domain: nouvelleplaya-cinta
*/

:root {
  --mono: "Courier New", Courier, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Valores por defecto. Se sobrescriben desde Apariencia > Personalizar (el CSS en línea de la página). */
  --np-logo-h: 60px; --np-pad: 54px; --np-top: 40px; --np-gap: 40px;
  --np-h-main: 176px; --np-h-photos: 320px; --np-h-inner: 300px; --np-rib-y: 50%;
  --np-overlay: 0; --np-text: #fff; --np-ig-ratio: 190;
  --np-pl-scale: 100; --np-pl-hmax: 1100px; --np-pl-vmax: 420px; --np-pl-ig: 400px;
  --np-pl-gapt: 12px; --np-pl-gapb: 12px; --np-pl-side: 54px;
  --np-desc-fs: 14px; --np-desc-w: 360px; --np-desc-max: 34;
  --np-copy-fs: 14px; --np-copy-w: 560px; --np-right-fs: 13px; --np-right-w: 340px; --np-ui-fs: 13px;
  --np-nav-fs: 13px; --np-nav-gap: 10px; --np-nav-b: 28px; --np-title-b: 28px;
  --np-soc-size: 22px; --np-soc-gap: 18px; --np-soc-b: 27px;
  --np-lb-w: 92; --np-lb-h: 82;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: #0a0a0a; background: #fff; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Fundido suave entre secciones (en navegadores que lo soportan) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: np-header; }
.site-footer { view-transition-name: np-footer; }
.np-social { view-transition-name: np-social; }

/* ---------- Cabecera (logo = botón home) y pie ---------- */
.site-header { padding: var(--np-top) var(--np-pad) 0; }
.site-logo { display: inline-block; font-size: calc(var(--np-logo-h) * 0.5); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1; }
.site-logo img { display: block; height: var(--np-logo-h); width: auto; max-width: calc(100vw - var(--np-pad) * 2); max-height: none; }

.site-footer { padding: 40px var(--np-pad); font-family: var(--mono); font-size: var(--np-nav-fs); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.footer-nav li:not(:last-child)::after { content: "|"; margin: 0 var(--np-nav-gap); } /* el separador va al final: si los enlaces saltan de línea, la siguiente no empieza con "|" */
.footer-nav a[aria-current="page"],
.footer-nav .current-menu-item > a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Páginas a pantalla completa ---------- */
body.np-stagepage { background: #14100d; overflow: hidden; }
body.np-stagepage .site-header,
body.np-stagepage .site-footer { position: fixed; z-index: 10; padding: 0; color: var(--np-text); text-shadow: 0 0 10px rgba(0,0,0,.35); }
body.np-stagepage .site-header { top: var(--np-top); left: var(--np-pad); }
body.np-stagepage .site-footer { bottom: var(--np-nav-b); left: var(--np-pad); }

.np-stage {
  position: fixed; inset: 0; z-index: 1;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.np-bg {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #14100d 0%, #2f2620 35%, #8a7561 55%, #d8c6ac 70%, #cbb698 100%);
  animation: np-fade .6s ease both;
}
.np-bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: #000; opacity: calc(var(--np-overlay) / 100); }
@keyframes np-fade { from { opacity: 0; } to { opacity: 1; } }

/* Botón back y título de la sección */
.np-back, .np-title {
  position: fixed; z-index: 10; margin: 0;
  font-family: var(--mono); font-size: var(--np-ui-fs); color: var(--np-text);
  text-shadow: 0 0 10px rgba(0,0,0,.35);
}
.np-back { top: var(--np-top); right: var(--np-pad); }
.np-title { bottom: var(--np-title-b); right: var(--np-pad); text-align: right; max-width: calc(50vw - var(--np-pad) - 60px); }

/* ---------- Texto sobre el fondo (descripciones y páginas) ---------- */
.np-copy {
  position: absolute; z-index: 3;
  left: var(--np-pad);
  top: calc(var(--np-top) + var(--np-logo-h) + 22px);
  width: min(var(--np-copy-w), calc(100% - var(--np-pad) * 2));
  max-height: calc(100% - var(--np-top) - var(--np-logo-h) - 22px - 90px);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  color: var(--np-text); text-shadow: 0 0 12px rgba(0,0,0,.4);
  font-family: var(--mono); font-size: var(--np-copy-fs); line-height: 1.6;
}
.np-copy.is-short { width: min(var(--np-desc-w), calc(100% - var(--np-pad) * 2)); max-height: calc(var(--np-desc-max) * 1vh); font-size: var(--np-desc-fs); }
/* Espacio que ocupa la descripción (stage.js lo mide; este valor vale mientras tanto). */
.np-stage.has-desc { --np-desc-h: 90px; }
.np-copy > :first-child { margin-top: 0; }
.np-copy > :last-child { margin-bottom: 0; }
.np-copy p { margin: 0 0 1em; }
.np-copy a { text-decoration: underline; text-underline-offset: 3px; }
.np-copy h1, .np-copy h2, .np-copy h3, .np-copy h4 { margin: 1.6em 0 .5em; font-size: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.np-copy img { max-width: 100%; height: auto; }
.np-copy ul, .np-copy ol { margin: 0 0 1em; padding-left: 1.2em; }
/* Formularios de contacto dentro de la página */
.np-copy input[type="text"], .np-copy input[type="email"], .np-copy input[type="tel"], .np-copy input[type="url"], .np-copy textarea {
  display: block; width: 100%; margin: 4px 0 14px; padding: 8px 10px;
  background: rgba(0,0,0,.25); color: var(--np-text); border: 1px solid currentColor; border-radius: 0;
  font: inherit;
}
.np-copy input[type="submit"], .np-copy button[type="submit"] {
  padding: 8px 18px; background: transparent; color: var(--np-text); border: 1px solid currentColor; border-radius: 0;
  font: inherit; cursor: pointer;
}
.np-copy input[type="submit"]:hover, .np-copy button[type="submit"]:hover { background: var(--np-text); color: #000; }
.np-copy label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

.np-copy-right {
  position: absolute; z-index: 3;
  top: var(--np-top); right: var(--np-pad);
  max-width: min(var(--np-right-w), 42vw); text-align: right;
  color: var(--np-text); text-shadow: 0 0 12px rgba(0,0,0,.4);
  font-family: var(--mono); font-size: var(--np-right-fs); line-height: 1.5;
}
.np-copy-right p { margin: 0 0 .8em; }
.np-copy-right a { text-decoration: underline; text-underline-offset: 3px; }
/* En ordenador la envoltura no afecta a la posición de los dos textos. */
.np-page { display: contents; }

/* ---------- Cinta ---------- */
.np-ticker {
  position: absolute; left: 0; right: 0; top: var(--np-rib-y);
  transform: translateY(-50%);
  overflow: hidden; z-index: 2;
  touch-action: pan-y;
  --np-item-h: var(--np-h-main);
}
.np-ticker.is-photos { --np-item-h: var(--np-h-photos); }
.np-ticker.is-inner  { --np-item-h: var(--np-h-inner); }
.np-ticker.is-dragging { cursor: grabbing; }
.np-track { display: flex; width: max-content; will-change: transform; }
.np-set { display: flex; flex: none; }
.np-item {
  flex: none; display: block;
  height: var(--np-item-h); margin-right: var(--np-gap);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.np-item img { display: block; height: 100%; width: auto; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.np-photos .np-item, .np-ticker.is-photos .np-item { cursor: zoom-in; }
.np-ticker.is-static .np-track { margin: 0 auto; }
.np-ticker.is-static .np-item { margin-right: 0; }

/* Portada de YouTube (16:9 recortada para quitar las barras negras) */
.np-item .np-yt { display: block; height: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.np-item .np-yt img { width: 100%; height: 100%; object-fit: cover; }

/* Recuadro cuando no hay portada */
.np-ph {
  display: flex; align-items: flex-end;
  height: 100%; aspect-ratio: 7 / 5;
  padding: 12px; background: rgba(0,0,0,.45);
  color: #fff; font-family: var(--mono); font-size: 12px; line-height: 1.3;
}
.np-ph-v { aspect-ratio: 9 / 16; }

/* ---------- Reproductor de vídeo ----------
 * Ocupa solo el espacio libre: por arriba deja sitio al logo (y a la descripción), por abajo al título y a los enlaces.
 * Todos los márgenes salen de Personalizar (Ordenador / Móvil). El reproductor nunca se sale de ese espacio. */
.np-player {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding:
    calc(var(--np-top) + var(--np-logo-h) + var(--np-pl-gapt) + var(--np-desc-h, 0px))
    var(--np-pl-side)
    calc(var(--np-title-b) + 22px + var(--np-pl-gapb));
  container-type: size;
  pointer-events: none;
}
.np-player > * { pointer-events: auto; }
.np-video {
  display: block; width: auto; height: auto; background: #000;
  max-width: 94vw; max-height: 70vh;
  max-width: calc(min(var(--np-pl-hmax), 100cqw) * var(--np-pl-scale) / 100);
  max-height: calc(100cqh * var(--np-pl-scale) / 100);
}
.np-frame {
  --mw: var(--np-pl-hmax);
  position: relative; aspect-ratio: var(--r, 0.5625);
  width: min(var(--mw), 94vw, calc(70svh * var(--r, 0.5625)));
  width: calc(min(var(--mw), 100cqw, calc(100cqh * var(--r, 0.5625))) * var(--np-pl-scale) / 100);
}
.np-frame.is-ig { --mw: var(--np-pl-ig); }
.np-frame.is-v  { --mw: var(--np-pl-vmax); }
.np-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }

/* ---------- Visor de fotos ---------- */
.np-lightbox[hidden] { display: none; }
.np-lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.9); }
.np-lightbox img { max-width: calc(var(--np-lb-w) * 1vw); max-height: calc(var(--np-lb-h) * 1vh); width: auto; height: auto; object-fit: contain; }
.np-lb-btn { position: absolute; background: none; border: 0; padding: 12px; color: #fff; font: 13px var(--mono); cursor: pointer; }
.np-lb-btn:hover { text-decoration: underline; }
.np-lb-close { top: calc(var(--np-top) - 12px); right: calc(var(--np-pad) - 12px); }
.np-lb-prev { bottom: 16px; left: calc(var(--np-pad) - 12px); }
.np-lb-next { bottom: 16px; right: calc(var(--np-pad) - 12px); }
.np-lb-count { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: #fff; font: 13px var(--mono); }

.np-empty { position: absolute; top: 50%; left: 0; right: 0; margin: 0; padding: 0 var(--np-pad); text-align: center; color: #fff; font-family: var(--mono); font-size: 13px; z-index: 2; }

/* ---------- Entradas del blog (por si las hubiera) ---------- */
.np-entry { max-width: 760px; margin: 0 auto; padding: 48px var(--np-pad) 80px; }
.np-entry h1 { margin: 0 0 24px; font-size: clamp(30px, 5vw, 52px); font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; line-height: 1; }
.np-entry .entry-content > * + * { margin-top: 1.1em; }

/* ---------- Redes sociales (abajo, en el centro) ---------- */
.np-social { display: flex; justify-content: center; align-items: center; gap: var(--np-soc-gap); padding: 0 var(--np-pad) 30px; color: var(--np-text); }
body.np-stagepage .np-social { position: fixed; z-index: 10; left: 50%; bottom: var(--np-soc-b); transform: translateX(-50%); padding: 0; }
.np-social a { position: relative; display: block; width: var(--np-soc-size); height: var(--np-soc-size); color: inherit; }
.np-social a::after { content: ""; position: absolute; inset: -10px; } /* zona de toque más grande que el icono */
.np-social svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(0,0,0,.35)); }
.np-social a:hover { opacity: .7; text-decoration: none; }
@media (min-width: 701px) { .np-social.no-d { display: none; } }

/* ---------- Móvil (hasta 700 px) ---------- */
@media (max-width: 700px) {
  .np-social.no-m { display: none; }
  /* El título va a la izquierda, encima de los enlaces de abajo. */
  .np-title { left: var(--np-pad); right: auto; text-align: left; max-width: calc(100vw - var(--np-pad) * 2); }

  /* Páginas: una sola columna que se desplaza. El texto de la derecha queda arriba a la derecha y el principal fluye a su lado. */
  .np-page {
    display: block; position: absolute; z-index: 3;
    left: var(--np-pad); right: var(--np-pad); top: var(--np-top); bottom: calc(var(--np-nav-b) + 32px);
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .np-page .np-copy { position: static; width: auto; max-width: var(--np-copy-w); max-height: none; overflow: visible; padding-top: calc(var(--np-logo-h) + 22px); }
  .np-page .np-copy-right { position: static; float: right; max-width: min(var(--np-right-w), 46%); margin: 0 0 12px 14px; }
  .np-lb-close { top: 8px; }
}
