/* ============================================
   BLOQUE CSS 01/04 - BASE, TOPBAR, HERO
   ============================================ */

:root{
  --line: rgba(255,255,255,0.16);
  --muted: rgba(255,255,255,0.92);
  --brand-red: #d32b2b;
  --topbar-h: 72px;

  /* ✅ CONTROL ÚNICO DE OSCURIDAD DEL VÍDEO (0.00–0.85 aprox) */
  --hero-dim: 0.70;

  --gap: 15px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Topbar clásica (ya casi en desuso, pero no molesta) */
.topbar{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  padding: 0 20px;
  background: rgba(0,0,0,0.55);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  z-index: 1000;
}
.brand{
  position: absolute;
  top: 50%; left: 20px;
  transform: translateY(-50%);
  display:flex; align-items:center;
}
.brand-logo{
  height: 40px; width: auto; display:block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.menu-centered{
  position:absolute; top:50%; left:50%;
  transform: translate(-50%, -50%);
}
.menu-centered ul{
  margin:0; padding:0; list-style:none;
  display:flex; gap:22px;
}
.menu-centered a{
  color:#fff; text-decoration:none;
  text-underline-offset:6px; text-decoration-thickness:2px;
  padding:10px 12px; border-radius:10px; border:1px solid transparent;
  transition: background .2s ease, color .2s ease;
}
.menu-centered a:hover,
.menu-centered a:focus-visible{
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
}
.menu-centered a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

/* Fondo hero (vídeo + control de oscurecido) */
.bg-layer{
  position: fixed;
  inset: 0;
  z-index: 0;
  background: transparent; /* sin poster, el vídeo manda */
  overflow: hidden;
}

/* Vídeo sin filtros: “fuente pura” */
.bg-video{
  position:absolute; inset:0;
  z-index: 1;
  width:100%; height:100%;
  object-fit:cover;
  filter: none; /* ✅ no mezclar controles */
}

/* ✅ ÚNICO CONTROL DE OSCURECIDO (mando) */
.bg-overlay{
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;

  /* un solo valor controla todo */
  background: rgba(0,0,0, var(--hero-dim))!important;
}

/* HERO genérico (el hero “nuevo” se ajusta desde el inline de index) */
.hero{
  position: relative; z-index: 1;
  min-height: calc(100vh - var(--topbar-h));
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  margin-top: var(--topbar-h);
}
.hero-inner{
  display:flex; flex-direction:column; align-items:center;
  transition: opacity .35s ease, transform .35s ease;
}
.fadeOutBlock{ opacity: 0; transform: translateY(12px); }

.hero-logo{
  width: min(540px, 67.5vw); height:auto; display:block;
  margin: 0 0 10px 0;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.6));
}
.hero h1{
  font-size: clamp(27px, 3.75vw, 54px);
  font-weight: 800;
  letter-spacing: .4px;
  margin: 0 0 6px 0;
  text-shadow: 0 3px 14px rgba(0,0,0,.65);
}
.hero-sub{
  margin: 0;
  font-size: clamp(12px, 1.2vw, 15px);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
  max-width: 1100px;
  padding: 0 16px;
}

/* Animación fadeUp */
@keyframes fadeUp{
  from{ opacity:0; transform: translateY(14px);}
  to{ opacity:1; transform:none;}
}
.fadeUp{
  opacity:0;
  animation: fadeUp .8s ease-out forwards;
}
.d0{ animation-delay: 0s; }
.d1{ animation-delay: 1s; }
.d2{ animation-delay: 2s; }

@media (prefers-reduced-motion: reduce){
  .fadeUp{ animation:none; opacity:1; transform:none;}
  .hero-inner{transition:none;}
}

@keyframes fadeInUpBox{
  from{opacity:0; transform: translateY(12px);}
  to{opacity:1; transform:none;}
}

/* Ajustes básicos responsive hero/topbar */
@media (max-width: 980px){
  :root{ --topbar-h: 64px; }
  .brand-logo{ height: 32px; }
  .menu-centered ul{ gap: 14px; }
  .menu-centered a{ padding: 8px 10px; }

  .hero-logo{ width: min(375px, 90vw); }
  .hero h1{ font-size: clamp(24px, 7vw, 44px); }
  .hero-sub{ font-size: clamp(13px, 3.6vw, 16px); }
}


/* ============================================
   BLOQUE CSS 02/04 - OVERLAY (UNICO + SCROLL OK)
   ============================================ */

/* Altura estándar del overlay (recorte arriba/abajo). */
:root{
  --overlay-h: 68vh;
  --media-crop: 34px; /* recorte uniforme arriba/abajo en la caja de imagen */
}

/* OVERLAY (fondo) */
.page-overlay{
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.985));
  backdrop-filter: blur(18px);
  z-index: 20; /* Topbar encima */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease-out;
}

.page-overlay.open{
  display: grid;
  opacity: 1;
  pointer-events: auto;
}

/* CONTENEDORES PRINCIPALES */
.page-split,
.page-single{
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  height: var(--overlay-h);
}

/* SPLIT (QUIÉNES / SERVICIOS / PRODUCCIONES / PANTALLAS LED) */
.page-split{
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.97);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 1);
  transform: translateY(12px);
  opacity: 0;
  transition:
    opacity 0.26s ease-out,
    transform 0.26s ease-out;
}

.page-split.open{
  display: grid;
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px; /* separación para que no toque la topbar */
}

/* CONTACTO (SINGLE) */
.page-single{
  display: none;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 1);
  transform: translateY(12px);
  opacity: 0;
  transition:
    opacity 0.26s ease-out,
    transform 0.26s ease-out;
}

.page-single.open{
  display: block;
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px;
}

/* CAJAS INTERNAS */
.box{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* IZQUIERDA (GALERÍA) */
.box-left{
  position: relative;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.96));
  overflow: hidden;

  /* ✅ RECORTE UNIFORME ARRIBA/ABAJO */
  padding-top: var(--media-crop);
  padding-bottom: var(--media-crop);
}

.box-left .media-stage{
  position: relative;
  width: 100%;
  height: calc(100% - (var(--media-crop) * 2));
  transition: opacity .25s ease, transform .25s ease;
}

.box-left .media-stage.is-swapping{
  opacity: 0;
  transform: scale(1.02);
}

.box-left .slide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.box-left .slide.is-active{
  opacity: 1;
  transform: scale(1);
}

/* DERECHA (TEXTO / CONTENIDO) */
.box-right,
.box-single{
  padding: 18px 26px 18px 26px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* CABECERA */
.page-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 6px;
  padding: 0 26px 6px 26px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.38);
}

.page-header h2{
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e5e7eb;
  transition: opacity .25s ease, transform .25s ease;
}

/* BOTÓN CERRAR */
.page-close{
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  transition:
    background 0.18s ease-out,
    color 0.18s ease-out,
    transform 0.12s ease-out;
}

.page-close:hover,
.page-close:focus-visible{
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  transform: translateY(-1px);
}

/* CONTENIDO (texto con scroll interno SIN saltos) */
.page-content{
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5f5;
  padding: 0 26px 0 26px;

  /* ✅ CLAVE: la scrollbar no aparece/desaparece => no cambia el ancho => no hay salto */
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;

  flex: 1;
  min-height: 0;
  transition: opacity .25s ease, transform .25s ease;
}

.is-swapping{
  opacity: 0;
  transform: translateY(6px);
}

.page-content p{ margin: 0 0 0.6rem; }

.page-content h3{
  margin-top: 1rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.page-content ul{
  margin: 0.3rem 0 0.7rem 1.1rem;
  padding: 0;
}

/* CONTACTO WRAP */
.contact-wrap{
  margin-top: 4px;
}

/* RESPONSIVE */
@media (max-width: 960px){
  .page-split{ grid-template-columns: minmax(0, 1fr); height: auto; }
  .page-single{ height: auto; }

  .box-left{ min-height: 210px; padding-top: 0; padding-bottom: 0; }
  .box-left .media-stage{ height: 100%; }

  .page-content{
    max-height: 55vh;
    overflow-y: auto;
    scrollbar-gutter: auto;
  }
}

@media (max-width: 720px){
  .page-overlay{ padding: 16px; }

  .page-split,
  .page-single{ border-radius: 18px; }

  .box-right,
  .box-single{ padding: 16px 16px 18px 16px; }

  .page-header{
    margin-bottom: 6px;
    padding: 0 16px 5px 16px;
  }

  .page-header h2{ font-size: 0.92rem; }

  .page-content{ padding: 0 16px 0 16px; }
}

/* ============================================
   FIN BLOQUE CSS 02/04 - OVERLAY (UNICO + SCROLL OK)
   ============================================ */
/* ============================================
   BLOQUE CSS 03/04 - CONTACTO (LAYOUT LIMPIO FINAL)
   ============================================ */

.page-single .contact-wrap{
  padding: 14px 0 0 0;
  overflow: visible;
}

.page-single .contact-form{
  max-width: 100%;
}

/* --- CAMPOS --- */
.page-single .contact-form .form-row{
  margin-bottom: 12px;
}

.page-single .contact-form .form-row.two{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.page-single .contact-form .form-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.page-single .contact-form label{
  font-weight:600;
  font-size:0.84rem;
  opacity:.96;
}

.page-single .contact-form input,
.page-single .contact-form select,
.page-single .contact-form textarea{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.45);
  background:rgba(15,23,42,.9);
  color:#f9fafb;
  outline:none;
}

.page-single .contact-form textarea{
  resize:vertical;
  min-height:120px;
}

.page-single .contact-form input:focus,
.page-single .contact-form select:focus,
.page-single .contact-form textarea:focus{
  border-color:#e5e7eb;
}

/* =================================================
   FOOTER CONTACTO (PRIVACIDAD + LEGAL + BOTÓN)
   ================================================= */

.page-single .contact-form .cf-footer{
  display:grid;
  grid-template-columns: auto auto 1fr;
  align-items:center;
  column-gap:18px;
  row-gap:8px;
  margin-top: 8px;
}

/* PRIVACIDAD */
.page-single .contact-form .cf-footer .agree{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

/* AVISO LEGAL */
.page-single .contact-form .cf-footer .cf-legal{
  white-space:nowrap;
  font-size:0.82rem;
  opacity:.95;
}

/* ===== ENLACES LEGALES ===== */
.page-single .contact-form a{
  color:#ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.page-single .contact-form a:hover,
.page-single .contact-form a:focus-visible{
  color:#facc15; /* amarillo */
  text-decoration-color:#facc15;
}

/* BOTÓN */
.page-single .contact-form .cf-footer .cf-actions{
  display:flex;
  justify-content:flex-start;
}

/* BLINDAJE BOTÓN */
.page-single .contact-form .cf-footer .cf-actions .btn-primary{
  width:auto !important;
  min-width:auto !important;
  max-width:none !important;
  padding:6px 16px !important;
  border-radius:8px !important;
  font-size:14px !important;
  line-height:1.2 !important;
  flex:0 0 auto !important;
}

/* RESPONSIVE */
@media (max-width:960px){
  .page-single .contact-form .form-row.two{
    grid-template-columns:1fr;
  }

  .page-single .contact-form .cf-footer{
    grid-template-columns:1fr;
    align-items:flex-start;
  }

  .page-single .contact-form .cf-actions{
    margin-top:6px;
  }
}

/* ============================================
   FIN BLOQUE CSS 03/03
   ============================================ */

/* ============================================
   BLOQUE CSS 04/04 - GUARDIA OVERLAYS + CONTACTO (V083)
   ============================================ */

/* =========================================================
   BLOQUEO ABSOLUTO DEL TAMAÑO DEL OVERLAY SPLIT (SIN EXCEPCIONES)
   ========================================================= */
.page-overlay .page-split,
.page-overlay .page-split.open{
  height: var(--overlay-h) !important;
  min-height: var(--overlay-h) !important;
  max-height: var(--overlay-h) !important;
}

/* =========================================================
   IGUALAR ALTURA DE COLUMNAS (IZQ + DER)
   ========================================================= */
.page-overlay .page-split .box-left,
.page-overlay .page-split .box-right{
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
}

/* =========================================================
   IZQUIERDA (IMÁGENES) — tamaño útil con recorte
   ========================================================= */
.page-overlay .page-split .box-left{
  padding-top: var(--media-crop) !important;
  padding-bottom: var(--media-crop) !important;
}

.page-overlay .page-split .box-left .media-stage{
  height: calc(100% - (var(--media-crop) * 2)) !important;
}

/* =========================================================
   DERECHA (TEXTO) — MISMO RECORTE VERTICAL QUE IMÁGENES
   CLAVE: si no, el texto "parece" más alto (caso SERVICIOS)
   ========================================================= */
.page-overlay .page-split .box-right{
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;

  /* ✅ iguala el “marco” superior e inferior al de la imagen */
  padding-top: var(--media-crop) !important;
  padding-bottom: var(--media-crop) !important;
}

/* Header fijo (no empuja) */
.page-overlay .page-split .box-right .page-header{
  flex: 0 0 auto !important;
}

/* Contenido ocupa el resto y scrollea (sin crecer) */
.page-overlay .page-split .box-right .page-content{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* =========================================================
   SINGLE (CONTACTO) — coherencia de altura
   ========================================================= */
.page-overlay .page-single,
.page-overlay .page-single.open{
  height: var(--overlay-h) !important;
  min-height: var(--overlay-h) !important;
  max-height: var(--overlay-h) !important;
}

.page-overlay .page-single .box-single{
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.page-overlay .page-single .page-content{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* =========================================================
   OCULTAR BOTÓN CERRAR (X) EN OVERLAYS SPLIT
   No tiene sentido visual en el panel de texto
   ========================================================= */
.page-overlay .page-split .page-close{
  display: none !important;
}

/* ===== FIN BLOQUE CSS 04/04 ===== */
