/* =====================================================
   SECCIÓN DIAGNÓSTICO RÁPIDO (PASO 1) + layout visual
   Archivo: src/css/sections/diagnostico.css
   ===================================================== */

/* Compatibilidad: .section-fast y .section-diagnostic-form */
.section-fast .section-inner,
.section-diagnostic-form .section-inner {
  gap: 2.25rem;
}

.section-fast form,
.section-diagnostic-form form {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Card del formulario (padding aquí; look+hover lo da cards.css) */
.diagnostic-form {
  padding: 1rem 1.1rem;
}

/* Acciones */
.fast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.fast-primary,
.fast-secondary {
  font-size: 0.96rem;
  font-weight: 600;
}

.fast-primary {
  padding-inline: 1.6rem;
}

.fast-secondary {
  padding-inline: 1.2rem;
}

/* Paso 2 */
.diagnostic-next[hidden] {
  display: none !important;
}

.diagnostic-next:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* =====================================================
   LAYOUT FORM + VISUAL (MIGRADO DEL <style> INLINE)
   ===================================================== */

/* Alias: diagnostic-layout == fast-layout */
.diagnostic-layout,
.fast-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.diagnostic-visual,
.fast-layout-secondary {
  min-width: 0;
}

/* Visual card (misma estética que la izquierda) */
.diagnostic-visual-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 1.5vw, 1.25rem);
  overflow: hidden;
}

.diagnostic-visual-figure {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
}

.diagnostic-visual-figure img {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--radius-lg, 18px) - 8px);
  background: transparent;
}

.diagnostic-visual-caption {
  margin: 0;
}

/* Grid desktop + igualar alturas */
@media (min-width: 960px) {
  .diagnostic-layout,
  .fast-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 3rem;
  }

  .diagnostic-form,
  .diagnostic-visual,
  .fast-layout-primary,
  .fast-layout-secondary {
    height: 100%;
  }

  .fast-layout-primary,
  .fast-layout-secondary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
  }

  .fast-layout-secondary {
    max-width: 480px;
    margin-left: auto;
  }
}

/* =====================================================
   Mockup (si usas .fast-media en tu HTML)
   ===================================================== */

.fast-media {
  margin: 0;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  min-height: 0;
}

.fast-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.9rem;
}

.fast-media-caption {
  display: none;
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #4b5563;
}

/* Fallback robusto (si no hay .fast-media) */
.section-fast .fast-layout-secondary figure,
.section-diagnostic-form .diagnostic-visual figure {
  margin: 0;
}

.section-fast .fast-layout-secondary figcaption,
.section-diagnostic-form .diagnostic-visual figcaption {
  display: none !important;
}

/* =====================================================
   Veredicto / planes
   ===================================================== */

.diag-output {
  margin-top: 1.75rem;
  padding: 1.2rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.diag-output-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-primary);
}

.diag-output-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
}

.diag-output-note {
  margin: 0;
  font-size: 0.82rem;
  color: #6b7280;
}

.diag-plans-intro {
  margin: 0.4rem 0 0.3rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.diag-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 0.4rem;
}

.diag-plan {
  /* Mantén estética si quieres 0.9rem: sobreescribe el token SOLO aquí */
  --card-radius: 0.9rem;

  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Estados */
.diag-plan[data-estado="GO"] {
  border-left: 4px solid #16a34a;
  border-color: #16a34a;
  background: #ecfdf3;

  --card-hover-bg: #ecfdf3;
  --card-hover-border: #16a34a;
}

.diag-plan[data-estado="CONDITIONAL"] {
  border-left: 4px solid #f97316;
  border-color: #f97316;
  background: #fff7ed;

  --card-hover-bg: #fff7ed;
  --card-hover-border: #f97316;
}

.diag-plan[data-estado="NO-GO"] {
  border-left: 4px solid #e11d48;
  border-color: #e11d48;
  background: #fdf2f8;

  --card-hover-bg: #fdf2f8;
  --card-hover-border: #e11d48;
}

.diag-plan-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.diag-plan-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
}

/* Plan destacado (badge): realce sin “moverlo” fijo */
.diag-plan:has(.diag-plan-badge) {
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.12);
  border-color: #1d4ed8;
  --card-hover-border: #1d4ed8;
}

.diag-plan-summary {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
}

.diag-plan-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #374151;
}

/* =====================================================
   OTRAS SECCIONES (servicio / proceso / encaje / FAQs)
   Solo layout y padding; “card look” lo da cards.css
   ===================================================== */

.section-service .section-inner,
.section-how-inner,
.section-fit .section-inner,
.section-social-proof .section-inner,
.section-faqs .section-inner {
  gap: 2.25rem;
}

.service-grid,
.fit-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-grid,
.fit-grid {
  gap: 1.75rem;
}

.faq-grid {
  gap: 1.5rem;
}

.service-item,
.step-item,
.info-card,
.fit-card {
  padding: 1rem 1.1rem;
}

.service-item h3,
.fit-card h3,
.info-title,
.step-title {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.service-item p,
.step-text,
.info-list,
.fit-list {
  margin: 0;
  font-size: 0.92rem;
  color: #374151;
  line-height: 1.6;
}

.section-how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.75rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-bullets {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: #374151;
}

.section-how-aside {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.info-card--muted {
  background: var(--c-surface, #f9fafb);
}

.section-how-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-how-primary,
.section-how-secondary {
  font-size: 0.96rem;
  font-weight: 600;
}

.section-how-primary {
  padding-inline: 1.6rem;
}

.section-how-secondary {
  padding-inline: 1.2rem;
}

/* Fit */
.fit-card--yes {
  border-left: 4px solid #16a34a;
}

.fit-card--no {
  border-left: 4px solid #f97316;
  background: #fff7ed;
}

.fit-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  line-height: 1.7;
}

.fit-note {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

/* FAQs */
.faq-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-column-title {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  font-weight: 600;
}

.faq-item {
  border-radius: 0.9rem;
  overflow: hidden;
}

.faq-item[open] {
  background: #ffffff;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.94rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 1rem 0.85rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #374151;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 960px) {
  .service-grid,
  .fit-grid,
  .section-how-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .diag-plans {
    grid-template-columns: 1fr;
  }

  .section-how-aside {
    order: -1;
  }
}

@media (max-width: 768px) {
  .section-inner {
    max-width: min(640px, 100% - 2rem);
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .fast-actions,
  .section-how-ctas {
    flex-direction: column;
  }

  .fast-primary,
  .fast-secondary,
  .section-how-primary,
  .section-how-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   TEMA OSCURO (solo texto/colores que no cubren tokens)
   ===================================================== */

[data-theme="dark"] .step-text,
[data-theme="dark"] .step-bullets,
[data-theme="dark"] .info-list,
[data-theme="dark"] .service-item p,
[data-theme="dark"] .fit-list,
[data-theme="dark"] .fit-note,
[data-theme="dark"] .fast-help,
[data-theme="dark"] .fast-consent,
[data-theme="dark"] .fast-note,
[data-theme="dark"] .faq-answer,
[data-theme="dark"] .faq-item summary {
  color: #e5e7eb;
}

[data-theme="dark"] .fit-card--no {
  background: #111827;
}

[data-theme="dark"] .info-title,
[data-theme="dark"] .step-title,
[data-theme="dark"] .service-item h3,
[data-theme="dark"] .fit-card h3,
[data-theme="dark"] .faq-column-title {
  color: #f9fafb;
}

[data-theme="dark"] .diag-output-title,
[data-theme="dark"] .diag-plan-title {
  color: #f9fafb;
}

[data-theme="dark"] .diag-output-text,
[data-theme="dark"] .diag-output-note,
[data-theme="dark"] .diag-plans-intro,
[data-theme="dark"] .diag-plan-summary,
[data-theme="dark"] .diag-plan-list {
  color: #e5e7eb;
}

/* Estados en dark */
[data-theme="dark"] .diag-plan[data-estado="GO"] {
  border-color: #22c55e;
  background: rgba(22, 163, 74, 0.18);

  --card-hover-bg: rgba(22, 163, 74, 0.18);
  --card-hover-border: #22c55e;
}

[data-theme="dark"] .diag-plan[data-estado="CONDITIONAL"] {
  border-color: #fb923c;
  background: rgba(248, 153, 59, 0.18);

  --card-hover-bg: rgba(248, 153, 59, 0.18);
  --card-hover-border: #fb923c;
}

[data-theme="dark"] .diag-plan[data-estado="NO-GO"] {
  border-color: #fb7185;
  background: rgba(248, 113, 113, 0.18);

  --card-hover-bg: rgba(248, 113, 113, 0.18);
  --card-hover-border: #fb7185;
}

[data-theme="dark"] .diag-plan:has(.diag-plan-badge) {
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.45);
  border-color: #60a5fa;
  --card-hover-border: #60a5fa;
}

/* OVIQA DIAG PROGRESS */
.diag-progress{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 0 0 12px 0;
  font-size: 0.95rem;
}
.diag-step{
  opacity: .55;
}
.diag-step.is-active{
  opacity: 1;
  font-weight: 600;
}


/* OVIQA DIAG STEPS VISIBILITY */
#resultPanel[hidden]{ display:none !important; }


/* OVIQA ARIA DISABLED BUTTONS */
button.is-disabled,
button[aria-disabled="true"]{
  opacity: .55;
  cursor: not-allowed;
}


/* OVIQA DIAG STEPPER SINGLE LABEL */
/* Solo se muestra el label del paso activo (1/2 o 2/2). */
.diag-progress .diag-step{
  display:none;
}
.diag-progress .diag-step.is-active{
  display:inline-flex;
  opacity: 1;
  font-weight: 600;
}

/* OVIQA DIAG TYPOGRAPHY LEGIBILITY (conversion-safe) */
#diagnostico-60s-form{
  font-size: 18px;
  line-height: 1.55;
}

#diagnostico-60s-form label{
  font-size: 18px;
  line-height: 1.35;
}

#diagnostico-60s-form select,
#diagnostico-60s-form button{
  font-size: 18px;
}

/* Texto secundario (ayudas/nota legal) — evita 12–14px en fondo oscuro */
#diagnostico-60s-form p,
#diagnostico-60s-form .hint,
#diagnostico-60s-form .help,
#diagnostico-60s-form .note{
  font-size: 16px;
  line-height: 1.55;
}
