/* ==========================================================================
   Certificación Oficial QGIS — página pública
   ========================================================================== */

.nav-link--active {
  color: var(--primary) !important;
}

/* Desplazamiento suave para las anclas internas (botones del banner) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------- HERO ----------------------------------- */
.cert-hero {
  position: relative;
  min-height: 420px;
  margin-top: 70px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.cert-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--bg-hero-overlay-start) 0%, var(--bg-hero-overlay-mid) 70%, transparent 100%);
}
.cert-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 72px 40px;
}
.cert-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--border);
}
.cert-hero-badge i { width: 15px; height: 15px; }
.cert-hero-title {
  font-family: var(--font-title);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 14px;
  color: var(--text-main);
}
.cert-hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.cert-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------- MAIN ----------------------------------- */
.cert-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px 64px;
}
.cert-section { margin-top: 54px; scroll-margin-top: 88px; }
.cert-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}
.cert-lead {
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-main);
  margin-bottom: 14px;
}
.cert-lead--aftercard { margin-top: 28px; }
.cert-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.cert-empty { color: var(--text-muted); font-style: italic; }

/* --------------------------- TIPOS (2 tarjetas) ------------------------- */
.cert-card {
  margin-top: 20px;
  padding: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cert-card--accent { border-color: var(--primary); box-shadow: var(--primary-light) 0 0 0 3px; }
.cert-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}
.cert-card h3 i { width: 20px; height: 20px; color: var(--primary); }
.cert-card p { font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.cert-card p + p { margin-top: 10px; }

/* ------------------------------ BENEFICIOS ------------------------------ */
.cert-benefits { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.cert-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.cert-benefits strong { color: var(--text-main); }
.cert-emoji { font-size: 26px; line-height: 1.1; }

/* -------------------------------- PASOS --------------------------------- */
.cert-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}
.cert-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cert-step-num {
  font-family: var(--font-title);
  font-size: 64px;
  font-weight: 900;
  line-height: 0.9;
  color: var(--primary);
  opacity: 0.9;
  flex-shrink: 0;
}
.cert-step p { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); margin-top: 6px; }
.cert-step strong { color: var(--text-main); }

/* ---------------------------- IMAGEN MUESTRA ---------------------------- */
.cert-sample {
  margin: 34px auto 0;
  max-width: 720px;
  text-align: center;
}
.cert-sample img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.cert-sample figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* --------------------------- CURSOS CERTIFICABLES ----------------------- */
.cert-curso-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}
.cert-curso-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.cert-curso-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.cert-curso-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.cert-curso-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

/* --------------------------------- CTA ---------------------------------- */
.cert-cta {
  margin-top: 60px;
  padding: 40px 28px;
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.cert-cta-text {
  font-family: var(--font-title);
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
}

/* ------------------------------- RESPONSIVE ----------------------------- */
/* ======================= FORMULARIO DE PEDIDO ========================== */
.cert-form-main { max-width: 720px; padding-top: 100px; }

/* Controles reutilizados del sitio (sin cargar auth.css para no romper el body) */
.btn-block {
  width: 100%;
  padding: 13px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-block:hover { background: var(--primary-hover); }
.btn-block:disabled { opacity: 0.6; cursor: not-allowed; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.4;
}
.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
}
.alert-info {
  background: var(--primary-light);
  border: 1px solid rgba(242, 92, 78, 0.35);
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}
.alert-info a { color: var(--primary); font-weight: 600; }

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: pointer;
}
.terms-check input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.terms-check a { color: var(--primary); font-weight: 600; text-decoration: none; }
.terms-check a:hover { text-decoration: underline; }
.cert-back {
  display: inline-block;
  margin: 28px 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.cert-back:hover { text-decoration: underline; }
.cert-form {
  margin: 22px 0;
  padding: 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cert-form-row { display: flex; gap: 16px; }
.cert-field { flex: 1; display: flex; flex-direction: column; margin-bottom: 16px; }
.cert-field label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}
.cert-field input,
.cert-field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: var(--transition);
}
.cert-field input:focus,
.cert-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.cert-input-disabled { opacity: 0.7; }
.cert-form-submit { margin-top: 8px; }
.cert-form-done {
  margin: 22px 0;
  padding: 34px 26px;
  text-align: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cert-form-done h2 { font-family: var(--font-title); font-size: 24px; font-weight: 800; margin: 10px 0; color: var(--text-main); }
.cert-form-done p { color: var(--text-muted); }
.cert-form-info {
  margin-top: 26px;
  padding: 22px 24px;
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.cert-form-info p { font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.cert-form-info p + p { margin-top: 12px; }
.cert-form-info a { color: var(--primary); }

/* ------------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 768px) {
  .cert-hero { margin-top: 65px; }
  .cert-hero-content { padding: 56px 22px; }
  .cert-steps { grid-template-columns: 1fr; }
  .cert-step-num { font-size: 52px; }
  .cert-main { padding: 0 18px 48px; }
  .cert-form-row { flex-direction: column; gap: 0; }
  .cert-form { padding: 20px; }
  .cert-form-main { padding: 86px 18px 48px; }
}
