/* ============================================================
   Capacitar Ecuador — estilos globales, responsivos
   ============================================================ */
:root{
  --primary:#1b4a9c; --primary-dark:#14356e; --accent:#2e6be6; --yellow:#f6b40a;
  --bg:#f4f7fb; --card:#fff; --border:#e3e9f2; --text:#1f2937; --muted:#647089;
  --radius:14px; --shadow:0 10px 30px -12px rgba(20,53,110,.22);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:'Inter',system-ui,-apple-system,sans-serif;color:var(--text);background:var(--bg);line-height:1.55;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-family:'Poppins',sans-serif;color:var(--primary-dark);margin:0;line-height:1.15}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.wrap{max-width:1240px;margin:0 auto;padding:0 20px}
.muted{color:var(--muted)}.center{text-align:center}
.accent{color:var(--accent)}

/* Botones */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:15px;border:none;border-radius:10px;padding:12px 22px;cursor:pointer;transition:.18s;font-family:inherit}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark);transform:translateY(-1px)}
.btn-primary:disabled{opacity:.5;cursor:not-allowed;transform:none}
.btn-outline{background:transparent;border:1.5px solid var(--border);color:var(--primary)}
.btn-outline:hover{border-color:var(--accent)}
.btn-light{background:#eef3fb;color:var(--primary)}
.btn-danger{background:#fde8e8;color:#c0392b}
.btn-sm{padding:8px 14px;font-size:13.5px}
.btn-lg{padding:14px 28px;font-size:16px}
.block{width:100%}

/* Formularios */
input,textarea,select{font-family:inherit;font-size:14.5px;width:100%;padding:10px 12px;border:1.5px solid var(--border);border-radius:9px;background:#fff;color:var(--text)}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--accent)}
input[type=color]{height:44px;padding:4px}
input[type=file]{padding:8px;background:#f8fafc}
label{font-size:13px;font-weight:600;color:var(--muted);display:block;margin:0 0 5px}
.field{margin-bottom:14px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.alert{padding:11px 14px;border-radius:10px;margin-bottom:14px;font-size:14px}
.alert.ok{background:#e2f5ea;color:#12703a;border:1px solid #bfe6cd}
.alert.error{background:#fdeaea;color:#c0392b;border:1px solid #f3c6c6}

/* ===== HEADER ===== */
.site-header{position:sticky;top:0;z-index:40;background:#fff;border-bottom:1px solid var(--border)}
.header-inner{display:flex;align-items:center;gap:18px;height:74px}
.brand{display:flex;align-items:center;gap:11px}
.brand-logo{height:46px;width:auto}
.brand-text b{font-family:'Poppins';font-weight:800;font-size:20px;color:var(--primary-dark);letter-spacing:.5px;display:block;line-height:1}
.brand-text small{font-size:9.5px;letter-spacing:2px;color:var(--muted);font-weight:600}
.main-nav{margin-left:auto;display:flex;gap:24px;align-items:center}
.main-nav a{font-size:14.5px;font-weight:600;color:var(--text)}
.main-nav a.active,.main-nav a:hover{color:var(--accent)}
.header-actions{display:flex;gap:10px;align-items:center}
.cart-btn{position:relative}
.cart-badge{position:absolute;top:-7px;right:-7px;background:var(--yellow);color:#3a2a00;font-size:11px;font-weight:700;min-width:19px;height:19px;border-radius:50%;display:grid;place-items:center;padding:0 4px}
.nav-toggle{display:none;background:none;border:none;font-size:26px;cursor:pointer;color:var(--primary-dark)}

/* ===== HERO ===== */
.hero{background:linear-gradient(180deg,#fff 0%,#eef3fb 100%);padding-top:34px}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:30px;align-items:center;padding-bottom:20px}
.hero-copy h1{font-size:clamp(30px,4.4vw,52px);font-weight:800;letter-spacing:-.5px}
.hero-script{font-family:'Dancing Script';font-weight:700;font-size:clamp(34px,5vw,58px);color:var(--accent);margin:2px 0 4px}
.hero-rule{width:70px;height:4px;background:var(--accent);border-radius:4px;margin:14px 0 20px}
.hero-copy p{font-size:17px;color:var(--muted);max-width:480px;margin-bottom:24px}
.hero-media{position:relative}
.hero-img{border-radius:20px;overflow:hidden;aspect-ratio:4/3;background:linear-gradient(135deg,var(--accent),var(--primary));box-shadow:var(--shadow)}
.hero-img img{width:100%;height:100%;object-fit:cover}
.hero-placeholder{width:100%;height:100%;display:grid;place-content:center;justify-items:center;color:#fff;text-align:center;gap:6px}
.hero-placeholder span{font-size:64px}
.hero-badges{position:absolute;right:-6px;top:14px;display:flex;flex-direction:column;gap:11px}
.badge{background:#fff;border-radius:12px;padding:9px 12px;box-shadow:var(--shadow);display:flex;gap:9px;align-items:center;max-width:210px}
.badge-ico{width:34px;height:34px;border-radius:9px;background:var(--primary);display:grid;place-items:center;font-size:16px;flex-shrink:0}
.badge b{font-size:13px;color:var(--primary-dark);display:block;line-height:1.15}
.badge small{font-size:11px;color:var(--muted)}

/* ===== SECCIONES ===== */
.section{padding:44px 0}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:22px}
.section-head h2{font-size:28px}
.section-head p{color:var(--muted);margin:2px 0 0}

/* Escuelas */
.schools-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.school-card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:20px;box-shadow:var(--shadow);display:flex;flex-direction:column}
.school-ico{width:52px;height:52px;border-radius:50%;background:var(--sc);display:grid;place-items:center;font-size:24px;margin-bottom:12px}
.school-card h3{font-size:18px;color:var(--sc);margin-bottom:8px}
.school-tag{font-size:13.5px;color:var(--muted);min-height:38px}
.school-list{list-style:none;margin:10px 0;padding:10px 0 0;border-top:1px solid var(--border);flex:1}
.school-list li{display:flex;gap:8px;font-size:13.5px;margin-bottom:6px}
.school-list li span{color:var(--sc);font-weight:800}
.school-btn{background:var(--sc);color:#fff;font-weight:700;margin-top:auto}

/* Filtros */
.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.chip{border:1.5px solid var(--border);border-radius:999px;padding:8px 15px;font-size:13.5px;font-weight:600;color:var(--sc,var(--primary));background:#fff}
.chip-on{background:var(--sc,var(--primary));color:#fff;border-color:transparent}

/* Cursos */
.courses-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}
.course-card{background:#fff;border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.course-media{aspect-ratio:16/9;background:linear-gradient(135deg,var(--sc),color-mix(in srgb,var(--sc) 70%,#000));display:grid;place-items:center;position:relative}
.course-media img{width:100%;height:100%;object-fit:cover}
.course-emoji{font-size:44px}
.tag-offer{position:absolute;top:10px;left:10px;background:var(--yellow);color:#3a2a00;font-size:11px;font-weight:800;padding:4px 10px;border-radius:999px;text-transform:uppercase}
.course-body{padding:15px;display:flex;flex-direction:column;flex:1}
.course-school{font-size:11px;font-weight:700;letter-spacing:.3px}
.course-body h4{font-size:16.5px;margin:4px 0 6px}
.course-desc{font-size:13px;color:var(--muted);flex:1}
.course-meta{display:flex;gap:10px;font-size:12px;color:var(--muted);margin:8px 0 12px}
.course-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.price b{font-size:22px;font-weight:800;color:var(--primary-dark);font-family:'Poppins'}
.price s{font-size:13px;color:var(--muted);margin-left:6px}
.empty{color:var(--muted);padding:30px;text-align:center}

/* Franja */
.stripe{background:var(--accent);color:#fff;padding:22px 0}
.stripe-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.stripe-item{display:flex;gap:11px;align-items:center}
.stripe-item span{font-size:26px}.stripe-item b{font-size:14px}

/* Footer */
.site-footer{background:var(--primary-dark);color:#cfdcf2;padding:30px 0}
.footer-inner{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;align-items:center}
.footer-brand{font-family:'Poppins';font-weight:800;font-size:18px;color:#fff}
.site-footer p{font-size:13px;margin:6px 0 0}
.footer-right{font-size:12.5px;text-align:right}
.footer-right a{color:#7fa5e0;text-decoration:underline}

/* WhatsApp */
.wa-float{position:fixed;bottom:22px;left:22px;background:#25d366;color:#fff;width:54px;height:54px;border-radius:50%;display:grid;place-items:center;font-size:26px;box-shadow:var(--shadow);z-index:50}

/* ===== CARRITO ===== */
.cart-overlay{position:fixed;inset:0;background:rgba(15,30,60,.4);z-index:60;opacity:0;visibility:hidden;transition:.25s}
.cart-overlay.show{opacity:1;visibility:visible}
.cart-drawer{position:fixed;top:0;right:-460px;width:min(420px,92vw);height:100%;background:#fff;z-index:61;box-shadow:-8px 0 40px rgba(0,0,0,.2);transition:.28s;display:flex;flex-direction:column}
.cart-drawer.open{right:0}
.cart-head{padding:18px 20px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.cart-head h3{font-size:19px}
.x{background:none;border:none;font-size:22px;color:var(--muted);cursor:pointer}
.cart-items{flex:1;overflow-y:auto;padding:16px}
.cart-line{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.cart-line .t{font-weight:600;font-size:14.5px}
.qty{display:flex;align-items:center;gap:8px;margin-top:6px}
.qty button{width:26px;height:26px;border-radius:6px;border:1.5px solid var(--border);background:#fff;cursor:pointer}
.cart-rm{margin-left:auto;background:none;border:none;color:#c0392b;font-size:13px;font-weight:600;cursor:pointer}
.cart-empty{color:var(--muted);text-align:center;margin-top:40px}
.cart-foot{padding:18px;border-top:1px solid var(--border)}
.cart-total{display:flex;justify-content:space-between;font-size:18px;font-weight:800;margin-bottom:12px}

/* ===== MODAL / CHECKOUT ===== */
.modal{position:fixed;inset:0;background:rgba(15,30,60,.55);z-index:70;display:none;place-items:center;padding:16px}
.modal.show{display:grid}
.modal-box{background:#fff;border-radius:16px;width:min(560px,100%);max-height:92vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-head{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center}
.modal-head h3{font-size:20px}
.modal-body{padding:22px}
.summary{background:var(--bg);border-radius:12px;padding:14px;margin-bottom:18px}
.summary .r{display:flex;justify-content:space-between;font-size:14px;margin-bottom:4px}
.summary .tot{font-weight:800;font-size:16px;border-top:1px solid var(--border);margin-top:8px;padding-top:8px}
.pm{display:flex;gap:12px;align-items:center;border:1.5px solid var(--border);border-radius:12px;padding:12px 14px;margin-bottom:10px;cursor:pointer}
.pm.sel{border-color:var(--accent);background:#eef3fb}
.pm input{width:auto}.pm .ico{font-size:24px}
.pm b{display:block}.pm small{font-size:12.5px;color:var(--muted)}
.bankbox{background:var(--bg);border-radius:10px;padding:14px;font-size:13.5px;margin-bottom:12px}
.ok-screen{text-align:center;padding:10px 0}
.ok-screen .big{font-size:56px}

/* ===== LOGIN ADMIN ===== */
.login-bg{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--primary-dark));padding:20px}
.login-card{background:#fff;border-radius:16px;padding:30px;width:min(380px,100%);box-shadow:var(--shadow)}
.login-card h2{text-align:center;font-size:22px;margin-bottom:4px}

/* ===== PANEL ADMIN ===== */
.admin-body{background:var(--bg)}
.admin-top{background:linear-gradient(135deg,var(--primary,#1b4a9c),var(--primary-dark,#12336d));
  color:#fff;padding:12px 0;position:sticky;top:0;z-index:60;
  box-shadow:0 6px 18px -12px rgba(2,10,30,.55)}
.admin-top-in{display:flex;align-items:center;gap:14px;justify-content:space-between;flex-wrap:wrap}
.admin-top-actions{display:flex;gap:8px}
.admin-layout{display:grid;grid-template-columns:210px 1fr;gap:22px;padding:22px 20px}
.admin-nav{display:flex;flex-direction:column;gap:6px}
.admin-tab{padding:11px 14px;border-radius:10px;font-weight:600;font-size:14.5px;background:#fff;border:1px solid var(--border);color:var(--text)}
.admin-tab.on{background:var(--primary);color:#fff;border-color:transparent}
.admin-main{background:#fff;border-radius:14px;border:1px solid var(--border);padding:22px;min-height:420px}
.admin-main h2{font-size:22px}
.card-form{margin-top:16px;padding-top:4px}
.card-form.school-edit,.card-form.highlight{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:16px}
.thumb{height:46px;border-radius:8px;margin-bottom:8px;border:1px solid var(--border)}
.thumb-lg{height:90px}
.row-gap{display:flex;gap:10px}
.check{display:flex;align-items:center;gap:9px;font-weight:600;color:var(--text);margin-bottom:10px}
.check input{width:auto}
.pay-block{border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:14px}
.course-rows{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.course-row{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;flex-wrap:wrap}
.cr-thumb{width:52px;height:40px;border-radius:7px;overflow:hidden;background:#eef3fb;display:grid;place-items:center;flex-shrink:0}
.cr-thumb img{width:100%;height:100%;object-fit:cover}
.cr-info{flex:1;min-width:150px}
.order-row{border:1px solid var(--border);border-radius:10px;padding:14px;margin-bottom:10px}
.order-head{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px}
.badge-status{font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px}
.badge-status.paid{background:#e2f5ea;color:#1b8a44}
.badge-status.pending{background:#fdf0e0;color:#b5720d}
.order-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}
.status-form{display:flex;gap:6px;align-items:center}
.status-form select{width:auto}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:1000px){
  .schools-grid{grid-template-columns:repeat(2,1fr)}
  .stripe-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  .main-nav{position:absolute;top:74px;left:0;right:0;background:#fff;border-bottom:1px solid var(--border);flex-direction:column;gap:0;padding:6px 20px;display:none}
  .main-nav.open{display:flex}
  .main-nav a{padding:12px 0;width:100%;border-bottom:1px solid var(--border)}
  .nav-toggle{display:block;margin-left:auto}
  .header-actions{margin-left:0}
  .cart-btn span:not(.cart-badge){display:none}
  .hero-grid{grid-template-columns:1fr}
  .hero-badges{position:static;flex-direction:row;flex-wrap:wrap;margin-top:14px}
  .badge{flex:1;min-width:150px}
  .admin-layout{grid-template-columns:1fr}
  .admin-nav{flex-direction:row;flex-wrap:wrap}
  .admin-tab{flex:1;text-align:center;min-width:100px}
}
@media(max-width:560px){
  .wrap{padding:0 16px}
  .schools-grid{grid-template-columns:1fr}
  .stripe-grid{grid-template-columns:1fr}
  .grid2{grid-template-columns:1fr}
  .footer-inner{flex-direction:column;align-items:flex-start}
  .footer-right{text-align:left}
  .hero-copy p{font-size:15.5px}
}

/* ============================================================
   Tarjeta: pista de "ver detalle" y botones
   ============================================================ */
.course-media{cursor:pointer}
.media-hint{position:absolute;bottom:8px;right:8px;background:rgba(15,30,60,.72);color:#fff;font-size:11px;font-weight:600;padding:4px 9px;border-radius:999px;opacity:0;transition:.18s}
.course-media:hover .media-hint{opacity:1}
.course-foot-btns{display:flex;gap:6px}

/* ============================================================
   Modal grande + detalle de curso
   ============================================================ */
.modal-box.modal-lg{width:min(720px,100%);position:relative;padding:0}
.x-float{position:absolute;top:12px;right:14px;z-index:5;background:rgba(255,255,255,.9);border-radius:50%;width:34px;height:34px;line-height:1}
.cm-carousel{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;background:#0a1a3a;border-radius:16px 16px 0 0}
.cm-track{display:flex;height:100%;transition:transform .35s ease}
.cm-slide{min-width:100%;height:100%}
.cm-slide img{width:100%;height:100%;object-fit:cover}
.cm-empty{display:grid;place-items:center}
.cm-empty span{font-size:70px}
.cm-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.85);border:none;width:40px;height:40px;border-radius:50%;font-size:24px;cursor:pointer;color:var(--primary-dark);display:grid;place-items:center}
.cm-nav.prev{left:10px}.cm-nav.next{right:10px}
.cm-dots{position:absolute;bottom:10px;left:0;right:0;display:flex;gap:6px;justify-content:center}
.cm-dots span{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer}
.cm-dots span.on{background:#fff;transform:scale(1.25)}
.cm-content{padding:22px}
.cm-school{font-size:12px;font-weight:700;letter-spacing:.3px}
.cm-title{font-size:24px;margin:4px 0 8px}
.cm-desc{color:var(--muted);font-size:15px;margin:0 0 14px}
.cm-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 16px}
.cm-fact{display:flex;gap:10px;align-items:flex-start;background:var(--bg);border-radius:10px;padding:10px 12px}
.cm-fact span{font-size:20px}
.cm-fact b{display:block;font-size:12px;color:var(--muted);font-weight:600}
.cm-fact small{font-size:14px;color:var(--text);font-weight:600}
.cm-blocks{border-top:1px solid var(--border);padding-top:6px}
.cm-h{font-size:17px;margin:16px 0 6px;color:var(--primary-dark)}
.cm-p{font-size:14.5px;color:var(--text);margin:0 0 10px;line-height:1.6}
.cm-ul{margin:0 0 12px;padding-left:0;list-style:none}
.cm-ul li{position:relative;padding-left:24px;margin-bottom:7px;font-size:14.5px}
.cm-ul li::before{content:"✓";position:absolute;left:0;color:var(--accent);font-weight:800}
.cm-blkimg{width:100%;border-radius:12px;margin:6px 0 14px}
.cm-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--border);padding-top:16px;margin-top:6px;position:sticky;bottom:0;background:#fff}
.cm-price b{font-size:26px;font-weight:800;color:var(--primary-dark);font-family:'Poppins'}
.cm-price s{font-size:15px;color:var(--muted);margin-left:8px}

/* ============================================================
   Editor del panel: galería + bloques
   ============================================================ */
.editor-block{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:14px}
.gallery-grid{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:10px}
.gcell{position:relative;width:96px;height:72px;border-radius:9px;overflow:hidden;border:1px solid var(--border)}
.gcell img{width:100%;height:100%;object-fit:cover}
.gdel{position:absolute;top:3px;right:3px;background:rgba(192,57,43,.92);color:#fff;border:none;width:22px;height:22px;border-radius:50%;cursor:pointer;font-size:12px;line-height:1}
.upload-btn{cursor:pointer}
.upl-status{display:block;margin-top:6px}
.blocks-wrap{display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
/* overflow:visible para que el desplegable del editor de texto no quede
   recortado dentro del bloque; el redondeo lo pone la propia cabecera. */
.blk{border:1px solid var(--border);border-radius:10px;background:#fff;overflow:visible}
.blk-head{display:flex;justify-content:space-between;align-items:center;background:#f2f6fc;padding:7px 10px;
  border-radius:9px 9px 0 0}
.blk-tag{font-size:12px;font-weight:700;color:var(--primary)}
.blk-ctrl{display:flex;gap:4px}
.blk-ctrl button{background:#fff;border:1px solid var(--border);border-radius:6px;width:28px;height:26px;cursor:pointer;font-size:13px}
.blk-body{padding:10px}
.blk-img{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.blk-img img{height:56px;border-radius:8px}
.block-tools{display:flex;gap:8px;flex-wrap:wrap}
.txt-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:8px;padding:6px;background:#f7f9fc;border:1px solid var(--border);border-radius:8px}
.txt-tools select{padding:4px 6px;font-size:12px;border-radius:6px;border:1px solid var(--border);width:auto}
.txt-tools input[type=color]{width:30px;height:28px;padding:2px;border:1px solid var(--border);border-radius:6px;cursor:pointer}
.txt-btn{width:28px;height:28px;border:1px solid var(--border);border-radius:6px;background:#fff;cursor:pointer;font-size:13px;line-height:1}
.txt-btn.on{background:var(--primary);border-color:var(--primary);color:#fff}
.txt-sep{width:1px;height:20px;background:var(--border);margin:0 2px}
.cta-wrap{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.cta-item{border:1px solid var(--border);border-radius:10px;background:#fff;padding:10px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cta-item input[type=text],.cta-item input:not([type]){flex:1 1 160px;min-width:120px}
.cta-item select{width:auto}
.cta-item .rm{margin-left:auto;background:#fff;border:1px solid var(--border);border-radius:6px;width:28px;height:28px;cursor:pointer}

@media(max-width:560px){
  .cm-facts{grid-template-columns:1fr}
  .cm-foot{flex-direction:column;align-items:stretch}
  .cm-foot .btn{width:100%}
  .course-foot{flex-direction:column;align-items:flex-start;gap:8px}
  .course-foot-btns{width:100%}
  .course-foot-btns .btn{flex:1}
}

/* ============================================================
   Hero con video
   ============================================================ */
.hero-img iframe.hero-video, .hero-img video.hero-video{width:100%;height:100%;border:0;display:block}

/* ============================================================
   Detalle del curso: portada, carrusel por bloque, video
   ============================================================ */
.cm-cover{width:100%;aspect-ratio:16/9;overflow:hidden;background:#0a1a3a;border-radius:16px 16px 0 0}
.cm-cover img{width:100%;height:100%;object-fit:cover}
.cm-cover.cm-empty{display:grid;place-items:center}
.cm-cover.cm-empty span{font-size:70px}
.cm-video{position:relative;width:100%;aspect-ratio:16/9;margin:6px 0 14px;border-radius:12px;overflow:hidden;background:#000}
.cm-video iframe,.cm-video video{position:absolute;inset:0;width:100%;height:100%;border:0}

.cm-car{position:relative;margin:8px 0 16px;overflow:hidden}
.cm-car .cm-car-track{display:flex;transition:transform .4s ease}
.cm-car-slide{min-width:100%}
.cm-car-slide img{width:100%;display:block}
/* Formas */
.cm-car.shape-rect .cm-car-slide img{aspect-ratio:16/9;object-fit:cover;border-radius:10px}
.cm-car.shape-rounded .cm-car-slide img{aspect-ratio:16/9;object-fit:cover;border-radius:22px}
.cm-car.shape-square .cm-car-slide img{aspect-ratio:1/1;object-fit:cover;border-radius:10px}
.cm-car.shape-circle{max-width:340px;margin-left:auto;margin-right:auto}
.cm-car.shape-circle .cm-car-slide img{aspect-ratio:1/1;object-fit:cover;border-radius:50%}
.cm-car.shadow .cm-car-slide img{box-shadow:0 14px 34px -10px rgba(20,53,110,.5)}
.cm-car .cm-car-dots{position:absolute;bottom:10px;left:0;right:0;display:flex;gap:6px;justify-content:center}
.cm-car .cm-car-dots span{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.6);cursor:pointer;box-shadow:0 0 3px rgba(0,0,0,.4)}
.cm-car .cm-car-dots span.on{background:#fff;transform:scale(1.25)}

/* ============================================================
   Secciones del inicio (públicas)
   ============================================================ */
.home-sec{padding:48px 0}
.home-title{font-size:26px;text-align:center;margin-bottom:26px}
.home-cols{display:grid;gap:22px}
.home-col{text-align:center;padding:10px}
.home-col-ico{font-size:42px;margin-bottom:8px}
.home-col h3{font-size:18px;margin-bottom:6px}
.home-col p{color:var(--muted);font-size:14.5px}
.home-it{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center}
.home-it.rev .home-it-img{order:2}
.home-it-img img{width:100%;border-radius:16px;box-shadow:var(--shadow)}
.home-it-txt p{font-size:16px;color:var(--text);margin-bottom:16px;white-space:pre-line}
.home-rich{max-width:760px;margin:0 auto;text-align:center;font-size:16px;color:var(--text);white-space:pre-line}
.home-map{border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}
.home-map iframe{width:100%;height:380px;border:0;display:block}
.home-form{max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.home-form-text{text-align:center;color:var(--muted);max-width:620px;margin:0 auto 18px}
.home-form .hp-field{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.home-form-msg{padding:10px 12px;border-radius:9px;font-size:14px;text-align:center}
.home-form-msg.ok{background:#e2f5ea;color:#12703a}
.home-form-msg.err{background:#fdeaea;color:#c0392b}

/* ============================================================
   Selector de emojis (panel)
   ============================================================ */
.emoji-field{display:flex;gap:6px;align-items:stretch}
.emoji-field input{flex:1}
.emoji-trigger{border:1.5px solid var(--border);background:#fff;border-radius:9px;width:44px;cursor:pointer;font-size:18px}
.emoji-pop{position:absolute;z-index:200;width:300px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 16px 44px rgba(20,53,110,.25);padding:10px;display:none}
.emoji-pop.show{display:block}
.emoji-pop-head{display:flex;gap:6px;margin-bottom:8px}
.emoji-search{flex:1;padding:7px 10px}
.emoji-close{border:none;background:#eef3fb;border-radius:8px;width:34px;cursor:pointer}
.emoji-tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px}
.etab{border:none;background:#f2f6fc;border-radius:7px;width:34px;height:30px;cursor:pointer;font-size:16px}
.etab.on{background:var(--primary)}
.emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;max-height:210px;overflow-y:auto}
.ebtn{border:none;background:none;font-size:20px;cursor:pointer;border-radius:6px;height:32px}
.ebtn:hover{background:#eef3fb}

/* ============================================================
   Panel: opciones de carrusel, radios, builder del inicio
   ============================================================ */
.car-opts{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-end;margin-top:10px}
.car-opts label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted);font-weight:600}
.car-opts .car-check{flex-direction:row;align-items:center;gap:6px}
.car-opts select,.car-opts input[type=number]{width:auto;min-width:120px}
.radio-row{display:flex;gap:10px}
.radio-pill{display:flex;align-items:center;gap:6px;border:1.5px solid var(--border);border-radius:999px;padding:8px 14px;cursor:pointer;font-weight:600;font-size:14px}
.radio-pill input{width:auto}
.home-wrap{display:flex;flex-direction:column;gap:12px}
.hsec{border:1px solid var(--border);border-radius:12px;background:#fff;overflow:hidden}
.hsec .blk-body{padding:14px}
.hcols{display:flex;flex-direction:column;gap:10px;margin:8px 0}
.hcol{border:1px dashed var(--border);border-radius:10px;padding:10px;background:var(--bg)}

@media(max-width:900px){
  .home-it{grid-template-columns:1fr}
  .home-it.rev .home-it-img{order:0}
}
@media(max-width:560px){
  .home-cols{grid-template-columns:1fr !important}
  .emoji-pop{width:min(92vw,300px)}
}

/* ============================================================
   Estados de visibilidad (ocultar/mostrar) en el panel
   ============================================================ */
.badge-state{display:inline-block;font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;vertical-align:middle}
.badge-state.on{background:#e5f6ec;color:#0f8a43}
.badge-state.off{background:#fdeaea;color:#c0392b}
.course-row.is-hidden{opacity:.55}
.course-row.is-hidden .cr-thumb{filter:grayscale(1)}
.school-top{display:flex;align-items:center;gap:10px;margin-bottom:10px;font-size:15px}
.school-top b{font-size:15px}
.school-actions{margin:-6px 0 24px}

/* ============================================================
   Carrusel de la portada (con efectos)
   ============================================================ */
.hero-carousel{position:relative;width:100%;aspect-ratio:4/3;border-radius:24px;overflow:hidden;background:#0a1a3a;box-shadow:0 20px 50px rgba(15,42,85,.25)}
.hero-carousel .hc-slide{position:absolute;inset:0;opacity:0}
.hero-carousel .hc-slide img{width:100%;height:100%;object-fit:cover;display:block}
.hero-carousel .hc-slide.on{opacity:1;z-index:1}
/* fade */
.effect-fade .hc-slide{transition:opacity .9s ease}
/* slide */
.effect-slide .hc-slide{transform:translateX(40px);transition:opacity .6s ease,transform .6s ease}
.effect-slide .hc-slide.on{transform:translateX(0)}
/* zoom */
.effect-zoom .hc-slide{transform:scale(1.1);transition:opacity .9s ease,transform 1.3s ease}
.effect-zoom .hc-slide.on{transform:scale(1)}
/* ken burns */
.effect-kenburns .hc-slide{transition:opacity .9s ease}
.effect-kenburns .hc-slide.on img{animation:kenburns 8s ease-out both}
@keyframes kenburns{from{transform:scale(1) translate(0,0)}to{transform:scale(1.16) translate(-2.5%,-2.5%)}}
/* flip 3D */
.effect-flip{perspective:1400px}
.effect-flip .hc-slide{transform:rotateY(90deg);transition:opacity .5s ease,transform .7s ease;backface-visibility:hidden}
.effect-flip .hc-slide.on{transform:rotateY(0)}
.hc-dots{position:absolute;bottom:14px;left:0;right:0;display:flex;gap:7px;justify-content:center;z-index:3}
.hc-dots span{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:.2s}
.hc-dots span.on{background:#fff;transform:scale(1.3)}

/* ============================================================
   Filas de badges (posiciones configurables)
   ============================================================ */
.badge-band{padding:22px 0;background:var(--bg)}
.badge-row{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.badge-pill{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--border);border-radius:999px;padding:10px 20px;box-shadow:0 4px 14px rgba(15,42,85,.06)}
.badge-pill .badge-ico{font-size:22px;line-height:1}
.badge-pill .badge-txt b{display:block;font-size:14px;color:var(--text);line-height:1.2}
.badge-pill .badge-txt small{font-size:12px;color:var(--muted)}

/* ============================================================
   Acordeón de escuelas (contraídas → cursos)
   ============================================================ */
.school-acc-list{display:flex;flex-direction:column;gap:12px}
.school-acc{border:1px solid var(--border);border-left:5px solid var(--sc,#1b4a9c);border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 4px 14px rgba(15,42,85,.05)}
.school-head{width:100%;display:flex;align-items:center;gap:14px;padding:16px 20px;background:none;border:0;cursor:pointer;text-align:left;font:inherit}
.school-head:hover{background:#f7faff}
.school-head .school-ico{font-size:30px;line-height:1;flex-shrink:0;background:none;width:auto;height:auto;padding:0}
.school-headname{flex:1;font-weight:700;font-size:17px;color:var(--primary-dark);display:flex;flex-direction:column;min-width:0}
.school-headname small{font-weight:500;font-size:13px;color:var(--muted)}
.school-count{font-size:12.5px;color:var(--muted);background:var(--bg);padding:4px 11px;border-radius:999px;white-space:nowrap}
.school-cta{display:flex;align-items:center;gap:6px;font-weight:700;font-size:13px;color:var(--sc,#1b4a9c);white-space:nowrap}
.school-cta .cta-close{display:none}
.school-acc.open .school-cta .cta-open{display:none}
.school-acc.open .school-cta .cta-close{display:inline}
.school-head .chev{transition:transform .3s ease;display:inline-block}
.school-acc.open .chev{transform:rotate(180deg)}
.school-panel{max-height:0;overflow:hidden;transition:max-height .45s ease}
.school-acc.open .school-panel{max-height:none}
.school-panel .courses-grid{padding:6px 18px 22px;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}
.anchor-offset{position:relative;top:-80px;display:block;height:0;visibility:hidden}

@media(max-width:640px){
  .school-count{display:none}
  .school-cta .cta-open,.school-cta .cta-close{display:none}
  .school-acc.open .school-cta .cta-close{display:none}
  .school-headname{font-size:15px}
  .badge-pill{padding:8px 14px}
  .hero-carousel{aspect-ratio:16/10}
}

/* ============================================================
   Tarjeta de escuela CONTRAÍDA (mismo ancho de columna)
   ============================================================ */
.school-collapse{padding:16px 18px;align-self:start}
.school-collapse .sc-head{display:flex;align-items:center;gap:12px;width:100%;background:none;border:0;cursor:pointer;font:inherit;text-align:left;padding:0}
.school-collapse .sc-head .school-ico{width:44px;height:44px;font-size:22px;margin-bottom:0;flex-shrink:0}
.school-collapse .sc-head h3{flex:1;margin:0;font-size:16px;line-height:1.25;color:var(--sc)}
.school-collapse .sc-head .chev{transition:transform .3s ease;color:var(--sc);font-weight:800;flex-shrink:0}
.school-collapse.open .sc-head .chev{transform:rotate(180deg)}
.school-collapse .sc-body{max-height:0;overflow:hidden;transition:max-height .4s ease}
.school-collapse.open .sc-body{max-height:600px}
.school-collapse .school-tag{min-height:0;margin-top:12px}
.school-collapse .school-list{margin-top:8px}
.school-collapse .school-btn{margin-top:14px;text-align:center}

/* ============================================================
   Botón de Aula Virtual (cabecera) + enlace en menú móvil
   ============================================================ */
.aula-btn{position:relative;white-space:nowrap}
.nav-aula{display:none}

/* ============================================================
   Cabecera responsive (más compacta en celular)
   ============================================================ */
@media(max-width:900px){
  .header-inner{height:64px;gap:10px}
  .main-nav{top:64px}
  .brand-logo{height:38px}
  .brand-text b{font-size:17px}
  .brand-text small{font-size:8.5px;letter-spacing:1.5px}
  .aula-btn span{display:none}          /* solo ícono, como el carrito */
  .nav-aula{display:block;color:var(--accent)!important;font-weight:700}
}
@media(max-width:560px){
  .header-inner{height:56px;gap:8px}
  .main-nav{top:56px}
  .brand-logo{height:30px}
  .brand-text b{font-size:14px;letter-spacing:.3px}
  .brand-text small{display:none}        /* eslogan oculto en pantallas muy pequeñas */
  .header-actions{gap:6px}
  .btn.btn-sm{padding:7px 10px}
}

/* ============================================================
   Plantillas de portada
   ============================================================ */
/* --- Pantalla completa / centrada --- */
.hero-full{position:relative;padding:0;min-height:clamp(430px,66vh,660px);display:flex;align-items:center;overflow:hidden}
.hero-full .hero-bg{position:absolute;inset:0;z-index:0}
.hero-full .hero-bg img{width:100%;height:100%;object-fit:cover;display:block}
.hero-full .hero-bg .hero-placeholder{width:100%;height:100%}
.hero-full .hero-bg .hero-carousel{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;border-radius:0;box-shadow:none}
.hero-full .hero-bg .hero-carousel .hc-slide img{height:100%}
.hero-full .hero-bg iframe.hero-video,.hero-full .hero-bg video.hero-video{width:100%;height:100%;min-height:100%;object-fit:cover}
.hero-full .hero-overlay{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(10,22,48,.82)0%,rgba(10,22,48,.5)46%,rgba(10,22,48,.15)100%)}
.hero-centered .hero-overlay{background:linear-gradient(180deg,rgba(10,22,48,.55),rgba(10,22,48,.6))}
.hero-full-copy{position:relative;z-index:2;color:#fff;padding:64px 0;max-width:600px}
.hero-full-copy h1{font-size:clamp(30px,4.6vw,54px);font-weight:800;letter-spacing:-.5px;color:#fff}
.hero-full-copy .hero-script{font-family:'Dancing Script';font-weight:700;font-size:clamp(32px,5vw,56px);color:#ffd36b;margin:2px 0 4px}
.hero-full-copy .hero-rule{width:70px;height:4px;background:#ffd36b;border-radius:4px;margin:14px 0 20px}
.hero-full-copy p{font-size:17px;color:rgba(255,255,255,.92);max-width:520px;margin-bottom:24px}
.hero-full .hero-badges{position:static;flex-direction:row;flex-wrap:wrap;margin-top:22px;gap:10px}
.hero-full .hero-badges.center{justify-content:center}
.hero-centered .hero-full-copy{max-width:800px;margin:0 auto;text-align:center}
.hero-centered .hero-full-copy .hero-rule{margin-left:auto;margin-right:auto}
.hero-centered .hero-full-copy p{margin-left:auto;margin-right:auto}

/* --- Banner (imagen full-width arriba, texto debajo) --- */
.hero-banner{padding:0}
.hero-banner-media{width:100%;overflow:hidden;background:#0a1a3a}
.hero-banner-media img{width:100%;max-height:54vh;object-fit:cover;display:block}
.hero-banner-media .hero-placeholder{aspect-ratio:21/9}
.hero-banner-media .hero-carousel{aspect-ratio:21/9;border-radius:0;width:100%;box-shadow:none}
.hero-banner-media iframe.hero-video,.hero-banner-media video.hero-video{width:100%;aspect-ratio:21/9;height:auto;display:block}
.hero-banner-copy{text-align:center;max-width:820px;margin:0 auto;padding:40px 20px 10px}
.hero-banner-copy h1{font-size:clamp(28px,4.2vw,50px);font-weight:800;letter-spacing:-.5px}
.hero-banner-copy .hero-script{font-family:'Dancing Script';font-weight:700;font-size:clamp(30px,5vw,54px);color:var(--accent);margin:2px 0 4px}
.hero-banner-copy .hero-rule{width:70px;height:4px;background:var(--accent);border-radius:4px;margin:14px auto 20px}
.hero-banner-copy p{font-size:17px;color:var(--muted);max-width:560px;margin:0 auto 24px}
.hero-banner .hero-badges{position:static;justify-content:center;flex-direction:row;flex-wrap:wrap;margin-top:20px;gap:10px}

@media(max-width:560px){
  .hero-full{min-height:auto;padding:0}
  .hero-full-copy{padding:44px 0}
  .hero-full .hero-overlay{background:linear-gradient(180deg,rgba(10,22,48,.6),rgba(10,22,48,.72))}
  .hero-banner-media img,.hero-banner-media .hero-carousel{max-height:38vh;aspect-ratio:16/10}
}

/* --- Selector de plantillas en el panel --- */
.layout-picker{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.layout-opt{display:flex;flex-direction:column;gap:3px;border:2px solid var(--border);border-radius:12px;padding:12px 14px;cursor:pointer;transition:.15s}
.layout-opt:hover{border-color:var(--accent)}
.layout-opt.on{border-color:var(--accent);background:#eef4ff}
.layout-opt input{position:absolute;opacity:0}
.lo-title{font-weight:700;font-size:14px;color:var(--primary-dark)}
.lo-desc{font-size:12px;color:var(--muted)}
@media(max-width:560px){ .layout-picker{grid-template-columns:1fr} }
.layout-opt:has(input:checked){border-color:var(--accent);background:#eef4ff}

/* ============================================================
   Badges con ANCHO UNIFORME (aspecto estándar y ordenado)
   ============================================================ */
.badge{flex:0 0 auto;box-sizing:border-box;width:230px;max-width:100%;min-height:52px}
.hero-badges{align-items:stretch}
.badge-row{align-items:stretch}
.badge-pill{flex:0 0 auto;box-sizing:border-box;width:250px;max-width:100%;min-height:56px;justify-content:flex-start}
@media(max-width:900px){
  .hero-badges .badge, .badge{flex:0 0 auto;width:210px;min-width:0}
}
@media(max-width:560px){
  .hero-badges{flex-direction:column}
  .badge{width:100%}
  .badge-pill{width:100%;max-width:360px}
  .badge-row{justify-content:center}
}

/* ============================================================
   Velo de color sobre la portada (color + transparencia)
   ============================================================ */
.hero-img{position:relative}
.hero-banner-media{position:relative}
.media-tint{position:absolute;inset:0;z-index:1;pointer-events:none}

/* ============================================================
   Panel → Cabecera: filas del editor de menú (añadido v2)
   ============================================================ */
.menu-row{display:grid;grid-template-columns:auto 1fr 1fr auto auto;gap:10px;align-items:end;
  padding:10px;border:1px solid #e5e9f2;border-radius:10px;background:#fbfcfe;margin-bottom:8px}
.menu-row .field{margin:0}
.menu-row-move{display:flex;flex-direction:column;gap:4px}
.menu-row-move .btn{padding:2px 8px;line-height:1.1}
.menu-row-vis{white-space:nowrap;margin:0 0 6px}
@media(max-width:760px){.menu-row{grid-template-columns:1fr 1fr;}.menu-row-move{flex-direction:row}}

/* ============================================================
   Panel → Inicio: constructor de filas y columnas (v2.2)
   ============================================================ */
.hb-row{border:1px solid #dbe3ef;border-radius:14px;background:#fff;margin-bottom:16px;overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.04)}
.hb-row.is-off{opacity:.6}
.hb-row-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;
  background:linear-gradient(180deg,#f7f9fc,#eef3fa);border-bottom:1px solid #dbe3ef}
.hb-row-name{font-size:14px;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hb-row-meta{font-size:12px;white-space:nowrap}
.hb-badge{display:inline-block;padding:3px 9px;border-radius:999px;background:#0b2545;color:#fff;
  font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.hb-badge--col{background:#1b4c86}
.hb-tools{display:flex;gap:5px;margin-left:auto}
.hb-tools .btn{padding:3px 9px;line-height:1.2}
.hb-row-body{padding:14px}
.hb-cols{display:grid;gap:12px;margin:14px 0;grid-auto-flow:column;grid-auto-columns:minmax(320px,1fr);
  overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.hb-cols-1{grid-auto-columns:minmax(320px,1fr)}
@media(max-width:900px){.hb-cols{grid-auto-flow:row;grid-auto-columns:auto}}
.hb-col{border:1px solid #e5e9f2;border-radius:12px;background:#fbfcfe;padding:12px}
.hb-col-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.hb-col .field{margin-bottom:10px}
.hb-style{border:1px dashed #cbd5e1;border-radius:10px;padding:8px 10px;margin:10px 0;background:#fff}
.hb-style summary{cursor:pointer;font-weight:700;font-size:13px;color:#1b4c86}
.hb-style[open] summary{margin-bottom:10px}
.hb-faq{display:grid;gap:8px;margin-bottom:8px}
.hb-faq-item{display:grid;grid-template-columns:1fr auto;gap:6px;align-items:start;
  border:1px solid #e5e9f2;border-radius:10px;padding:8px;background:#fff}
.hb-faq-item input{grid-column:1}
.hb-faq-item textarea{grid-column:1}
.hb-faq-item .btn{grid-column:2;grid-row:1/3}
.color-field{display:flex;align-items:center;gap:8px}
.color-field input[type=color]{flex:1}
/* Dentro de una columna del constructor, los campos se apilan para que se lean */
.hb-col .grid2{grid-template-columns:1fr}
.hb-col .field label{font-size:12.5px}
.hb-col textarea{min-height:64px}
/* Marca: rejilla de selectores de color */
.brand-colors{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin-top:10px}
.brand-colors .field{margin:0}
.brand-colors input[type=color]{width:100%;height:44px}

/* Acordeón de filas del constructor */
.hb-row-head{cursor:pointer;user-select:none;transition:background .15s ease}
.hb-row-head:hover{background:linear-gradient(180deg,#eef3fa,#e4ecf7)}
.hb-row-head:focus-visible{outline:3px solid #1b4c86;outline-offset:-3px}
.hb-chev{display:inline-block;font-size:13px;color:#64748b;transition:transform .2s ease}
.hb-row.is-open .hb-chev{transform:rotate(90deg)}
.hb-row.is-open{box-shadow:0 8px 28px -18px rgba(11,37,69,.5)}
.hb-savebar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;position:sticky;bottom:0;
  background:linear-gradient(180deg,rgba(255,255,255,.4),#fff 40%);padding:12px 0;margin-top:8px;z-index:5}
.hb-saved{font-size:13px;font-weight:700;color:#0b7d57}

/* ============================================================
   Panel v2.4 — menú plegable, barra de guardado y secciones fijas
   ============================================================ */
.admin-layout.nav-hidden .admin-nav{display:none}
.admin-layout.nav-hidden .admin-main{grid-column:1 / -1}
.admin-top-in #navToggle{margin-right:10px;padding:4px 10px;font-size:16px;line-height:1}

.adm-savebar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;position:sticky;bottom:0;z-index:5;
  background:linear-gradient(180deg,rgba(255,255,255,0),#fff 45%);padding:12px 0 4px;margin-top:6px}
.adm-saved{font-size:13px;font-weight:700;color:#0b7d57}

/* Secciones fijas del sitio dentro del constructor */
.hb-row--fixed{background:#f7f9fc;border-style:dashed}
.hb-row-head--fixed{cursor:default;background:linear-gradient(180deg,#fbfcfe,#f3f7fc)}
.hb-row-head--fixed:hover{background:linear-gradient(180deg,#fbfcfe,#f3f7fc)}
.hb-badge--fixed{background:#64748b}
.hb-row-vis{margin:0 10px 0 0;white-space:nowrap;font-size:13px}

/* ============================================================
   Panel v2.5 — barra fija, menú pegajoso y campos HEX
   ============================================================ */
.admin-top-in{min-height:44px}
.admin-nav{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 96px);overflow-y:auto;
  scrollbar-width:thin;padding-right:2px}
@media(max-width:900px){.admin-nav{position:static;max-height:none;overflow:visible}}

/* Campo para pegar un color en HEX junto al selector */
.hexwrap{display:inline-flex;align-items:center;gap:6px}
.hexwrap input[type=color]{flex:0 0 46px;width:46px;height:38px;padding:2px;cursor:pointer}
.hex-input{width:104px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;
  text-transform:uppercase;letter-spacing:.02em}
.hex-input.is-bad{border-color:#dc2626;background:#fef2f2}
.color-field .hexwrap{flex:1}
.brand-colors .hexwrap{width:100%}
.brand-colors .hexwrap input[type=color]{flex:1 1 auto;width:auto;height:44px}

/* ============================================================
   Editor de texto con formato (v2.6)
   ============================================================ */
.rt{border:1px solid #cfd8e6;border-radius:10px;background:#fff;overflow:visible}
.rt:focus-within{border-color:var(--primary,#1b4a9c);box-shadow:0 0 0 3px rgba(27,76,134,.14)}
.rt-bar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:6px 8px;
  border-bottom:1px solid #e5e9f2;background:linear-gradient(180deg,#fbfcfe,#f4f7fc);
  border-radius:10px 10px 0 0;position:static;z-index:auto}
/* Ojo: .rt y .rt-bar NO llevan z-index. Si lo llevaran crearían un
   contexto de apilamiento y encerrarían al desplegable por debajo de la
   barra del panel. El desplegable se posiciona respecto a .rt-menu. */
.rt{scroll-margin-top:96px}
.rt-btn{border:0;background:transparent;border-radius:7px;padding:5px 8px;min-width:30px;height:30px;
  font-size:14px;line-height:1;color:#334155;cursor:pointer;transition:background .12s ease}
.rt-btn:hover{background:#e4ecf7;color:#0b2545}
.rt-btn--menu{font-size:13px;font-weight:700}
.rt-sep{width:1px;height:20px;background:#dbe3ef;margin:0 4px}
.rt-hl{background:#fde68a;padding:0 3px;border-radius:3px;font-weight:700}
.rt-menu{position:relative;display:inline-flex}
.rt-pop{position:fixed;z-index:1200;min-width:180px;padding:6px;
  background:#fff;border:1px solid #d7dfec;border-radius:10px;
  box-shadow:0 14px 34px -16px rgba(11,37,69,.5);flex-direction:column;gap:2px;
  max-height:340px;overflow:auto}
.rt-pop:not([hidden]){display:flex}
.rt-pop[hidden]{display:none}
.rt-item{border:0;background:transparent;text-align:left;padding:6px 9px;border-radius:6px;
  font-size:13px;color:#334155;cursor:pointer;white-space:nowrap}
.rt-item:hover{background:#eef3fa}
.rt-item--h2{font-size:20px;font-weight:800;color:#0b2545}
.rt-item--h3{font-size:17px;font-weight:700;color:#0b2545}
.rt-item--h4{font-size:15px;font-weight:700}
.rt-item--h5{font-size:14px;font-weight:700}
.rt-item--h6{font-size:13px;font-weight:700}
.rt-item--blockquote{font-style:italic;color:#64748b}
.rt-pop--colors:not([hidden]){display:grid;grid-template-columns:repeat(6,1fr);gap:5px;min-width:190px}
.rt-sw{width:24px;height:24px;border-radius:6px;border:1px solid rgba(15,23,42,.18);cursor:pointer;padding:0}
.rt-sw:hover{box-shadow:0 0 0 2px #fff,0 0 0 4px #1b4a9c}
.rt-hexrow{grid-column:1/-1;display:flex;align-items:center;gap:6px;width:100%;margin-top:2px}
.rt-custom{flex:0 0 46px;width:46px;height:32px;padding:2px;cursor:pointer}
.rt-hex{flex:1 1 auto;min-width:0;height:32px;padding:6px 8px;font-size:12.5px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;text-transform:uppercase;
  border:1.5px solid var(--border);border-radius:8px}
.rt-hex.is-bad{border-color:#dc2626;background:#fef2f2}
.rt-pop--colors .rt-item{grid-column:1/-1;text-align:center}
.rt-pop--icons:not([hidden]){display:grid;grid-template-columns:repeat(5,1fr);gap:3px;min-width:190px}
.rt-ico{border:0;background:transparent;font-size:18px;padding:5px;border-radius:6px;cursor:pointer}
.rt-ico:hover{background:#eef3fa}
.rt-area{min-height:110px;padding:12px 14px;font-size:14.5px;line-height:1.65;color:#1f2937;outline:0}
.rt-area:empty::before{content:attr(data-ph);color:#94a3b8}
.rt-area h2{font-size:22px;margin:.5em 0 .3em}
.rt-area h3{font-size:19px;margin:.5em 0 .3em}
.rt-area h4{font-size:17px;margin:.5em 0 .3em}
.rt-area h5{font-size:15px;margin:.5em 0 .3em}
.rt-area h6{font-size:14px;margin:.5em 0 .3em}
.rt-area p{margin:0 0 .6em}
.rt-area ul,.rt-area ol{margin:.3em 0 .6em;padding-left:1.5em}
.rt-area li{margin:.15em 0}
.rt-area blockquote{margin:.4em 0;padding:.2em 0 .2em .9em;border-left:3px solid #cbd5e1;color:#475569;font-style:italic}
.rt-area a{color:var(--primary,#1b4a9c);text-decoration:underline}
textarea.rt-source{display:none !important}

/* Campos "en línea": el texto vive dentro de un título, un párrafo o un botón,
   así que la barra es más corta y el área más baja. */
.rt--inline .rt-area{min-height:46px;padding:9px 12px}
.rt--inline .rt-bar{padding:4px 6px}
.rt-hint{display:block;margin-top:5px;font-size:11.5px;color:#64748b;line-height:1.45}

/* ============================================================
   Bloque «Botón» dentro del contenido de un curso
   ============================================================ */
.btn-blk .field{margin-bottom:10px}
.btn-blk .btn-row2{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
@media (min-width:1100px){.btn-blk .btn-row2{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.btn-aligns{display:flex;gap:6px;flex-wrap:wrap}
.btn-blk .btn-align{width:auto;height:auto;flex:0 0 auto;white-space:nowrap;
  padding:8px 14px;font-size:13px;font-weight:600}
.btn-blk .color-field{flex-wrap:wrap;gap:8px}
.btn-prev-wrap{margin-top:10px;padding-top:10px;border-top:1px dashed #dbe3ef}
.btn-prev-box{display:flex;margin-top:6px}
.btn-prev{display:inline-flex;align-items:center;justify-content:center;
  border-radius:12px;padding:13px 26px;font-size:15px;font-weight:700;color:#fff;
  box-shadow:0 10px 24px -10px rgba(15,23,42,.45)}

/* ============================================================
   Palabra de vinculación de cada fila (enlace #palabra)
   ============================================================ */
.hb-anchor{background:#f7faff;border:1px dashed #c7d8ef;border-radius:10px;padding:10px 12px;margin-bottom:14px}
.hb-anchor-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hb-anchor-hash{font:700 17px ui-monospace,SFMono-Regular,Menlo,monospace;color:#1b4c86;line-height:1}
.hb-anchor-in{flex:1 1 180px;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}
.hb-anchor-copy{flex:0 0 auto;white-space:nowrap}
.hb-anchor-prev{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#1b4c86}
.hb-anchor.is-dup .hb-anchor-in{border-color:#f59e0b;background:#fffbeb}
.hb-anchor.is-dup small::after{content:' ⚠️ Otra fila ya usa esta palabra: al guardar se le añadirá un número.';
  color:#b45309;font-weight:600}
.hb-row-body--fixed{padding:12px 14px 4px;border-top:1px solid #e8eef7}
.menu-href-pick{margin-bottom:6px}

/* ============================================================
   Panel → Pie de página: columnas y enlaces
   Las columnas se apilan y se pliegan, como las filas del Inicio:
   así cada una tiene todo el ancho y la página no se estira.
   ============================================================ */
.fcols{display:grid;gap:12px}
.fcol{border:1px solid #dbe3ef;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.fcol.is-off{opacity:.62}
.fcol-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 14px;cursor:pointer;
  background:linear-gradient(180deg,#f7f9fc,#eef3fa);border-radius:14px 14px 0 0}
.fcol.is-open .fcol-head{border-bottom:1px solid #dbe3ef}
.fcol .hb-chev{transition:transform .18s ease;color:#64748b;font-size:12px}
.fcol.is-open .hb-chev{transform:rotate(90deg)}
.fcol-name{font-size:14px;white-space:nowrap}
.fcol-meta{font-size:12.5px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fcol-body{padding:14px}
.fcol-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,240px) auto;gap:12px;align-items:end;margin-bottom:12px}
@media(max-width:760px){.fcol-top{grid-template-columns:1fr}}
.fcol-top .field{margin:0}
.fcol-vis{margin:0 0 10px;white-space:nowrap}

/* --- una fila de enlace ocupa UNA línea --- */
.fl-list{display:grid;gap:8px;margin:6px 0 12px}
.fl-row{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.15fr) auto auto;gap:10px;
  align-items:end;border:1px solid #e5e9f2;border-radius:10px;padding:9px 10px;background:#fbfcfe}
.fl-row.is-off{opacity:.55}
.fl-campo{min-width:0}
.fl-campo label{font-size:11.5px;margin:0 0 3px}
.fl-campo input,.fl-campo select{padding:7px 9px;font-size:13.5px}
.fl-libre{margin-top:6px}
.fl-move{display:flex;flex-direction:column;gap:2px}
.fl-mv{border:1px solid var(--border);background:#fff;border-radius:5px;width:24px;height:19px;
  line-height:1;font-size:10px;color:#475569;cursor:pointer;padding:0}
.fl-mv:disabled{opacity:.35;cursor:default}
.fl-opts{display:flex;gap:10px;align-items:center;white-space:nowrap;padding-bottom:6px}
.fl-opts .check{margin:0;font-size:12.5px}
.fl-del{padding:6px 9px;align-self:center}
.fl-aula{grid-column:2/4;font-size:13.5px;padding-bottom:6px}
@media(max-width:900px){
  .fl-row{grid-template-columns:auto minmax(0,1fr) auto;align-items:start}
  .fl-campo{grid-column:2}
  .fl-opts{grid-column:2;padding:0}
  .fl-aula{grid-column:2}
  .fl-del{grid-row:1;grid-column:3}
}
.fl-checks{display:flex;gap:16px;flex-wrap:wrap;margin:4px 0 8px}

