/* ============================================================
   Claude a Casa — Estils globals
   Paleta: Navy #1A1A2E | Gold #C9A84C | Copper #8B4A0F | Cream #FDF8EF
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:  #1A1A2E;
  --gold:  #C9A84C;
  --copper:#8B4A0F;
  --cream: #FDF8EF;
  --gray:  #f5f0e8;
  --text:  #2a2a2a;
  --muted: #666;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.12);
}

body { font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--cream); line-height: 1.6; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.gold { color: var(--gold); }

/* ── NAV ──────────────────────────────────────────────────── */
.nav { background: var(--navy); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 960px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { color: var(--gold); font-size: 1.1rem; font-weight: 700; letter-spacing: .5px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: #ccc; font-size: .9rem; }
.nav-links a:hover { color: var(--gold); text-decoration: none; }
.btn-nav { background: var(--gold); color: var(--navy) !important; padding: .4rem 1rem; border-radius: 6px; font-weight: 700; font-size: .85rem; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary { display: inline-block; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 1.05rem; padding: .9rem 2.2rem; border-radius: 8px; transition: background .2s; }
.btn-primary:hover { background: #d4b060; text-decoration: none; }
.btn-secondary { display: inline-block; background: transparent; color: var(--gold); border: 2px solid var(--gold); font-weight: 700; font-size: .95rem; padding: .7rem 1.8rem; border-radius: 8px; }
.btn-secondary:hover { background: var(--gold); color: var(--navy); text-decoration: none; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero { background: var(--navy); color: var(--cream); padding: 5rem 1.5rem 4rem; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-badge { display: inline-block; background: rgba(201,168,76,.15); color: var(--gold); border: 1px solid var(--gold); border-radius: 20px; padding: .3rem .9rem; font-size: .8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.2rem; }
.hero-sub { font-size: 1.1rem; color: #ccc; max-width: 560px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-cta { margin-bottom: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.hero-social-proof { font-size: .85rem; color: #888; }
.hero-promise { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 1rem; }
.promise-item { font-size: .9rem; color: #aaa; }

/* ── SECTIONS ─────────────────────────────────────────────── */
section { padding: 4rem 0; }
section:nth-child(even) { background: var(--gray); }
h2 { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin-bottom: .5rem; text-align: center; }
.section-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 2.5rem; }

/* ── PROFILES ─────────────────────────────────────────────── */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.2rem; }
.profile-card { background: white; border-radius: var(--radius); padding: 1.4rem; text-align: center; box-shadow: var(--shadow); }
.profile-icon { font-size: 2rem; margin-bottom: .6rem; }
.profile-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: .4rem; }
.profile-card p { font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* ── CURRICULUM ───────────────────────────────────────────── */
.chapters-list { display: flex; flex-direction: column; gap: .6rem; }
.chapter-item { display: flex; align-items: center; gap: 1rem; background: white; border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ch-num { font-size: .85rem; font-weight: 800; color: var(--gold); background: var(--navy); padding: .3rem .6rem; border-radius: 6px; min-width: 38px; text-align: center; }
.ch-info { flex: 1; }
.ch-info strong { display: block; color: var(--navy); font-size: .95rem; }
.ch-info span { font-size: .82rem; color: var(--muted); }
.ch-dur { font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* ── PRICING ──────────────────────────────────────────────── */
.pricing { background: var(--navy); color: var(--cream); }
.pricing h2 { color: var(--gold); }
.pricing .section-sub { color: #ccc; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
.price-card { background: rgba(255,255,255,.06); border: 1px solid rgba(201,168,76,.25); border-radius: var(--radius); padding: 1.6rem; text-align: center; position: relative; }
.price-card.featured { border-color: var(--gold); background: rgba(201,168,76,.1); }
.price-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy); font-size: .75rem; font-weight: 800; padding: .2rem .8rem; border-radius: 20px; white-space: nowrap; }
.price-amount { font-size: 1.8rem; font-weight: 800; color: var(--gold); margin-bottom: .3rem; }
.price-label { font-size: .8rem; color: #999; margin-bottom: .8rem; }
.price-card p { font-size: .9rem; color: #ccc; margin-bottom: 1.2rem; }
.btn-price { display: inline-block; background: var(--gold); color: var(--navy); font-weight: 700; font-size: .9rem; padding: .6rem 1.4rem; border-radius: 6px; }
.btn-price:hover { background: #d4b060; text-decoration: none; }
.btn-price.featured { background: var(--gold); font-size: 1rem; padding: .7rem 1.8rem; }
.pricing-note { text-align: center; color: #888; font-size: .85rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: #0f0f1e; color: #666; text-align: center; padding: 2rem 1.5rem; }
.footer p { margin-bottom: .4rem; font-size: .9rem; }
.footer a { color: #888; }
.footer-small { font-size: .8rem; color: #444; margin-top: .5rem; }

/* ── FORMS (login/register) ───────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); }
.auth-box { background: var(--cream); border-radius: 14px; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-logo { text-align: center; color: var(--gold); font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.auth-box h1 { font-size: 1.5rem; color: var(--navy); margin-bottom: .3rem; }
.auth-box p.sub { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .85rem; font-weight: 700; color: var(--navy); margin-bottom: .3rem; }
.form-group input { width: 100%; padding: .7rem .9rem; border: 1.5px solid #ddd; border-radius: 7px; font-size: .95rem; background: white; }
.form-group input:focus { outline: none; border-color: var(--gold); }
.btn-full { width: 100%; padding: .85rem; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 1rem; border: none; border-radius: 8px; cursor: pointer; margin-top: .5rem; }
.btn-full:hover { background: #d4b060; }
.auth-alt { text-align: center; margin-top: 1.2rem; font-size: .88rem; color: var(--muted); }
.auth-alt a { color: var(--copper); font-weight: 700; }
.msg-ok { background: #d4edda; color: #155724; border-radius: 7px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.msg-err { background: #f8d7da; color: #721c24; border-radius: 7px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .9rem; }

/* ── DASHBOARD ────────────────────────────────────────────── */
.dashboard-page { min-height: 100vh; background: var(--gray); }
.dash-header { background: var(--navy); color: var(--cream); padding: 1.2rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.dash-logo-link { text-decoration: none; display: flex; align-items: center; }
.dash-logo-link img { max-height: 36px; width: auto; }
.dash-logo { color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.dash-user { font-size: .9rem; color: #ccc; }
.dash-user a { color: var(--gold); margin-left: 1rem; font-size: .85rem; }
.dash-main { max-width: 820px; margin: 2rem auto; padding: 0 1.5rem; }
.dash-welcome { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: .3rem; }
.progress-bar-wrap { background: #ddd; border-radius: 20px; height: 12px; margin: 1rem 0 .3rem; overflow: hidden; }
.progress-bar { background: var(--gold); height: 100%; border-radius: 20px; transition: width .5s; }
.progress-label { font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }
.chapters-grid { display: flex; flex-direction: column; gap: .8rem; }
.chapter-card { background: white; border-radius: var(--radius); padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: box-shadow .2s; }
.chapter-card:hover { box-shadow: var(--shadow); }
.chapter-card.done { border-left: 4px solid var(--gold); }
.chapter-card.locked { opacity: .6; cursor: default; }
.cc-num { font-size: .85rem; font-weight: 800; color: white; background: var(--navy); padding: .3rem .6rem; border-radius: 6px; min-width: 38px; text-align: center; }
.chapter-card.done .cc-num { background: var(--gold); color: var(--navy); }
.cc-info { flex: 1; }
.cc-info strong { display: block; color: var(--navy); font-size: .95rem; }
.cc-info span { font-size: .82rem; color: var(--muted); }
.cc-action { font-size: .85rem; }
.cc-done-badge { color: var(--gold); font-weight: 700; }
.cc-btn { background: var(--navy); color: white; padding: .4rem .9rem; border-radius: 6px; font-size: .82rem; font-weight: 700; }
.chapter-card:hover .cc-btn { background: var(--gold); color: var(--navy); }
.cert-section { margin-top: 2rem; background: var(--navy); color: var(--cream); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.cert-section h3 { color: var(--gold); margin-bottom: .5rem; }

/* ── CHAPTER PAGE ─────────────────────────────────────────── */
.chapter-page { min-height: 100vh; background: var(--gray); }
.chapter-main { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem; }
.chapter-header { margin-bottom: 1.5rem; }
.chapter-header .ch-back { font-size: .85rem; color: var(--muted); display: block; margin-bottom: .5rem; }
.chapter-header h1 { font-size: 1.6rem; color: var(--navy); font-weight: 800; }
.video-wrap { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; }
.video-wrap iframe { width: 100%; height: 100%; border: none; }
.video-placeholder { color: #555; text-align: center; }
.chapter-resources { background: white; border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.5rem; }
.chapter-resources h3 { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: .8rem; }
.resource-btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--gray); color: var(--navy); padding: .5rem 1rem; border-radius: 6px; font-size: .85rem; font-weight: 700; margin-right: .5rem; margin-bottom: .5rem; }
.resource-btn:hover { background: var(--gold); color: var(--navy); text-decoration: none; }
.complete-section { background: var(--navy); border-radius: var(--radius); padding: 1.5rem; text-align: center; color: var(--cream); }
.complete-section.done { background: #1a3a1a; border: 2px solid var(--gold); }
.btn-complete { background: var(--gold); color: var(--navy); font-weight: 800; font-size: 1rem; padding: .8rem 2rem; border-radius: 8px; border: none; cursor: pointer; }
.btn-complete:hover { background: #d4b060; }

/* ── ADMIN ────────────────────────────────────────────────── */
.admin-page { min-height: 100vh; background: var(--gray); }
.admin-header { background: var(--navy); color: var(--cream); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card { background: white; border-radius: var(--radius); padding: 1.2rem; text-align: center; box-shadow: var(--shadow); }
.kpi-num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.kpi-label { font-size: .8rem; color: var(--muted); }
.kpi-card.gold { background: var(--gold); }
.kpi-card.gold .kpi-num, .kpi-card.gold .kpi-label { color: var(--navy); }
table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
thead { background: var(--navy); color: var(--cream); }
th { padding: .7rem .9rem; text-align: left; font-size: .82rem; font-weight: 700; }
td { padding: .65rem .9rem; font-size: .85rem; border-bottom: 1px solid #eee; }
tr:hover td { background: #fafafa; }
.badge { display: inline-block; padding: .2rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge.ok { background: #d4edda; color: #155724; }
.badge.no { background: #f8d7da; color: #721c24; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-promise { gap: .8rem; }
  .nav-links a:not(.btn-nav) { display: none; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  table { font-size: .78rem; }
  th, td { padding: .5rem .6rem; }
}

/* ── PAYMENT SECTION (taquilla inversa al dashboard) ──────── */
.payment-section { margin-top: 2rem; }
.payment-inner { background: var(--navy); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--cream); border: 1px solid rgba(201,168,76,.3); }
.payment-icon { font-size: 2rem; margin-bottom: .8rem; }
.payment-inner h3 { color: var(--gold); font-size: 1.3rem; margin-bottom: .5rem; }
.payment-inner > p { color: #ccc; font-size: .95rem; margin-bottom: 1.5rem; }
.payment-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.pay-opt { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(201,168,76,.2); border-radius: var(--radius); padding: 1rem .8rem; transition: all .2s; }
.pay-opt:hover { background: rgba(201,168,76,.15); border-color: var(--gold); text-decoration: none; }
.pay-opt.featured { border-color: var(--gold); background: rgba(201,168,76,.12); }
.pay-opt.voluntat { border-style: dashed; }
.pay-amount { font-size: 1.3rem; font-weight: 800; color: var(--gold); }
.pay-sub { font-size: .75rem; color: #aaa; margin-top: .2rem; }
.pay-opt.featured .pay-sub { color: var(--gold); }
.payment-note { font-size: .82rem; color: #888; margin-top: .3rem; }

/* ── BTN-PRICE-SECONDARY (landing page pricing) ───────────── */
.btn-price-secondary { display: inline-block; background: transparent; color: var(--gold); border: 1px solid rgba(201,168,76,.4); font-size: .82rem; font-weight: 600; padding: .45rem 1rem; border-radius: 6px; margin-top: .6rem; }
.btn-price-secondary:hover { border-color: var(--gold); background: rgba(201,168,76,.1); text-decoration: none; }
.btn-price-secondary.featured { border-color: var(--gold); }

@media (max-width: 600px) {
  .payment-options { grid-template-columns: 1fr 1fr; }
}
