/* Wrapper para input y botón limpiar en móviles */
.atenea-buscar-wrapper-movil {
  display: flex !important;
  width: 100% !important;
  gap: 0 !important;
}

/* Botón cuadrado de limpiar búsqueda en unidades-educativas */
#atenea-btn-limpiar-busqueda-unidad {
  height: 40px !important;
  width: 40px !important;
  background: #ff6347 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

#atenea-btn-limpiar-busqueda-unidad:hover {
  background: #e5533c !important;
}

#atenea-btn-limpiar-busqueda-unidad i {
  color: #fff !important;
  font-size: 1.4em !important;
  margin: 0 !important;
}

/* Botón de información sobre el robot */
#atenea-btn-informacion {
  position: absolute;
  top: 24px;   /* Ajusta la posición en Y */
  right: 133px;  /* Ajusta la posición en X */
  width: 241px;   /* ancho del área clickeable */
  height: 40px;  /* alto del área clickeable */
  padding:8px 18px;
  background:#f44336;
  color:#fff;
  border:none;
  border-radius: 0;
  font-weight: 600;
  background: transparent !important; /* lo hace invisible */
  cursor: pointer;
  z-index: 10 !important;
}

/* Contenedor principal para la guía de búsqueda y robot */
.atenea-guia-wrapper {
  position: relative;
  padding: 12px 24px 20px 24px; /* Menos padding superior para reducir altura del rectángulo */
  margin-top: 40px; /* Margen para separar del navbar y dejar espacio para el robot */
  margin-bottom: 15px;
  border-radius: 0;
  color: #000;
  font-size: 0.95em;
  line-height: 1.4;
  display: block;
}

/* Cuadro gris con texto */
.atenea-guia-busqueda {
  max-width: 900px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  position: relative;
  z-index: 3;
  color: #000;
  font-size: 0.95em;
  line-height: 1.0;
}

/* Imagen robot con burbuja arriba a la derecha */
.atenea-logos {
  position: absolute;
  top: -30px; /* Ajusta para que el robot quede justo encima del rectángulo */
  left: 20px;
  width: 300px;
  height: 300px;
  background: url('../img/img_logo_small.png') no-repeat top left;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  margin-bottom: 10px !important;
}
/* Centrar la imagen del robot sobre el rectángulo de ayuda */
.atenea-robot-bubble {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  background: url('../img/img_char.png') no-repeat top center;
  background-size: contain;
  z-index: 2;
  margin-bottom: 10px !important;
}

/*.atenea-robot-bubble {
  position: absolute;
  top: -45px;
  right: 20px;
  width: 380px;
  height: 380px;
  background: url('../img/img_char.png') no-repeat top right;
  background-size: contain;
  z-index: 2;
  margin-bottom: 10px !important;
}*/

/* Responsive para robot y contenedor */
@media (max-width: 900px) {
  .atenea-guia-wrapper {
    padding: 12px 20px 20px 20px;
  }
  .atenea-robot-bubble {
    /*position: static;*/
    width: 350px;
    height: 350px;
    /*background-position: center top;*/
    background-size: contain;
    margin-bottom: 20px;
  }

  #atenea-btn-informacion {
    top: 21px;
    right: 123px;
    width: 221px;
    height: 36px;
  }

  .atenea-logos {
    /*position: static;*/
    width: 270px;
    height: 270px;
    /*background-position: center top;*/
    background-size: contain;
    margin-bottom: 20px;
  }
}

/* Título en azul */
.atenea-guia-busqueda b:first-child {
  color: #00aaff !important;
  display: block;
}

/* Texto descriptivo */
.atenea-guia-busqueda span {
  font-size: 12px !important;
  color: #000 !important;
  display: block;
  margin-top: 4px;
}

/* Botón buscar más largo */
#atenea-btn-buscar-unidad {
  padding: 10px 48px !important;
  background: #00aaff !important;
  color: #fff !important;
  border: 1.5px solid #00aaff !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 0.95em !important;
  height: 40px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  white-space: nowrap !important;
}

#atenea-btn-buscar-unidad:hover {
  background: #2563eb !important;
}

/* Estilos para selects con select2 y borde azul */
.select2-container--default .select2-selection--single {
  border: 2px solid #00aaff !important;
  border-radius: 0 !important;
  height: 40px !important;
  padding: 6px 12px !important;
  font-weight: 700 !important;
  font-size: 1em !important;
  min-width: 180px !important;
  max-width: 240px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Refuerza alineación izquierda del texto seleccionado en select2 */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  /*width: 100% !important;*/
}

/* Refuerza alineación izquierda del placeholder en select2 */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  text-align: left !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  /*width: 100% !important;*/
}

/* Mejora visibilidad de la X para limpiar en select2 */
.select2-container--default .select2-selection--single .select2-selection__clear {
  color: #dc2626 !important;
  font-size: 1.3em !important;
  right: 0px !important; /* Separación para no superponerse con la flecha */
  top: 50% !important;
  transform: translateY(-50%) !important;
  cursor: pointer !important;
  opacity: 0.85 !important;
  position: absolute !important;
  z-index: 2 !important;
}

/* Reduce el tamaño de la fuente de las opciones del dropdown de select2 */
.select2-container--default .select2-results__option {
  font-size: 0.8em !important;
}

/* DataTable: reducir tamaño de fuente del buscador y paginador */
.dataTables_wrapper .dataTables_filter input {
  font-size: 0.8em !important;
  height: 32px !important;
  padding: 4px 8px !important;
  border: 1px solid #c3c9d7 !important;
  border-radius: 4px !important;
  outline: none !important;
}

.dataTables_wrapper .dataTables_filter label {
  font-size: 0.85em !important;
  color: #374151 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  font-size: 0.8em !important;
  padding: 3px 8px !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8em !important;
  color: #6b7280 !important;
}

/* Flechas para selects con select2 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #00aaff !important;
}

/* Grid de unidades con 3 columnas y espacio */
.atenea-unidades-grid, .cursos-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 24px !important;
  margin-bottom: 24px !important;
  justify-content: center !important;
  justify-items: center !important;
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transition: grid-template-columns 0.3s ease;
}

/* Unificación de estilos para .atenea-unidad-card */
/* Contenedor del card */
.atenea-unidad-card, .curso-card {
  background: #fff !important;
  border-radius: 0 !important; /* Esquinas cuadradas */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  padding: 20px !important;
  text-align: center !important;
  cursor: default;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100%;
  min-width: 260px !important;
  max-width: 360px !important;
  /* margin: 0 auto !important;  El grid ya está centrado */
}

.atenea-unidad-card:hover {
  box-shadow: 0 6px 15px rgba(0,0,0,0.15) !important;
  transform: translateY(-4px) !important;
}

/* Imagen del logo dentro del card */
.atenea-unidad-card img {
  width: 90px !important;
  height: 90px !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  margin: 0 auto 14px auto !important; /* Centrar horizontalmente */
  display: block !important;
  box-shadow: 0 2px 8px #d2d2d2 !important;
  background: #f9f9f9 !important;
}

/* Imagen para curso-card */
.curso-card img {
  width: 230px !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  box-shadow: 0 2px 8px #d2d2d2 !important;
  background: #f9f9f9 !important;
}

/* Texto de nombre en negrita y mayúsculas */
.atenea-unidad-card div:nth-child(2) {
  font-weight: 700 !important;
  font-size: 1em !important;
  color: #1b2b4f !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
}

/* AMIE en azul */
.atenea-unidad-card div:nth-child(3) {
  color: #00aaff !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

/* Ciudad y provincia en gris */
.atenea-unidad-card div:nth-child(4) {
  color: #555 !important;
  font-weight: 500 !important;
  margin-bottom: 6px !important;
}

/* Dirección en texto normal */
.atenea-unidad-card h5 {
  font-weight: 500 !important;
  color: #333 !important;
  min-height: 40px !important;
}

/* Paginación unificada para unidades y cursos */
.atenea-paginacion {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
  margin-top: 4px !important;
  margin-bottom: 10px !important;
}

/* Botones de paginación */
.atenea-paginacion button,
.atenea-paginacion .atenea-btn-pag,
.atenea-paginacion .atenea-btn-pag-curso {
  background-color: #00aaff !important;
  color: #fff !important;
  border-radius: 0 !important; /* Esquinas cuadradas */
  border: none !important;
  padding: 8px 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  text-transform: uppercase !important;
  font-size: 0.95em !important;
  transition: background-color 0.3s ease !important;
}

.atenea-paginacion button[disabled],
.atenea-paginacion .atenea-btn-pag[disabled],
.atenea-paginacion .atenea-btn-pag-curso[disabled] {
  background-color: #a0cfff !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Texto de página actual */
.atenea-paginacion span#pagina-actual {
  background: transparent !important;
  color: #00aaff !important;
  border: 1.5px solid #00aaff !important;
  padding: 6px 12px !important;
  border-radius: 0 !important; /* Esquinas cuadradas */
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 0.95em !important;
}

/* Estilos para la fila de búsqueda */
.atenea-unidades-search-row {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 14px !important; /* Definir el gap uniforme entre selects, input y botón */
  margin-bottom: 8px !important;
  margin-top: 12px !important;
  /*width: 100% !important;*/
  padding: 0 24px !important; /* Padding para que no toque los bordes */
  z-index: 10 !important;
}

.atenea-unidades-fondo {
  position: absolute !important;
  /*top: 175px !important;*/
  top: calc(var(--atenea-guia-wrapper-height, 0px) + 10px);
  left: 0 !important;
  width: 100%;
  height: 65px !important;
  background-color: #f2f2f2 !important;
  z-index: 0 !important;
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
  z-index: 9 !important;
  /*display: block !important;*/
}

/* Selects provincia y ciudad */
#atenea-select-provincia, #atenea-select-ciudad {
  min-width: 160px !important;
  height: 44px !important;
  padding: 8px 12px !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-size: 0.95em !important;
  color: #000 !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#atenea-select-provincia:focus, #atenea-select-ciudad:focus,
#atenea-select-proyecto:focus, #atenea-select-productos:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Selects provincia y ciudad */
#atenea-select-proyecto, #atenea-select-productos {
  /*min-width: 160px !important;*/
  height: 44px !important;
  padding: 8px 12px !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-size: 0.95em !important;
  color: #000 !important;
  outline: none !important;
  box-sizing: border-box !important;
}

/* Input buscar unidad */
#atenea-buscar-unidad {
  height: 40px !important;
  padding: 8px 16px !important;
  border-radius: 0 !important;
  border: 2px solid #00aaff !important;
  min-width: 280px !important;
  max-width: 360px !important;
  background: #fff !important;
  font-size: 0.95em !important;
  color: #374151 !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#atenea-buscar-unidad:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Estilos para el wrapper de búsqueda */
.atenea-search-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

/* Otros estilos para búsqueda */
#atenea-search-input {
  border: 1.5px solid #c3c9d7;
  border-radius: 24px 0 0 24px;
  padding: 12px 18px;
  width: 100%;
  font-size: 1.08em;
  outline: none;
  color: #273656;
  background: #fff;
  transition: border .2s;
  box-sizing: border-box;
}

#atenea-search-input:focus {
  border-color: #1976d2;
}

#btnBuscar {
  background: #1976d2;
  border: none;
  border-radius: 0 24px 24px 0;
  width: 52px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  margin-left: -6px;
  padding: 0;
}

/* Grid de unidades educativas con 3 columnas */
#atenea-grid-unidades {
  position: relative !important;
  /*display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;*/
  margin-top: 100px !important;
  justify-content: center !important;
  justify-items: center !important;  /* Centra cada ítem dentro de su celda */
  /*margin-bottom: 4px !important;*/
}

/* Botones de registro y cursos */
.atenea-btn-registrar {
  margin-top: auto !important;
  padding: 9px 24px !important;
  background: #2352a2 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 1em !important;
  font-weight: 600 !important;
  transition: background 0.2s ease !important;
}

.atenea-btn-registrar:hover {
  background: #1e40af !important;
}

.atenea-btn-cursos {
  padding: 8px 16px !important;
  background: #10b981 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  padding: 20px 0 !important;
  min-height: 320px;
  margin-bottom: 8px;
  background: #059669 !important;
}

.atenea-btn-cursos:hover {
  background: #059669 !important;
}

/* Estilos para el grid de cursos */
#atenea-grid-cursos {
  align-items: center !important;
  justify-content: center !important;
  /*padding: 20px 0 !important;*/
  min-height: 320px;
  margin-bottom: 8px;
  transition: grid-template-columns 0.3s ease;
}

.atenea-unidad-card, .curso-card {
  background: #fff !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.curso-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 15px rgba(0,0,0,0.15) !important;
}

/* Nombre del curso */
.nombre-curso {
  font-size: 1.1em !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
  text-align: center;
}

/* ID del curso */
.curso-numero {
  font-size: 1.0em !important;
  font-weight: 700 !important;
  color: #00aaff !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
  text-align: center;
}

/* Botón activar curso */
.btn-activar-curso {
  background: #00aaff !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  max-width: 160px !important;
}

.btn-activar-curso:hover {
  background: #2563eb !important;
}

/* Botón azul para cursos */
.atenea-btn-curso {
  background: #3b82f6 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  cursor: pointer !important;
  text-decoration: none !important;
  font-size: 0.9em !important;
  transition: background 0.2s ease !important;
}

.atenea-btn-curso:hover {
  background: #2563eb !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Estilos para el buscador de cursos */

#atenea-buscar-curso {
  height: 40px !important;
  padding: 8px 16px !important;
  border-radius: 0 !important;
  border: 2px solid #00aaff !important;
  min-width: 280px !important;
  max-width: 360px !important;
  background: #fff !important;
  font-size: 0.95em !important;
  color: #374151 !important;
  outline: none !important;
  box-sizing: border-box !important;
}

#atenea-buscar-curso:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

#atenea-btn-buscar-curso {
  padding: 10px 28px !important;
  background: #00aaff !important;
  color: #fff !important;
  border: 1.5px solid #00aaff !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 0.95em !important;
  height: 40px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background 0.2s ease !important;
}

@media (max-width: 600px) {
  
}

#atenea-btn-buscar-curso:hover {
  background: #2563eb !important;
}

#atenea-btn-limpiar-busqueda-curso {
  display: none !important;
  position: absolute !important;
  right: 100px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  border: none !important;
  background: transparent !important;
  font-size: 1.4em !important;
  color: #9ca3af !important;
  cursor: pointer !important;
  padding: 0 8px !important;
  line-height: 1 !important;
  z-index: 10 !important;
}

/* Paginador */
.atenea-paginador {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  margin-bottom: 16px;
}

/* Modal de licencia */
#modal-activar-licencia, #modal-informacion {
  /*display: none !important;*/
  position: fixed !important;
  z-index: 21000 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,0.5) !important;
}

#modal-licencia-content, #modal-informacion-content {
  position: relative !important;
  max-width: 800px !important;
  margin: 80px auto !important;
  padding: 32px 48px !important;
  background: #fff !important;
  border-radius: 0 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
  z-index: 1;
}

#modal-activar-licencia > #modal-licencia-content::before,
#modal-informacion > #modal-informacion-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;
  background-color: #f44336; /* barra roja arriba */
  border-radius: 0 !important;
}

/* Botón X modal */
#cerrar-modal-licencia {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  background: none !important;
  border: none !important;
  font-size: 1.5em !important;
  cursor: pointer !important;
  color: #9ca3af !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: background 0.2s ease !important;
  z-index: 10;
}

#cerrar-modal-licencia:hover {
  background: #f3f4f6 !important;
}

#modal-licencia-content h3, #modal-informacion-content h3 {
  color: #00aaff;
  font-weight: 400;
  margin-top: 10px;
  margin-bottom: 12px;
}

#modal-licencia-content p {
  margin: 0 0 8px 0;
  font-weight: 600;
}

#nombre-curso-modal {
  font-weight: 700;
  font-size: 1.25em;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: center;
  z-index: 2 !important;
}

#input-licencia-curso {
  position: static !important;
  width: 350px !important;
  height: 36px;
  padding: 10px 14px !important;
  margin-bottom: 16px !important;
  font-size: 0.90em !important;
  border-radius: 0 !important;
  border: 1px solid #00aaff !important;
  background: #fff !important;
  box-sizing: border-box !important;
  text-align: center;
  align-items: center !important;
  z-index: 2 !important;
}

#input-licencia-curso:focus {
  border-color: #2563eb !important;
}

.checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center; /* Centra horizontalmente */
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  z-index: 2 !important;
}

/* Oculta el checkbox nativo */
.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  cursor: pointer;
  border: none !important;
  background: transparent !important;
}

/* Crea un cuadro personalizado */
.checkbox-container label {
  position: relative;
  padding-left: 32px; /* espacio para el cuadro */
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.9em;
  color: #000;
  display: inline-flex;
  align-items: center;
  border: none !important;
  background: transparent !important;
  margin: 0;
  white-space: normal; /* Permite saltos de línea y espacios */
}

/* Cuadro visible */
.checkbox-container label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid #00aaff;
  border-radius: 0; /* esquinas cuadradas */
  background: #fff;
  box-sizing: border-box;
  box-shadow: none !important;
}

/* Marca de check (invisible por defecto) */
.checkbox-container label::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 7px;
  height: 12px;
  border: solid #00aaff;
  border-width: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Mostrar check cuando está seleccionado */
.checkbox-container input[type="checkbox"]:checked + label::after {
  opacity: 1;
}

/* Opcional: hover para el cuadro */
.checkbox-container label:hover::before {
  border-color: #2563eb;
}

.checkbox-container label a {
  margin-left: 4px; /* separa el link del texto anterior */
  color: #2563eb;
  text-decoration: underline;
}

#estado-licencia-curso {
  min-height: 24px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #b00;
}

.botones-modal {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  text-align: center;
}

#btn-cancelar-modal-licencia,
#btn-validar-licencia,
#btn-cerrar-informacion {
  width: 100px; /* ancho fijo */
  padding: 10px 0;
  font-weight: 600;
  font-size: 0.85em;
  border-radius: 0 !important;
  cursor: pointer;
  transition: background 0.2s ease;
  text-transform: uppercase;
  border: 1px solid #00aaff;
  z-index: 2 !important;
}

#btn-cancelar-modal-licencia {
  background: #fff;
  color: #374151;
}

#btn-cancelar-modal-licencia:hover {
  background: #f3f4f6;
}

#btn-validar-licencia, #btn-cerrar-informacion {
  background: #00aaff;
  color: #fff;
}

#btn-validar-licencia:hover, #btn-cerrar-informacion:hover {
  background: #2563eb;
}

.icon-lock {
  position: absolute;
  top: 40px;
  right: 8px;
  width: 200px;
  height: 100%;
  background: url('../img/img_help_unlock.png') no-repeat top right;
  background-size: contain;
  pointer-events: none;
  flex-shrink: 0; /* Evita que se reduzca */
  z-index: -1 !important;
}

.icon-lupa {
  position: absolute;
  top: 40px;
  right: 8px;
  width: 200px;
  height: 100%;
  background: url('../img/img_help_search.png') no-repeat top right;
  background-size: contain;
  pointer-events: none;
  flex-shrink: 0; /* Evita que se reduzca */
  z-index: -1 !important;
}

.atenea-grid-loading {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.13em;
  color: #123;
  width: 100%;
}

#bloqueo-rol-overlay {
  .atenea-robot-bubble {
    width: 320px;
    height: 320px;
    left: 50%;
    transform: translateX(-50%);
    background-position: top center;
  }
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(255,247,240,0.97);
  z-index: 20010 !important;   /* MUY ALTO */
  display: flex;
  align-items: center;
  justify-content: center;
}

.swal2-container {
  z-index: 20020 !important;   /* SweetAlert encima del overlay */
}

/* Media queries */
@media (max-width: 900px) and (min-width: 731px) {
  .atenea-search-wrapper {
    max-width: 98vw;
  }

  .atenea-unidades-fondo {
    /*position: static !important;*/
    /*height: auto !important;*/
    /*min-height: 60px !important;*/
    height: 85px !important;
    background-color: #fff !important;
    margin-bottom: 75px !important;
  }

  /*#atenea-select-provincia, #atenea-select-ciudad, #atenea-buscar-unidad {
    width: 100% !important;
    max-width: 300px !important;
    color: #000 !important;
  }*/

  .atenea-unidades-grid, .cursos-grid {
    /*grid-template-columns: repeat(2, 1fr) !important;*/
    max-width: 740px !important;
  }

  .atenea-unidad-card, .curso-card {
    margin-top: 12px !important;
  }

  .atenea-unidades-search-row {
    /*position: static !important;*/
    flex-wrap: wrap !important; /* Permite que los elementos se envuelvan */
    /*flex-direction: column !important;*/
    align-items: stretch !important;
    gap: 12px !important;
    padding: 0 8px !important;
    margin-bottom: 12px !important;
    margin-top: 10px !important;
    max-width: 98vw !important;
  }
  .atenea-unidades-search-row > * {
    /*width: 100% !important;*/
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Select2: fuerza ancho completo y elimina restricciones */
  /*.select2-container,
  .select2-container--default .select2-selection--single {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #atenea-select-proyecto, #atenea-select-productos, #atenea-buscar-curso {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #atenea-btn-buscar-curso {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
  }*/
}

@media (max-width: 730px) {

  .atenea-unidades-fondo {
    position: static !important;
    /*height: auto !important;*/
    /*min-height: 60px !important;*/
    height: 100px !important;
    background-color: #fff !important;
    margin-bottom: 0 !important;
  }
  #atenea-grid-unidades, .cursos-grid {
    margin-top: 40px !important;
    position: static !important;
    z-index: auto !important;
  }
  .atenea-unidad-card, .curso-card {
    margin-top: 20px !important;
  }
  .atenea-unidades-search-row {
    position: static !important;
    flex-wrap: wrap !important;
    /*flex-direction: column !important;*/
    align-items: stretch !important;
    gap: 12px !important;
    padding: 0 8px !important;
    margin-bottom: 12px !important;
    margin-top: 10px !important;
  }
  .atenea-unidades-search-row > * {
    /*width: 100% !important;*/
    min-width: 0 !important;
    margin: 0 !important;
  }

  #atenea-buscar-unidad {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 680px) {
  .atenea-robot-bubble {
    display: none !important;
  }
  .atenea-logos {
    left: 50%;
    top: -40;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    /*margin-bottom: 10px !important;*/
    background-position: center top !important;
  }
  /*.atenea-robot-bubble {
    width: 200px;
    height: 200px;
    left: 50%;
    transform: translateX(-50%);
    background-position: top center;
    display: block !important;
  }*/
  #atenea-btn-informacion-2 {
    display: block !important;
  }
  .atenea-guia-wrapper {
    display: none !important;
  }
}

@media (max-width: 480px) {

  .atenea-unidades-search-row {
    padding: 0 4px !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
  }
  #atenea-select-provincia,
  #atenea-select-ciudad,
  #atenea-select-proyecto,
  #atenea-select-productos {
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }
  .atenea-buscar-wrapper-movil {
    display: flex !important;
    margin-top: 0 !important;
    width: 100% !important;
    gap: 0 !important;
  }
  #atenea-buscar-unidad {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    flex: 1 1 auto !important;
  }
  #atenea-btn-limpiar-busqueda-unidad {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    margin-left: 6px !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
  }
  #atenea-btn-buscar-unidad/*,
  #atenea-btn-informacion*/ {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
  }
  .atenea-provincia-msg {
    width: 100% !important;
    display: block !important;
    margin-top: 40px !important;
    font-size: 1em !important;
    color: #374151 !important;
    text-align: left !important;
  }
  .atenea-grid-empty {
    margin-top: 60px !important;
  }
}

@media (max-width: 420px) {
  .atenea-grid-empty {
    margin-top: 100px !important;
  }
}

/* Forzar color de fondo blanco en selects nativos deshabilitados */
select:disabled {
    background-color: #fff !important;
}

/* Forzar color de fondo blanco en select2 deshabilitado */
.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #fff !important;
    cursor: not-allowed; /* mantiene el aspecto de deshabilitado */
    color: #000 !important;
}

.select2-selection__placeholder {
  color: #000 !important;
  font-weight: 700 !important;
  font-size: 1.05em !important;
}

@media (max-width: 600px) {

  .atenea-unidades-grid, .cursos-grid {
    grid-template-columns: 1fr !important;
    max-width: 360px !important;
  }
  
  .atenea-unidad-card, .curso-card {
    padding: 16px !important;
    max-width: none !important;
  }

  .atenea-btn-registrar, .atenea-btn-cursos {
    padding: 8px 12px !important;
    font-size: 0.8em !important;
  }

  #modal-licencia-content {
    max-width: 98vw !important;
    width: 98vw !important;
    padding: 18px 6vw 18px 6vw !important;
    min-width: 0 !important;
  }
  .icon-lock {
    width: 70px;
    height: 70px;
    top: 12px;
    right: 12px;
  }

  .atenea-ayuda-wrapper {
    max-width: 98vw !important;
    width: 100% !important;
  }
}

/*Para mostrar el texto de direcciones en una sola línea*/
.atenea-direccion-truncada {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  display: block;
  cursor: pointer;
  font-size: 12px !important;
  text-align: center !important;
  padding-left: 2px !important;
  font-weight: 700 !important;
  color: #222 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Botón cuadrado de limpiar búsqueda con FontAwesome */
#atenea-btn-limpiar-busqueda {
  height: 40px !important;
  width: 40px !important;
  background: #f44336 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

#atenea-btn-limpiar-busqueda:hover {
  background: #d32f2f !important;
}

#atenea-btn-limpiar-busqueda i {
  color: #fff !important;
  font-size: 1.4em !important;
  margin: 0 !important;
}

/* ============================================================
   NUEVA VERSIÓN 2.0 - ESTILOS ADICIONALES
   ============================================================ */

/* Botón "Activar licencias +" (zona superior derecha) */
#btn-activar-licencias-mas {
  padding: 10px 18px !important;
  background: linear-gradient(135deg, #00aaff, #1976d2) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.95em !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0, 170, 255, 0.35) !important;
  transition: all 0.2s ease !important;
}

#btn-activar-licencias-mas:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 170, 255, 0.45);
}

#btn-activar-licencias-mas i {
  margin-right: 5px;
  font-size: 0.95em;
}

/* --- Bloqueo del botón VALIDAR cuando está deshabilitado --- */
#btn-validar-licencia[disabled] {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  filter: grayscale(60%);
}

/* --- Tabla de cursos en el modal (DataTable) --- */
#tabla-cursos-licencia {
  font-size: 0.85em !important;
  border-collapse: collapse !important;
  width: 100% !important;
}

#tabla-cursos-licencia thead th {
  background: #00aaff !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.85em !important;
  padding: 8px 10px !important;
  border: none !important;
  text-align: left;
}

#tabla-cursos-licencia tbody td {
  padding: 8px 10px !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #374151 !important;
  vertical-align: middle;
}

#tabla-cursos-licencia tbody tr:hover {
  background: #f0faff !important;
  cursor: pointer;
}

#tabla-cursos-licencia tbody tr.selected {
  background: #e0f2fe !important;
}

/* Radio buttons dentro de la tabla */
#tabla-cursos-licencia .radio-curso-licencia {
  width: 16px;
  height: 16px;
  accent-color: #00aaff;
  cursor: pointer;
}

/* DataTable de paginación */
#tabla-cursos-licencia_wrapper .dataTables_wrapper .dataTables_paginate .paginate_button.current,
#tabla-cursos-licencia_wrapper .dataTables_paginate .paginate_button.current {
  background: #00aaff !important;
  border-color: #00aaff !important;
  color: #fff !important;
  border-radius: 4px !important;
}

/* --- Buscador del DataTable: reducir tamaño --- */
#tabla-cursos-licencia_wrapper .dataTables_filter {
  font-size: 0.8em !important;
}

#tabla-cursos-licencia_wrapper .dataTables_filter input {
  font-size: 0.8em !important;
  height: 30px !important;
  padding: 2px 8px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
}

/* --- Paginación del DataTable: reducir tamaño --- */
#tabla-cursos-licencia_wrapper .dataTables_paginate {
  font-size: 0.78em !important;
}

#tabla-cursos-licencia_wrapper .dataTables_paginate .paginate_button {
  padding: 3px 8px !important;
  font-size: 0.78em !important;
}

/* --- Info del DataTable: reducir tamaño --- */
#tabla-cursos-licencia_wrapper .dataTables_info {
  font-size: 0.8em !important;
}

/* --- Contenedor del grid de cursos activados --- */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 8px 0;
  width: 100%;
  justify-items: center;
}

/* --- Estado loading del grid --- */
.atenea-grid-loading {
  text-align: center;
  padding: 48px 16px;
  color: #6b7280;
  font-size: 1em;
  position: relative;
}

.atenea-grid-loading::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 16px auto;
  border: 4px solid #e5e7eb;
  border-top-color: #00aaff;
  border-radius: 50%;
  animation: atenea-spin 0.8s linear infinite;
}

@keyframes atenea-spin {
  to { transform: rotate(360deg); }
}

/* --- Loading overlay centrado con spinner --- */
.atenea-loading-overlay {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40vh !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 48px 16px !important;
  color: #6b7280 !important;
  font-size: 1em !important;
  position: relative !important;
  z-index: 10 !important;
}

.atenea-spinner {
  width: 48px !important;
  height: 48px !important;
  border: 4px solid #e5e7eb !important;
  border-top-color: #00aaff !important;
  border-radius: 50% !important;
  animation: atenea-spin 0.8s linear infinite !important;
  margin-bottom: 16px !important;
}

.atenea-loading-overlay span {
  font-size: 1.1em !important;
  color: #374151 !important;
  font-weight: 500 !important;
}

/* --- Mensaje "No se encontrados cursos" centrado --- */
.atenea-no-cursos-found {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40vh !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 48px 16px !important;
  color: #6b7280 !important;
  font-size: 1.1em !important;
  font-weight: 500 !important;
  text-align: center !important;
  position: relative !important;
  z-index: 10 !important;
}

/* --- Card de curso con licencia --- */
.curso-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 0; /* Esquinas cuadradas */
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.curso-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

/* --- Botón ojo para mostrar/ocultar licencia --- */
.atenea-btn-ver-licencia {
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: #00aaff !important;
  font-size: 1.25em !important;
  padding: 2px 6px !important;
  transition: color 0.2s ease !important;
  border-radius: 6px !important;
}

.atenea-btn-ver-licencia:hover {
  color: #1976d2 !important;
  background: rgba(0, 170, 255, 0.1) !important;
}

/* --- Mensajes de estado en el modal --- */
#estado-licencia-curso {
  text-align: center;
  font-size: 0.92em;
  margin: 8px 0;
  padding: 0 8px;
}

/* --- Ajustes responsive para el modal --- */
@media (max-width: 600px) {
  #modal-licencia-content {
    padding: 20px 16px !important;
  }

  #input-licencia-curso {
    min-width: 0 !important;
    flex: 1;
  }

  #btn-ver-cursos {
    padding: 0 12px !important;
    font-size: 0.8em !important;
  }

  #tabla-cursos-licencia thead th,
  #tabla-cursos-licencia tbody td {
    padding: 6px 8px !important;
    font-size: 0.8em !important;
  }
}

/* ============================================================
   CARDS DE CURSOS ACTIVADOS - COMPACTA AJUSTADA (+20% sobre la -30%)
   Efecto neto ≈ -16% respecto al diseño aprobado.
   Sobrescribe los estilos compartidos y los inline del JS.
   ============================================================ */
.cursos-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 19px !important;
  max-width: 945px !important;
}

.curso-card {
  max-width: 302px !important;
  min-width: 0 !important;
  padding: 0 !important;
  font-size: 0.84em !important; /* 0.8em +5% */
}

.curso-card > div:nth-child(2) {
  padding: 14px !important; /* 13px +5% */
}

.curso-card img {
  width: 193px !important;
  height: auto !important;
  margin-top: 9px !important;
  margin-bottom: 9px !important;
  box-shadow: 0 2px 6px #d2d2d2 !important;
}

/* Botón VER CURSO: +5% adicional */
.atenea-btn-curso {
  padding: 8px 17px !important;
  font-size: 1.05em !important;
}

/* Zona de licencia: +5% adicional */
.atenea-licencia-box {
  padding: 7px 10px !important;
  margin-top: 9px !important;
  border-radius: 7px !important;
}

.atenea-licencia-texto {
  font-size: 1.03em !important;
  letter-spacing: 0.63px !important;
}

.atenea-btn-ver-licencia {
  font-size: 1.21em !important;
  padding: 1px 5px !important;
}

/* Textos INICIO/FIN y fila de fechas */
.nombre-curso,
.curso-numero {
  margin-bottom: 7px !important;
}

@media (max-width: 900px) {
  .cursos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 676px !important;
  }
}

@media (max-width: 600px) {
  .cursos-grid {
    grid-template-columns: 1fr !important;
    max-width: 386px !important;
  }

  .curso-card {
    max-width: 362px !important;
  }
}