/* === ESTILOS BASE === */
/* Animación de entrada para el contenedor principal */
.animar-entrada {
  opacity: 0;
  transform: translateY(30px);
  animation: entradaSuave 0.8s ease-out forwards;
}

@keyframes entradaSuave {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SECCIÓN DE IDENTIDAD (MISIÓN/VISIÓN) === */
.identidad-seccion {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #f0f7ff;
}

.slider-identidad {
  position: relative;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.slide.activo {
  opacity: 1;
  z-index: 2;
}

.contenido-slide {
  background-color: rgba(255, 255, 255, 0.95); /* Aumentado para mejor legibilidad */
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 850px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Mejorado el shadow */
}

.contenido-slide h2 {
  font-size: 2.4rem;
  color: #0a3a5a;
  margin-bottom: 20px;
}

.contenido-slide p {
  font-size: 1.15rem;
  color: #333;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 800px;
}

/* === BOTONES SLIDER === */
.botones-slider {
  margin-top: 20px;
  z-index: 3;
  text-align: center;
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
}

.punto {
  height: 14px;
  width: 14px;
  margin: 0 6px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.punto.activo {
  background-color: #0a3a5a;
}

/* === SECCIÓN DE SERVICIOS === */
.servicios-seccion {
  position: relative;
  margin-top: 60px;
  padding: 80px 20px;
  text-align: center;
  overflow: hidden;
  background-color: #fff;
}

.servicios-seccion::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../../assets/servicios.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: brightness(0.65);
  z-index: 1;
}

.servicios-seccion h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #ffffff;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.servicios-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px; /* Aumentado para mejor distribución */
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 20px;
}

/* === TARJETAS FLIP === */
.flip-card {
  background-color: transparent;
  width: 280px;
  height: 250px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* Mejorada la transición */
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.flip-card-front i {
  font-size: 2.5rem;
  color: #cc0033;
  margin-bottom: 15px;
}

.flip-card-front h3,
.flip-card-back h3 {
  color: #0a3a5a;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.flip-card-back p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* === SECTORES ATENDIDOS === */
.sectores-seccion {
  background-color: #f4f9ff;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.sectores-seccion h2 {
  font-size: 2.4rem;
  color: #0a3a5a;
  margin-bottom: 50px;
}

.sectores-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 30px;
  overflow-x: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch; /* Mejor scroll en iOS */
  scrollbar-width: none; /* Ocultar scrollbar en Firefox */
}

.sectores-grid::-webkit-scrollbar {
  display: none; /* Ocultar scrollbar en Chrome/Safari */
}

.sector-card {
  background-color: #ffffff;
  padding: 30px 20px;
  border-radius: 16px;
  width: 180px;
  height: 180px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0; /* Evitar que las tarjetas se compriman */
}

.sector-card i {
  font-size: 2.8rem;
  color: #1d5c8b;
  margin-bottom: 12px;
}

.sector-card p {
  font-size: 1rem;
  color: #0a3a5a;
  font-weight: 600;
}

.sector-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* === AVISO DE PRIVACIDAD === */
.aviso-privacidad-seccion {
  background-color: #f5f5f5;
  padding: 80px 20px;
  text-align: center;
  position: relative;
}

.aviso-privacidad-contenedor {
  max-width: 900px;
  margin: 0 auto;
  background-color: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.aviso-privacidad-contenedor h2 {
  font-size: 2rem;
  color: #0a3a5a;
  margin-bottom: 20px;
}

.aviso-privacidad-contenedor p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 30px;
}

.boton-aviso {
  display: inline-block;
  background-color: #cc0033;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.boton-aviso:hover {
  background-color: #a30029;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(204, 0, 51, 0.3);
}

/* === TRANSICIONES Y EFECTOS === */
.transicion-degradado {
  position: relative;
}

.transicion-degradado::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(245, 245, 245, 1) 100%);
  z-index: 2;
  pointer-events: none;
}

/* === MEDIA QUERIES (MÓVIL) === */
@media (max-width: 900px) {
  /* Ajustes para el slider en móvil */
  .identidad-seccion,
  .slider-identidad {
    height: auto !important;
    min-height: 300px !important;
    max-height: none !important;
    padding: 80px 10px 20px; /* Ajustado para el header fijo */
  }

  .slide {
    position: relative;
    height: auto !important;
    min-height: 250px;
    padding: 20px 10px;
    background-attachment: scroll !important;
  }

  .contenido-slide {
    padding: 20px 15px;
    max-width: 100%;
    margin: 0 10px;
  }

  .contenido-slide h2 {
    font-size: 1.8rem;
  }

  .contenido-slide p {
    font-size: 1rem;
  }

  /* Ajustes para servicios en móvil */
  .servicios-grid {
    flex-direction: column;
    gap: 20px;
    padding: 10px;
  }

  .flip-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  /* Ajustes para sectores en móvil */
  .sectores-grid {
    padding: 10px;
    justify-content: flex-start;
  }

  .sector-card {
    width: 160px;
    height: 160px;
  }

  /* Ajustes para aviso de privacidad en móvil */
  .aviso-privacidad-contenedor {
    padding: 20px 15px;
  }

  .aviso-privacidad-contenedor h2 {
    font-size: 1.5rem;
  }

  .aviso-privacidad-contenedor p {
    font-size: 1rem;
  }
}

/* === VISTAS MÓVIL/ESCRITORIO === */
@media (max-width: 900px) {
  .vista-movil { display: block !important; }
  .vista-escritorio { display: none !important; }
}

@media (min-width: 901px) {
  .vista-movil { display: none !important; }
  .vista-escritorio { display: block !important; }
}
