/* ================== CONTACTO SUPERIOR ================== */
.contacto-top {
  background: #002b55;
  color: #ffffff;
  text-align: right;
  padding: 6px 40px;
  font-size: 0.9rem;
  font-family: 'Poppins', 'Open Sans', sans-serif;
  position: relative;
  z-index: 1100;
}
.contacto-top a {
  color: #66a3ff;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contacto-top a:hover { color: #ffffff; }
.contacto-top i { margin-right: 6px; color: #99c2ff; }

/* ================== ENCABEZADO ================== */
.encabezado-pan {
  background: linear-gradient(135deg, #001f3f 0%, #003c8f 50%, #0057b7 100%);
  color: #ffffff;
  text-align: center;
  padding: 70px 0 50px 0;
  border-bottom: 6px solid #007bff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', 'Open Sans', sans-serif;
}
.encabezado-pan::before {
  content: "";
  position: absolute;
  top: 0; left: -50%;
  width: 200%; height: 100%;
  background: rgba(255,255,255,0.1);
  transform: skewX(-20deg);
  animation: shimmer 6s infinite linear;
  pointer-events: none;
}
@keyframes shimmer {
  0% { left: -50%; }
  50% { left: 100%; }
  100% { left: 100%; }
}
.titulo-pan h1 {
  font-size: 3.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.subtitulo-pan {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 10px;
  color: #d6e4ff;
  letter-spacing: 1px;
}
.logo-pan img {
  height: 95px;
  width: auto;
  display: block;
  margin: 6px auto 0 auto;
}

/* ================== MENÚ PRINCIPAL ================== */
.menu-pan {
  background: #003c8f;
  border-bottom: 4px solid #0057b7;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-family: 'Poppins', 'Open Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 20px;
  z-index: 1200;
}
.menu-pan .menu-items {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
}
.menu-pan .menu-items li { position: relative; }
.menu-pan .menu-items li a {
  display: block;
  padding: 18px 25px;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: color 0.3s ease;
  position: relative;
}
.menu-pan .menu-items li a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 8px;
  width: 0; height: 3px;
  background: #00b4ff;
  transition: width 0.3s ease;
  transform: translateX(-50%);
}
.menu-pan .menu-items li a:hover {
  color: #00b4ff;
}
.menu-pan .menu-items li a:hover::after {
  width: 60%;
}

/* ---------- Submenú ---------- */
.submenu-pan {
  list-style: none;
  position: absolute;
  top: 100%; left: 0;
  background: #004080;
  border-radius: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease;
  pointer-events: none;
  z-index: 1300;
  min-width: 220px;
}
.submenu-pan.show {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.submenu-pan li a {
  padding: 12px 20px;
  display: block;
  color: #fff;
  font-weight: 500;
  text-transform: uppercase;
  transition: background 0.3s ease;
}
.submenu-pan li a:hover { background: #00264d; }
.submenu-toggle::after {
  content: " ▾";
  font-size: 0.8rem;
  margin-left: 5px;
  transition: transform 0.3s ease;
}
.submenu-toggle.active::after { transform: rotate(180deg); }

/* ================== BUSCADOR ================== */
.icono-buscar {
  position: absolute;
  right: 25px;
  font-size: 1.3rem;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.3s ease;
}
.icono-buscar:hover { color: #00b4ff; }
.buscador-pan {
  position: absolute;
  right: 20px; top: 100%;
  background: #002b55;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1300;
}
.buscador-pan input {
  background: #fff;
  border: none;
  outline: none;
  padding: 8px 12px;
  width: 200px;
  border-radius: 4px;
  font-size: 0.95rem;
}
.buscador-pan.activo {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ================== SECCIÓN DE NOTICIAS ================== */
.titulo-seccion {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #002b55;
  margin-bottom: 40px;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
}

/* --- Grilla de 3 columnas --- */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Tarjeta de noticia --- */
.noticia-card {
  background: #fff;
  border-radius: 12px;
  text-align: center;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 43, 85, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 360px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.noticia-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.noticia-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}
.noticia-card img:hover { transform: scale(1.03); }
.noticia-card h5 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #002b55;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.noticia-card p {
  font-family: 'Open Sans', sans-serif;
  color: #333f55;
  font-size: 0.95rem;
  text-align: justify;
  line-height: 1.6;
  margin-bottom: 10px;
}
.noticia-card .fecha {
  font-size: 0.85rem;
  color: #0066cc;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.3px;
}

/* --- Modal --- */
.modal { z-index: 2000 !important; }
.modal-backdrop { z-index: 1990 !important; }
.modal-title {
  width: 100%;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  color: #002b55;
  font-weight: 700;
}
.carousel-item img {
  border-radius: 10px;
  max-height: 420px;
  object-fit: cover;
}

/* --- Texto del modal --- */
.texto-noticia {
  color: #222;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: justify;
  text-indent: 2em;
  max-width: 850px;
  margin: 0 auto;
  padding: 20px 15px;
  white-space: pre-line;
}
.texto-noticia p {
  margin-bottom: 0.8em;
}
.modal-body .fecha {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  color: #0056b3;
  margin-top: 10px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.3px;
}

.footer-servicios .card-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.footer-servicios .card-link:hover .card {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.footer-servicios .card i {
  color: #003366; /* Azul institucional PAN */
}

.card-foto {
  display: flex;
  justify-content: center;
  margin: 40px auto;
}

.card-foto .thumbnail {
  background: #ffffff;
  border: 2px solid rgba(0, 47, 108, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 47, 108, 0.15);
  overflow: hidden;
  max-width: 700px;
  transition: all 0.3s ease;
}

.card-foto .thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 22px rgba(0, 47, 108, 0.25);
}

.card-foto img {
  width: 100%;
  height: auto;
  display: block;
}

.card-foto .caption {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(0,47,108,0.08) 0%, rgba(0,47,108,0.03) 100%);
  font-size: 0.95rem;
  font-style: italic;
  color: #2f3d4a;
  text-align: center;
}

/* ======== TÍTULOS DE SECCIÓN (estilo institucional) ======== */
.titulo-seccion {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #002b55;
  position: relative;
  margin-bottom: 2.5rem;
}

.titulo-seccion::after {
  content: "";
  display: block;
  width: 220px;
  height: 4px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, transparent, #004a99, transparent);
  border-radius: 2px;
}

/* ======== SUBTÍTULOS DE SECCIÓN ======== */
.subtitulo-seccion {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: #004a99;
  margin-bottom: 1.2rem;
  position: relative;
}

.subtitulo-seccion::after {
  content: "";
  display: block;
  width: 180px;
  height: 3px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, transparent, #007bff, transparent);
  border-radius: 2px;
  opacity: 0.8;
}

.contenido-subtitulo {
  text-align: center;
  color: #333;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
}

/* ================== SECCIÓN VIDEO (videos.html) ================== */

.video-section {
  background-color: #f8f5f0;
  padding: 80px 0;
  text-align: center;
}

.video-section h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #002b55;
  margin-bottom: 20px;
  font-size: 2rem;
  text-transform: uppercase;
}

.video-section p.descripcion {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  color: #333;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

video {
  width: 100%;
  height: auto;
  display: block;
}


/* ==========================================================
   SECCIÓN CONTACTO INSTITUCIONAL PAN
   ========================================================== */

.pan-contacto {
    margin-top: 40px;
}

/* Íconos redondos */
.pan-icon {
    width: 80px;
    height: 80px;
    background: var(--pan-azul, #003d73);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.pan-icon i {
    color: white;
    font-size: 32px;
}

/* Títulos */
.pan-contact-title {
    color: #555;
    font-weight: 600;
    font-size: 18px;
}

/* Cajitas blancas */
.pan-box {
    background: white;
    border-radius: 10px;
    padding: 18px 20px;
    border: 1px solid #e2e2e2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.pan-box p {
    margin: 0;
    color: #444;
    font-size: 15px;
}

/* ===== TÍTULO PRINCIPAL ===== */
.titulo-contacto {
    font-size: 2.3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #003366;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;
}

/* ===== TÍTULO DE LA UNIDAD ===== */
.pan-contacto-unidad {
    font-size: 1.2rem;
    font-weight: 600;
    color: #003366;
    line-height: 1.4;
}

/* ===== SUBTÍTULOS (Dirección, Teléfono, Email) ===== */
.pan-contacto-subtitulo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #005bb5;
    border-left: 4px solid #005bb5;
    padding-left: 10px;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
}

/* ===== TÍTULO PRINCIPAL DE CONTACTO ===== */
.titulo-contacto {
    font-size: 2.3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #003366;
    letter-spacing: 1px;
    font-family: 'Poppins', sans-serif;

    /* CENTRADO REAL */
    display: block;
    text-align: center;

    position: relative;
    padding-bottom: 12px;
    margin-bottom: 40px;
}

/* Línea degradada centrada */
.titulo-contacto::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;

    width: 260px;        /* ajustable */
    height: 4px;

    background: linear-gradient(
        to right,
        rgba(0, 91, 181, 0) 0%,
        rgba(0, 91, 181, 1) 50%,
        rgba(0, 91, 181, 0) 100%
    );

    border-radius: 10px;
}

/* ===== TÍTULOS DE SECCIÓN (Dirección, Teléfono, Email) ===== */
.pan-contacto h5 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #003366;       /* azul institucional */
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 0.4px;
    font-family: 'Poppins', sans-serif;
}

/* ===== TEXTO DENTRO DE LAS CAJAS ===== */
.pan-box p {
    font-size: 1rem;
    color: #333;
    line-height: 1.55rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

.pan-box {
    background: #ffffff;
    border: 1px solid rgba(0, 51, 102, 0.2);
    border-left: 4px solid #003366;   /* toque institucional que se nota */
    padding: 18px 20px;
    border-radius: 8px;
}

/* Reglas seguras para imágenes dentro de modales */
.modal-body img,
.modal-body .img-fluid {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 60vh;       /* evita que la imagen estire el modal */
  object-fit: cover;      /* recorta suavemente si la relación no coincide */
  display: block;
  border-radius: 10px;
  margin-bottom: 18px;
}

/* Asegurar tamaño medio coherente */
.modal-dialog.modal-lg {
  max-width: 800px;
}

/* Estética: encabezado azul PAN, bordes redondeados, sombra */
.modal-content {
  border-radius: 12px;
  overflow: hidden;
  border: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.modal-header {
    background-color: #ffff; /* Azul PAN */
    color: #ffffff;            /* Texto blanco */
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}
.modal-body {
  font-family: 'Poppins', sans-serif;
  color: #222;
  background: #fff;
  padding: 20px;
}
.modal-footer .btn {
  background: #002b55;
  color: #fff;
  border: none;
}

.card.obsoleto {
    opacity: 0.55;
    filter: grayscale(70%);
    cursor: not-allowed;
    transition: .3s;
}

.card.obsoleto:hover {
    opacity: 0.8;
}
