:root {
  --azul-oscuro: #004C97;
  --azul-claro: #0098DA;
  --gradient: linear-gradient(45deg,#004C97,#0098DA);
  --hover-gradient: linear-gradient(90deg,#0098DA,#005EB7);
}

body, * {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin:0; padding:0;
}

/* ================= TOP BAR ================= */
.top-bar {
  background: var(--gradient);
  color:white;
  font-size:14px;
  padding:10px 0;
}
.top-socials a i { color:white; font-size:18px; }

/* ================= NAVBAR ================= */
.main-navbar {
  background: linear-gradient(45deg,#003974,#005eb7);
  padding: 8px 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.logo-muni {
  height: 75px;
  transition: .3s ease;
}

.logo-muni:hover { 
  transform: scale(1.05); 
}

.nav-link {
  font-size:17px;
  margin:0 14px;
  position:relative;
  font-weight:500;
  color:white !important;
  transition:0.3s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,0.08);
  border-radius:6px;
}

.nav-link::after {
  content:"";
  position:absolute;
  bottom:-4px;
  left:0;
  width:0;
  height:2px;
  background:white;
  opacity:0;
  transition:.25s ease;
}

.nav-link:hover::after { 
  width:100%;
  opacity:1;
}

/* ================= DROPDOWNS ================= */
.dropdown-menu {
  border-radius:10px;
  padding:6px 0;
  min-width:230px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  box-shadow:0 8px 20px rgba(0,0,0,0.25);
}

.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown > .dropdown-menu.show {
  display:block;
}

.dropdown-item:hover {
  background: var(--hover-gradient);
  color:white;
  border-radius:6px;
}

.dropdown-submenu { position:relative; }
.dropdown-submenu .dropdown-menu {
  left:100%; top:0; display:none;
}
.dropdown-submenu:hover > .dropdown-menu {
  display:block;
}

/* ================= HERO ================= */
.hero {
  width:100%;
  position:relative;
}

.hero-slide {
  width:100%;
  height:75vh;
  min-height:450px;
  background-size:cover;
  background-position:center;
  animation: kenburns 20s infinite alternate;
}

.hero-slide::after {
  content:"";
  position:absolute; inset:0;
  background: rgba(0,0,0,0.45);
}

@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* ================= SECCIÓN NOTICIAS ================= */
/* Contenedor de las columnas */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centra las tarjetas */
  gap: 20px;
}

/* 3 tarjetas por fila en escritorio */
.col-md-4 {
  flex: 0 1 300px;      /* ← Tamaño fijo sin estirarse */
  max-width: 300px;     /* ← No crecer más */
}

/* Tablet */
@media (max-width: 992px) {
  .col-md-4 {
    flex: 0 1 45%;
    max-width: 45%;
  }
}

/* Móvil */
@media (max-width: 576px) {
  .col-md-4 {
    flex: 0 1 100%;
    max-width: 100%;
  }
}

/* Tarjeta */
.card-noticia {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 3px 8px rgba(0,0,0,0.1);
  transition: 0.3s ease;
}

/* Hover */
.card-noticia:hover {
  transform: translateY(-4px);
  box-shadow: 0px 6px 14px rgba(0,0,0,0.18);
}

/* Imagen: más pequeña */
.card-noticia img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* Botón */
.btn-muni {
  display: inline-block;
  background: linear-gradient(45deg, #005bbb, #00aaff);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-top: 10px;
}

.btn-muni:hover {
  background: linear-gradient(45deg, #004999, #0090dd);
}

/* Enlace sin decoración */
.card-link {
  text-decoration: none;
}

/* ================= FOOTERS (todos) ================= */
.footer {
  background: linear-gradient(45deg, #003974, #005eb7);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer .row {
    display: flex;
    justify-content: center;   /* Centra horizontalmente todas las columnas */
    text-align: center;        /* Centra TODO el contenido dentro */
}

.footer .col-md-3 {
    display: flex;
    flex-direction: column;
    align-items: center;   /* Centra contenido vertical */
    text-align: center;
}

.footer-box h5 { font-size: 20px; font-weight: 600; margin-bottom: 15px; }
.footer-text { font-size: 15px; margin-bottom: 8px; opacity: 0.9; }

.footer-socials a {
  color: white;
  font-size: 25px;
  margin-right: 15px;
  transition: 0.3s;
}

.footer-socials a:hover {
  color: #00c8ff;
  transform: scale(1.15);
}

.footer-line {
  border-color: rgba(255,255,255,0.3);
  margin: 25px 0;
}

.footer-copy {
  font-size: 14px;
  opacity: 0.8;
}

.footer-bottom {
  text-align:center;
  padding:15px;
  background:#0c0c0c;
  font-size:14px;
  color:#aaa;
}

/* ================= LIBRO DE RECLAMACIONES ================= */
.footer-libro {
    text-align: center;
    padding: 25px 0 10px;
}

.footer-libro img {
    width: 60px;
    display: block;
    margin: 0 auto 10px;
    opacity: 0.9;
    transition: 0.3s ease;
}

.footer-libro img:hover {
    opacity: 1;
    transform: scale(1.06);
}

.footer-libro a {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.footer-libro a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-box {
    margin-bottom: 25px;
    text-align: center;
  }
}

/* ================== RESPONSIVE GENERAL ================== */
@media(max-width:991px){
  .logo-muni { height:70px; }

  /* Permitir que Bootstrap maneje display con clase .show */
  .dropdown-menu { display:none; }
  .dropdown-menu.show { display:block !important; }

  /* Submenús anidados */
  .dropdown-submenu .dropdown-menu {
    position:static !important;
    left:0 !important;
    margin-top:4px !important;
    box-shadow:none !important;
    background:rgba(0,0,0,0.15) !important;
    border:none !important;
  }
}

/* ============================================================
   👇👇👇  ESTILOS IMPLEMENTADOS PARA LAS TARJETAS DE DOCUMENTOS 
   (sin borrar nada de lo anterior)
=============================================================== */

/* CONTENEDOR DE TARJETAS */
.doc-container-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;        /* 🔵 Centrado */
    gap: 25px;
    padding: 20px 0;
}

/* ENLACE */
.doc-link {
    text-decoration: none;
    display: inline-block !important;   /* 🔵 Evita el bloque gigante */
    width: auto !important;
}

/* TARJETA */
.doc-card {
    width: 260px !important;           /* 🔵 Tamaño corregido */
    padding: 18px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-card:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Número */
.doc-numero {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

/* Título */
.doc-title {
    font-size: 15px;
    font-weight: 500;
    color: #555;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .doc-card { width: 220px !important; }
}
@media (max-width: 480px) {
    .doc-card { width: 90% !important; }
}

/* ================================
   SEPARACIÓN ENTRE SLIDER Y CUERPO
================================ */
.curve-separator {
    width: 100%;
    height: 60px;          /* Separación visual */
    background: #ffffff;
    margin-top: -3px;
}

/* ================================
   HERO – TÍTULO NUESTROS SERVICIOS
================================ */
.hero-servicios {
    text-align: center;
    padding: 60px 20px 40px;
    background: #ffffff;
}

.hero-servicios h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #1b3c7a;
    margin-bottom: 10px;
}

.hero-servicios p {
    font-size: 1.2rem;
    color: #444;
}

/* =======================================
   PALETA GLOBAL
======================================= */
:root {
    --azul-oscuro: #004C97;
    --azul-claro: #0098DA;
    --gradient: linear-gradient(45deg, #004C97, #0098DA);
    --hover-gradient: linear-gradient(90deg, #0098DA, #005EB7);
    --gris-fondo: #f5f7fb;
}

/* =======================================
   SEPARADOR CURVO
======================================= */
.curve-separator {
    width: 100%;
    height: 60px;
    background: var(--gris-fondo);
    margin-top: -3px;
}

/* =======================================
   HERO SERVICIOS
======================================= */
.hero-servicios {
    text-align: center;
    padding: 70px 20px 40px;
    background: var(--gris-fondo);
}

.hero-servicios h1 {
    font-size: 2.7rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-servicios p {
    font-size: 1.25rem;
    color: #2e2e2e;
    max-width: 700px;
    margin: auto;
}

/* =======================================
   CUERPO – FONDO Y GRID
======================================= */
.servicios-section {
    padding: 60px 20px 100px;
    background: var(--gris-fondo);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}

/* =======================================
   TARJETAS
======================================= */
.serv-card {
    background: #ffffff;
    padding: 35px 20px;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 1px solid #dee3ee;
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
    transition: all .25s ease;
    position: relative;
}

/* Borde superior con color institucional */
.serv-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: var(--gradient);
    border-radius: 14px 14px 0 0;
}

/* EFECTO HOVER */
.serv-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: var(--azul-claro);
}

/* =======================================
   ICONO
======================================= */
.serv-icon i {
    font-size: 3.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 18px;
    transition: 0.3s ease;
}

.serv-card:hover .serv-icon i {
    color: var(--azul-claro);
    transform: scale(1.15);
}

/* =======================================
   TITULO
======================================= */
.serv-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1b1b1b;
    margin-top: 5px;
}

/* =======================================
   RESPONSIVE
======================================= */
@media (max-width: 768px) {
    .hero-servicios h1 {
        font-size: 2.2rem;
    }
    .serv-card {
        padding: 30px 18px;
    }
}

/* ==========================
   MODAL SUPERPUESTO
========================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
}

.modal-box {
    width: 90%;
    max-width: 420px;
    background: white;
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    animation: fadeIn .3s ease;
    border-top: 6px solid var(--azul-claro);
}

.modal-box h2 {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--azul-oscuro);
}

.modal-box p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 25px;
}

/* OPCIONES */
.modal-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 25px;
}

.modal-option {
    text-decoration: none;
    background: var(--gradient);
    color: white;
    width: 48%;
    padding: 20px 10px;
    border-radius: 12px;
    text-align: center;
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-option i {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.modal-option:hover {
    transform: translateY(-4px);
    background: var(--hover-gradient);
}

/* BOTÓN CERRAR */
.modal-close {
    background: #333;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
}

.modal-close:hover {
    background: #000;
}

/* Animación */
@keyframes fadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal más grande */
.modal-large {
    max-width: 800px;
    padding: 25px;
}

/* Tabla */
.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
}

.seg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.seg-table thead {
    background: var(--gradient);
    color: white;
}

.seg-table th, .seg-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.seg-table tr:nth-child(even) {
    background: #f7f9fc;
}

/* Botón descargar */
.btn-descargar {
    display: inline-block;
    padding: 6px 12px;
    background: var(--azul-claro);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: .25s;
    font-weight: 600;
}

.btn-descargar:hover {
    background: var(--azul-oscuro);
}

/* ================================
   ESTILOS PARA LA PÁGINA HISTORIA
   No afecta al resto del sitio
================================ */

/* Contenedor principal */
.historia-container {
    max-width: 1200px;            /* AUMENTADO – antes 900px */
    margin: 140px auto 80px auto;
    padding: 50px 60px;           /* AUMENTADO – más cuerpo */
    background: #ffffff;
    border-radius: 18px;          /* Más elegante */
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    line-height: 1.85;
    font-size: 19px;              /* Texto ligeramente más grande */
}

/* Título principal */
.historia-title {
    text-align: center;
    font-size: 60px;     /* Estilo portada */
    font-weight: 900;
    color: #003d7a;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

/* Línea decorativa del título */
.historia-line {
    width: 120px;
    height: 4px;
    background: linear-gradient(45deg, #004C97, #0098DA);
    margin: 0 auto 35px auto;
    border-radius: 4px;
}

/* Subtítulos */
.historia-subtitle {
    font-size: 28px;
    color: #004C97;
    margin-top: 50px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 18px;
    font-weight: 700;
}

/* Línea decorativa en subtítulos */
.historia-subtitle::before {
    content: "";
    width: 8px;
    height: 100%;
    background: linear-gradient(180deg, #004C97, #0098DA);
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 4px;
}

/* Párrafos */
.historia-container p {
    text-align: justify;
    margin-bottom: 20px;
    color: #333;
}

/* Pequeña separación para los bloques especiales */
.historia-container p + h2 {
    margin-top: 55px;
}

/* Responsive */
@media (max-width: 768px) {
    .historia-container {
        margin: 120px 20px 60px 20px;
        padding: 25px;
    }

    .historia-title {
        font-size: 32px;
    }

    .historia-subtitle {
        font-size: 24px;
    }
}

/* ======== CONTENEDOR TIPO PERGAMINO ======== */
.pergamino-box {
    background: url('./img/pergamino.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 80px 70px;
    min-height: 1200px;
    margin: 0 auto;
    color: #3a2e1f;
    font-family: "Georgia", serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
}

/* Fallback si la imagen no carga */
.pergamino-box:not([style]) {
    background-image: linear-gradient(180deg, #f7f3e9, #f0eadb);
}

/* ======== TÍTULOS DENTRO DEL PERGAMINO ======== */
.pergamino-box .historia-title {
    text-align: center;
    font-size: 55px;
    font-weight: 900;
    color: #4b2e12;
    margin-bottom: 15px;
    text-shadow: 1px 1px 1px #ffffff;
}

.pergamino-box .historia-subtitle {
    font-size: 32px;
    font-weight: 800;
    margin-top: 50px;
    margin-bottom: 15px;
    color: #5f3a14;
}

/* ======== PÁRRAFOS ======== */
.pergamino-box p {
    font-size: 20px;
    text-align: justify;
    color: #3b2b1a;
}