:root{
  --bg:#0b0f19;
  --panel:#0f172a;
  --panel2:#111c33;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:rgba(148,163,184,.18);
  --brand:#ff0336;
  --brand2:#8ab4ff;

  --radius:18px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --container:1200px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(255,3,54,.18), transparent 60%),
              radial-gradient(900px 500px at 100% 0%, rgba(138,180,255,.14), transparent 55%),
              var(--bg);
  color:var(--text);
  line-height:1.35;
}

a{ color:var(--brand2); text-decoration:none; }
a:hover{ text-decoration:underline; }

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

.container{ max-width:var(--container); margin:0 auto; padding: 0 18px; }
.site-main{ padding: 18px 0 34px; }

.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:18px; top:18px; width:auto; height:auto; padding:10px 12px;
  background:#111827; border:1px solid var(--border); border-radius:12px; z-index:9999;
}

/* Header */
.site-header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,25,.75);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding: 12px 0;
}
.brand{ display:flex; align-items:center; gap:10px; color:var(--text); }
.brand:hover{ text-decoration:none; }
.brand-logo{ border-radius:14px; box-shadow: var(--shadow); }
.brand-name{ font-weight:800; letter-spacing:.2px; }

.nav{ display:flex; align-items:center; gap:12px; }
.nav-menu{ display:flex; align-items:center; gap:12px; }
.nav-link{
  color:var(--text);
  opacity:.9;
  padding:10px 12px;
  border-radius:12px;
}
.nav-link:hover{ text-decoration:none; background: rgba(148,163,184,.10); }
.nav-link.is-active{ background: rgba(255,3,54,.16); border: 1px solid rgba(255,3,54,.25); }

.header-cta{ display:flex; gap:10px; align-items:center; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(148,163,184,.08);
  color:var(--text);
  text-decoration:none;
  font-weight:650;
  cursor:pointer;
}
.btn:hover{ text-decoration:none; background: rgba(148,163,184,.12); }
.btn-primary{
  background: linear-gradient(135deg, rgba(255,3,54,.95), rgba(255,3,54,.55));
  border-color: rgba(255,3,54,.35);
}
.btn-primary:hover{ background: linear-gradient(135deg, rgba(255,3,54,1), rgba(255,3,54,.62)); }
.btn-ghost{
  background: transparent;
}

/* Mobile nav */
.nav-toggle{
  display:none;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(148,163,184,.08);
  cursor:pointer;
}
.nav-toggle .bar{
  display:block;
  width:18px; height:2px;
  background: var(--text);
  margin: 4px auto;
  border-radius:2px;
}
.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

@media (max-width: 860px){
  .header-cta{ display:none; }
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .nav-menu{
    position:absolute;
    right:18px; top:64px;
    min-width: 220px;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding:10px;
    border-radius:16px;
    border:1px solid var(--border);
    background: rgba(15,23,42,.98);
    box-shadow: var(--shadow);
    display:none;
  }
  .nav-menu.is-open{ display:flex; }
  .nav-link{ padding:10px 12px; }
}

/* Panels / cards */
.panel{
  background: linear-gradient(180deg, rgba(15,23,42,.85), rgba(15,23,42,.70));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero{
  padding: 22px 0 12px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.hero-card{
  padding: 18px;
}
.hero h1{
  margin:0 0 8px;
  font-size: clamp(26px, 3.6vw, 42px);
  letter-spacing: -.2px;
}
.hero p{ margin:0 0 14px; color:var(--muted); max-width: 72ch; }

.searchbar{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top: 10px;
}
.input, .select{
  appearance:none;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.45);
  color: var(--text);
  outline: none;
  min-width: 160px;
}
.input{ flex: 1 1 260px; }
.select{ flex: 0 1 170px; }
.input:focus, .select:focus{
  border-color: rgba(138,180,255,.55);
  box-shadow: 0 0 0 3px rgba(138,180,255,.18);
}

.kpi{
  padding:18px;
  display:flex; flex-direction:column; gap:12px;
}
.kpi-row{ display:flex; justify-content:space-between; gap:10px; }
.kpi-val{ font-weight:800; font-size: 22px; }
.kpi-lab{ color:var(--muted); font-size: 13px; }

.section{
  margin-top: 18px;
}
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  margin: 0 0 10px;
}
.section-title{
  margin:0;
  font-size: 18px;
  letter-spacing:.2px;
}
.section-sub{ color:var(--muted); font-size: 13px; margin:0; }

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  padding: 14px;
}
.card:hover{
  border-color: rgba(148,163,184,.30);
}
.card-top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(148,163,184,.08);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.card h3{ margin: 10px 0 8px; font-size: 16px; }
.card p{ margin:0; color: var(--muted); font-size: 13px; }
.card-footer{ margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.pill{
  color: var(--text);
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.35);
  border-radius: 999px;
  padding: 6px 10px;
}

/* Pagination */
.pager{
  display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:center;
  margin-top: 16px;
}
.pager a, .pager span{
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148,163,184,.06);
  color: var(--text);
}
.pager a:hover{ text-decoration:none; background: rgba(148,163,184,.10); }
.pager .is-current{ background: rgba(255,3,54,.16); border-color: rgba(255,3,54,.3); }

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(11,15,25,.85);
  padding: 22px 0;
}
.footer-inner{ display:grid; grid-template-columns: 1.2fr 1fr auto; gap:14px; align-items:center; }
.footer-brand{ display:flex; gap:10px; align-items:center; }
.footer-title{ font-weight:800; }
.footer-sub{ color:var(--muted); font-size:13px; }
.footer-links{ display:flex; gap:14px; flex-wrap:wrap; justify-content:center; }
.footer-links a{ color: var(--muted); }
.footer-copy{ color: var(--muted); font-size: 13px; text-align:right; }

@media (max-width: 860px){
  .footer-inner{ grid-template-columns: 1fr; text-align:left; }
  .footer-copy{ text-align:left; }
}

/* Tables (exercise/training pages) */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(2,6,23,.32);
}
.table th, .table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148,163,184,.12);
  text-align:left;
  vertical-align: top;
}
.table th{ color: var(--muted); font-weight:650; }
.table tr:last-child td{ border-bottom:0; }

.notice{
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid rgba(138,180,255,.22);
  background: rgba(138,180,255,.10);
  color: var(--text);
}

.thumb-wrap{
  border-radius:12px;
  overflow:hidden;
}

.thumb-wrap.level-principiante{ box-shadow: 0 0 0 1px rgba(46,204,113,.30), var(--shadow); }
.thumb-wrap.level-intermedio{ box-shadow: 0 0 0 1px rgba(241,196,15,.30), var(--shadow); }
.thumb-wrap.level-avanzado{ box-shadow: 0 0 0 1px rgba(231,76,60,.30), var(--shadow); }