/* =========================================================
   CURSO AUTOINSTRUCTIVO — VISTA INTERNA
   ========================================================= */

#cursoAutoinstructivoInterna {
  --auto-gold: #d4af37;
  --auto-gold-light: #fff1a6;
  --auto-gold-soft: #f5d67b;
  --auto-text: #ffffff;
  --auto-muted: rgba(255, 255, 255, 0.68);
  --auto-line: rgba(255, 255, 255, 0.08);
  --auto-gold-line: rgba(212, 175, 55, 0.28);
  --auto-success: #8ee58a;
  --auto-warning: #ffd27a;
  --auto-danger: #ffaaaa;

  position: relative;
  width: 100%;
  min-height: 100%;
  color: var(--auto-text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(900px 520px at 76% 8%, rgba(212, 175, 55, 0.14), transparent 68%),
    linear-gradient(180deg, #090909, #030303);
  border-radius: 24px;
  overflow: visible;
}

#cursoAutoinstructivoInterna *,
#cursoAutoinstructivoInterna *::before,
#cursoAutoinstructivoInterna *::after {
  box-sizing: border-box;
}

#cursoAutoinstructivoInterna button {
  font: inherit;
}

#cursoAutoinstructivoInterna .autoinstructivo-page {
  width: 100%;
  max-width: 1180px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 30px 28px 52px;
}

/* NAV */
#cursoAutoinstructivoInterna .autoinstructivo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

#cursoAutoinstructivoInterna .autoinstructivo-back,
#cursoAutoinstructivoInterna .autoinstructivo-reload-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--auto-gold-line);
  border-radius: 13px;
  background: rgba(212, 175, 55, 0.06);
  color: var(--auto-gold-light);
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: 0.18s ease;
}

#cursoAutoinstructivoInterna .autoinstructivo-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#cursoAutoinstructivoInterna .autoinstructivo-back:hover,
#cursoAutoinstructivoInterna .autoinstructivo-reload-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 224, 102, 0.52);
  background: rgba(212, 175, 55, 0.11);
}

#cursoAutoinstructivoInterna .autoinstructivo-top-status {
  color: rgba(255,255,255,.56);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* HERO */
#cursoAutoinstructivoInterna .autoinstructivo-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(255, 224, 102, 0.34);
  border-radius: 28px;
  background:
    radial-gradient(680px 300px at 12% 10%, rgba(212, 175, 55, 0.18), transparent 68%),
    radial-gradient(360px 220px at 92% 76%, rgba(59, 146, 255, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(18,18,18,.94), rgba(7,7,7,.98));
  box-shadow: 0 0 0 1px rgba(212,175,55,.1), 0 24px 58px rgba(0,0,0,.4), 0 0 38px rgba(212,175,55,.1);
}

#cursoAutoinstructivoInterna .autoinstructivo-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.04), transparent 50%, rgba(255,255,255,.02));
}

#cursoAutoinstructivoInterna .autoinstructivo-hero-copy,
#cursoAutoinstructivoInterna .autoinstructivo-metrics {
  position: relative;
  z-index: 2;
}

#cursoAutoinstructivoInterna .autoinstructivo-badge,
#cursoAutoinstructivoInterna .autoinstructivo-section-kicker {
  color: var(--auto-gold-soft);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

#cursoAutoinstructivoInterna .autoinstructivo-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 9px 15px;
  border: 1px solid rgba(212,175,55,.34);
  border-radius: 999px;
  background: rgba(212,175,55,.07);
  color: var(--auto-gold-light);
}

#cursoAutoinstructivoInterna .autoinstructivo-title {
  max-width: 680px;
  margin: 0 0 14px;
  color: #fff;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 900;
}

#cursoAutoinstructivoInterna .autoinstructivo-description {
  max-width: 660px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: .98rem;
  line-height: 1.62;
}

#cursoAutoinstructivoInterna .autoinstructivo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

#cursoAutoinstructivoInterna .autoinstructivo-chip {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.78);
  font-size: .79rem;
  font-weight: 750;
}

/* METRICS */
#cursoAutoinstructivoInterna .autoinstructivo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#cursoAutoinstructivoInterna .autoinstructivo-metric-card {
  min-width: 0;
  min-height: 128px;
  padding: 16px;
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(22,22,22,.94), rgba(10,10,10,.98));
  box-shadow: 0 12px 26px rgba(0,0,0,.22);
}

#cursoAutoinstructivoInterna .autoinstructivo-metric-label {
  display: block;
  color: #d9c48c;
  font-size: .69rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .045em;
}

#cursoAutoinstructivoInterna .autoinstructivo-metric-value {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.16;
}

#cursoAutoinstructivoInterna .autoinstructivo-metric-status {
  font-size: 1.02rem;
  color: var(--auto-gold-light);
}

#cursoAutoinstructivoInterna .autoinstructivo-metric-description {
  margin: 7px 0 0;
  color: rgba(255,255,255,.57);
  font-size: .77rem;
  line-height: 1.42;
}

/* HOW IT WORKS */
#cursoAutoinstructivoInterna .autoinstructivo-learning-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18,18,18,.92), rgba(9,9,9,.97));
}

#cursoAutoinstructivoInterna .autoinstructivo-learning-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212,175,55,.25);
  border-radius: 15px;
  background: rgba(212,175,55,.06);
  font-size: 1.25rem;
}

#cursoAutoinstructivoInterna .autoinstructivo-learning-panel h2,
#cursoAutoinstructivoInterna .autoinstructivo-section-heading h2,
#cursoAutoinstructivoInterna .autoinstructivo-final-card h2 {
  margin: 6px 0 8px;
  color: #fff;
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 900;
}

#cursoAutoinstructivoInterna .autoinstructivo-learning-panel p,
#cursoAutoinstructivoInterna .autoinstructivo-section-heading p,
#cursoAutoinstructivoInterna .autoinstructivo-final-card p {
  margin: 0;
  color: var(--auto-muted);
  line-height: 1.58;
  font-size: .91rem;
}

/* CONTENT */
#cursoAutoinstructivoInterna .autoinstructivo-content {
  margin-top: 28px;
}

#cursoAutoinstructivoInterna .autoinstructivo-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

#cursoAutoinstructivoInterna .autoinstructivo-section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

/* LOADING / EMPTY */
#cursoAutoinstructivoInterna .autoinstructivo-loading,
#cursoAutoinstructivoInterna .autoinstructivo-empty {
  min-height: 210px;
  padding: 30px;
  border: 1px solid var(--auto-line);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.68);
  text-align: center;
}

#cursoAutoinstructivoInterna .autoinstructivo-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

#cursoAutoinstructivoInterna .autoinstructivo-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,.09);
  border-top-color: var(--auto-gold);
  border-radius: 50%;
  animation: autoSpinner .8s linear infinite;
}

#cursoAutoinstructivoInterna .autoinstructivo-empty-icon {
  margin-bottom: 10px;
  font-size: 2.2rem;
}

#cursoAutoinstructivoInterna .autoinstructivo-empty h3 {
  margin: 0 0 8px;
  color: #fff7d1;
}

#cursoAutoinstructivoInterna .autoinstructivo-empty p {
  margin: 0;
  color: rgba(255,255,255,.64);
}

#cursoAutoinstructivoInterna .autoinstructivo-loading[hidden],
#cursoAutoinstructivoInterna .autoinstructivo-empty[hidden],
#cursoAutoinstructivoInterna .autoinstructivo-reload-button[hidden] {
  display: none !important;
}

/* LESSONS */
#cursoAutoinstructivoInterna .autoinstructivo-lessons {
  display: grid;
  gap: 14px;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18,18,18,.94), rgba(10,10,10,.98));
  box-shadow: 0 12px 24px rgba(0,0,0,.2);
  transition: .2s ease;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson:not(.is-locked):hover {
  transform: translateY(-2px);
  border-color: rgba(255,224,102,.35);
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 50%;
  background: rgba(212,175,55,.07);
  color: var(--auto-gold-light);
  font-weight: 900;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson p {
  margin: 0;
  color: rgba(255,255,255,.61);
  font-size: .86rem;
  line-height: 1.5;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-meta span,
#cursoAutoinstructivoInterna .autoinstructivo-final-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.66);
  font-size: .7rem;
  font-weight: 750;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson.is-dominated .autoinstructivo-lesson-state {
  color: #bff5a9;
  border-color: rgba(142,229,138,.25);
  background: rgba(142,229,138,.05);
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson.is-progress .autoinstructivo-lesson-state {
  color: var(--auto-gold-light);
  border-color: rgba(212,175,55,.28);
  background: rgba(212,175,55,.06);
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson.is-locked {
  opacity: .48;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson.is-locked .autoinstructivo-lesson-state {
  color: rgba(255,255,255,.58);
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-button,
#cursoAutoinstructivoInterna .autoinstructivo-primary-button,
#cursoAutoinstructivoInterna .autoinstructivo-secondary-button {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 14px;
  font-weight: 900;
  font-size: .82rem;
  cursor: pointer;
  transition: .18s ease;
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-button,
#cursoAutoinstructivoInterna .autoinstructivo-primary-button {
  border: 1px solid rgba(255,241,166,.55);
  background: linear-gradient(180deg, #fff2c2, #f5d67b 45%, #d4af37);
  color: #1d1605;
}

#cursoAutoinstructivoInterna .autoinstructivo-secondary-button {
  border: 1px solid rgba(212,175,55,.34);
  background: rgba(212,175,55,.06);
  color: var(--auto-gold-light);
}

#cursoAutoinstructivoInterna button:disabled {
  cursor: not-allowed;
  opacity: .5;
  filter: grayscale(.25);
}

#cursoAutoinstructivoInterna .autoinstructivo-lesson-button:not(:disabled):hover,
#cursoAutoinstructivoInterna .autoinstructivo-primary-button:not(:disabled):hover,
#cursoAutoinstructivoInterna .autoinstructivo-secondary-button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* FINAL */
#cursoAutoinstructivoInterna .autoinstructivo-final-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
  margin-top: 28px;
}

#cursoAutoinstructivoInterna .autoinstructivo-final-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(212,175,55,.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18,18,18,.96), rgba(9,9,9,.99));
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

#cursoAutoinstructivoInterna .autoinstructivo-final-card > button {
  grid-column: 1 / -1;
  width: 100%;
}

#cursoAutoinstructivoInterna .autoinstructivo-final-card.is-locked {
  border-color: rgba(255,255,255,.08);
}

#cursoAutoinstructivoInterna .autoinstructivo-final-card.is-ready {
  border-color: rgba(255,224,102,.42);
  box-shadow: 0 16px 34px rgba(0,0,0,.28), 0 0 24px rgba(212,175,55,.09);
}

#cursoAutoinstructivoInterna .autoinstructivo-final-card.is-complete {
  border-color: rgba(142,229,138,.28);
}

#cursoAutoinstructivoInterna .autoinstructivo-final-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212,175,55,.24);
  border-radius: 15px;
  background: rgba(212,175,55,.06);
  font-size: 1.2rem;
}

#cursoAutoinstructivoInterna .autoinstructivo-final-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* FOOTER */
#cursoAutoinstructivoInterna .autoinstructivo-footer {
  margin-top: 42px;
  padding: 20px 14px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

#cursoAutoinstructivoInterna .autoinstructivo-footer p {
  margin: 0;
  color: rgba(255,255,255,.46);
  font-size: .8rem;
}

@keyframes autoSpinner { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
  #cursoAutoinstructivoInterna .autoinstructivo-hero-card,
  #cursoAutoinstructivoInterna .autoinstructivo-final-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #cursoAutoinstructivoInterna { border-radius: 18px; }

  #cursoAutoinstructivoInterna .autoinstructivo-page {
    min-height: auto;
    padding: 22px 14px 100px;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-hero-card {
    padding: 24px 18px;
    border-radius: 22px;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-title {
    font-size: 2.15rem;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-metrics,
  #cursoAutoinstructivoInterna .autoinstructivo-final-grid {
    grid-template-columns: 1fr;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-learning-panel {
    grid-template-columns: 1fr;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-reload-button {
    width: 100%;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-lesson {
    grid-template-columns: 48px minmax(0,1fr);
  }

  #cursoAutoinstructivoInterna .autoinstructivo-lesson-actions {
    grid-column: 1 / -1;
  }

  #cursoAutoinstructivoInterna .autoinstructivo-lesson-button {
    width: 100%;
  }
}

@media (max-width: 390px) {
  #cursoAutoinstructivoInterna .autoinstructivo-title {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursoAutoinstructivoInterna .autoinstructivo-spinner {
    animation: none !important;
  }

  #cursoAutoinstructivoInterna * {
    scroll-behavior: auto !important;
  }
}
