/* =========================================================
   Workping STEAM — hoja de estilos
   Los colores por defecto se sobrescriben desde content.json
   (sitio.colorPrimario / sitio.colorSecundario) vía main.js
   ========================================================= */

:root {
  --primary: #1e5f74;
  --primary-dark: #123a49;
  --secondary: #f2994a;
  --ink: #1c2b30;
  --ink-soft: #4b5c61;
  --surface: #ffffff;
  --surface-alt: #f5f8f8;
  --border: #dfe7e8;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow: 0 10px 30px rgba(18, 58, 73, 0.10);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
  background: var(--secondary);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary-dark);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--surface-alt), #ffffff);
  padding: 64px 0 80px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  color: var(--primary-dark);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--secondary); color: #fff; box-shadow: 0 8px 20px rgba(242, 153, 74, 0.35); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
section { padding: 72px 0; }

.section-alt { background: var(--surface-alt); }

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--primary-dark);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- Sobre el programa ---------- */
.programa-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 44px;
}

.pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.fases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.fase-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.fase-card .fase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}

.fase-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary-dark); }
.fase-card p { margin: 0 0 6px; font-size: 0.92rem; color: var(--ink-soft); flex: 1; }

.fase-detalle-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 16px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: transparent;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.fase-detalle-link:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Página de detalle de ciclo ---------- */
.ciclo-hero {
  background: var(--surface-alt);
  padding: 48px 0 56px;
}

.volver-link {
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
}

.volver-link:hover { text-decoration: underline; }

.ciclo-hero .pill { margin-bottom: 16px; }

.ciclo-hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--primary-dark);
  margin: 0 0 16px;
}

.ciclo-hero p {
  color: var(--ink-soft);
  max-width: 70ch;
  font-size: 1.05rem;
  margin: 0;
}

.ciclo-nota {
  margin-top: 18px !important;
  color: var(--secondary) !important;
  font-weight: 600;
  font-size: 0.9rem;
}

.sesiones-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 860px;
  margin: 0 auto;
}

.sesion-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

.sesion-num {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 8px;
}

.sesion-card h3 { margin: 0 0 8px; color: var(--primary-dark); font-size: 1.15rem; }
.sesion-card > p { margin: 0 0 16px; color: var(--ink-soft); }

.sesion-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sesion-meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 4px;
}

.sesion-meta p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

@media (max-width: 640px) {
  .sesion-meta { grid-template-columns: 1fr; }
  .sesion-card { padding: 20px; }
}

.programa-cierre {
  margin-top: 36px;
  background: #fff;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  text-align: center;
  color: var(--ink-soft);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Niveles ---------- */
.niveles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.nivel-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nivel-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }

.nivel-body { padding: 24px; }

.nivel-body .edades {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.nivel-body h3 { margin: 0 0 10px; color: var(--primary-dark); font-size: 1.3rem; }
.nivel-body p { margin: 0; color: var(--ink-soft); }

/* ---------- Precios ---------- */
.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.plan-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow);
}

.plan-card h3 { margin: 0 0 6px; color: var(--primary-dark); }

.plan-precio {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin: 8px 0 18px;
}

.plan-card ul { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.plan-card li { margin-bottom: 8px; }

.horarios-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.horarios-table th, .horarios-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.horarios-table th {
  background: var(--surface-alt);
  color: var(--primary-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.precios-nota {
  text-align: center;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 30px;
  font-size: 0.9rem;
}

/* ---------- Galería ---------- */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.galeria-grid img {
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--secondary);
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-soft);
}

/* ---------- Inscripción / contacto ---------- */
.inscripcion {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.inscripcion h2, .inscripcion p { color: #fff; }
.inscripcion .section-head { text-align: left; margin: 0 0 20px; max-width: none; }
.inscripcion .section-head p { color: rgba(255,255,255,0.85); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  align-self: start;
}

.form-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  color: var(--ink);
}

.form-card label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 14px 0 6px;
}

.form-card label:first-child { margin-top: 0; }

.form-card input, .form-card textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-card textarea { resize: vertical; min-height: 90px; }

.form-card button {
  margin-top: 18px;
  width: 100%;
  background: var(--secondary);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.form-nota {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .fases-grid { grid-template-columns: repeat(2, 1fr); }
  .niveles-grid { grid-template-columns: 1fr; }
  .galeria-grid { grid-template-columns: repeat(2, 1fr); }
  .inscripcion { grid-template-columns: 1fr; padding: 32px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .fases-grid { grid-template-columns: 1fr; }
  .galeria-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .nav-cta { padding: 8px 14px; font-size: 0.82rem; }
}

body.menu-open .nav-links {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  flex-direction: column;
  padding: 18px 24px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}
