/* Variables de color */
:root {
  --primario: #1b135b;
  --secundario: #d19a3c;
  --blanco: #ffffff;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--blanco);
  color: var(--primario);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

#preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: var(--secundario);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 3.5s ease, visibility 3.5s ease; /* ← más lento */
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}


.preloader-content {
  text-align: center;
  color: var(--primario); /* #1b135b */
}

.logo-preloader {
  width: 180px; /* tamaño más grande del logo */
  margin-bottom: 1rem;
}

.preloader-nombre {
  font-size: 2rem;
  font-weight: bold;
  margin: 0.5rem 0;
}

.preloader-eslogan {
  font-size: 1rem;
  font-weight: 300;
  margin: 0;
}



/* Header */
.main-header {
  background-color: var(--blanco);
  color: var(--primario);
  padding: 0.25rem 0; /* Aún más delgado */
}


.main-header .logo-header {
  width: 120px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-link {
  display: inline-block;
  cursor: pointer;
}

.nombre-empresa {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0;
  color: var(--primario);
}

.eslogan {
  font-size: 0.9rem;
  margin: 0;
  color: var(--primario);
}


.nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end; /* <-- los empuja a la derecha */
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}


.nav a {
  color: #1b135b;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;  /* Aumenta el tamaño del texto */
  transition: color 0.3s ease;
}


.nav a:hover {
  color: #d19a3c;
}



/* Hero */
.hero {
  background: var(--primario);
  color: var(--blanco);
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Servicios */
.services {
  background: var(--blanco);
  padding: 3rem 1rem;
}

.service-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.servicio {
  margin-bottom: 3rem;
}

.servicio h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primario);
}

.servicio p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.carrusel {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 300px;
  overflow: hidden;
}

.carrusel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carrusel img.active {
  opacity: 1;
  z-index: 1;
}
.grid-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card-servicio {
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card-servicio:hover {
  transform: translateY(-5px);
}

.carrusel {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.carrusel img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carrusel img.active {
  opacity: 1;
  z-index: 1;
}

.info-servicio {
  padding: 1rem;
  text-align: center;
}

.info-servicio h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primario);
}

.info-servicio p {
  font-size: 0.95rem;
  color: #333;
}


/* About */
.about {
  background: #f9f9f9;
  padding: 3rem 1rem;
}

/* Testimonios */
.testimonials {
  background: var(--secundario);
  color: var(--primario);
  padding: 3rem 1rem;
}

/* Contacto */
.contact {
  background: var(--blanco);
  padding: 3rem 1rem;
}

.contact form {
  display: grid;
  gap: 1rem;
}

.contact input,
.contact textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contact button {
  background: var(--primario);
  color: var(--blanco);
  border: none;
  padding: 0.75rem;
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--primario);
  color: var(--blanco);
  text-align: center;
  padding: 1rem 0;
}
/* Animaciones suaves */
section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}


/* Mostrar botón hamburguesa solo en móviles */

/* Ocultar botón hamburguesa por defecto */
.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
  }

  .nav {
  display: none;
  flex-direction: column;
  background-color: var(--primario);
  position: absolute;
  top: 70px;
  right: 0;
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  z-index: 999; /* <-- AÑADE ESTO */
  min-height: 200px;

}

@media (max-width: 768px) {
  /* Estilo de enlaces en el menú hamburguesa */
  .nav a {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .nav a:hover {
    color: #d19a3c;
  }

  /* (Otros estilos ya existentes, no los elimines) */
}


  .nav.open {
    display: flex;
  }

  .nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;   /* <-- centra en vertical */
  gap: 1.5rem;
  padding: 1rem 0;
  margin: 0;
  list-style: none;
}


}
.main-header .container {
  position: relative;
}

/* HERO CON VIDEO DE FONDO */
.hero-video {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  text-align: center;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 19, 91, 0.6); /* Capa oscura con tu color primario */
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  animation: fadeInUp 1.5s ease both;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  animation: fadeInUp 1.5s ease both;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  animation: fadeInUp 2s ease both;
}

/* Animación */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: flex-start;
}

.about-text {
  flex: 1 1 300px;
  font-size: 1rem;
  color: #333;
}

.about-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.about-video {
  flex: 1 1 300px;
}

.about-video iframe,
.about-video video {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.testimonios {
  background: var(--secundario);
  color: var(--primario);
  padding: 3rem 1rem;
  text-align: center;
}

.testimonios-descripcion {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.testimonios-carrusel {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 350px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.testimonio-imagen {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.testimonio-imagen.active {
  opacity: 1;
  z-index: 1;
}
.contact {
  background-color: #f9f9f9;
  padding: 3rem 1rem;
}

.contacto-intro {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contacto-contenido {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.formulario-contacto {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.formulario-contacto input,
.formulario-contacto textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
}

.formulario-contacto button {
  background-color: var(--primario);
  color: white;
  border: none;
  padding: 0.75rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.formulario-contacto button:hover {
  background-color: var(--secundario);
  color: var(--primario);
}

.info-contacto {
  flex: 1 1 250px;
  font-size: 0.95rem;
}

.info-contacto h3 {
  margin-bottom: 0.5rem;
  color: var(--primario);
}

.info-contacto a {
  color: var(--primario);
  text-decoration: none;
}

.info-contacto a:hover {
  text-decoration: underline;
}

.mensaje-gracias {
  margin-top: 2rem;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  color: var(--primario);
}

@media (max-width: 768px) {
  .contacto-contenido {
    flex-direction: column;
  }
}
.footer {
  background-color: var(--primario);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.footer-contenido {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 1.5rem;
}

.footer-logo h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-logo p {
  font-size: 0.95rem;
  font-style: italic;
}

.footer-redes a {
  margin: 0 0.5rem;
  display: inline-block;
}

.footer-redes img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1); /* blanco sobre fondo oscuro */
  transition: transform 0.2s ease;
}

.footer-redes img:hover {
  transform: scale(1.1);
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .footer-contenido {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
