/* Reset básico */
body, form, table, caption, tr, tr, td, ul, ol, li, dl, img, button, p, h1, h2, h3, h4, h5, h6, h7, dl, dt, dd, object, iframe, dl, dt, dd, legend, fieldset { 
  margin: 0; 
  padding: 0; 
  outline: 0; 
  
}


body { 
  font-size: 95%;
}
img { 
  border: 0; 
}

/* Menú principal - ancho completo */
/* CSS para el menú móvil usando solo CSS (sin JavaScript) */

/* Contenedor principal del menú */
#cssmenu {
  width: 100%;
  background-color: #004b99;
  position: relative;
  z-index: 1000;
}

/* Al expandirse, el menú se posicionará a la derecha */
#cssmenu > ul {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 100%;
  width: 33.33%; /* Un tercio de la pantalla por defecto */
  max-width: 400px;
  background-color: #004b99;
  box-shadow: -2px 2px 5px rgba(0,0,0,0.2);
}

/* Ajuste para móviles */
@media screen and (max-width: 768px) {
  #cssmenu > ul {
    width: 66.66%; /* Dos tercios en móvil */
  }
}

#cssmenu > ul > li {
  position: relative;
  flex-grow: 1;
}

#cssmenu > ul > li > a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 15px 20px;
  text-align: center;
  transition: background-color 0.3s ease;
}

#cssmenu > ul > li > a:hover {
  background-color: #0a96c9;
}

/* Ocultar checkbox del menú */
#menu-toggle {
  display: none;
}

/* Label para el checkbox (botón hamburguesa) */
.menu-toggle-label {
  display: none; /* Oculto en desktop */
  background: #004b99;
  color: white;
  padding: 15px;
  cursor: pointer;
  text-align: right;
  font-size: 1.25rem;
}

/* Totalmente invisible - aplicado a todos los checkboxes de submenu */
.submenu-toggle {
  display: none !important;
  position: absolute !important;
  opacity: 0 !important;
  left: -9999px !important;
  pointer-events: none !important;
}

/* Estilos para todas las pantallas - menú siempre oculto y vertical */
/* Mostrar el botón hamburguesa */
.menu-toggle-label {
  display: block;
  background: #004b99;
  color: white;
  padding: 15px;
  cursor: pointer;
  text-align: right;
  font-size: 1.25rem;
}

/* Ocultar el menú por defecto */
#cssmenu > ul {
  display: none;
  flex-direction: column;
}

/* Mostrar el menú cuando el checkbox está marcado */
#menu-toggle:checked ~ ul {
  display: flex;
}

/* Cambios para que cada item ocupe todo el ancho */
#cssmenu > ul > li {
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Alinear a la izquierda */
#cssmenu > ul > li > a {
  text-align: left;
  width: calc(100% - 50px); /* Hacer espacio para el botón toggle */
}

/* Modificar submenús */
#cssmenu .has-sub > ul {
  position: static;
  width: 100%;
  display: none;
  box-shadow: none;
  background-color: #003b79;
}

/* Etiqueta para el toggle del submenú */
.submenu-toggle-label {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.submenu-toggle-label::after {
  content: '+';
  font-size: 1.2rem;
  color: white;
}

/* Cambiar el signo cuando está abierto */
.submenu-toggle:checked ~ .submenu-toggle-label::after {
  content: '-';
}

/* Mostrar submenú cuando el checkbox está marcado */
.submenu-toggle:checked ~ ul {
  display: block !important;
}

/* Estilos para los items del submenú */
#cssmenu .has-sub > ul > li > a {
  color: white;
  padding-left: 30px;
}

/* Estilos base para todos los ul */
#cssmenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

* Solución completa para el menú y el icono */

/* Restablecer completamente el aspecto del icono de menú */
.menu-toggle-label {
  background: #004b99;
  color: #fff;
  padding: 15px;
  cursor: pointer;
  text-align: right;
  font-size: 1.25rem;
}

/* Eliminar todos los pseudo-elementos existentes para evitar duplicados */
.menu-toggle-label::before, 
.menu-toggle-label::after {
  display: none !important;
  content: none !important;
}


/* Establecer estilo base del label */
.menu-toggle-label {
  position: relative;
}
/* Añadir iconos con alta especificidad para sobreescribir cualquier otro estilo */
#menu-toggle:not(:checked) + .menu-toggle-label:after {
  content: '☰' !important; 
  display: inline !important;
  
}

#menu-toggle:checked + .menu-toggle-label:after {
  content: '✕' !important;
  display: inline !important;
  transform: rotate(180deg) !important;
}


/* Ajustes para PowerBI que no afectan al límite del header */
.powerbi-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.powerbi-container iframe {
  width: 100%;
  min-height: 400px;
  border: none;
}

/* Indicador de scroll para PowerBI */
.powerbi-container::after {
  content: "⟷ Desliza para ver todo el contenido";
  display: block;
  text-align: center;
  padding: 5px;
  background-color: #f0f8ff;
  color: #004b99;
  font-size: 0.8rem;
  border-radius: 3px;
  margin-top: 5px;
}

/* Ajustes para móviles */
@media screen and (max-width: 768px) {
  .powerbi-container {
    transform-origin: left top;
    transform: scale(0.9);
    margin-left: -5%;
    margin-right: -5%;
  }
  
  /* Ajustar contenedores */
  .boxCuerpo, .boxTitulo, .wrapper, .wrapperCabecera {
    width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Menú a ancho completo en móvil */
  #cssmenu > ul {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@keyframes etherealAnimation {
  0% { background-position: 50% 100%; }  /* Empieza desde abajo */
  50% { background-position: 50% 50%; }  /* Se mueve a la mitad */
  100% { background-position: 50% 0%; }  /* Llega arriba */
}


.header-top {
  display: flex;
  align-items: center;
  justify-content: center; /* Centra todo el contenido */
  background: linear-gradient(to top,  
    rgba(0, 30, 60, 1) 0%,     
    rgba(0, 50, 100, 0.95) 20%,  
    rgba(0, 75, 153, 0.9) 40%,  
    rgba(10, 96, 180, 0.85) 60%,  
    rgba(20, 120, 200, 0.8) 80%,  
    rgba(25, 140, 220, 0.75) 100%);
  background-size: 250% 250%;
  animation: etherealAnimation 10s infinite alternate ease-in-out;
  padding: 20px;
  color: white;
  overflow: hidden;
  position: relative;
}

.header-top .logo {
  position: absolute;
  left: 20px; /* Fija el logo a la izquierda */
  top: 50%;
  transform: translateY(-50%);
}

.header-top h1 {
  font-size: 2rem;
  text-align: center;
  margin: 0 auto; /* Asegura el centrado */
  flex-grow: 1; /* Ocupa el máximo espacio disponible */
}

/* Ajustes para móvil */
@media screen and (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }

  .header-top .logo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-bottom: 10px;
  }

  .header-top h1 {
    font-size: 1.5rem;
    text-align: center;
    width: 100%;
  }
}





.container {
  display: flex;
  align-items: stretch;
  margin-bottom: 20px;
}
.text-box {
  background-color: #e6f2ff;
  padding: 20px;
  flex: 1;
  border-radius: 5px;
}
.image-box {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}
.image-box img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}
.text-box ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.text-box li {
  margin-bottom: 10px;
}
.text-box a {
  text-decoration: none;
  color: #0066cc;
}
.text-box a:hover {
  text-decoration: underline;
}


/* Ambos modos de pantalla usan el mismo comportamiento */
/* Al eliminar las media queries, el comportamiento es uniforme */


/* CONTENEDOR PRINCIPAL que limita el ancho del contenido */
.contenido-principal {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 15px;
}

/* CSS GRID portada - dentro del contenedor limitado */
.wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 10px;
  background-color: #f8f8f8;
  color: #FFFFFF;
  justify-content: center;
    /* Para hacer el contenedor más estrecho */
    width: 75%; 
            /* Ajusta este valor según necesites max-width: 1100px;  */
    margin-left: auto;        /* Centra el contenedor */
    margin-right: auto;       /* Centra el contenedor */
}

/* La cabecera también tendrá ancho completo */
.wrapperCabecera {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
  background-color: #f8f8f8;
  color: #FFFFFF;
  justify-content: center;
  margin-bottom: 20px;
   /* Para hacer el contenedor más estrecho */
   width: 75%; 
         /* Ajusta este valor según necesites max-width: 1100px;   */
   margin-left: auto;        /* Centra el contenedor */
   margin-right: auto;       /* Centra el contenedor */
}

.boxcabecera {
  background-color: #004b99;
  color: #FFFFFF;
  border-radius: 5px;
  padding: 20px;
  font-size: 200%;
  opacity: 1;
  font-weight: bold;
}

.boxTitulo {
  background-color: #FFFFFF;
  color: #828282;
  border-radius: 5px;
  padding: 20px;
  font-size: 150%;
  opacity: 1;
  transition: 0.4s;
  font-weight: bold;
  width: 75%; 
  /* Para hacer el contenedor más estrecho */
         /* Ajusta este valor según necesites  max-width: 1000px;  */
  margin-left: auto;        /* Centra el contenedor */
  margin-right: auto;       /* Centra el contenedor */;
}

.boxCuerpo {
  background-color: #dbe9f4;
  color: #000000;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 110%;
  opacity: 1;
  transition: 0.4s;
  text-align: left;
  /* Bordes y sombra suave */
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  /* Margin para separación */
  margin-bottom: 15px;
  /* Para hacer el contenedor más estrecho */
  width: 75%; 
         /* Ajusta este valor según necesites  max-width: 1000px;  */
  margin-left: auto;        /* Centra el contenedor */
  margin-right: auto;       /* Centra el contenedor */
}

/* Estilos para enlaces dentro de boxCuerpo */
.boxCuerpo a {
  color: #000000;
  text-decoration: none;
}

.boxCuerpo a:hover {
  color: #000080;
  text-decoration: underline;
}

.divLink {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.table {
  display: flex;
}

.column {
  margin-bottom: 1em;
  width: 100%;
}

.row {
  border: 1px black solid;
  height: 3em;
  margin: auto;
  width: 100%;
}

.responsive-iframe-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Estilos para los boxes con efecto hover mejorado */
/* Estilos para los boxes con sombreado y borde fino */
.box1, .box2, .box3, .box4, .box5, .box6, .box7, .box8 {
  background-color: #FFFFFF;
  color: #40afa9;
  border-radius: 5px;
  padding: 20px;
  font-size: 150%;
  opacity: 0.9;
  transition: all 0.2s ease;
  position: relative;
  /* Agregar borde fino */
  border: 1px solid rgba(0, 0, 0, 0.1);
  /* Agregar sombreado sutil */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Efectos hover específicos para cada box */
.wrapper .box1:hover { 
  background-color: #40afa9; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  /* Sombreado más pronunciado en hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box2:hover { 
  background-color: #8ca9b8; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box3:hover { 
  background-color: #e48383; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box4:hover { 
  background-color: #cebad4; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box5:hover { 
  background-color: #efab51; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box6:hover { 
  background-color: #b6b099; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box7:hover { 
  background-color: #ffdf59; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wrapper .box8:hover { 
  background-color: #B1DCC0; 
  color: #FFFFFF; 
  opacity: 1; 
  transform: scale(1.03); 
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Mejora para contenedores de iframe responsivos, especialmente para Power BI */
.responsive-iframe-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 56.25%; /* Proporción 16:9 por defecto */
}

/* Configuración específica para Power BI que necesita ajustes especiales */
.powerbi-iframe-container {
  position: relative;
  width: 100%;
  overflow-x: auto; /* Permite scroll horizontal en caso necesario */
  overflow-y: hidden;
  max-width: 100%;
  margin: 0 auto;
}

/* Para dispositivos móviles, hacemos un manejo especial */
@media screen and (max-width: 768px) {
  .powerbi-iframe-container {
    min-height: 500px; /* Altura mínima en móvil */
    -webkit-overflow-scrolling: touch; /* Mejor scroll en iOS */
  }
  
  /* Ajustamos el iframe de Power BI para que sea más usable en móvil */
  .powerbi-iframe-container iframe {
    width: 100% !important;
    height: 100% !important;
    transform-origin: left top; /* Punto de origen para la escala */
    transform: scale(0.9); /* Reduce ligeramente para mejor visualización */
  }
  
  /* Ajuste para la cabecera en páginas con Power BI */
  .header-top h1 {
    font-size: 1.2rem; /* Más pequeño en páginas con Power BI */
  }
  
  /* Reducimos los márgenes laterales para maximizar espacio */
  .boxCuerpo, .boxTitulo, .wrapper, .wrapperCabecera {
    width: 95% !important; /* Ancho casi completo en móviles */
  }
}

/* Estilos generales para todos los iframes */
iframe {
  border: none;
  max-width: 100%;
}

/* Configuración específica para iframes de Power BI */
iframe[src*="powerbi"] {
  display: block;
  margin: 0 auto;
  width: 100%;
  min-height: 400px; /* Altura mínima */
}

/* Contenedor específico para informes de Power BI */
.power-bi-report {
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* En dispositivos grandes, damos más espacio al contenido de Power BI */
@media screen and (min-width: 769px) {
  .power-bi-report {
    width: 90%;
  }
  
  /* Mayor altura en pantallas grandes */
  iframe[src*="powerbi"] {
    min-height: 600px;
  }
}
  color: #777;
  
  
 /* =====================================================================
   Diseño fsp- · Finances del sector públic CAIB
   !important SOLO en propiedades de etiquetas (h2, h3, p, ul, li, a, img)
   que los estilos por defecto del editor pueden pisar.
   ===================================================================== */

/* ---------- Contenedor ---------- */
.fsp-page {
  width: 75%;
  max-width: 1000px;
  margin: 0 auto 30px;
}

/* Desplazamiento suave al saltar a una sección */
html {
  scroll-behavior: smooth;
}

/* ---------- Cabecera de páginas interiores ---------- */
.fsp-hero {
  padding: 6px 0 0;
  margin: 10px 0 26px;
}
.fsp-page .fsp-hero h2 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-size: 2rem !important;
  font-weight: bold;
  color: #333 !important;
}
/* Barra de acento de color bajo el título */
.fsp-hero h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, #004b99 0%, #40afa9 50%, #efab51 100%);
}
.fsp-page .fsp-hero p {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  font-size: 1rem !important;
  color: #555 !important;
}

/* ---------- Barra de saltos (pestañas planas) ---------- */
.fsp-page .fsp-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  border-bottom: 1px solid #e3e3e3;
}
.fsp-page .fsp-jump li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
.fsp-page .fsp-jump li::before {
  content: none;
}
.fsp-page .fsp-jump a {
  display: inline-block;
  padding: 8px 14px;
  border-bottom: 3px solid transparent;
  color: #1a5aa0 !important;
  font-size: 0.92rem !important;
  text-decoration: none !important;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.fsp-page .fsp-jump a:hover {
  background-color: #f2f2f2;
  border-bottom-color: #004b99;
}

/* ---------- Tarjetas ---------- */
.fsp-card {
  background-color: #fff;
  border: 1px solid #dde5ee;
  border-left: 4px solid #004b99;
  border-radius: 4px;
  padding: 18px 24px 16px;
  margin: 0 0 16px;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.fsp-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Color por sección: línea izquierda y fondo del icono */
.fsp-card:nth-child(6n+1) { border-left-color: #004b99; }
.fsp-card:nth-child(6n+2) { border-left-color: #40afa9; }
.fsp-card:nth-child(6n+3) { border-left-color: #efab51; }
.fsp-card:nth-child(6n+4) { border-left-color: #e48383; }
.fsp-card:nth-child(6n+5) { border-left-color: #8ca9b8; }
.fsp-card:nth-child(6n+6) { border-left-color: #b1a0c0; }

.fsp-card:nth-child(6n+1) .fsp-icon { background-color: #e6f0fa; }
.fsp-card:nth-child(6n+2) .fsp-icon { background-color: #e3f4f3; }
.fsp-card:nth-child(6n+3) .fsp-icon { background-color: #fdf1e1; }
.fsp-card:nth-child(6n+4) .fsp-icon { background-color: #fbe9e9; }
.fsp-card:nth-child(6n+5) .fsp-icon { background-color: #edf2f5; }
.fsp-card:nth-child(6n+6) .fsp-icon { background-color: #f1ecf5; }

/* ---------- Título de sección ---------- */
.fsp-page .fsp-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px !important;
  padding: 0 0 10px !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 1px solid #e6edf4 !important;
  font-size: 1.25rem !important;
  font-weight: bold;
  line-height: 1.3 !important;
  color: #333 !important;
}

/* Anclajes del menú (#Estadisticas, #Cuentas...) */
.fsp-card-title a[name] {
  display: block;
  position: relative;
  top: -80px;
  height: 0;
  visibility: hidden;
}

/* ---------- Icono ---------- */
.fsp-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #e6f0fa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fsp-page .fsp-icon img {
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  float: none !important;
  object-fit: contain;
}

/* ---------- Texto ---------- */
.fsp-page .fsp-text {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
  color: #333 !important;
}
/* Subtítulo dentro de una tarjeta ("Altres anys"...) */
.fsp-page .fsp-subtitle {
  margin: 18px 0 8px !important;
  font-weight: bold;
}
.fsp-meta {
  margin-left: 6px;
  font-size: 0.8rem;
  color: #777;
}

/* ---------- Listas de enlaces ---------- */
.fsp-page .fsp-links {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.fsp-page .fsp-links li {
  list-style: none !important;
  background: none !important;
  margin: 0 !important;
  padding: 5px 0 5px 16px !important;
  position: relative;
  line-height: 1.4 !important;
}
/* Punto de color delante de cada enlace */
.fsp-page .fsp-links li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #0a96c9;
}
.fsp-page .fsp-links a {
  color: #0a5aa8 !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}
.fsp-page .fsp-links a:hover {
  color: #003366 !important;
  text-decoration: underline !important;
}

/* Aviso de "se abre en ventana nueva" (accesibilidad) */
.fsp-page a[target="_blank"]:not(.fsp-viz-img)::after {
  content: " ↗" / " (s'obre en una finestra nova)";
  display: inline-block;
  margin-left: 2px;
  font-size: 0.85em;
  text-decoration: none;
}
.fsp-page:lang(es) a[target="_blank"]:not(.fsp-viz-img)::after {
  content: " ↗" / " (se abre en una ventana nueva)";
}

/* ---------- Años como botones ---------- */
.fsp-page .fsp-links-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fsp-page .fsp-links-cols li {
  padding: 0 !important;
}
.fsp-page .fsp-links-cols li::before {
  content: none;
}
.fsp-page .fsp-links-cols a,
.fsp-current {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  background-color: #f7f7f7;
  font-size: 0.92rem !important;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.fsp-page .fsp-links-cols a:hover {
  background-color: #004b99;
  border-color: #004b99;
  color: #fff !important;
  text-decoration: none !important;
}
/* Año en curso: marcado y sin enlace */
.fsp-current {
  background-color: #004b99;
  border-color: #004b99;
  color: #fff;
  font-weight: bold;
}

/* ---------- Power BI dentro de una tarjeta ---------- */
.fsp-powerbi {
  margin: 6px 0 14px;
}
.fsp-powerbi iframe {
  display: block;
  width: 100% !important;
  height: 800px;
  border: 0;
  border-radius: 4px;
}

/* ---------- Visualizaciones: miniatura + enlaces ---------- */
.fsp-viz {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 16px 0;
  border-top: 1px solid #eef2f6;
}
.fsp-card-title + .fsp-viz {
  border-top: 0;
  padding-top: 4px;
}
.fsp-viz-img {
  flex: 0 0 150px;
  display: block;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  transition: box-shadow 0.35s ease;
}
/* Miniatura difuminada: indica que es un Power BI sin que se lean los datos */
.fsp-page .fsp-viz-img img {
  display: block;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
  filter: blur(1.5px) saturate(0.6);
  opacity: 0.85;
  transform: scale(1.04);
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.fsp-viz-img:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.fsp-viz-img:hover img {
  filter: blur(1px) saturate(0.8);
  opacity: 1;
}
.fsp-viz-body {
  flex: 1;
  min-width: 0;
}
.fsp-page .fsp-viz-title {
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 1.05rem !important;
  font-weight: bold;
  line-height: 1.35 !important;
}
.fsp-page .fsp-viz-title a {
  color: #004b99 !important;
  text-decoration: none !important;
}
.fsp-page .fsp-viz-title a:hover {
  text-decoration: underline !important;
}

/* =====================================================================
   PORTADA
   ===================================================================== */
.fsp-hero-portada {
  background: linear-gradient(120deg, #004b99 0%, #0a6fb8 60%, #0a96c9 100%);
  border-radius: 6px;
  padding: 30px;
  margin: 20px 0 24px;
  text-align: center;
}
.fsp-hero-portada h2::after {
  content: none;
}
.fsp-page .fsp-hero-portada h2 {
  color: #fff !important;
  font-size: 1.45rem !important;
}
.fsp-page .fsp-hero-portada p {
  max-width: 860px;
  margin: 8px auto 0 !important;
  color: #fff !important;
  opacity: 0.85;
  font-size: 1.05rem !important;
}

.fsp-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* Todo el recuadro es el enlace */
.fsp-page a.fsp-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px 16px 20px;
  background-color: #fff;
  border: 1px solid #dde5ee;
  border-top: 4px solid var(--acento);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  color: #1a1a1a !important;
  text-decoration: none !important;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  animation: fspAparece 0.6s ease-out both;
}

/* Colores por acceso: franja, fondo del icono y relleno al pasar el ratón */
.fsp-page a.fsp-tile:nth-child(5n+1) { --acento: #004b99; --suave: #e6f0fa; --relleno: #004b99; }
.fsp-page a.fsp-tile:nth-child(5n+2) { --acento: #40afa9; --suave: #e3f4f3; --relleno: #2f8f8a; }
.fsp-page a.fsp-tile:nth-child(5n+3) { --acento: #e48383; --suave: #fbe9e9; --relleno: #c65f5f; }
.fsp-page a.fsp-tile:nth-child(5n+4) { --acento: #efab51; --suave: #fdf1e1; --relleno: #c47a1e; }
.fsp-page a.fsp-tile:nth-child(5n+5) { --acento: #8a74a8; --suave: #f1ecf5; --relleno: #74609a; }

.fsp-page a.fsp-tile:hover,
.fsp-page a.fsp-tile:focus {
  background-color: var(--relleno);
  border-color: var(--relleno);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  outline: none;
}

.fsp-tile-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--suave);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s ease;
}
.fsp-tile:hover .fsp-tile-icon,
.fsp-tile:focus .fsp-tile-icon {
  background-color: #fff;
}
.fsp-page .fsp-tile-icon img {
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  float: none !important;
  object-fit: contain;
}

.fsp-tile-title {
  font-size: 1.05rem;
  font-weight: bold;
  line-height: 1.3;
  color: #004b99;
  transition: color 0.35s ease;
}
.fsp-tile-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #555;
  transition: color 0.35s ease;
}
.fsp-tile:hover .fsp-tile-title,
.fsp-tile:focus .fsp-tile-title,
.fsp-tile:hover .fsp-tile-text,
.fsp-tile:focus .fsp-tile-text {
  color: #fff;
}

/* Variante con logotipos (Educació financera...): 4 columnas */
.fsp-tiles-4 {
  grid-template-columns: repeat(4, 1fr);
}
.fsp-tile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80px;
  padding: 8px;
  background-color: #fff;
  border-radius: 6px;
}
.fsp-page .fsp-tile-logo img {
  max-width: 100% !important;
  max-height: 64px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
  object-fit: contain;
}

/* Aparición escalonada (solo portada) */
@keyframes fspAparece {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fsp-tile:nth-child(1)  { animation-delay: 0.10s; }
.fsp-tile:nth-child(2)  { animation-delay: 0.16s; }
.fsp-tile:nth-child(3)  { animation-delay: 0.22s; }
.fsp-tile:nth-child(4)  { animation-delay: 0.28s; }
.fsp-tile:nth-child(5)  { animation-delay: 0.34s; }
.fsp-tile:nth-child(6)  { animation-delay: 0.40s; }
.fsp-tile:nth-child(7)  { animation-delay: 0.46s; }
.fsp-tile:nth-child(8)  { animation-delay: 0.52s; }
.fsp-tile:nth-child(9)  { animation-delay: 0.58s; }
.fsp-tile:nth-child(n+10) { animation-delay: 0.64s; }

/* =====================================================================
   RESPONSIVE Y ACCESIBILIDAD
   ===================================================================== */
@media screen and (max-width: 1200px) {
  .fsp-tiles, .fsp-tiles-4 { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 768px) {
  .fsp-page { width: 95%; }
  .fsp-page .fsp-hero h2 { font-size: 1.5rem !important; }
  .fsp-card { padding: 16px 18px; }
  .fsp-powerbi iframe { height: 500px; }
  .fsp-viz { flex-direction: column; gap: 12px; }
  .fsp-viz-img { flex-basis: auto; width: 100%; }
  .fsp-tiles, .fsp-tiles-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fsp-page a.fsp-tile { padding: 18px 10px 14px; }
  .fsp-tile-text { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fsp-page a.fsp-tile { animation: none; }
  .fsp-card:hover { transform: none; }
}