/* ================================
   ESTILOS GENERALES
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fdfdfd;
  color: #333;
}

/* desplazamiento suave para anclas internas */
html {
  scroll-behavior: smooth;
}

/* ================================
   ENCABEZADO
================================ */
header {
  position: relative;
  background-color: #b30000;
  color: white;
  padding: 20px 40px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center; /* centra el h1 */
}

/* Logo alineado a la izquierda */
.logo-header {
  position: absolute;
  left: 20px;
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* Título centrado horizontalmente */
.titulo-header {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0;
  text-align: center;
}



/* ================================
   SLIDER PRINCIPAL (INICIO)
================================ */
/* Contenedor del slider */

.slider-fade {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  background-color: black; /* 👈 Fondo negro */
}

/* Todas las imágenes se apilan */
.fade-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fade 36s infinite;
  z-index: 0;
}

/* Animación para cada imagen con delay */
.img1 { animation-delay: 0s; }
.img2 { animation-delay: 4s; }
.img3 { animation-delay: 8s; }
.img4 { animation-delay: 12s; }
.img5 { animation-delay: 16s; }
.img6 { animation-delay: 20s; }
.img7 { animation-delay: 24s; }
.img8 { animation-delay: 28s; }
.img9 { animation-delay: 32s; }


/* Animación tipo fade sin pantalla blanca */
@keyframes fade {
  0%    { opacity: 0; }
  2.7%  { opacity: 1; }
  10.8% { opacity: 1; }
  13.5% { opacity: 0; }
  100%  { opacity: 0; }
}




/* ================================
   MENÚ DE NAVEGACIÓN FIJO
================================ */
nav {
  position: sticky;
  top: 0;
  background-color: #800000;
  display: flex;
  justify-content: center;
  z-index: 1000;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 15px 20px;
  display: block;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: #a00000;
}

/* ================================
   CONTENIDO PRINCIPAL
================================ */
main {
  padding: 30px;
  max-width: 1200px;
  margin: auto;
}

section {
  margin-bottom: 50px;
}

section h2 {
  color: #b30000;
  border-bottom: 2px solid #b30000;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* ================================
   SLIDER DE IMÁGENES
================================ */
.slider {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: 250px;
  position: relative;
}

.slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 1s ease;
  border-radius: 8px;
}

/* ================================
   FORMULARIO DE CONTACTO
================================ */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
}

input, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

button {
  background-color: #b30000;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #a00000;
}

/* ================================
   PIE DE PÁGINA
================================ */
footer {
  background-color: #800000;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}

/* ================================
   ANIMACIONES
================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
  }

  .slider {
    height: 180px;
  }

  form {
    width: 100%;
  }
}
#nosotros {
  background-color: #f8f8f8;
  padding: 60px 20px;
}

.contenedor-nosotros {
  max-width: 1000px;
  margin: 0 auto;
}

.nosotros-contenido {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.imagen-nosotros {
  flex: 1 1 300px;
  max-width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.texto-nosotros {
  flex: 2 1 600px;
}

.texto-nosotros h2 {
  font-size: 2.5rem;
  color: #b30000;
  margin-bottom: 20px;
}

.texto-nosotros p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}
@media (max-width: 768px) {
  .nosotros-contenido {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .imagen-nosotros {
    max-width: 100%;
    margin-bottom: 20px;
  }

  .texto-nosotros {
    flex: 1 1 100%;
  }
}
/* seccion servicios*/
.servicio-item {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.servicios-section {
  scroll-margin-top: 100px; /* ajusta según la altura del menú fijo */
}

.servicio-item:hover {
  transform: translateY(-5px);
}

.servicio-item img {
  width: 40%;
  height: 100%;
  object-fit: cover;
}

.servicio-detalle {
  padding: 20px;
  width: 60%;
}

.servicio-detalle h3 {
  color: #d32f2f;
  margin-bottom: 10px;
  font-size: 1.5em;
}

.servicio-detalle p {
  color: #333;
  font-size: 1.1em;
}
@media (max-width: 768px) {
  .servicio-item {
    flex-direction: column;
  }

  .servicio-item img,
  .servicio-detalle {
    width: 100%;
  }

  .servicio-item img {
    height: 200px;
  }
}
 /*seccion rendicion de cuentas*/
.rendicion-section {
  background-color: #f4f4f4;
  padding: 60px 20px;
  text-align: center;
}

.titulo-seccion {
  font-size: 2.5rem;
  color: #b30000;
  margin-bottom: 40px;
}

.anio-cuentas {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.anio-cuentas h3 {
  font-size: 1.8rem;
  color: #d32f2f;
  margin-bottom: 10px;
}

.anio-cuentas p {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
}

.btn-video {
  display: inline-block;
  padding: 10px 20px;
  background-color: #d32f2f;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-video:hover {
  background-color: #b71c1c;
}
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
/* seccion galeria*/
.galeria-rendicion {
  padding: 40px 20px;
  background: #f9f9f9;
}

.grid-galeria {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.galeria {
  scroll-margin-top: 100px;
}

.item {
  width: 100%;
  aspect-ratio: 4 / 3; /* Mantiene proporción uniforme */
  overflow: hidden;
  border-radius: 6px;
  background: #ddd;
  position: relative;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recorta sin distorsionar */
  transition: transform 0.3s ease;
}

.item:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .grid-galeria {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-galeria {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* seccion Transparencia*/
.transparencia-section {
  padding: 60px 20px;
  background-color: #f4f4f4;
  text-align: center;
  scroll-margin-top: 100px;
}

.grid-documentos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
  background-color: #000; /* Fondo negro */
  padding: 30px;
  border-radius: 8px;
}

.documento {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.documento:hover {
  transform: translateY(-5px);
}

.documento img {
  width: 60px;
  margin-bottom: 10px;
}

.documento h4 {
  font-size: 1.1rem;
  color: #d32f2f;
  margin-bottom: 10px;
}

.documento a {
  text-decoration: none;
  color: white;
  background-color: #d32f2f;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.documento a:hover {
  background-color: #b71c1c;
}
.seccion-contacto {
  background-color: #f5f5f5;
  padding: 40px 20px;
}

.seccion-contacto h2 {
  color: #b30000; /* Rojo institucional */
  font-weight: bold;
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
}

.contenedor-contacto {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  justify-content: space-between;
}

.formulario-contacto,
.info-contacto {
  flex: 1 1 45%;
  min-width: 300px;
}

.formulario-contacto label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.formulario-contacto button {
  background-color: #d32f2f;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.formulario-contacto button:hover {
  background-color: #b71c1c;
}

.info-contacto {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.item-contacto {
  display: flex;
  align-items: center;
  gap: 15px;
}

.item-contacto img {
  width: 30px;
  height: 30px;
}

.item-contacto p {
  margin: 0;
  color: #444;
}
