/* ======================================================
   ESTRUCTURA BASE DEL DOCUMENTO
   ====================================================== */

/* El documento debe medir toda la pantalla */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Solo color de fondo; NO usar flex aquí */
body {
    background: #e8f0ff; /* Azul muy suave */
}

/* ======================================================
   CONTENEDOR PRINCIPAL (la caja blanca que envuelve todo)
   ====================================================== */

.contenedor-principal {
    width: 100%;
    max-width: 1200px;           /* Mantiene el sitio centrado */
    margin: 10px auto;           /* Espacio externo */
    background: #ffffff;         /* Fondo blanco */
    border-radius: 10px;         /* Bordes redondeados */
    padding: 20px;               /* Espacio interno */
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;               /* Permite que el MAIN empuje al footer */
    flex-direction: column;      /* Orden vertical */
    min-height: 100vh;           /* Siempre ocupa toda la pantalla */
}

/* ======================================================
   BANNER SUPERIOR
   ====================================================== */

.banner-container {
    background: transparent;  /* SIN color */
    padding: 0;               /* SIN márgenes internos */
    margin-bottom: 15px;      /* Mantengo separación con la navbar */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);        
    border-radius: 0;         /* SIN bordes redondeados */
}

.banner-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;         /* Por si tenía bordes */
}

/* ======================================================
   ========== NAVBAR ==========
   ====================================================== */
/* Caja contenedora del navbar */
.navbar-custom {
  border-radius: 10px;
  background: #0d6efd;
  padding: 10px 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Estilos básicos de los ítems */
.navbar-custom .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  padding: 10px 18px;
  text-align: center;
  border-radius: 6px;
  transition: 0.3s;
}

/* Efecto hover */
.navbar-custom .nav-link:hover {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
}

/* Ítem ACTIVO */
.navbar-custom .nav-link.activo {
  background: #ffffff;
  color: #0d6efd !important;
  border-radius: 8px;
  font-weight: bold;
  padding: 6px 12px;
}
.dropdown-item.activo {
  background-color: #0d6efd;
  color: #fff;
  border-radius: 8px;
}

/* Distribuir TODO el menú horizontalmente */
.navbar-custom .navbar-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;  /* ← CLAVE: reparte los ítems */
  align-items: center;
}

/* Quitar margen sobrante en pantallas pequeñas */
@media (max-width: 991px) {
  .navbar-custom .navbar-nav {
    justify-content: center; /* centrado en móviles */
    gap: 10px;
    width: 100%;
  }
}

/* ===============================
   DROPDOWN INSTITUCIONAL
   =============================== */

.navbar-custom .dropdown-menu {
  border-radius: 10px;
  border: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  padding: 8px 0;
}

.navbar-custom .dropdown-item {
  font-weight: 500;
  padding: 10px 20px;
  transition: background 0.3s;
}

.navbar-custom .dropdown-item:hover {
  background: #e8f0ff;
  color: #0d6efd;
}


/* ======================================================
   BLOQUES GENERALES (banner, navbar, main, footer)
   ====================================================== */

.bloque-sitio {
    background-color: #ffffff;
    border: 1px solid #498ff7;   /* Línea azul */
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    overflow: hidden;
}

/* ======================================================
   MAIN (crece para empujar el footer)
   ====================================================== */

main {
    flex: 1; /* ← ESTA LÍNEA HACE QUE EL MAIN SE EXPANDA */
    background: #f8faff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
    margin-bottom: 15px;

  /* ✔ Nuevo borde azul */
  border: 1px solid #498ff7;
}

/* ======================================================
   FOOTER
   ====================================================== */

.mi-footer {
    border-radius: 10px;
    background: #0d6efd !important;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 !important;
}
/* Alinear correctamente el contenido interno del footer */
.mi-footer .row > div {
  text-align: center;
}

/* Distribución perfecta entre columnas */
.mi-footer .row {
  display: flex;
  justify-content: space-between;
}

/* Divider del footer */
.mi-footer hr {
  opacity: 0.4;
}

/* Botones de redes sociales */
.btn-red-social {
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 1.3rem;
  color: white;
  text-decoration: none;
  transition: 0.25s ease-in-out;
}

/* Facebook */
.btn-red-social.facebook {
  background: #1877f2;
  border: 1px solid #ffffff;   /* ✔ Borde blanco añadido */
}
.btn-red-social.facebook:hover {
  background: #0f5fcc;
  border-color: #ffffff;
  transform: scale(1.03);
}

/* Instagram (degradado moderno) */
.btn-red-social.instagram {
  background: radial-gradient(circle at 30% 30%, #fdf497, #f55f9d, #c837ab, #4c63d2);
}
.btn-red-social.instagram:hover {
  opacity: 0.8;
  transform: scale(1.03);
}

/* YouTube */
.btn-red-social.youtube {
  background: #ff0000;
}
.btn-red-social.youtube:hover {
  background: #cc0000;
  transform: scale(1.03);
}

/* ======================================================
   TARJETAS DE ACCESO RÁPIDO
   ====================================================== */

.acceso-rapido h2 {
    color: #0d6efd;
}

.tarjeta-iemar {
    border: 1px solid #498ff7;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta-iemar:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Iconos grandes */
.icono-tarjeta {
    font-size: 2.8rem;
    color: #0d6efd;
    margin-bottom: 10px;
}

/* ======================================================
   CARRUSEL INSTITUCIONAL
   ====================================================== */

.carrusel-institucional img {
  height: 380px;
  object-fit: cover;
  border-radius: 12px;
}

/* Texto sobre las imágenes */
.carousel-caption {
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  padding: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .carrusel-institucional img {
    height: 240px;
  }
}

/* ======================================================
   FLECHAS DEL CARRUSEL (FONDO CIRCULAR)
   ====================================================== */

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.45); /* Fondo oscuro semitransparente */
  border-radius: 50%;
  width: 48px;
  height: 48px;
  background-size: 60% 60%; /* Tamaño del icono */
}

/* Efecto hover */
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(13, 110, 253, 0.9); /* Azul institucional */
}

/* ======================================================
   NOTICIAS DESTACADAS
   ====================================================== */

.tarjeta-noticia {
  border-radius: 12px;
  overflow: hidden; /* 🔑 evita bordes raros */
}

/* Controla la imagen de la card */
.card-img-top {
  height: 150px;        /* Ajusta aquí el tamaño */
  object-fit: cover;    /* Recorta sin deformar */
  transition: transform 0.4s ease;
}
/*
.card:hover .card-img-top {
  transform: scale(1.05);
}*/

.card-title {
  font-weight: 600;
}
.card-footer {
  background: #f8f9fa;
}
/* Asegurar que los botones dentro de las cards sean clickeables */
.card .btn {
  position: relative;
  z-index: 5;
}


.linea-separadora {
  width: 100%;              /* Ocupa todo el ancho disponible */
  max-width: 900px;         /* Control visual en pantallas grandes */
  height: 3px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent,
    #0d6efd,
    #66a3ff,
    #0d6efd,
    transparent
  );
  border-radius: 10px;
}
/* ======================================================
   FLECHAS DEL REEL DE NOTICIAS
   ====================================================== */

#carouselNoticias .carousel-control-prev-icon,
#carouselNoticias .carousel-control-next-icon {
  background-color: rgba(13, 110, 253, 0.9);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  background-size: 60% 60%;
}

#carouselNoticias .carousel-control-prev,
#carouselNoticias .carousel-control-next {
  width: 8%;              /* Antes ocupaban demasiado */
  z-index: 2;
}


/* ======================================================
   TEXTO INSTITUCIONAL 
   ====================================================== */

.texto-seccion p {
  text-align: justify;      /* Lectura formal */
  line-height: 1.8;         /* Aire entre líneas */
  margin-bottom: 1.2rem;    /* Separación entre párrafos */
  font-size: 1.05rem;       /* Tamaño cómodo */
  color: #333;              /* Gris oscuro, más suave que negro */
}
/* ======================================================
   TEXTO INSTITUCIONAL CON MARCA DE AGUA
   ====================================================== */

.texto-seccion::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("../img/institucional/escudo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 500px auto;

  background-attachment: scroll; /* ← se mueve con el texto */

  opacity: 0.1; /* ← clave para marca de agua */
  pointer-events: none;
}
.texto-seccion {
  position: relative;

}
@media (max-width: 768px) {
  .texto-seccion::before {
    background-size: 200px auto;
  }
}

/* ======================================================
   LISTAS INSTITUCIONALES
   ====================================================== */

.lista-institucional {
  padding-left: 1.2rem;      /* Separación del borde */
  margin-top: 1rem;
}

.lista-institucional li {
  margin-bottom: 0.6rem;     /* Aire entre ítems */
  line-height: 1.6;
}

/* ======================================================
   BLOQUE TARJETAS INFORMES CONTABLES
   ====================================================== */
.card-informes {
  border: none;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

/* Hover elegante */
.card-informes:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Ícono principal */
.icono-informes {
  font-size: 3.5rem;
  color: #0d6efd;
}

/* ===============================
   PLANTILLA DETALLE DE NOTICIA
   =============================== */

.noticia-detalle {
  max-width: 850px;
  padding: 2rem 1rem;
}

/* Título */
.noticia-titulo {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* Fecha */
.noticia-fecha {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Imagen */
.noticia-imagen {
  text-align: center;
  margin: 2rem 0;
}

.noticia-imagen img {
  max-height: 420px;
  object-fit: cover;
}

/* Contenido */
.noticia-contenido {
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: justify;
}

.noticia-contenido p {
  margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .noticia-titulo {
    font-size: 1.8rem;
  }
}

#galeriaNoticia {
  max-width: 900px;
  margin: 1.5rem auto 2.5rem;
}

#galeriaNoticia .carousel-inner {
  border-radius: 12px;
  overflow: hidden;
}

#galeriaNoticia img {
  max-height: 420px;
  object-fit: cover;
}

/* CAJA GENERAL DE CADA SEDE */
.sede-box {
  border: 2px solid #0d6efd; /* Azul Bootstrap */
  border-radius: 12px;
  padding: 25px;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* EFECTO SUAVE AL PASAR EL MOUSE */
.sede-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* LISTAS MÁS LIMPIAS */
.sede-box ul {
  padding-left: 18px;
}

.sede-box ul li {
  margin-bottom: 4px;
}

/* GALERÍA */
.galeria-sede {
  width: 100%;
}

/* IMÁGENES DEL CARRUSEL */
.galeria-sede img {
  border-radius: 10px;
  object-fit: cover;
}

/* RESPONSIVE: en móviles separa un poco */
@media (max-width: 767px) {
  .galeria-sede {
    margin-top: 20px;
  }
}


/* Card del personero */
.card-personero {
  --bs-card-bg: #ffffff;
  background-color: #ffffff;
  border-width: 2px;
  border-style: solid;
  border-radius: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-personero:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Imagen del candidato */
.img-personero {
  height: 200px;              /* tamaño controlado */
  width: 100%;
  object-fit: contain;        /* NO recorta la imagen */
  padding: 10px;              /* aire alrededor de la foto */
  background-color: #ffffff;  /* fondo neutro */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
/* Número Tarjetón Candidato*/
.badge {
  border-radius: 8px;
  font-weight: 600;
}
/* Colores personalizados campaña */
.border-rosado {
  border-color: #e83e8c !important;
}

.border-morado {
  border-color: #6f42c1 !important;
}

.bg-rosado {
  background-color: #e83e8c !important;
  color: #ffffff;
}

.bg-morado {
  background-color: #6f42c1 !important;
  color: #ffffff;
}

/* para que la galería se vea moderna */
.galeria-item {
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.galeria-item img {
  transition: transform 0.4s ease, filter 0.3s ease;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* Hover elegante */
.galeria-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.9);
}

@media (max-width: 576px) {
  .galeria-item img {
    height: 150px;
  }
}

/* BOTÓN GALERIA DRIVE */
.boton-galeriadrive {
  border-radius: 30px;
  padding: 12px 24px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.boton-galeriadrive:hover {
  background-color: #0d6efd;
  color: white;
  transform: translateY(-2px);
}

/* TEXTO DESCRIPTIVO */
.texto-galeriadrive {
  font-size: 0.9rem;
  color: #6c757d;
}
