/* ============================================================
   REPOSITORIO DE RECURSOS 
   ============================================================ */




/* --- Leyenda (tipo de contenido) --- */
.repo-legend {
  padding: 20px 24px;
  flex: none;
  min-width: 160px;
  align-self: flex-start;
}

.repo-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.repo-legend-item small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--slate-light);
}

.repo-legend-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid transparent;
  flex: none;
  display: inline-block;
}

.repo-badge-permanente {
  background: var(--blue-600);
  border-color: var(--blue-700);
}

.repo-badge-temporal {
  background: transparent;
  border-color: var(--slate-light);
  border-style: dashed;
}

/* --- Tabs de categoría --- */
.repo-tabs-mobile {
  display: none;
}

.repo-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 20px;
  width: 100%;
  background: transparent;
}

.repo-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  flex: 1; /* Esto hace que los botones se estiren para ocupar todo el ancho uniformemente */
}

.repo-tab i {
  font-size: 14px;
  flex: none;
}

.repo-tab:hover {
  background: var(--sky-100);
  border-color: var(--sky-200);
  color: var(--navy-900);
}

.repo-tab.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   BANCO DE PLANTILLAS
   ============================================================ */

.repo-plantillas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Tarjeta de plantilla */
.repo-plantilla-card {
  /* bg, border, radius-md, shadow, transition → .card .card-sm .card-interactive .card-col */
  overflow: hidden;
  gap: 0;
}

.repo-plantilla-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 20px;
  background: var(--sky-100);
  border-bottom: 1px solid var(--line);
  min-height: 110px;
}

/* Icono de archivo grande */
.repo-file-icon {
  font-size: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.repo-file-docx { color: #2b5be0; }
.repo-file-xlsx { color: #1e7f45; }
.repo-file-pptx { color: #c43b1a; }
.repo-file-pdf  { color: #c0392b; }

/* Badge de tipo de archivo */
.repo-file-type-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-docx { background: #dce9fb; color: #2b5be0; }
.badge-xlsx { background: #d6f0e0; color: #1e7f45; }
.badge-pptx { background: #fde8e3; color: #c43b1a; }
.badge-pdf  { background: #fde3e3; color: #c0392b; }

/* Cuerpo de la tarjeta */
.repo-plantilla-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  flex: 1;
}

.repo-plantilla-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14.5px;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.3;
}

.repo-plantilla-desc {
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

.repo-plantilla-footer {
  margin-top: 8px;
}

.repo-plantilla-footer .btn {
  width: 100%;
  justify-content: center;
  font-size: 12px;
  letter-spacing: .04em;
  font-weight: 800;
  text-transform: uppercase;
  gap: 8px;
}

.repo-plantilla-footer .btn i {
  font-size: 13px;
}


/* ============================================================
   VIDEOTECA
   ============================================================ */

.repo-videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* Tarjeta de video */
.repo-video-card {
  /* bg, border, radius-md, shadow, transition → .card .card-sm .card-interactive .card-col */
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  gap: 0;
  text-decoration: none !important;
}

.repo-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-900);
  flex: none;
}

.repo-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, filter .3s ease;
}

.repo-video-card:hover .repo-video-thumb img {
  transform: scale(1.05);
  filter: brightness(.85);
}

/* Overlay con botón play */
.repo-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 33, 61, .35);
  transition: background .2s;
}

.repo-video-card:hover .repo-video-overlay {
  background: rgba(7, 33, 61, .5);
}

.repo-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  transition: transform .2s, background .2s;
}

.repo-play-btn i {
  font-size: 17px;
  color: var(--navy-900);
  margin-left: 3px; /* compensar visualmente el ícono de play */
}

.repo-video-card:hover .repo-play-btn {
  transform: scale(1.1);
  background: var(--teal-500);
}

.repo-video-card:hover .repo-play-btn i {
  color: var(--navy-900);
}

/* Badge de duración */
.repo-video-duration {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(7,33,61,.82);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .02em;
}

/* Cuerpo de la tarjeta de video */
.repo-video-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 14px;
  flex: 1;
}

.repo-video-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14.5px;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.3;
}

.repo-video-desc {
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.repo-video-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--slate-light);
  font-weight: 600;
  margin-top: 4px;
}

.repo-video-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.repo-video-meta i {
  font-size: 11px;
  flex: none;
}


/* ============================================================
   RESPONSIVE — Repositorio
   ============================================================ */
@media (max-width: 1080px) {
  .repo-plantillas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .repo-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .repo-legend {
    width: 100%;
    flex-direction: row;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  .repo-plantillas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .repo-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .repo-tabs-desktop {
    display: none !important;
  }
  .repo-tabs-mobile {
    display: block !important;
  }
}

@media (max-width: 480px) {
  .repo-plantillas-grid,
  .repo-videos-grid {
    grid-template-columns: 1fr;
  }
}

