/* ============================================================
   SAMFYR Courses — Front-end Styles
   ============================================================ */

:root {
  --sfc-primary:    #005da4;
  --sfc-secondary:  #009edb;
  --sfc-dark:       #313030;
  --sfc-gray:       #9fa4a6;
  --sfc-light:      #f1f1f1;
  --sfc-white:      #ffffff;
  --sfc-radius:     10px;
  --sfc-shadow:     0 4px 20px rgba(0,93,164,.10);
  --sfc-transition: 0.22s ease;

  /* Modality badge colours */
  --sfc-online:        #009edb;
  --sfc-online-sinc:   #005da4;
  --sfc-webinar:       #7b5ea7;
  --sfc-presencial:    #1e8c5c;
}

/* ── Section wrapper ──────────────────────── */
.sfc-proximos-cursos {
  padding: 5rem 0;
  margin: 2rem 0;
}

.sfc-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sfc-dark);
  margin-bottom: 2rem;
  position: relative;
}
.sfc-section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--sfc-secondary);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* ── Grid ─────────────────────────────────── */
.sfc-cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

/* ── Card ─────────────────────────────────── */
.sfc-curso-card {
  background: var(--sfc-white);
  border-radius: var(--sfc-radius);
  box-shadow: var(--sfc-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--sfc-transition), box-shadow var(--sfc-transition);
}
.sfc-curso-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,93,164,.18);
}

.sfc-curso-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.sfc-curso-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Modality badges ──────────────────────── */
.sfc-modalidades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.sfc-modalidad-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.75em;
  border-radius: 100px;
  color: var(--sfc-white);
  background: var(--sfc-primary);
}
.sfc-mod-online               { background: var(--sfc-online); }
.sfc-mod-online-sincronico    { background: var(--sfc-online-sinc); }
.sfc-mod-online-sinc-oacuten  { background: var(--sfc-online-sinc); }
.sfc-mod-webinar              { background: var(--sfc-webinar); }
.sfc-mod-presencial           { background: var(--sfc-presencial); }

/* ── Card title ───────────────────────────── */
.sfc-curso-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.sfc-curso-title a {
  color: var(--sfc-dark);
  text-decoration: none;
  transition: color var(--sfc-transition);
}
.sfc-curso-title a:hover { color: var(--sfc-primary); }

/* ── Meta ─────────────────────────────────── */
.sfc-curso-docente,
.sfc-curso-dates {
  font-size: 0.83rem;
  color: var(--sfc-gray);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.sfc-curso-docente svg,
.sfc-curso-dates svg {
  flex-shrink: 0;
  color: var(--sfc-secondary);
}
.sfc-duracion::before { content: '·'; margin: 0 0.2em; }

/* ── Excerpt ──────────────────────────────── */
.sfc-curso-excerpt {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
  margin-top: 0.25rem;
}

/* ── Actions ──────────────────────────────── */
.sfc-curso-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ── Buttons ──────────────────────────────── */
.sfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--sfc-transition), color var(--sfc-transition), border-color var(--sfc-transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}
.sfc-btn-primary {
  background: var(--sfc-secondary);
  color: var(--sfc-white);
  border-color: var(--sfc-secondary);
}
.sfc-btn-primary:hover {
  background: var(--sfc-primary);
  border-color: var(--sfc-primary);
  color: var(--sfc-white);
}
.sfc-btn-outline {
  background: transparent;
  color: var(--sfc-primary);
  border-color: var(--sfc-primary);
}
.sfc-btn-outline:hover {
  background: var(--sfc-primary);
  color: var(--sfc-white);
}
.sfc-btn-ghost {
  background: transparent;
  color: var(--sfc-primary);
  border-color: transparent;
  font-size: 0.9rem;
}
.sfc-btn-ghost:hover {
  color: var(--sfc-secondary);
}

/* ── Ver todos ────────────────────────────── */
.sfc-ver-todos {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ── Empty state ──────────────────────────── */
.sfc-no-cursos {
  color: var(--sfc-gray);
  font-style: italic;
}

/* ── Admin badge ──────────────────────────── */
.sfc-badge {
  display: inline-block;
  background: var(--sfc-primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ============================================================
   SINGLE CURSO PAGE
   ============================================================ */
.sfc-single-curso {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.sfc-single-header {
  margin-bottom: 2rem;
}
.sfc-single-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sfc-dark);
  margin-bottom: 0.75rem;
}
.sfc-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--sfc-gray);
}
.sfc-single-featured { margin-bottom: 2rem; }
.sfc-single-featured img {
  width: 100%;
  border-radius: var(--sfc-radius);
  max-height: 380px;
  object-fit: cover;
}

/* Info box ─────────────────────────────────── */
.sfc-info-box {
  background: var(--sfc-light);
  border-left: 4px solid var(--sfc-secondary);
  border-radius: 0 var(--sfc-radius) var(--sfc-radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.sfc-info-item {}
.sfc-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sfc-gray);
  display: block;
  margin-bottom: 0.2rem;
}
.sfc-info-value {
  font-size: 0.95rem;
  color: var(--sfc-dark);
  font-weight: 500;
}

/* Sections ─────────────────────────────────── */
.sfc-section { margin: 2.5rem 0; }
.sfc-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sfc-primary);
  border-bottom: 2px solid var(--sfc-light);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}
.sfc-section p,
.sfc-section ul,
.sfc-section ol {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.7;
}

/* Fees table ───────────────────────────────── */
.sfc-tarifas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.sfc-tarifas-table th {
  background: var(--sfc-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}
.sfc-tarifas-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--sfc-light);
}
.sfc-tarifas-table tr:last-child td { border-bottom: none; }

/* CTA buttons ──────────────────────────────── */
.sfc-cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--sfc-light);
  justify-content: center;
}
.sfc-cta-buttons .sfc-btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 8px;
}

/* Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .sfc-cursos-grid { grid-template-columns: 1fr; }
  .sfc-single-title { font-size: 1.5rem; }
  .sfc-info-box { grid-template-columns: 1fr 1fr; }
  .sfc-cta-buttons { flex-direction: column; align-items: stretch; }
  .sfc-cta-buttons .sfc-btn { text-align: center; }
}
