/* ═══════════════════════════════════════════════════════
   estudiante.css — Guía del Estudiante AulaSync
   Paleta: colores vivos, formas redondeadas, tono amigable
   ═══════════════════════════════════════════════════════ */

/* ── Variables propias de la guía estudiante ──────────── */
:root {
  --est-purple:  #7c3aed;
  --est-pink:    #ec4899;
  --est-orange:  #f97316;
  --est-green:   #10b981;
  --est-blue:    #3b82f6;
  --est-yellow:  #f59e0b;
  --est-teal:    #06b6d4;
  --est-bg:      #fdf4ff;
  --est-radius:  20px;
  --est-radius-sm: 14px;
}

/* ── Body ─────────────────────────────────────────────── */
body { background: var(--est-bg); }

/* ── Hero estudiante ──────────────────────────────────── */
.hero-est {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 60%, #f97316 100%);
  min-height: 480px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* El navbar ahora es "fixed" (sale del flujo normal), así que el
     hero necesita este espacio arriba para no quedar tapado. */
  padding-top: var(--navbar-h, 68px);
}
.hero-est::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255,255,255,.08) 0%, transparent 40%);
}
.hero-est-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.3);
  color: white;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-est h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hero-est .sub {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  margin-top: 10px;
}

/* ── Floating emojis decorativos ──────────────────────── */
.float-emoji {
  position: absolute;
  font-size: 2.5rem;
  opacity: .25;
  animation: floatAnim 4s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}
.float-emoji:nth-child(2) { animation-delay: .5s; }
.float-emoji:nth-child(3) { animation-delay: 1s;  }
.float-emoji:nth-child(4) { animation-delay: 1.5s;}
@keyframes floatAnim {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-12px) rotate(5deg); }
}

/* ── Mockup de celular ────────────────────────────────── */
.phone-mockup {
  width: 200px;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 28px;
  padding: 16px 12px;
  margin: 0 auto;
  backdrop-filter: blur(6px);
}
.phone-notch {
  width: 60px;
  height: 8px;
  background: rgba(255,255,255,.25);
  border-radius: 8px;
  margin: 0 auto 12px;
}
.phone-screen {
  background: rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 10px;
  min-height: 200px;
}
.phone-url-bar {
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .65rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 8px;
  font-family: monospace;
}
.phone-level-card {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  margin-bottom: 6px;
  font-size: .7rem;
  color: white;
  font-weight: 600;
}

/* ── Secciones con formas redondeadas ─────────────────── */
.est-section {
  scroll-margin-top: 90px;
  margin-bottom: 60px;
}

/* ── Step cards (pasos grandes y visuales) ────────────── */
.big-step {
  background: white;
  border-radius: var(--est-radius);
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  min-width: 0;
  word-break: break-word;
}
.big-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
/* Flex interno: min-width:0 para que el texto se contraiga y no empuje el card */
.big-step > .d-flex {
  min-width: 0;
}
.big-step > .d-flex > div:last-child {
  min-width: 0;
}
.big-step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.big-step-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}
.big-step-desc {
  font-size: .9rem;
  color: #64748b;
  line-height: 1.6;
}
.big-step-deco {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 5rem;
  opacity: .06;
  transform: rotate(15deg);
  pointer-events: none;
}
.big-step-accent {
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

/* ── Tip cards amigables ──────────────────────────────── */
.tip-card {
  border-radius: var(--est-radius-sm);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 16px 0;
  font-size: .9rem;
}
.tip-card .tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}
.tip-card.tip-purple { background: #f5f3ff; border-left: 4px solid var(--est-purple); }
.tip-card.tip-green  { background: #f0fdf4; border-left: 4px solid var(--est-green);  }
.tip-card.tip-orange { background: #fff7ed; border-left: 4px solid var(--est-orange); }
.tip-card.tip-blue   { background: #eff6ff; border-left: 4px solid var(--est-blue);   }
.tip-card.tip-pink   { background: #fdf2f8; border-left: 4px solid var(--est-pink);   }

/* ── Feature chips ────────────────────────────────────── */
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: .85rem;
  font-weight: 600;
  margin: 4px;
}

/* ── Section headers con degradado ───────────────────── */
.est-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.est-section-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--est-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.est-section-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
}
.est-section-sub {
  font-size: .9rem;
  color: #64748b;
  margin: 4px 0 0;
}

/* ── Dividers decorativos ────────────────────────────── */
.wavy-divider {
  height: 48px;
  overflow: hidden;
  line-height: 0;
}

/* ── Sección "¿Cómo funciona?" cards en fila ─────────── */
.how-card {
  background: white;
  border-radius: var(--est-radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.how-card .how-emoji { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.how-card .how-num {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 4rem;
  font-weight: 900;
  color: rgba(0,0,0,.04);
  line-height: 1;
}
.how-card h6 {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 6px;
}
.how-card p { font-size: .85rem; color: #64748b; margin: 0; }

/* ── Mini connector entre pasos ──────────────────────── */
.step-connector {
  text-align: center;
  color: #94a3b8;
  font-size: 1.5rem;
  margin: 8px 0;
}

/* ── Selector de nombre (demo visual) ────────────────── */
.select-demo {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: var(--est-radius-sm);
  padding: 12px 16px;
  font-size: .9rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}
.select-demo.selected {
  border-color: var(--est-purple);
  color: #1e293b;
  font-weight: 600;
}
.select-demo .sd-badge {
  background: #f5f3ff;
  color: var(--est-purple);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 700;
}

/* ── Upload zone demo ─────────────────────────────────── */
.upload-demo {
  border: 2.5px dashed #c4b5fd;
  border-radius: var(--est-radius-sm);
  padding: 28px;
  text-align: center;
  background: #f5f3ff;
  cursor: pointer;
  transition: all .2s;
}
.upload-demo:hover {
  border-color: var(--est-purple);
  background: #ede9fe;
}
.upload-demo .ud-icon { font-size: 2.5rem; }
.upload-demo .ud-text {
  font-weight: 700;
  color: var(--est-purple);
  margin: 8px 0 4px;
  font-size: .95rem;
}
.upload-demo .ud-sub { font-size: .8rem; color: #94a3b8; }

/* ── Success banner ───────────────────────────────────── */
.success-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: var(--est-radius);
  padding: 24px;
  text-align: center;
}
.success-banner .sb-icon { font-size: 3rem; margin-bottom: 8px; }
.success-banner .sb-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 4px;
}
.success-banner .sb-sub { font-size: .85rem; color: #16a34a; }

/* ── Screenshot placeholder (versión estudiante) ─────── */
.est-screenshot {
  background: linear-gradient(135deg, #fdf4ff 0%, #f5f3ff 100%);
  border: 2px dashed #c4b5fd;
  border-radius: var(--est-radius);
  padding: 36px 20px;
  text-align: center;
  margin: 20px 0;
}
.est-screenshot .ph-icon { font-size: 2.5rem; color: #a78bfa; }
.est-screenshot .ph-label {
  font-size: .85rem;
  font-weight: 700;
  color: #7c3aed;
  margin-top: 8px;
  margin-bottom: 4px;
}
.est-screenshot .ph-hint { font-size: .75rem; color: #94a3b8; }

/* ── TOC estudiante ───────────────────────────────────── */
.est-toc-card {
  background: white;
  border-radius: var(--est-radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  border-top: 4px solid var(--est-purple);
}
#est-toc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: .875rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: all .15s;
}
#est-toc-nav a:hover {
  color: var(--est-purple);
  background: #f5f3ff;
}
#est-toc-nav a.active {
  color: var(--est-purple);
  background: #f5f3ff;
  font-weight: 700;
}

/* ── Sección de errores comunes ──────────────────────── */
.error-card {
  background: white;
  border-radius: var(--est-radius-sm);
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.error-card .ec-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.error-card .ec-problem {
  font-weight: 700;
  font-size: .9rem;
  color: #1e293b;
  margin-bottom: 3px;
}
.error-card .ec-solution {
  font-size: .85rem;
  color: #64748b;
}

/* ── Botón volver arriba ──────────────────────────────── */
#btn-top {
  background: linear-gradient(135deg, var(--est-purple), var(--est-pink));
}
#btn-top:hover { opacity: .9; }

/* ── Footer override ──────────────────────────────────── */
.site-footer { background: #1e1b4b; }
.footer-divider { border-color: #2d2b6b; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-est h1 { font-size: 2rem; }
  .phone-mockup { width: 160px; }
  .big-step { padding: 16px; }
  .est-section-title { font-size: 1.3rem; }

  /* El título y desc del paso no deben forzar ancho */
  .big-step-title { font-size: 1rem; }
  .big-step-desc  { font-size: .85rem; }

  /* El número del paso más pequeño en móvil */
  .big-step-num {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  /* Caja de código monoespacio: scroll interno, no desborde */
  .big-step [style*="font-family:monospace"],
  .big-step [style*="monospace"] {
    overflow-x: auto;
    word-break: break-all;
    font-size: .95rem;
  }

  /* how-cards en columna única en móvil muy pequeño */
  .how-card { padding: 20px 16px; }

  /* tip-card no desborde */
  .tip-card {
    padding: 14px 16px;
    gap: 10px;
    word-break: break-word;
  }

  /* error-card */
  .error-card { padding: 14px 16px; gap: 10px; }

  /* Upload demo más compacto */
  .upload-demo { padding: 20px 16px; }

  /* Select demo */
  .select-demo { font-size: .8rem; }

  /* est-section-header en columna en pantallas muy pequeñas */
  .est-section-header { gap: 12px; }
  .est-section-icon { width: 48px; height: 48px; font-size: 1.4rem; }

  /* feature-chip en wrap natural */
  .feature-chip { font-size: .78rem; padding: 6px 12px; }

  /* Pantallas muy pequeñas (<400px): reducir padding del container */
  .est-screenshot { padding: 24px 14px; }
}

@media (max-width: 400px) {
  .big-step { padding: 14px 12px; }
  .est-section-header { flex-wrap: wrap; }
  .error-card { flex-direction: column; gap: 6px; }
  .tip-card   { flex-direction: column; gap: 6px; }
}
