/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Sticky cabecera - perujo */
.sticky-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  width: 100%;
  box-shadow:
    0 7px 15px rgba(0, 0, 0, 0.8) !important;
}

@media (max-width: 768px) {
  .sticky-header {
    position: sticky !important;
    top: 0 !important;
  }
}

/* boton formulario ancho completo */
button.wide {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* -------------------------------------------------------
   1) Contenedor principal: posición ABSOLUTA detrás del texto
   ------------------------------------------------------- */
.slide-indicator-container {
  position: absolute;
  top: 50%;            /* Centrado verticalmente respecto a la diapositiva */
  left: 0;
  width: 100vw;        /* Ancho total de la ventana */
  height: 7px;         /* Misma altura de la línea blanca */
  transform: translateY(-50%);
  z-index: 1;          /* Asegúrate de que el texto del slider tenga z-index > 1 */
  overflow: visible;   /* Para que la flecha pueda desplazarse fuera de los límites */
  pointer-events: none;/* Evita que bloquee clics/taps en otros elementos */
}

/* -------------------------------------------------------
   2) Línea blanca horizontal (detrás del texto)
   ------------------------------------------------------- */
.slide-indicator-line {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: white;
}

/* -------------------------------------------------------
   3) Flecha (➔) que aparecerá, recorrerá espacio y se perderá 
   ------------------------------------------------------- */
.slide-indicator-arrow {
  position: absolute;
  top: -25%;
  left: -1%;               /* Punto de inicio: justo al final del texto aproximado */
  transform: translateY(-50%);
  font-size: 90px;         /* Flecha más grande para que se vea bien */
  color: white;            /* Color blanco para que contraste con el fondo rojo */
  line-height: 1;
  opacity: 0;              /* Partimos invisible, la animación la hará aparecer */
  animation: arrowSlideLong 3.5s ease-in-out infinite;
}

/* -------------------------------------------------------
   4) Animación: 
      - Aparece (opacidad 0→1)
      - Se desplaza hacia la derecha (hasta salir de la pantalla)
      - Desaparece (opacidad 1→0)
   ------------------------------------------------------- */
@keyframes arrowSlideLong {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(0);
  }
  10% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  80% {
    opacity: 1;
    transform: translateY(-50%) translateX(98vw);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(98vw);
  }
}



/* =============================================================
   2.1) STICKY VAN (furgoneta) – estilo general
   ============================================================= */
#sticky-van {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 112px;
  height: 112px;
  background-color: #cc2738;
  display: flex;
  /*align-items: center;*/
  justify-content: center;
border-radius: 56px; 
  z-index: 9999;
  cursor: pointer;
  box-shadow: 2px 6px 20px 0px rgba(0, 0, 0, 0.5);
  transition: background-color 0.2s ease;
}

/* Cambiar ligeramente el tono al hacer hover sobre la furgoneta */
#sticky-van:hover {
  background-color: #c62828;
}

/* Si tu SVG no ocupa todo el contenedor, ajustamos el tamaño interno */
#sticky-van svg {
  width: 28px;
  height: 28px;
  fill: #ffffff; /* icono de furgoneta en blanco */
}


/* =============================================================
   2.2) STICKY TEST (botón derecho con icono y texto oculto)
   ============================================================= */
#sticky-test {
  position: fixed;
  top: auto;
  /*top: 94%;*/
  bottom: -36px;
  right: 0;
  transform: translateY(-50%);
  background-color: #cc2738;      /* mismo rojo intenso */
  color: #ffffff;
  width: 60px;                     /* ancho inicial solo para el icono */
  height: 112px;
  border-radius: 8px 0 0 8px;      /* bordes redondeados en la parte visible */
  display: flex;
  align-items: center;
  overflow: hidden;                /* oculta el texto hasta hacer hover */
  transition: width 0.3s ease;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 2px 6px 12px 0px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

 #sticky-test .admira {
	height: 75px;
	padding-left: 10px;
  }

/* Icono de exclamación centrado (podría ser también un SVG) */
#sticky-test .icon {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 20px;
  line-height: 40px;
  pointer-events: none; /* para que el hover funcione sobre todo el bloque */
}


/* Texto que se mostrará al hacer hover; de entrada está opaco 0 */
#sticky-test .text {
  display: inline-block;
  margin-left: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

/* Al pasar el mouse (hover) sobre #sticky-test: 
   - aumentamos width para dejar sitio al texto 
   - hacemos que el texto tenga opacidad 1 */
#sticky-test:hover {
  width: 190px; /* ajústalo si tu texto es más largo o más corto */
}

#sticky-test:hover .text {
  opacity: 1;
}

/* =============================================================
   2.3) MODAL (capa semi-transparente y contenido interno)
   ============================================================= */
/* Contenedor del modal (fondo oscuro) */
.sticky-modal {
  display: none;                /* oculto por defecto */
  position: fixed;
  z-index: 10000;               /* un poco más alto que el sticky */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5); /* semitransparente negro */
  box-shadow: 2px 6px 20px 0px rgba(32, 40, 68, 0.5);

}

/* Contenido centrado dentro del modal */
.sticky-modal-content {
	position:relative;
  /*background-color: #cc2738;*/
	background-color: #fff;
  color: #fff;
  margin: 10% auto;              /* separo un 10% desde arriba */
  padding: 10px 10px;
  border-radius: 10px;
  width: 90%;
  max-width: 780px;             /* ancho máximo para desktop */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Botón “close” (la X) en la esquina superior derecha del modal */
.sticky-modal-close {
  /*color: #fff;*/
  font-size: 38px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
	color:#731111;         
    top:-16px;
    right:2px;
    z-index: 999;
}
.sticky-modal-close:hover {
  color: #000000;
}

/* Estilos básicos del formulario de ejemplo (puedes personalizarlo) */
#form-test-cuadrillista label {
  font-size: 14px;
  font-weight: 600;
}
#form-test-cuadrillista input[type="text"],
#form-test-cuadrillista input[type="email"],
#form-test-cuadrillista button {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-sizing: border-box;
}
#form-test-cuadrillista button {
  background-color: #1976d2;
  color: #ffffff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#form-test-cuadrillista button:hover {
  background-color: #1565c0;
}

/* =============================================================
   2.4) RESPONSIVE / MOBILE ADAPTATIONS
   ============================================================= */
@media (max-width: 768px) {
  /* Reducir tamaño del sticky van en mobile */
  #sticky-van {
    bottom: 7px;
    left: 5px;
    width: 70px;
    height: 70px;
  }
  #sticky-van svg {
    width: 22px;
    height: 22px;
  }

  /* Movemos el sticky-test a bottom-right (para que no tape cosas en mobile) */
  #sticky-test {
    top: auto;
    bottom: 7px;
    right: 0px;
    transform: none;
    width: 50px;
    height: 70px;
  }
 #sticky-test .admira {
	height: 50px;
	padding-left: 10px;
  }
  #sticky-test .icon {
    font-size: 18px;
    line-height: 40px;
  }
  /* En mobile podemos dejar que no se despliegue (o que despliegue menos) */
  #sticky-test:hover {
    width: 180px;
  }
  #sticky-test:hover .text {
    opacity: 1;
    font-size: 13px;
  }

  /* Ajuste del contenido del modal (para pantallas pequeñas) */
  .sticky-modal-content {
    margin: 20% auto;
    padding: 16px 20px;
    max-width: 90%;
  }
  .sticky-modal-close {
    top: -14px;
	right: 4px;
	font-size: 34px;
  }

}

/* Contenedor principal por defecto sin desenfoque */
.site-container {
  transition: filter 0.3s ease;
}

/* Cuando el sticky modal tenga clase .active, desenfoca todo el wrapper */
.sticky-test.active ~ .site-container {
  filter: blur(4px);
}
/* Color por defecto (todas las pantallas salvo la 0) */
.sticky-modal-content{
    background:#ffffff;      /* blanco */
    transition:background .5s ease;
}

/* Color exclusivo para la INTRO */
.sticky-modal-content.intro-bg{
    background:#A70B2C;      /* rojo corporativo */
    color:#fff;
}
