/* ================================================
   REPOSITORIO DIGITAL - Biblioteca ENEG
   ================================================ */

.repositorio-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.repositorio-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1a2744 0%, #2c3e6b 100%);
  border-radius: 12px;
  color: #fff;
}

.repositorio-header h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: #fff;
  border: none;
}

.repositorio-subtitulo {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0;
}

.repositorio-filtros {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.filtros-inner {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filtro-busqueda { flex: 1; min-width: 200px; }

.input-busqueda {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.input-busqueda:focus { outline: none; border-color: #1a2744; }

.select-categoria {
  padding: 0.65rem 1rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  cursor: pointer;
  min-width: 200px;
}

.select-categoria:focus { outline: none; border-color: #1a2744; }

.btn-filtrar {
  padding: 0.65rem 1.5rem;
  background: #1a2744;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-filtrar:hover { background: #2c3e6b; color: #fff; }

.btn-limpiar {
  padding: 0.65rem 1rem;
  background: transparent;
  color: #666;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-limpiar:hover { border-color: #999; color: #333; }

.repositorio-contador {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #666;
  padding: 0 0.25rem;
}

.recursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.recurso-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.recurso-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26,39,68,0.12);
}

.recurso-icono { font-size: 2.5rem; line-height: 1; }

.recurso-categoria-badge {
  display: inline-block;
  background: #e8ecf5;
  color: #1a2744;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recurso-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2744;
  margin: 0;
  line-height: 1.4;
}

.recurso-meta { display: flex; flex-direction: column; gap: 0.25rem; }

.meta-autor, .meta-anio { font-size: 0.85rem; color: #555; }

.recurso-descripcion {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.recurso-acciones {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-descargar {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #1a2744;
  color: #fff !important;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-descargar:hover { background: #2c3e6b; color: #fff !important; }

.btn-enlace {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  color: #1a2744 !important;
  border: 2px solid #1a2744;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-enlace:hover { background: #1a2744; color: #fff !important; }

.sin-archivo { font-size: 0.82rem; color: #888; font-style: italic; }

.repositorio-vacio { text-align: center; padding: 4rem 2rem; color: #888; }
.vacio-icono { font-size: 4rem; margin-bottom: 1rem; }
.repositorio-vacio h3 { color: #555; margin-bottom: 0.5rem; }

@media (max-width: 600px) {
  .filtros-inner { flex-direction: column; }
  .filtro-busqueda, .select-categoria, .btn-filtrar, .btn-limpiar { width: 100%; }
  .recursos-grid { grid-template-columns: 1fr; }
  .repositorio-header h1 { font-size: 1.5rem; }
}

/* === FUENTE Y BOTÓN EXTERNO === */
.meta-fuente {
  display: inline-block;
  background: #e8f0fe;
  color: #1a2744;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn-enlace {
  display: inline-block;
  padding: 8px 16px;
  background: #1a2744;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-enlace:hover { background: #2a3f6f; }

/* Secciones multimedia */
.multimedia-seccion {
  color: #1a2744;
  font-size: 1.2rem;
  margin: 2rem 0 1.25rem 0;
  padding-left: 0.75rem;
  border-left: 4px solid #c8a96e;
}

/* eneg-card con estilo repositorio */
.eneg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.eneg-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.eneg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.eneg-card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.eneg-card h3 { color: #1a2744; font-size: 1rem; margin-bottom: 0.75rem; }
