/* Página pública (index.html) - colores de la marca Amazing 360 */
:root {
  --plum: #4b1b45;
  --plum-dark: #36112f;
  --teal: #0e8f88;
  --teal-dark: #0a6f6a;
  --ink: #23202a;
  --muted: #5f5a66;
  --line: #e6e1e8;
  --bg: #ffffff;
  --bg-alt: #f7f4f8;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(54, 17, 47, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Open Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

h1, h2, h3, h4 { font-family: 'Quicksand', 'Open Sans', sans-serif; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--plum); }
a { color: var(--teal-dark); }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .6em 1.1em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem 'Open Sans', sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-lg { padding: .8em 1.5em; font-size: 1.05rem; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { border-color: var(--plum); color: var(--plum); background: transparent; }
.btn-outline:hover { background: var(--plum); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn:focus-visible, .chip:focus-visible, .search:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }

/* Barra superior */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand img { display: block; width: 150px; height: auto; }
.topnav { display: flex; gap: 20px; margin-left: auto; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.topnav a:hover { color: var(--teal-dark); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: .35em .7em; font: 600 .8rem 'Open Sans', sans-serif; color: var(--muted); cursor: pointer; }
.lang button.active { background: var(--plum); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-dark) 55%, #1f5f5c 100%);
  color: #fff; padding: 72px 0 64px;
}
.hero-inner { max-width: 860px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: #9fe3dc; margin: 0 0 12px; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin-bottom: .4em; }
.lead { font-size: clamp(1rem, 2vw, 1.2rem); color: #eadcea; margin: 0 0 24px; }
.badges { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.badges li {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px; padding: .45em .8em; font-size: .85rem; line-height: 1.3;
}
.badges strong { display: block; font-size: .95rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Confianza */
.trust { border-bottom: 1px solid var(--line); padding: 28px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.trust-num { font: 700 1.6rem 'Quicksand', sans-serif; color: var(--plum); }
.stars { color: #f2b705; font-size: 1.3rem; letter-spacing: 2px; }
.trust-reviews a { font-weight: 600; }

/* Secciones y tarjetas */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-top {
  position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--teal) 0%, var(--plum) 100%);
  border: 0; padding: 0; width: 100%; cursor: pointer; color: #fff; overflow: hidden;
}
.card-top .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.card-top .play { background: rgba(0, 0, 0, .25); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.card-top .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  font: 600 .85rem 'Open Sans', sans-serif;
}
.card-top .play::before {
  content: ''; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .92)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234b1b45' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.card-top:hover .play::before { transform: scale(1.06); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.card-series { margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-dark); }
.card h3 { font-size: 1.05rem; margin: 0; color: var(--ink); }
.meta { margin: 0; color: var(--muted); font-size: .85rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font: 700 1.3rem 'Quicksand', sans-serif; color: var(--plum); }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--teal-dark); font: 600 .85rem 'Open Sans', sans-serif; cursor: pointer; text-decoration: underline; }

.featured .card { border: 2px solid var(--teal); }

/* Catálogo */
.catalog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.catalog-head h2 { margin: 0; }
.search { flex: 0 1 320px; padding: .65em 1em; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4em .9em; font: 600 .85rem 'Open Sans', sans-serif; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--plum); border-color: var(--plum); color: #fff; }
.empty, .error { color: var(--muted); text-align: center; padding: 24px 0; }

.skeleton { height: 300px; border-radius: var(--radius); background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Pasos */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { counter-increment: paso; background: var(--bg-alt); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(paso); width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.steps span { color: var(--muted); font-size: .95rem; }

/* Footer */
.footer { background: var(--plum-dark); color: #e6d8e4; padding: 40px 0 16px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer h3 { font-size: 1rem; color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer a { color: #bfeee9; text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { text-decoration: underline; }
.footer-logo { width: 130px; margin-bottom: 8px; }
.copyright { font-size: .8rem; color: #b9a6b6; margin-top: 24px; }

/* Modal de detalle */
.modal { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal::backdrop { background: rgba(30, 10, 28, .65); }
.modal-close-form { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.modal-video { background: #000; aspect-ratio: 16 / 9; }
.modal-video video { width: 100%; height: 100%; display: block; }
.modal-body { padding: 20px; }
.modal-body h3 { font-size: 1.4rem; color: var(--plum); }
.modal-body h4 { margin-top: 16px; font-size: 1rem; }
.syllabus { padding-left: 1.2em; margin: 0 0 12px; color: var(--muted); }
.modal-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; position: sticky; bottom: 0; background: #fff; padding-bottom: 4px; }

@media (max-width: 860px) {
  .topnav { display: none; }
  .topbar-actions { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand img { width: 120px; }
  .topbar-actions .btn { padding: .45em .8em; font-size: .85rem; }
  .hero { padding: 48px 0 44px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .search { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton { animation: none; }
}

/* WhatsApp: botón flotante y enlace en la ficha del curso */
.whatsapp-float { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: .7em 1.1em; border-radius: 999px; background: #25d366; color: #0b3d1f; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.whatsapp-float:hover { background: #1ebe5b; }
.whatsapp-float:focus-visible, .modal-whatsapp:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.modal-whatsapp { display: block; margin-top: 12px; text-align: center; font-weight: 600; color: #128c4a; }
@media (max-width: 600px) {
  .whatsapp-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .whatsapp-float { padding: .85em; }
}
@media print { .whatsapp-float { display: none; } }

/* Para empresas: texto + formulario de contacto */
.empresas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.eyebrow-dark { color: var(--teal-dark); }
.lead-dark { font-size: 1.1rem; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: .85rem; margin: 8px 0 0; }
.checks { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.lead-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px; }
.lead-form h3 { margin: 0; color: var(--plum); font-size: 1.3rem; }
.lead-form > .muted:first-of-type { margin: -6px 0 4px; }
.lead-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--ink); }
.lead-form input, .lead-form select, .lead-form textarea { font: inherit; font-weight: 400; padding: .6em .7em; border: 1px solid #cfc8d2; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.lead-form input:focus-visible, .lead-form select:focus-visible, .lead-form textarea:focus-visible { outline: 3px solid #f2b705; outline-offset: 1px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; min-height: 1.2em; font-weight: 600; }
.form-msg.ok { color: var(--teal-dark); }
.form-msg.err { color: #b3261e; }
.lead-form.sent .form-row, .lead-form.sent label, .lead-form.sent #lead-submit { display: none; }

/* Preguntas frecuentes */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--plum); list-style-position: outside; }
.faq summary:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

@media (max-width: 800px) {
  .empresas-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}
section[id] { scroll-margin-top: 72px; } /* que el encabezado fijo no tape el título al ir a #empresas, #preguntas */
.hero-empresas { margin: 18px 0 0; } .hero-empresas a { color: #bfeee9; font-weight: 600; }

/* Planes */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 20px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.plan-card.plan-business { border-top: 4px solid var(--plum); }
.plan-card:not(.plan-business) { border-top: 4px solid var(--teal); }
.plan-card h3 { margin: 0; font-size: 1.1rem; color: var(--plum); }
.plan-card .card-series { margin: 0; }
.plan-price { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin: 0; }
.plan-points { margin: 0 0 8px; padding-left: 18px; color: var(--muted); font-size: .9rem; flex: 1; }
.plan-points li { margin-bottom: 4px; }
.plan-card .btn { align-self: stretch; }
.plan-modal { max-width: 620px; }
.plan-buy { justify-content: flex-start; flex-wrap: wrap; }

/* Planes: tarjeta con imagen y ficha de venta */
.plan-card { padding: 0; overflow: hidden; }
.plan-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.plan-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan-tagline { font-weight: 600; color: var(--ink); margin: 0; }
.plan-value { background: #e8f6f4; color: var(--teal-dark); border-radius: 8px; padding: 8px 12px; font-weight: 600; font-size: .92rem; margin: 4px 0; }
.plan-modal-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.plan-modal .modal-body h3 { margin-bottom: 4px; }
.plan-modal .plan-tagline { font-size: 1.1rem; margin-top: 12px; color: var(--plum); }
.plan-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.plan-hl { background: var(--bg-alt); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.plan-hl strong { color: var(--plum); }
.plan-hl span { color: var(--muted); font-size: .92rem; }
.plan-steps { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.plan-steps li { margin-bottom: 4px; }
.plan-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 8px 0 16px; }
.plan-details summary { cursor: pointer; font-weight: 700; color: var(--plum); }
.plan-teacher { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-alt); border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.plan-teacher img { width: 72px; height: 86px; object-fit: cover; border-radius: 8px; flex: none; }
.plan-teacher p { margin: 4px 0 0; font-size: .92rem; }
.plan-teacher .card-series { margin: 0; }
@media (max-width: 560px) { .plan-highlights { grid-template-columns: 1fr; } .plan-modal-img { height: 140px; } }
@media (max-width: 560px) { #plan-modal-price-buy { display: none; } .plan-buy .btn { flex: 1 1 100%; } }
