/**
 * ======================================================
 * ARCHIVO: cursos-gratis.css
 * UBICACIÓN: frontend/public/styles/
 * VERSIÓN: 1.0 — UI cursos gratis por áreas
 * ÚLTIMA ACTUALIZACIÓN: 2026-03-30 00:05
 *
 * 🎯 PROPÓSITO:
 * Estilos de la página cursos-gratis con identidad Soluciones Lamakinet:
 * header consistente, mejor proporción de logo, filtros por área y tarjetas.
 *
 * ======================================================
 * 📋 HISTORIAL DE CAMBIOS:
 * ---
 * [1.0] - 2026-03-30 00:05
 * ✅ Creación inicial
 * ======================================================
 */

body.cg-page {
  min-height: 100vh;
}

body.cg-page .bonos-header .header-inner {
  max-width: 1280px;
}

.cg-user-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}

.cg-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 16px 56px;
}

.cg-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
}

.cg-hero h1 {
  font-size: 1.7rem;
  margin: 0 0 10px 0;
  color: #0f172a;
}

.cg-hero p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.cg-filter {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cg-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cg-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.87rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cg-chip:hover {
  border-color: #1f4fd8;
  color: #1f4fd8;
}

.cg-chip.is-active {
  border-color: #1f4fd8;
  background: #1f4fd8;
  color: #ffffff;
}

.cg-filter-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-weight: 500;
}

.cg-filter-select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
}

.cg-content {
  display: grid;
  gap: 20px;
}

.cg-area {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.cg-area-title {
  margin: 0 0 14px 0;
  font-size: 1.2rem;
  color: #1f4fd8;
  border-bottom: 2px solid rgba(31, 79, 216, 0.2);
  padding-bottom: 8px;
  display: inline-block;
}

.cg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.cg-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.cg-card h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #0f172a;
}

.cg-card p {
  margin: 0 0 10px 0;
  font-size: 0.92rem;
  color: #475569;
}

.cg-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

.cg-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cg-empty,
.cg-loading,
.cg-error,
.cg-auth-warning {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}

.cg-auth-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

@media (max-width: 768px) {
  .cg-main {
    padding-top: 16px;
  }

  .cg-filter-select-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .cg-filter-select {
    min-width: 180px;
  }

  .cg-cards {
    grid-template-columns: 1fr;
  }
}
