﻿/* General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'fonttest1';
    src: url('fonts/BaiJamjuree-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'fonttest2';
    src: url('fonts/BaiJamjuree-BoldItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'fonttest3';
    src: url('fonts/BaiJamjuree-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@keyframes letraFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right span {
    opacity: 0;
    display: inline-block;
    transform: translateX(1px); /* 10 para un efecto por el lado */
    animation: letraFadeIn 0.3s ease forwards;
    white-space: normal;
    word-break: normal;
}

.palabra-animada {
    display: inline-block;
    white-space: nowrap; /* Hace que no se rompa la palabra */
    margin-right: 0.25em;
}

.letra-animada {
    display: inline-block;
    opacity: 0;
    animation: fadeLetra 0.4s ease forwards;
}

@keyframes fadeLetra {
    from {
        opacity: 0;
        transform: translateX(8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

html, body {
    height: 100%;
    font-family: 'fonttest3', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
    overflow: hidden; /* Evita el scroll nativo */
    touch-action: none; /* <-- Esta es clave para móviles */
}

h1, h2, h3 {
    font-family: 'fonttest1', sans-serif;
}

/* Pantalla de carga */
#loader-container {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

#loader-logo {
    position: absolute; /* Usamos absolute para posicionarlo dentro del contenedor */
    top: 33vh; /* Colocamos el logo en la mitad de la mitad (25% de la altura total) */
    transform: translateX(0%); /* Ajuste para que esté centrado exactamente */
    width: 33vw;
    animation: loader-logo_fx 1.1s;/* infinite;*/
}

@keyframes loader-logo_fx {
    0% { transform: scale(1); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 450px) { /* con max-width el de más abajo más prioridad */
    #loader-logo {
	width: 55vw;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 8vh; /* ← Aquí defines el 10% del alto de la pantalla */
    background-color: #ffffff;
    padding: 0 40px; /* opcional: reduce padding vertical para no romper el 10vh */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.fade-in {
    opacity: 1;
}

.header-inner {
    display: flex;
    align-items: center;
    width: 70vw;
    max-width: 100%; /* por si acaso, pero no esencial */
    margin: 0 auto;
    height: 100%;

    /* border: 2px dashed red; */
}

.left,
.center,
.right {
  display: flex;
  align-items: center;
  min-width: 0; /* necesario para que no rompa los textos largos */
}

.left {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
}

.center {
  flex: 0 1 auto;
}

.right {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;

  flex: 1;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap; /* ← ¡Esto es la clave para que no se apile! */
}

.logo-container img {
    height: 100%;
    width: auto;
    max-height: 8vh;       /* Igual que el header */
    max-width: 25vw;       /* Nunca más del 25% del ancho de la pantalla */
    object-fit: contain;   /* Asegura que se mantenga dentro del espacio */
    display: block;
    padding: 1.2vh 1vw; /* Espacio arriba/abajo y a los lados */
}

.logo-text {
  font-family: 'fonttest1', sans-serif;
  font-size: 3vh; /* clamp(0.5rem, 1.5vw, 3rem); */

  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;

  transition: opacity 0.4s ease, visibility 0.4s ease;
  opacity: 1;
  visibility: visible;
}

.logo-text.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

img.logo-img {
  content: url('images/logo.png');
  max-width: 100%;
  height: auto;
  display: block; /* evita espacios extra debajo de la imagen */
}

img.logo-img-redux {
  content: url('images/logo_redux.png');
  max-width: 100%;
  height: auto;
  display: block; /* evita espacios extra debajo de la imagen */
}

.nav-buttons a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
font-size: 1rem; /* Baja un poco el tamaño si se ve apretado */
    padding: 0.5rem;
}

.nav-buttons a:hover {
    color: #0077ff;
}

/* Botón hamburguesa oculto por defecto */
/* Botón hamburguesa base */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animación al activar */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive: muestra menú y botón */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-buttons {
    position: absolute;
    top: 8vh;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    width: 100%;
    max-width: 300px;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-buttons.active {
    display: flex;
  }

  .nav-buttons a {
    margin: 0.5rem 0;
    font-size: 1.2rem;
  }
}
/* Fin boton hamburgesa */

/* Secciones */
.section {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 60px 20px 20px;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
}

.section.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

@media (max-width: 375px) and (max-height: 540px) {
    .section {
	padding: 20px 20px 20px;
    }
}

/* Bienvenida */
#bienvenida {
    position: relative;
    background-color: black;
    color: white;
    overflow: hidden; /* Importante para que el ::before no se salga */
}

#bienvenida::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/image1.webp');
    background-size: cover;       /* Rellenar completamente */
    background-position: center;  /* Centrada */
    opacity: 0.6;
    z-index: 0;
}

#bienvenida > * {
    position: relative;
    z-index: 1; /* Para que el contenido esté por encima del fondo */
}

#bienvenida .contenido-bienvenida {
    max-width: 54vw;
    text-align: left;
}

#bienvenida .contenido-bienvenida h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    text-align: left; /* predeterminado para móviles */
}

#bienvenida .contenido-bienvenida p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.4;
    text-align: justify;
    text-justify: inter-word;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);

}

@media (max-width: 768px) {
    #bienvenida .contenido-bienvenida {
    	max-width: 60vw;
    }
    #bienvenida .contenido-bienvenida p {
    	text-align: left; /* predeterminado para móviles */
    }
}

@media (max-width: 375px) { /* con max-width el de más abajo más prioridad */
    #bienvenida .contenido-bienvenida {
    	max-width: 80vw !important;
    }
    #bienvenida .contenido-bienvenida h1 {
	font-size: clamp(1.44rem, 5vw, 3.2rem);
    }
}
@media (max-width: 375px) and (max-height: 540px) { /* con max-width el de más abajo más prioridad */
    #bienvenida .contenido-bienvenida h1 {
	margin-top: 1.5rem;
    }
}

.btn-contacto {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #007BFF;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    transition: 
        background-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-contacto:hover {
    background-color: #0056b3;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.6);
    transform: translateY(-2px);
}

/* Servicios */
.servicios-container {
    position: relative;
    width: 100%;
    max-width: 60vw;
    height: 60vh;
    overflow: hidden;
}

@media (max-width: 810px) {
    .servicios-container {
	max-width: 70vw;
    }
}
@media (max-width: 768px) {
    .servicios-container {
	max-width: 100vw;
    }
}

/* Dot */
.dots-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #333;
}

@media (max-width: 375px) and (max-height: 540px) {
    .dots-container {
	margin-top: 15px;
	margin-bottom: 15px;
    }
}

/* Servicio */
.servicio {
    opacity: 0;
    transform: translateX(0px); /* inicio desplazado */
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    text-align: center;
    display: none; /* solo el activo se muestra */
    padding: 0 50px;
}

.servicio h3 {
    font-size: clamp(1.5rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    text-align: center; /* predeterminado para móviles */
}

.servicio p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.4;
    text-align: left; /* predeterminado para móviles */
    transition: opacity 1s ease, transform 1s ease;
}

@media (min-width: 768px) {
    .servicio  p {
        text-align: justify;
        text-justify: inter-word;
    }
}

@media (max-width: 768px) {
    #bienvenida .contenido-bienvenida {
    	max-width: 60vw;
    }
    #bienvenida .contenido-bienvenida p {
    	text-align: left; /* predeterminado para móviles */
    }
}

@media (max-width: 375px) { /* con max-width el de más abajo más prioridad */
    #servicios h1 {
	font-size: clamp(1.65rem, 5vw, 3.2rem);
    }
    .servicio h3 {
	font-size: clamp(1.4rem, 5vw, 3.2rem);
    }
}

@media (max-width: 375px) and (max-height: 540px) {
    .servicio {
	padding: 0 15px !important;
    }
    .servicio img {
	display: none !important;
    }
}

/* Estado inicial de entrada desde la derecha */
.servicio.entrando-derecha {
    transform: translateX(50px);
    opacity: 0;
}

/* Estado inicial de entrada desde la izquierda */
.servicio.entrando-izquierda {
    transform: translateX(-50px);
    opacity: 0;
}

/* Activar el servicio con fade in + slide in */
.servicio.visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

/* Desactivado (animación de salida) */
.servicio.out {
    opacity: 0;
    transform: translateX(-50px); /* sale hacia la izquierda */
    z-index: 0;
}

/* Nuevo deslizamiento hacia la derecha */
.servicio.out-right {
    opacity: 0;
    transform: translateX(50px); /* Sale hacia la derecha */
    z-index: 0;
}

.servicio img {
    width: 100px;
    margin-bottom: 10px;
}

/* Barra de progreso */
#progress-bar {
    width: 0%;
    height: 6px;
    background-color: #0077ff;
    transition: width 0.3s ease, opacity 0.3s ease;
    margin: 10px auto 0;
    max-width: 100%;
    opacity: 1;
  bottom: 55px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.bar-test2 {
  position: absolute;
  bottom: 0;/*55px;*/
  left: 50%;
  transform: translateX(-50%);
  width: 33vw;
  height: 8vh;
  pointer-events: auto;
}

#progress-bar.oculto {
	opacity: 0;
}

#progress-bar.fade-out {
	opacity: 0;
}

#progress-bar.fade-in {
	opacity: 1;
}

												/* Contacto */
#contacto {
  display: flex;
  flex-direction: column;
  height: 100vh; /* O el alto que necesites */
}

.contacto-inner {
  display: flex;
  flex-direction: column;
  flex: 1; /* Que ocupe todo el espacio disponible */
}

#contacto::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/image3.webp') no-repeat center center / cover;
    opacity: 0.8;
    z-index: 0;
}

.contacto-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 50vh !important;
    overflow: hidden;
}

.contacto-background {
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    /*background: black;*/
}

.texto-superior {
    transform: translateX(0px); /* inicio desplazado */
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    width: 100%;
    top: 0;
    left: 0;
    text-align: center;
    align-items: center;
    padding: 25px 25px;
    color: white !important;

    opacity: 0;
}

.texto-superior h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    margin-bottom: 1rem;
    text-align: center; /* predeterminado para móviles */
}

.texto-superior p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.4;
    text-align: center; /* predeterminado para móviles */
    transition: opacity 1s ease, transform 1s ease;
}

/* centro */

.imagen-central {
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    text-align: center;
    padding: 2rem 0;
}

.imagen-central img {
    width: 100%;
    max-width: 400px; /* Ajusta el tamaño máximo */
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 10px; /* Opcional: bordes redondeados */
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* Opcional: sombra para que destaque */

    opacity: 0;
}

.imagen-central h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.4;
    text-align: center;
    color: white !important;

  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);

}

/* botom */

.form-section {
    transform: translateX(0px); /* inicio desplazado */
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    width: 100%;
    top: 0;
    left: 0;
    text-align: center;
    padding: 12px 0 50px 0;

    margin-top: auto; /* Se empuja hacia abajo */
}

.form-section form {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	
width: 100% !important;
	max-width: 640px;
margin: 0 auto; /* para centrar el form */
}

/* Inputs */
.form-section form input,
.form-section form .captcha-placeholder,
.form-section form button {
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 1;
  transform-origin: top;
}

.form-section form.textarea-activo input,
.form-section form.textarea-activo .captcha-placeholder,
.form-section form.textarea-activo button {
  opacity: 0;
  pointer-events: none;
}

/* TextArea */
.form-section form textarea {
  transition: min-height 0.5s ease, transform 0.5s ease;
  min-height: 100px;
}

.form-section form.textarea-activo textarea {
  min-height: 270px;
  overflow: auto;
}

.form-section h1 {
    font-size: clamp(1.5rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    text-align: center; /* predeterminado para móviles */
}

.form-section p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.4;
    text-align: center;
    transition: opacity 1s ease, transform 1s ease;
}

.form-section input,
.form-section textarea {
  margin: 6px;
  padding: 1.0rem;
  border-radius: 5px;
  font-size: 1rem;

  background-color: rgba(255, 255, 255, 0.77); /* Fondo blanco con 50% de transparencia */
  /* Otros estilos que desees aplicar (bordes, padding, etc.) */
  border: 1px solid #aaa;
}

.form-section textarea {
  resize: vertical;
  min-height: 100px;
}

.form-section button {
  padding: 1.0rem;
  background-color: #ffffff;
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  max-width: 100px;
  margin: 0 auto;
}

.form-section button:hover {
  background-color: #ddd;
}

.captcha-placeholder {
  margin: 1rem 0;
  text-align: center;
}

@media (min-width: 768px) {
    .contacto-container {
	max-width: 70vw;
    }
    .texto-superior p {
	text-align: center;
	text-justify: inter-word;
    }
    .form-section form {
        margin: 0 auto; /* para centrar el form */
    }
}

/* Arrow */
.scroll-arrow {
  position: absolute !important;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  pointer-events: none;
  animation: scroll-arrow-fade 9s forwards; /* conserva su último estado con forwards */
  transition: opacity 0.5s ease;
}

.scroll-arrow_arrow {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 33vw;
  height: 8vh;
  pointer-events: auto;
}

.scroll-arrow_arrow svg {
  width: 100%;
  height: 100%;
}

.scroll-arrow.show {
  opacity: 0;
}

.scroll-arrow-anim {
  animation: scroll-arrow-bounce-fade 2.0s ease-out infinite, scroll-arrow-bounce 2.0s infinite;
}

.scroll-arrow-anim-alt {
  animation: scroll-arrow-bounce-fade-alt 2.0s ease-out infinite, scroll-arrow-bounce 2.0s infinite;
  animation-delay: 0.2s;
}

.scroll-arrow.hidden {
  display: none;
}

@keyframes scroll-arrow-bounce {
  0% {
    transform: translate(-50%, 0);
  }
  12% {
    transform: translate(-50%, 15px);
  }
  100% {
    transform: translate(-50%, 15px);
  }
}

@keyframes scroll-arrow-bounce-fade {
  0% {
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  20% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes scroll-arrow-bounce-fade-alt {
  0%,50%,100% {
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  30% {
    opacity: 1;
  }
}

@keyframes scroll-arrow-fade {
  0%, 80% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (min-width: 390px) {
	.scroll-arrow_arrow {
  		bottom: 40px;
	}
}
/* Arrow END */

/* Footer */
footer {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #555;
    animation: fadein 2s ease forwards;
    opacity: 0;
}

@media (max-width: 375px) and (max-height: 540px) {
	footer {
  		display: flex;
		justify-content: center;
		gap: 5px;
	}
}

@keyframes fadein {
    to { opacity: 1; }
}