/* General */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', Times, serif, sans-serif;
  background-color: #f9f4f4e4;
  color: white;
}

/* Pantalla compartida */
.pantalla-negra {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color:rgb(8, 7, 42);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  text-align: center;
}

/* Ocultar elementos */
.oculto {
  display: none;
}

/* Banderas-seleccion */

.banderas-seleccion {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.banderas-seleccion img {
  width: 60px;
  height: auto;
  background-color: white;
  border: 1px solid black;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.banderas-seleccion img:hover {
  transform: scale(1.1);
}

/* Loader */
.loader {
  width: 100px;
  height: 100px;
  border: 6px solid transparent;
  border-top: 6px solid rgb(242, 241, 250);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 20px rgb(88, 85, 97), 0 0 40px rgb(94, 93, 105), 0 0 60px rgb(46, 14, 226);
  margin-bottom: 30px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 20px rgb(83, 83, 109);
  }
  50% {
    box-shadow: 0 0 40px rgb(235, 235, 237), 0 0 60px rgb(250, 250, 251);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgb(22, 21, 24);
  }
}

/* Lema */
.lema {
  font-style: italic;
  font-size: 1.6em;
  color: rgb(246, 245, 248);
}

.barra-superior {
  background: url('assets/logo_castega.jpg') no-repeat center center;
  background-size: 200px 70px;
  background-color: white;
  height: 100px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  border: 5px solid #0d0c0c;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.banderas {
  position: top;
  bottom: 10px;
  width: 100%; 
  display: flex;
  justify-content: space-between; 
  padding: 0 20px;
  box-sizing: border-box;
  
}

.bandera {
  width: 35px;
  opacity: 0.5;
  cursor: pointer;
  border: 5px solid rgb(22, 22, 78);
  border-radius: 100px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.bandera.activa {
  opacity: 1;
}

.barra-menu {
  background-color:rgb(8, 7, 42);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 0; 
  position: fixed;
  top: 110px; 
  left: 0;
  width: 100%;
 z-index: 999;
}

.opcion {
  text-align: center;
  cursor: pointer;
}

.icono {
  width: 50px;
  height: auto;
  margin-bottom: 5px;
}

.texto-menu {
  font-weight: bold;
}

.seccion {
  padding: 20px;
  display: none;
}

/* Sección de Servicios */
#servicios {
  display: none;
  width: 100%;
  height: calc(100vh - 240px);
  overflow: hidden;
  padding-top: 240px; 
  position: relative;
  background: url('assets/fondo_servicios.jpg') center/cover no-repeat;
}


.slider-servicios {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1; 
}

.slide-servicio {
  display: none;
  position: absolute;
  inset: 0;
  justify-content: center;
  align-items: center;
}
.slide-servicio.activo {
  display: flex;             
  z-index: 2;
}

.imagen-servicio {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 5px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  transition: transform 2s;   
}

.imagen-servicio:hover {
  transform: scale(1.3);      
}

/* Overlay de texto SIEMPRE visible */
.slide-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 250px;
  width: min(650px, 88%);    
  padding: 16px 20px;
  border-radius: 10px;        
  background: rgba(0,0,0,0.45);
  color: #fff;
  line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 3;
}

.titulo-servicio {
  margin: 0 0 6px 0;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: .3px;
}

.desc-servicio {
  margin: 0;
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  opacity: .95;
}

@media (max-width: 480px) {
  .titulo-servicio { font-size: 1rem;}
  .desc-servicio { font-size: 0.9rem;}
  
}

/* Botones de navegación */
.controles-slider-servicio {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 4;
}
.controles-slider-servicio button {
  background-color: white;
  color: black;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  opacity: 0.9;
}
.controles-slider-servicio button:hover { opacity: 1; }

@media (max-width: 768px) {
  #servicios {
    padding-top: 180px;
    height: calc(100vh - 200px);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100vw;        
    overflow-x: hidden;  
  }

  .slide-servicio {
    width: 100% !important; 
    margin: 0 auto; 
    box-sizing: border-box;
  }

  .imagen-servicio {
    width: 100%; 
    height: auto; 
    object-fit: cover;
  }

  .slide-overlay {
    bottom: 150px;
    padding: 12px 14px;
    border-radius: 10px;
    max-width: 100%;    
  }
}

/* Contactanos */
.contacto-info {
  padding: 220px;
  max-width: 1100px;
  margin: auto;
  color: darkgoldenrod;
  text-align: justify;
  font-size: x-large;
  font-style:oblique;
   
  
}

.contacto-info ul {
  list-style: none;
  padding: 0;
}

.contacto-info li {
  margin-bottom: 10px;
  font-size: 1em;
}

.icono-contacto {
  vertical-align: middle;
  margin-right: 10px;
  width: 24px;
  height: auto;
}

.contacto-info a {
  color: darkgoldenrod;
  text-decoration: none;
  font-size: x-large;
  font-style: oblique;
  
}

.contacto-info a:hover {
  text-decoration: underline;
}

/* Ajuste responsivo para móviles */
@media (max-width: 768px) {
  .contacto-info {
    padding: 220px 20px; 
    font-size: large; 
    text-align: left;
    line-height: 1.6; 
  }

  .contacto-info a {
    font-size: large;
  }

  .icono-contacto {
    width: 15px; 
  }
}

/* Conocenos */
#conocenos {
  background-color:rgb(8, 7, 42);
  color: white;
  padding: 250px;
}

.video-responsivo {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
  border: 5px solid #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.historia, .mision-vision-valores {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: justify;
}

.mision-vision-valores ul {
  list-style: none;
  padding: 0;
}

.mision-vision-valores li {
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  #conocenos {
    padding: 240px 20px;   /* ajusta según la altura de tu header/menú */
  }

  .video-responsivo {
    max-width: 100%;
    margin: 0 auto 20px;
    border-width: 3px;          /* bordes un poco más delgados */
    box-shadow: 0 0 10px rgba(0,0,0,0.35);
  }

  .historia, .mision-vision-valores {
    max-width: 100%;
    padding: 12px 0;
    text-align: left;           /* evita huecos raros del justificado */
    line-height: 1.5;
    font-size: 1rem;
  }

  .mision-vision-valores li {
    margin-bottom: 8px;
  }
}

#testimonios {
  padding: 240px;
  background-color: #f9f9f9;
  background-image: url('assets/fondo_testimonios.jpg');
  background-size: thumbnail;
  background-position: center;
  background-repeat: no-repeat;
  color: #333;
}

.contenedor-testimonios {
  max-width: 700px;
  margin: auto;
  background-color: rgba(227, 230, 246, 0.9);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.formulario-testimonio {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario-testimonio label {
  font-weight: bold;
}

.formulario-testimonio input,
.formulario-testimonio select,
.formulario-testimonio button {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.formulario-testimonio input[type="file"] {
  border: none;
}

.formulario-testimonio button {
  background-color: #002f6c;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.formulario-testimonio button:hover {
  background-color: #001a3a;
}

.espacio-testimonios {
  margin-top: 30px;
  text-align: center;
  font-style: italic;
}

@media screen and (max-width: 600px) {
  .contenedor-testimonios {
    padding: 20px 15px;
  }

  .formulario-testimonio input,
  .formulario-testimonio select,
  .formulario-testimonio button {
    font-size: 0.95em;
  }
}

.oculto {
  display: none;
}
  .img-container {
  position: relative;
  height: 250px;
  width: 250px;
  perspective: 500px;
  transform-style: preserve-3d;
  margin: auto;
}

.box {
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  width: 250px;
  height: 250px;
  border-radius: 25px;
  overflow: hidden;
  border: 1px solid #bbb;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}
.box.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9) rotateY(10deg);
}

.box.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotateY(0deg);
}
.box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Móviles */
@media (max-width: 768px) {
  #testimonios {
    padding: 240px 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;  
  }

  .contenedor-testimonios {
    padding: 18px 14px;
  }

  .formulario-testimonio input,
  .formulario-testimonio select,
  .formulario-testimonio button {
    font-size: 0.95em;
    padding: 8px;
  }

  .img-container {
    height: 200px;
    width: 200px;
  }

  .box {
    width: 200px;
    height: 200px;
  }
}

.footer {
  background-color:rgb(8, 7, 42);
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 0.9em;
}

.footer a {
  color: #ffd700;  /* dorado para resaltar */
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}