:root{
  --ink:#0A0A0A;
  --ink-soft:#3D3D3D;
  --muted:#6B6B6B;
  --line:rgba(0,0,0,0.10);
  --line-strong:rgba(0,0,0,0.16);
  --paper:#FFFFFF;
  --cream:#FAF9F6;
  --accent:#96773C;
  --accent-soft:#F4EDE0;
  --shadow-sm:0 2px 10px rgba(0,0,0,0.05);
  --shadow-md:0 14px 34px rgba(0,0,0,0.09);
  --radius:12px;
}
*{ box-sizing:border-box; }
body{
  font-family:'Lora', serif;
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.brand-font{
  font-family:'Cormorant Garamond', serif;
  font-weight:600;
  letter-spacing:0.01em;
}
a{ color:var(--ink); text-decoration:none; }
a:hover{ color:#000; }

/* ---------- Header ---------- */
.site-header{
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(6px);
  position:sticky; top:0; z-index:40;
}
.navbar-brand{
  font-family:'Cormorant Garamond', serif;
  font-size:25px;
  letter-spacing:0.03em;
  color:var(--ink) !important;
  display:flex; align-items:baseline; gap:8px;
}
.brand-sub{ font-size:13px; color:var(--muted); letter-spacing:0.08em; text-transform:uppercase; }
.nav-link{ color:var(--ink-soft) !important; font-size:14.5px; font-weight:500; }
.nav-link:hover{ color:var(--ink) !important; }

.admin-strip{
  background:var(--ink); color:#EDEDED; font-size:12.5px; letter-spacing:0.02em;
  padding:8px 0; position:relative; z-index:41;
}
.admin-strip a{ color:#fff; text-decoration:underline; }
.admin-strip a:hover{ color:var(--accent); }
.admin-pill{
  background:var(--accent-soft); color:var(--accent); font-weight:600; font-size:12.5px;
  padding:6px 12px; border-radius:999px; letter-spacing:0.02em;
}

/* ---------- Dashboard admin ---------- */
.dash-head{
  display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:20px;
  padding-top:36px; margin-bottom:28px;
}
.dash-eyebrow{ font-size:12.5px; letter-spacing:0.18em; text-transform:uppercase; color:var(--accent); font-weight:600; margin-bottom:6px; }
.dash-head h1{ font-size:32px; margin-bottom:4px; }

.kpi-grid{
  display:grid; grid-template-columns:repeat(5, 1fr); gap:18px; margin-bottom:32px;
}
.kpi-card{
  border:1px solid var(--line); border-radius:var(--radius); padding:20px;
  background:var(--paper); box-shadow:var(--shadow-sm); position:relative;
}
.kpi-icon{
  width:36px; height:36px; border-radius:9px; background:var(--cream);
  display:flex; align-items:center; justify-content:center; color:var(--ink); margin-bottom:14px;
}
.kpi-icon svg{ width:18px; height:18px; }
.kpi-accent .kpi-icon{ background:var(--accent-soft); color:var(--accent); }
.kpi-alert{ border-color:rgba(150,119,60,0.4); }
.kpi-alert .kpi-icon{ background:var(--accent-soft); color:var(--accent); }
.kpi-value{ font-family:'Cormorant Garamond',serif; font-size:30px; font-weight:600; color:var(--ink); line-height:1; }
.kpi-label{ font-size:13px; color:var(--ink-soft); margin-top:6px; font-weight:500; }
.kpi-sub{ font-size:11.5px; color:var(--muted); margin-top:4px; }
.kpi-link{ display:inline-block; margin-top:8px; font-size:12.5px; font-weight:600; color:var(--accent); }
.kpi-link:hover{ color:var(--ink); }

.quick-actions{ display:flex; flex-wrap:wrap; gap:12px; margin-bottom:36px; }
.quick-action{
  display:flex; align-items:center; gap:9px;
  border:1px solid var(--line-strong); border-radius:999px; padding:11px 20px;
  font-size:13.5px; font-weight:600; color:var(--ink); background:var(--paper);
  transition:background .2s, transform .2s;
}
.quick-action svg{ width:16px; height:16px; }
.quick-action:hover{ background:var(--ink); color:#fff; transform:translateY(-2px); }

.dash-grid{ display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-bottom:22px; }
.dash-panel{
  border:1px solid var(--line); border-radius:var(--radius); padding:24px;
  background:var(--paper); box-shadow:var(--shadow-sm);
}
.dash-panel h2{ font-size:19px; margin-bottom:16px; }
.dash-panel-link{ display:inline-block; margin-top:14px; font-size:13px; font-weight:600; color:var(--accent); }
.dash-panel-link:hover{ color:var(--ink); }

.bar-chart{ display:flex; flex-direction:column; gap:14px; }
.bar-row{ display:grid; grid-template-columns:120px 1fr 26px; align-items:center; gap:12px; }
.bar-label{ font-size:13px; color:var(--ink-soft); }
.bar-track{ height:10px; background:var(--cream); border-radius:999px; overflow:hidden; }
.bar-fill{ height:100%; background:var(--accent); border-radius:999px; transition:width .6s ease; }
.bar-value{ font-size:12.5px; color:var(--muted); text-align:right; }

.activity-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.activity-list li{ border-bottom:1px solid var(--line); }
.activity-list li:last-child{ border-bottom:none; }
.activity-list a{ display:block; padding:11px 2px; }
.activity-list a:hover{ background:var(--cream); }
.activity-list strong{ display:block; font-size:14px; color:var(--ink); font-weight:600; }
.activity-meta{ display:block; font-size:12px; color:var(--muted); margin-top:2px; }

@media (max-width:1100px){
  .kpi-grid{ grid-template-columns:repeat(3, 1fr); }
}
@media (max-width:768px){
  .kpi-grid{ grid-template-columns:repeat(2, 1fr); }
  .dash-grid{ grid-template-columns:1fr; }
  .bar-row{ grid-template-columns:90px 1fr 22px; }
}

.btn-dark{ background:var(--ink); border-color:var(--ink); font-weight:600; letter-spacing:0.02em; }
.btn-dark:hover{ background:#242424; border-color:#242424; }
.btn-outline-dark{ border-color:var(--ink); color:var(--ink); font-weight:500; }
.btn-outline-dark:hover{ background:var(--ink); color:#fff; }

/* ---------- Layout ---------- */
.site-main{ min-height:70vh; padding:0 0 80px; }
.site-footer{
  border-top:1px solid var(--line);
  padding:40px 0;
  color:var(--muted);
  font-size:14px;
  background:var(--cream);
}

/* ---------- Hero del catalogo ---------- */
.catalog-hero{
  background:linear-gradient(180deg, var(--cream) 0%, #FFFFFF 100%);
  border-bottom:1px solid var(--line);
  padding:64px 0 46px;
  text-align:center;
  margin-bottom:48px;
}
.catalog-eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-size:12.5px; letter-spacing:0.2em; text-transform:uppercase;
  color:var(--accent); font-weight:600; margin-bottom:18px;
}
.catalog-eyebrow:before, .catalog-eyebrow:after{ content:""; width:26px; height:1px; background:var(--accent); }
.catalog-hero h1{ font-size:42px; color:var(--ink); margin-bottom:14px; }
.catalog-hero .lead{ color:var(--ink-soft); font-size:17px; max-width:560px; margin:0 auto; }

/* ---------- Barra de confianza ---------- */
.trust-bar{
  display:flex; flex-wrap:wrap; justify-content:center; gap:28px 40px;
  margin-top:34px; padding-top:30px; border-top:1px solid var(--line);
}
.trust-item{
  display:flex; align-items:center; gap:10px;
  font-size:13.5px; color:var(--ink-soft); font-weight:500;
}
.trust-item svg{ width:20px; height:20px; color:var(--accent); flex-shrink:0; }

/* ---------- Tarjetas de curso ---------- */
.card-course{
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--paper);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  height:100%;
  display:flex; flex-direction:column;
  box-shadow:var(--shadow-sm);
}
.card-course:hover{
  transform:translateY(-5px);
  box-shadow:var(--shadow-md);
  border-color:var(--line-strong);
}
.card-course .cover{
  aspect-ratio:16/10; background:var(--cream); overflow:hidden; position:relative;
}
.card-course .cover img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .5s ease;
}
.card-course:hover .cover img{ transform:scale(1.06); }

.cover-placeholder{
  width:100%; height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  background:linear-gradient(150deg, #F4EDE0 0%, #EFEAE0 55%, #E9E3D8 100%);
  color:var(--accent);
}
.cover-placeholder svg{ width:34px; height:34px; opacity:0.8; }
.cover-placeholder span{ font-size:12px; letter-spacing:0.08em; text-transform:uppercase; color:#9A8A6A; }

.badge-category{
  display:inline-block;
  background:var(--ink); color:#fff; font-weight:600; letter-spacing:0.06em;
  font-size:10.5px; text-transform:uppercase; padding:5px 12px; border-radius:999px;
}
.cover-badge{
  position:absolute; top:14px; left:14px;
  background:rgba(10,10,10,0.82); backdrop-filter:blur(3px);
}

.card-course .card-body{ padding:22px 22px 20px; display:flex; flex-direction:column; flex:1; }
.card-course h3{ font-size:21px; margin:2px 0 10px; color:var(--ink); line-height:1.25; }
.card-course .card-desc{
  color:var(--ink-soft); font-size:14.5px; line-height:1.55; margin-bottom:18px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  flex:1;
}
.card-course .card-footer-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-top:14px; border-top:1px solid var(--line);
}
.card-course .price{
  font-family:'Cormorant Garamond', serif; font-size:22px; font-weight:600; color:var(--accent);
}
.card-course .price small{ display:block; font-family:'Lora',serif; font-size:11px; color:var(--muted); font-weight:400; letter-spacing:0.03em; }
.card-course .btn-view{
  background:var(--ink); color:#fff; font-size:13px; font-weight:600; letter-spacing:0.02em;
  padding:9px 18px; border-radius:8px; transition:background .2s, transform .2s;
  white-space:nowrap;
}
.card-course .btn-view:hover{ background:var(--accent); color:#fff; transform:translateX(2px); }

/* ---------- Empty state ---------- */
.catalog-empty{
  text-align:center; padding:70px 20px; color:var(--muted);
  border:1px dashed var(--line-strong); border-radius:var(--radius); background:var(--cream);
}

/* ---------- Autenticacion ---------- */
.auth-card{
  max-width:440px; margin:60px auto; border:1px solid var(--line); border-radius:var(--radius);
  padding:40px 36px; box-shadow:var(--shadow-sm); background:var(--paper);
}
.auth-card h1{ font-size:28px; }

/* ---------- Lecciones / progreso ---------- */
.lesson-list .list-group-item{ border-color:var(--line); }
.lesson-list .list-group-item.active{ background:var(--ink); border-color:var(--ink); }
.lesson-list .list-group-item.completed .lesson-check{ color:var(--accent); }

.progress{ height:8px; border-radius:999px; background:var(--cream); }
.progress-bar{ background-color:var(--accent); }

video, .pdf-embed{ width:100%; border-radius:var(--radius); border:1px solid var(--line); }

/* ---------- WhatsApp flotante ---------- */
.wa-float{
  position:fixed; bottom:24px; right:24px; z-index:60;
  width:58px; height:58px; border-radius:50%;
  background:#25D366; color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 24px rgba(0,0,0,0.28);
  transition:transform .2s ease;
}
.wa-float:hover{ transform:scale(1.08); color:#fff; }

/* ---------- Fondo mistico animado (marca de agua, igual al sitio principal) ---------- */
.mystic-bg{
  position:fixed; inset:0; z-index:1; pointer-events:none; overflow:hidden;
  opacity:0.05; mix-blend-mode:multiply;
}
.mystic-mandala{
  position:absolute; top:50%; left:50%; width:900px; height:900px;
  transform:translate(-50%,-50%);
  animation:mysticSpin 140s linear infinite;
}
.mystic-mandala.secondary{
  width:560px; height:560px;
  animation:mysticSpinReverse 100s linear infinite;
}
@keyframes mysticSpin{ from{ transform:translate(-50%,-50%) rotate(0deg); } to{ transform:translate(-50%,-50%) rotate(360deg); } }
@keyframes mysticSpinReverse{ from{ transform:translate(-50%,-50%) rotate(360deg); } to{ transform:translate(-50%,-50%) rotate(0deg); } }
.mystic-star{
  position:absolute; opacity:0;
  animation:mysticTwinkle 7s ease-in-out infinite;
}
@keyframes mysticTwinkle{
  0%, 100%{ opacity:0; transform:translateY(0) scale(0.8); }
  50%{ opacity:0.9; transform:translateY(-14px) scale(1.15); }
}
@media (max-width:768px){
  .mystic-mandala{ width:560px; height:560px; }
  .mystic-mandala.secondary{ width:360px; height:360px; }
}

/* El header, el contenido y el whatsapp flotante deben quedar por encima del fondo */
.site-main, .site-footer{ position:relative; z-index:2; }
.wa-float{ z-index:60; }

@media (max-width:768px){
  .catalog-hero{ padding:48px 0 34px; }
  .catalog-hero h1{ font-size:32px; }
  .trust-bar{ gap:18px 26px; }
}
