/**
 * @file
 * Subtheme specific CSS.
 */

/*===============================================================
  PONE SANGRIA ENTRE LA DESCRIPCION DE LOS DOCUMENTOS ENCONTRADOS
================================================================ */

/* Cambiar fondo solo a la vista buscador_principal */
.view-id-buscador_principal {
  background-color: #f8fafc !important; 
  color: #00205B !important;
  padding-left:5px;
}

/*Cambiar color de enlaces solo dentro de esta vista */
.view-id-buscador_principal a {
  
  color: #024C87 !important;
  font-size: 20px;
  font-weight:700 !important;
  line-height: 1.0;
  text-align: Justify;
}

.view-id-buscador_principal .views-field-title a::before {
    
    color: #024C87 !important;
    margin-right: 8px !important;
    padding: 0px 0px 5px 5px;
    font-size: 0.85em !important;
}

.view-id-buscador_principal p {
 color:#000000 !important;
 font-size:17px; 
 padding: 0px  15px 5px 25px ;
 text-align:Justify;
}


.sidebar {
  background-color: #fffff !important;
  border-color: #003366;
}

.sidebar .block {
    background-color: transparent !important;
    border-color: transparent !important;
}


/* =========================================
   DISEÑO DEL TOP HEADER (Buscador)
   ========================================= */
.region-top-header .form-item-search-api-fulltext input {
  border-radius: 50rem !important;
  padding-left: 20px;
  border: 1px solid #ccc;
}

.region-top-header .form-item-search-api-fulltext label {
  display: none;
}

.region-top-header {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

/* =========================================
   DISEÑO DEL MENÚ PRINCIPAL (NAVBAR)
   ========================================= */
.navbar-nav .nav-link {
  color: #051c7a !important;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  max-width: 140px;
  white-space: normal;
  text-align: left;
  padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #020d3f !important;
}

.navbar-nav .dropdown-toggle::after {
  vertical-align: middle;
  margin-left: 0.4em;
}

.navbar {
  align-items: center;
}

/* =========================================
   AJUSTE DE TAMAÑO DEL LOGO
   ========================================= */
.navbar-brand img {
  max-height: 75px;
  width: auto;
  object-fit: contain;
}

.navbar-brand {
  margin-right: 2rem;
}


/* =========================================
   FORZAR UN ANCHO MÁXIMO DEL BANNER (OPCIONAL)
   ========================================= */

/* Solo se aplica en pantallas grandes (desktop) */
@media (min-width: 992px) {
  .site-content .carousel-item img {
    max-width: 80% !important; /* El banner solo ocupará el 80% del ancho de su columna */
    margin: 0 auto; /* Centrar la imagen dentro del 80% */
  }
}

/*=======================================
  ESTILO DEL MENU DE DESTACADOS
  ====================================== */


/* 1. Contenedor Principal (.widget-destacados) */
.widget-destacados {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px -5px rgba(13, 49, 97, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.widget-destacados:hover {
    box-shadow: 0 14px 30px -5px rgba(13, 49, 97, 0.14) !important;
}

/* 2. Encabezado (.widget-header) */
.widget-destacados .widget-header {
    background: linear-gradient(135deg, #2f6195 0%, #044885 100%) !important;
    color: #ffffff !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    border-bottom: 3px solid #a5d2f2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* 3. Lista de Elementos (.widget-lista) */
.widget-destacados .widget-lista {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.widget-destacados .widget-lista li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.widget-destacados .widget-lista li:last-child {
    border-bottom: none !important;
}

/* 4. Fila del Ícono y Texto (.widget-icono) */
.widget-destacados .widget-icono {
    display: flex !important;
    align-items: center !important;
    padding: 10px 18px !important;
    gap: 14px !important;
    transition: all 0.25s ease !important;
    border-left: 4px solid transparent !important;
    background-color: transparent !important;
}

.widget-destacados .widget-icono:hover {
    background-color: #f8fafc !important;
    border-left-color: #2563eb !important;
    padding-left: 22px !important;
}

/* 5. Ajuste y Corrección de Imágenes (Anula el width="115" del HTML) */
.widget-destacados .widget-icono img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    transition: transform 0.25s ease !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06)) !important;
}

.widget-destacados .widget-icono:hover img {
    transform: scale(1.1) !important;
}

/* 6. Enlaces y Texto (Quita el subrayado molesto) */
.widget-destacados .widget-icono a {
    text-decoration: none !important;
    color: #0d3161 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    display: flex !important;
    align-items: center !important;
    transition: color 0.25s ease !important;
}

.widget-destacados .widget-icono a:hover {
    text-decoration: none !important;
    color: #1e40af !important;
}

.widget-destacados .widget-titulo {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #0d3161 !important;
    transition: color 0.25s ease !important;
}

.widget-destacados .widget-icono:hover .widget-titulo {
    color: #1e40af !important;
}

.widget-destacados .widget-lista p,
.widget-destacados .widget-lista li > p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.widget-destacados .widget-icono:not(:has(a)) {
    display: none !important;
}

.widget-destacados .widget-icono:empty {
    display: none !important;
}



/* =========================================
   DISEÑO DEL FOOTER (PIE DE PÁGINA)
   ========================================= */
.site-footer {
  background-color: #EEF2FB !important;
  color: #003366 !important;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 2px solid #d0e4f5;
}

.site-footer a {
  color: #004080;
  text-decoration: none;
}

.site-footer a:hover {
  color: #001f40;
  text-decoration: underline;
}

.site-footer ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

.site-footer ul li {
  margin-bottom: 8px;
 
}

.site-footer li a{
  padding: 0.1em 2px 0.1em 20px !important;
}

/* Forzar el color azul oscuro en todos los textos, párrafos y títulos del footer */
.site-footer a,
.site-footer p,
.site-footer div,
.site-footer span,
.site-footer strong,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer h5 {
  color: #003366 !important;
}

/* ===================================================
   VIÑETAS EXCLUSIVAS PARA: Footer - Transparencia
   =================================================== */

 #block-nuevo-comienzo-footertransparencia ul,
.block-nuevo-comienzo-footertransparencia ul {
    list-style-type: disc !important;
    padding-left: 20px !important;
}

#block-nuevo-comienzo-footertransparencia ul li,
.block-nuevo-comienzo-footertransparencia ul li {
    display: list-item !important;
    margin-bottom: 2px !important;
}


 /*===============================================
  * MODIFICA EL COLOR DEL ICONO DE LOGIN Y LOGOUT
  =============================================== */

.icono-personalizado {
    color: #f17524 !important; /* Cambia este código HEX por el color que desees */
    font-size: 0 !important; /* Oculta el texto "Log out" */
    text-decoration: none; /* Quita el subrayado si lo tiene */
}

/* Le devuelve el tamaño exclusivamente al icono */
.icono-personalizado::before,
.icono-personalizado svg {
    font-size: 25px !important; /* Tamaño del icono */
}


/*=========================================
 *DISEÑOS PERSONALIZADOS DE LAS VISTAS
===========================================*/


/*=====================================
 * VISTA PROGRAMAS SOCIALES
 * ====================================*/ 
 .js-views-accordion-group-header {
    display: flex !important;
    justify-content: space-between !important; /* Manda el texto a la izq y el número a la der */
    align-items: center !important; /* Centra verticalmente */
    background-color: #eef2fb !important; /* Fondo azul claro */
    color: #000066 !important; /* Texto azul oscuro */
    border: 1px solid #cdd6e8 !important; /* Borde sutil */
    border-radius: 6px !important; /* Bordes redondeados */
    padding: 10px 15px !important;
    margin-bottom: 5px !important;
}

/* 2. Ajuste del icono por defecto de jQuery UI (para que no estorbe al Flexbox) */
.js-views-accordion-group-header .ui-accordion-header-icon {
    position: static !important;
    margin-right: 10px !important;
    display: inline-block;
}

/* 3. Asegurar que el texto ocupe el espacio disponible */
.texto-dependencia {
    flex-grow: 1; /* Permite que el texto empuje al círculo hacia el extremo derecho */
    font-size: 15px !important;
}

/* 4. El círculo azul oscuro con el número */
.contador-programas {
    background-color: #000066 !important; /* Fondo azul oscuro */
    color: #ffffff !important; /* Número blanco */
    border-radius: 50px !important; /* Redondea hasta crear un círculo/óvalo */
    padding: 3px 10px !important; /* Espacio alrededor del número */
    font-size: 13px !important;
    font-weight: bold !important;
    min-width: 30px !important; /* Evita que se deforme si hay 1 o 2 dígitos */
    text-align: center !important;
    line-height: 1.2 !important;
}


/* ==========================================================================
   ESTILOS INSTITUCIONALES PARA MODAL Y WEBFORM (DRUPAL 11)
   ========================================================================== */

/* 1. Fondo Oscuro Traslúcido con Desenfoque de Pantalla */
.ui-widget-overlay {
  background: rgba(0, 3, 6, 0.50) !important;
  backdrop-filter: blur(1px) !important;
  opacity: 1 !important;
  z-index: 1000 !important;
}

/* 2. Ancho, Centrado Perfecto y Bordes Redondeados de la Ventana */
.ui-dialog.ui-widget-content,
.modal-institucional.ui-dialog {
  width: 850px !important;
  max-width: 92vw !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 32, 91, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  padding: 0 !important;
  z-index: 1001 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

/* 3. Encabezado Azul Marino Institucional (#00205B) */
.ui-dialog .ui-dialog-titlebar {
  background: linear-gradient(135deg, #00205B 0%, #024C87 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-bottom: 4px solid #rgb(2, 77, 136) !important;
  padding: 18px 28px !important;
  border-radius: 20px 20px 0 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.ui-dialog .ui-dialog-title {
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  letter-spacing: -0.01em !important;
  float: none !important;
  margin: 0 !important;
  width: auto !important;
}

/* Botón de Cierre (X) Elegante */
.ui-dialog .ui-dialog-titlebar-close {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  position: static !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ui-dialog .ui-dialog-titlebar-close:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.08);
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon {
  background: none !important;
  text-indent: 0 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: bold !important;
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon:before {
  content: "X" !important;
  color: #ffffff;
  display: block;
  line-height: 1;
}

/* 4. Cuerpo Interno de la Modal */
.ui-dialog .ui-dialog-content {	
  padding: 32px 36px !important;
  background: #f8fafc !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
}

/* 5. Preguntas, Radio Buttons e Inputs del Webform */
.ui-dialog .form-item label {
  color: #00205B !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  margin-bottom: 10px !important;
  display: block !important;
}

.ui-dialog .form-text,
.ui-dialog .form-select,
.ui-dialog .form-textarea {
  width: 100% !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 1rem !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

.ui-dialog .form-text:focus,
.ui-dialog .form-select:focus {
  border-color: #00205B !important;
  box-shadow: 0 0 0 3px rgba(0, 32, 91, 0.15) !important;
  outline: none !important;
}

/* Tarjetas para Opciones de Selección Multiples */
.ui-dialog .form-type-radio,
.ui-dialog .form-type-checkbox {
  background: #ffffff !important;
  padding: 12px 18px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-bottom: 8px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.ui-dialog .form-type-radio:hover,
.ui-dialog .form-type-checkbox:hover {
  border-color: #024C87 !important;
  background-color: #f1f5f9 !important;
}

.ui-dialog input[type="radio"],
.ui-dialog input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  accent-color: #00205B !important;
  cursor: pointer !important;
}

/* 6. Botones de Envío / Navegación */
.ui-dialog .form-actions {
  margin-top: 28px !important;
  padding-top: 20px !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

.ui-dialog .webform-button--submit,
.ui-dialog .webform-button--next,
.ui-dialog input[type="submit"] {
  background: linear-gradient(135deg, #00205B 0%, #024C87 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 32px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 32, 91, 0.25) !important;
  transition: all 0.25s ease !important;
}

.ui-dialog .webform-button--submit:hover,
.ui-dialog .webform-button--next:hover,
.ui-dialog input[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 32, 91, 0.35) !important;
}

/*=======================================
 VISTA DE BOTONES DE MONITOREO Y EVALUACION
 ========================================*/

.custom-dashboard {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.custom-dashboard .card {
  width: 360px;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #f0f0f0;
}

.custom-dashboard .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* HEADER */
.custom-dashboard .card-header {
  background: #1e3a8a; /* Azul institucional */
  color: #ffffff;
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.custom-dashboard .card-header .icon-wrapper {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-dashboard .card-header img.icon-svg {
  width: 24px;
  height: 24px;
}

.custom-dashboard .card-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.custom-dashboard .card-header p {
  margin: 3px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* BODY */
.custom-dashboard .card-body {
  padding: 30px 20px;
}

.custom-dashboard .stat {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.custom-dashboard .icon-wrapper-body {
  width: 64px;
  height: 64px;
  background: #eef2ff; /* Azul claro suave */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-dashboard img.icon-svg-body {
  width: 32px;
  height: 32px;
}

.custom-dashboard .stat p {
  margin: 0;
  font-size: 13px;
  color: #555555;
  font-weight: 500;
}

.custom-dashboard .stat h1 {
  margin: 2px 0 0;
  font-size: 38px;
  color: #1e3a8a;
  font-weight: 800;
  line-height: 1;
}

/* FOOTER */
.custom-dashboard .card-footer {
  padding: 18px 22px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #ffffff;
  transition: background 0.2s ease;
}

.custom-dashboard .card-footer:hover {
  background: #f8fafc;
}

.custom-dashboard .card-footer strong {
  font-size: 13px;
  color: #1e3a8a;
  display: block;
  font-weight: 700;
}

.custom-dashboard .card-footer p {
  margin: 4px 0 0;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
}

.custom-dashboard .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}

/* IFRAME VISOR */
.interfaz-container {
  margin-top: 25px;
}

.iframe-box {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}

.iframe-box iframe {
  border: none;
  display: block;
  width: 100%;
  height: 750px;
}

/******************************
====================================================
ESTILO DE LA VISTA CUANDO SU FORMATO SEA EN TABLAS
====================================================
 */

/* Estilos para embellecer la tabla renderizada por AJAX */
#visor-dashboard table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

/* Cabecera de la tabla */
#visor-dashboard th {
  background: #1e3a8a; /* Mismo azul de las tarjetas */
  color: #ffffff;
  padding: 14px 16px;
  font-size: 13px;
  text-align: left;
  font-weight: 600;
}

/* Celdas de la tabla */
#visor-dashboard td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  color: #333333;
}

/* Enlaces dentro de la tabla */
#visor-dashboard td a {
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 600;
}

#visor-dashboard td a:hover {
  text-decoration: underline;
}

/* Efecto hover en las filas */
#visor-dashboard tr:hover td {
  background: #f8fafc;
}

/* Botón de descarga dentro de la tabla */
#visor-dashboard td .btn-descargar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #1e3a8a; /* Azul institucional */
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}

#visor-dashboard td .btn-descargar:hover {
  background-color: #1d4ed8; /* Azul un poco más claro al pasar el mouse */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.25);
}

#visor-dashboard td .btn-descargar svg {
  stroke: #ffffff;
}




