/* =====================
   GRID DE CARDS
===================== */
.capacitaciones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}



/* =====================
   CARD
===================== */
.card {
  position: relative;
  background: #fdfefe;
  padding: 1.8rem 1.6rem 1.6rem;
  border-radius: var(--radius);
  border-top: 6px solid var(--primary);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  /* 🔑 CLAVE */
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

/* =====================
   CONTENIDO SUPERIOR
===================== */

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #4c7a88;
  margin-bottom: 0.6rem;
}

.card-meta i {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-right: 0.3rem;
}

/* Título */
.card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);

  line-clamp: 3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: calc(1.25rem * 1.2 * 3);
  margin: 0 0 0.6rem;
}

/* =====================
   DOCENTES
===================== */

.card-docentes {
  min-height: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #3a6b78;
}

/* OJO: no tocar display acá, ya lo tenés blindado */
.card-docentes .docente {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.25;
}


/* =====================
   ACCIONES (BOTONES)
===================== */

.card-actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding-top: 1rem;

  /* 🔑 CLAVE */
  align-self: end;
}

/* =====================
   BOTONES
===================== */

.card a {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--secondary);
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card a:hover {
  background: var(--primary);
}

.card-main {
  display: flex;
  flex-direction: column;
}

/* =====================
   BOTÓN DESHABILITADO
===================== */

.card-link.disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;

  background: #cfdfe3;
  color: #6b8a94;

  cursor: not-allowed;
  pointer-events: auto;   /* 👈 clave para hover */
  text-align: center;

  position: relative;     /* 👈 ancla del tooltip */
}

/* =====================
   TOOLTIP INSCRIPCIÓN
===================== */

.card-link.disabled::after {
  content: attr(data-tooltip);

  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);

  background: #003b44;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;

  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.card-link.disabled::before {
  content: "";
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);

  border-width: 6px;
  border-style: solid;
  border-color: #003b44 transparent transparent transparent;

  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-link.disabled:hover::after,
.card-link.disabled:hover::before {
  opacity: 1;
}

/* Tooltip solo si existe data-tooltip */
.card-link.disabled[data-tooltip]::after,
.card-link.disabled[data-tooltip]::before {
  display: block;
}

.card-link.disabled:not([data-tooltip])::after,
.card-link.disabled:not([data-tooltip])::before {
  display: none;
}


/*Badge*/
.card-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sincrónico */
.card-badge.sincronico {
  background: #ffe8c7;
  color: #a25a00;
}

/* Autogestivo */
.card-badge.autogestivo {
  background: #dff4ea;
  color: #1d7a55;
}



/* =====================
   DOCENTES CON FOTO
===================== */

/* Contenedor de todos los docentes */
.card-docentes {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

/* Cada docente: fila (blindado) */
.card-docentes .docente {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.8rem;
}

/* Imagen del docente (mejor calidad) */
.card-docentes .docente img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;

  border: 2px solid var(--secondary);

  /* 🔑 CLAVES ANTI-PIXELADO */
  image-rendering: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* ❌ NO usar aceleración */
  transform: none;
  backface-visibility: visible;
}



/* Nombre del docente */
.card-docentes .docente span {
  display: inline;
  width: auto;
  white-space: nowrap;

  font-size: 0.9rem;
  line-height: 1.2;
  color: #3a6b78;

  margin: 0;
  padding: 0;
}

/* Título "Docentes:" */
.card-docentes-title {
  margin: 0.6rem 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}


/* =====================
   CONTENIDOS / TEMAS
===================== */
.card-topics {
  margin: 1rem 0 0;
  padding: 0;

  list-style: none;

  font-size: 0.85rem;
  color: #3a6b78;

  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Ícono tipo flecha institucional */
.card-topics li {
  position: relative;
  padding-left: 1.1rem;
  line-height: 1.3;
}

.card-topics li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary);
  font-weight: 700;
}


.tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Tab base */
.tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Tab base = INACTIVA */
.tab {
  padding: 0.7rem 1.6rem;
  border-radius: 999px;

  background: var(--secondary);
  border: 2px solid var(--secondary);
  color: #ffffff;

  font-weight: 600;
  cursor: pointer;

  transition: all 0.25s ease;
}

/* Hover sobre inactivas */
.tab:hover {
  background: #ffffff;
  color: var(--secondary);
}

/* Tab ACTIVA */
.tab.active {
  background: var(--primary);
  border: 2px solid var(--primary);
  color: #ffffff;

  box-shadow: none;
}



/* =====================
   TABS + BOTÓN INFO EN FILA
===================== */
.tabs,
.floating-info {
  display: inline-flex;
  align-items: center;
}

.floating-info {
  margin-left: 0.6rem;
}


/* =====================
   TAB VALORES – ANIMADO
===================== */
.tab.valores {
  animation: pulseAttention 2.8s ease-in-out infinite;
  border: none;
}

.tab.valores:hover {
  border: none;
  color: white;
}




@keyframes pulseAttention {
  0% {
    transform: scale(1);
    background: #7027de; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  }

  50% {
    transform: scale(1.05);
    background: #de6127;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  }

  100% {
    transform: scale(1);
    background: #7027de; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  }
}

/* =====================
   MOBILE – CARDS EN UNA COLUMNA
===================== */
@media (max-width: 768px) {
  .capacitaciones {
    grid-template-columns: 1fr;
  }
}


/* =====================
   DOCENTE INFO (NOMBRE + MATRÍCULA)
===================== */

.docente-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.docente-nombre {
  font-size: 0.9rem;
  color: #3a6b78;
  font-weight: 600;
}

.docente-matricula {
  font-size: 0.75rem;
  color: #6b8a94;
  margin-top: 0.1rem;
}



