/* Sitio público v2 (una página) + modo edición tipo Moodle */
:root {
    --navy: #000156;
    --navy-2: #0c1b7a;
    --blue: #265f9e;
    --sky: #addde7;
    --teal: #0f8e8a;
    --ink: #101828;
    --muted: #52607a;
    --line: #dbe4f0;
    --paper: #ffffff;
    --soft: #f2f6fc;
    --danger: #b42318;
    --shadow: 0 18px 50px rgba(0, 1, 86, .16);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--paper); }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }
.section-shell { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; }
.eyebrow { letter-spacing: .14em; font-size: .75rem; font-weight: 800; color: var(--sky); margin: 0 0 1rem; }
.eyebrow.dark { color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .8rem 1.4rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; font: inherit; }
.button-primary { background: #fff; color: var(--navy); }
.button-dark { background: var(--navy); color: #fff; }
.button-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.button-teal { background: var(--teal); color: #fff; }
.button-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.button.small { min-height: 38px; padding: .45rem .95rem; font-size: .88rem; }
.button:disabled { opacity: .55; cursor: wait; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.5rem); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand img { width: 38px; height: 38px; }
.brand strong { display: block; letter-spacing: .12em; }
.brand small { display: block; color: var(--muted); font-size: .72rem; }
.site-nav { display: flex; align-items: center; gap: 1.2rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--blue); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* Secciones */
.site-section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-hero { padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(3.5rem, 8vw, 6rem); color: #fff; background: radial-gradient(circle at 82% 12%, #3f83c5 0, transparent 42%), linear-gradient(125deg, var(--navy), var(--navy-2) 62%, var(--blue)); }
.hero-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-copy { min-width: 0; }
.hero-copy h1, .eyebrow { overflow-wrap: anywhere; }
.hero-copy h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 1.2rem; letter-spacing: -.02em; }
.hero-lead { font-size: 1.15rem; line-height: 1.7; color: #e2effa; max-width: 560px; }
.hero-media img { border-radius: 24px; box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.section-texto, .section-faq { background: var(--paper); }
.rich-copy { max-width: 820px; }
.rich-copy h2, .section-heading h2, .cta-layout h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; margin: 0 0 1rem; color: var(--navy); }
.rich-copy p { font-size: 1.08rem; line-height: 1.75; color: var(--muted); white-space: pre-wrap; }
.section-servicios { background: var(--soft); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.section-heading > p { max-width: 420px; color: var(--muted); line-height: 1.65; margin: 0; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; }
.service-card > span { color: var(--teal); font-weight: 800; }
.service-card h3 { color: var(--navy); margin: .7rem 0 .5rem; }
.service-card p { color: var(--muted); line-height: 1.6; margin: 0 0 1rem; }
.card-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.section-estadisticas { background: var(--navy); padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; }
.stat-card { text-align: center; color: #fff; }
.stat-card strong { display: block; font-size: 2.2rem; }
.stat-card span { color: var(--sky); }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-top: .8rem; background: #fff; }
.faq-list summary { font-weight: 700; color: var(--navy); cursor: pointer; }
.faq-list p { margin: .7rem 0 0; }
.image-block img { width: 100%; border-radius: 22px; box-shadow: var(--shadow); }
.image-caption { color: var(--muted); text-align: center; margin-top: .8rem; }
.section-cta { background: linear-gradient(120deg, #e8f4f6, #eef3fd); }
.cta-layout { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-layout p { color: var(--muted); line-height: 1.65; max-width: 620px; }

/* Elementos dentro de una sección (no son secciones) */
.elemento { margin-top: 1.4rem; }
.elemento-texto { font-size: 1.08rem; line-height: 1.75; white-space: pre-wrap; margin: 0; }
.elemento-recuadro { max-width: 640px; }
.elemento-cita { margin: 0; max-width: 760px; background: var(--soft); border-left: 4px solid var(--teal); border-radius: 0 16px 16px 0; padding: 1.2rem 1.4rem; }
.elemento-cita p { font-size: 1.15rem; line-height: 1.65; font-style: italic; margin: 0; }
.elemento-cita footer { margin-top: .7rem; }
.elemento-lista-titulo { color: var(--navy); margin: 0 0 .4rem; }
body.edit-on [data-elemento-id] { border-radius: 10px; }
body.edit-on [data-elemento-id]:hover { outline: 1px dashed rgba(38,95,158,.6); outline-offset: 6px; }
body.edit-on [data-el-campo], body.edit-on [data-el-item-campo] { cursor: text; border-radius: 6px; outline: 1px dashed transparent; outline-offset: 3px; }
body.edit-on [data-el-campo]:hover, body.edit-on [data-el-item-campo]:hover { outline-color: rgba(15,142,138,.7); background: rgba(15,142,138,.07); }
body.edit-on [data-el-campo]:focus, body.edit-on [data-el-item-campo]:focus { outline: 2px solid var(--teal); background: rgba(15,142,138,.1); }

/* Elementos tipo Canva: formas, imagen, tabla, gráfico, icono, mapa */
.elemento-forma { display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-weight: 700; padding: 1.2rem 1.6rem; min-width: 180px; min-height: 90px; text-align: center; }
.forma-redondeado { border-radius: 18px; }
.forma-circulo { border-radius: 50%; width: 180px; height: 180px; min-width: 180px; }
.forma-pastilla { border-radius: 999px; min-height: 0; }
.forma-rombo { transform: rotate(45deg); width: 170px; height: 170px; min-width: 170px; margin: 1.6rem 0; }
.forma-rombo > span { transform: rotate(-45deg); }
.elemento-img { border-radius: 22px; box-shadow: var(--shadow); }
.forma-img-circulo { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.forma-img-cuadrado { border-radius: 0; }
.tabla-scroll { overflow-x: auto; }
.elemento-tabla { width: 100%; border-collapse: collapse; background: #fff; }
.elemento-tabla th, .elemento-tabla td { border: 1px solid var(--line); padding: .7rem .9rem; text-align: left; }
.elemento-tabla th { background: var(--navy); color: #fff; }
.elemento-tabla .tabla-quitar { border: 0; width: 36px; }
.grafico-barras { display: grid; gap: .7rem; max-width: 760px; }
.grafico-fila { display: grid; grid-template-columns: 150px 1fr 64px; gap: .8rem; align-items: center; }
.grafico-pista { background: var(--soft); border-radius: 999px; height: 18px; overflow: hidden; }
.grafico-barra { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue)); border-radius: 999px; min-width: 4px; }
.grafico-valor { color: var(--navy); }
.elemento-icono .icono-simbolo { font-size: 3.2rem; line-height: 1; }
.elemento-icono p { margin: .5rem 0 0; }
.elemento-espaciador { border-radius: 10px; }
body.edit-on .elemento-espaciador { background: repeating-linear-gradient(45deg, #f2f6fc, #f2f6fc 10px, #e4ecf8 10px, #e4ecf8 20px); display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.mapa-marco { background: var(--soft); }

/* Biblioteca ampliada de elementos */
.forma-estrella { clip-path: polygon(50% 0, 62% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 38% 35%); width: 200px; height: 200px; min-width: 200px; }
.forma-corazon { clip-path: path('M100 175C40 125 15 90 15 55C15 25 38 8 62 8C80 8 95 18 100 32C105 18 120 8 138 8C162 8 185 25 185 55C185 90 160 125 100 175Z'); width: 200px; height: 185px; min-width: 200px; }
.forma-hexagono { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); width: 210px; height: 185px; min-width: 210px; }
.forma-flecha { clip-path: polygon(0 20%, 65% 20%, 65% 0, 100% 50%, 65% 100%, 65% 80%, 0 80%); min-width: 230px; }
.forma-banner { clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); min-width: 230px; }
.filtro-gris { filter: grayscale(1); }
.filtro-sepia { filter: sepia(.7); }
.filtro-brillante { filter: brightness(1.18) saturate(1.2); }
.filtro-contraste { filter: contrast(1.25); }
.lista-estilo-punto li::before { content: '•'; }
.lista-estilo-estrella li::before { content: '★'; }
.lista-estilo-numero { counter-reset: punto; }
.lista-estilo-numero li { counter-increment: punto; }
.lista-estilo-numero li::before { content: counter(punto); }
.elemento-columnas { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 1.2rem; }
.columna { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem; }
.columna h4 { color: var(--navy); margin: 0 0 .5rem; }
.columna p { color: var(--muted); line-height: 1.6; margin: 0; }
.elemento-pasos { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; max-width: 760px; }
.elemento-pasos li { display: flex; gap: 1rem; align-items: start; }
.paso-numero { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; display: grid; place-items: center; }
.elemento-pasos h4 { color: var(--navy); margin: .45rem 0 .3rem; }
.elemento-pasos p { color: var(--muted); margin: 0; line-height: 1.6; }
.lista-precios { list-style: none; padding: 0; margin: 0; max-width: 760px; display: grid; gap: .9rem; }
.lista-precios li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.precio-puntos { flex: 1; border-bottom: 2px dotted var(--line); min-width: 40px; }
.precio-monto { color: var(--teal); font-size: 1.15rem; }
.precio-desc { width: 100%; color: var(--muted); }
.persona-card { max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; text-align: center; box-shadow: var(--shadow); }
.persona-foto { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; }
.persona-card h4 { color: var(--navy); margin: .8rem 0 .2rem; font-size: 1.25rem; }
.persona-rol { color: var(--teal); font-weight: 700; margin: 0 0 .6rem; }
.persona-card p { color: var(--muted); line-height: 1.6; }
.elemento-estadistica { text-align: center; }
.elemento-estadistica strong { display: block; font-size: 2.6rem; color: var(--navy); }
.elemento-estadistica span { color: var(--muted); }
.progreso-cab { display: flex; justify-content: space-between; max-width: 760px; margin-bottom: .45rem; }
.progreso-pista { max-width: 760px; }
.dona-wrap { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.dona { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.dona::after { content: ''; position: absolute; inset: 34px; background: #fff; border-radius: 50%; }
.dona span { position: relative; z-index: 1; font-weight: 800; color: var(--navy); text-align: center; max-width: 100px; }
.dona-leyenda { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.dona-leyenda li { display: flex; gap: .55rem; align-items: center; }
.dona-color { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.redes-fila { display: flex; gap: .6rem; flex-wrap: wrap; }
.red-btn { background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; border-radius: 999px; padding: .6rem 1.1rem; }
.red-vacio { color: var(--muted); }
.elemento-formulario { max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow); display: grid; gap: .9rem; }
.elemento-formulario h3 { color: var(--navy); margin: 0; }
.elemento-formulario p { color: var(--muted); margin: 0; }
.elemento-formulario label { display: grid; gap: .3rem; font-weight: 700; color: var(--navy); }
.elemento-formulario input, .elemento-formulario textarea { border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; font: inherit; }
.cuenta-regresiva { display: flex; gap: .8rem; flex-wrap: wrap; }
.cuenta-regresiva span { background: var(--navy); color: var(--sky); border-radius: 14px; padding: .8rem 1rem; text-align: center; min-width: 86px; }
.cuenta-regresiva strong { display: block; color: #fff; font-size: 1.7rem; }
.elemento-aviso { display: flex; gap: .8rem; align-items: start; border-radius: 14px; padding: 1rem 1.2rem; max-width: 820px; }
.elemento-aviso p { margin: 0; line-height: 1.6; }
.aviso-info { background: #e8effc; }
.aviso-exito { background: #e3f5ec; }
.aviso-alerta { background: #fff4d6; }
.aviso-peligro { background: #fde8e5; }
.audio-marco { width: 100%; max-width: 640px; height: 152px; border: 0; border-radius: 14px; }
.elemento-qr { text-align: center; }
.qr-caja { display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 180px; min-height: 180px; color: var(--muted); }
.qr-caja svg { display: block; }
@media (max-width: 720px) {
    .elemento-columnas { grid-template-columns: 1fr; }
    .grafico-fila { grid-template-columns: 96px 1fr 52px; }
}

/* Lienzo libre + selección limpia */
.lienzo { position: relative; min-height: 320px; margin-top: 1.2rem; }
body.edit-on .lienzo { border: 1px dashed rgba(38,95,158,.28); border-radius: 16px; background: rgba(242,246,252,.45); }
.lienzo .elemento.en-lienzo { position: absolute; margin: 0; max-width: none; cursor: grab; }
.lienzo .elemento.en-lienzo.arrastrando { cursor: grabbing; }
body.edit-on [data-elemento-id].seleccionado { outline: 2px solid var(--blue); outline-offset: 4px; z-index: 2; }
body.edit-on [data-elemento-id].bloqueado { outline: 2px dashed #b54708; outline-offset: 4px; }
.el-drag { position: absolute; top: -12px; right: 8px; z-index: 5; border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 28px; height: 28px; font-size: .85rem; font-weight: 800; color: var(--muted); cursor: grab; box-shadow: 0 4px 14px rgba(0,1,86,.14); line-height: 1; }
.el-drag:active { cursor: grabbing; }
.el-resize { position: absolute; right: -6px; bottom: -6px; z-index: 5; width: 14px; height: 14px; border-radius: 3px; background: var(--blue); border: 2px solid #fff; cursor: ew-resize; box-shadow: 0 2px 8px rgba(0,1,86,.25); }
body.edit-on .elemento { position: relative; }
.elemento.arrastrando { opacity: .55; }
@media (max-width: 720px) {
    .lienzo { min-height: 0; display: grid; gap: 1rem; }
    body.edit-on .lienzo { background: none; border: 0; }
    .lienzo .elemento.en-lienzo { position: relative !important; left: auto !important; top: auto !important; width: 100% !important; }
    .el-resize { display: none; }
}
.element-bar { position: fixed; z-index: 320; display: flex; gap: .25rem; align-items: center; background: #101828; color: #fff; border-radius: 999px; padding: .35rem .5rem; box-shadow: 0 16px 40px rgba(0,1,86,.35); max-width: calc(100vw - 1rem); flex-wrap: wrap; }
.element-bar[hidden] { display: none; }
.element-bar button { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: .38rem .7rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.element-bar button:hover { background: rgba(255,255,255,.28); }
.element-bar .elbar-nombre { font-size: .78rem; font-weight: 800; letter-spacing: .04em; padding: 0 .35rem; color: var(--sky); }

/* Tipos agregables: botón, lista, recuadros, galería, video, testimonios, precios */
.section-boton { padding: clamp(1.2rem, 3vw, 2rem) 0; }
.boton-sobre-claro { background: var(--sky); color: var(--navy); }
.check-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.check-list li { position: relative; padding: .8rem 1rem .8rem 2.6rem; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; line-height: 1.55; }
.check-list li::before { content: '✓'; position: absolute; left: .9rem; top: .8rem; color: var(--teal); font-weight: 800; }
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.galeria-item { margin: 0; }
.galeria-item img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); object-fit: cover; }
.galeria-item figcaption { color: var(--muted); text-align: center; margin-top: .55rem; }
.video-marco { position: relative; padding-top: 56.25%; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.video-marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.separador-linea { border: 0; border-top: 2px solid var(--line); margin: 0; }
.testimonio { margin: 0; }
.testimonio p { font-size: 1.05rem; line-height: 1.65; color: var(--ink); }
.testimonio footer { display: grid; gap: .15rem; margin-top: 1rem; }
.testimonio footer strong { color: var(--navy); }
.testimonio footer span { color: var(--muted); font-size: .9rem; }
.precio-valor { display: block; font-size: 2rem; color: var(--teal); margin: .5rem 0; }

/* Pie */
.site-footer { background: var(--navy); color: #dceaff; padding: 3rem 0 2rem; }
.footer-shell { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer strong { color: #fff; letter-spacing: .1em; }
.site-footer a { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.2); margin-top: 2rem; padding-top: 1.2rem; font-size: .9rem; }

/* Barra de edición (tipo Moodle: "Activar edición") */
.edit-bar { position: sticky; top: 65px; z-index: 55; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem clamp(1rem, 4vw, 2.5rem); background: #fff8e6; border-bottom: 1px solid #f0dfae; }
.edit-bar[hidden] { display: none; }
.edit-bar .who { font-weight: 700; color: var(--navy); margin-right: auto; }
.edit-bar .who small { display: block; color: var(--muted); font-weight: 500; }
.switch { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--teal); }
.dirty-dot { color: var(--danger); font-weight: 800; }
body.edit-on { padding-bottom: 2rem; }
body.edit-on .site-section { position: relative; cursor: pointer; transition: box-shadow .15s; }
body.edit-on .site-section:hover { box-shadow: inset 0 0 0 2px rgba(38,95,158,.25); }
body.edit-on .site-section.seccion-seleccionada { box-shadow: inset 0 0 0 3px var(--blue); }
.add-section button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .8rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.add-section button:hover { border-color: var(--teal); color: var(--teal); }
.edit-more { position: relative; }
.edit-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 180px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .35rem; display: grid; }
.edit-more-menu[hidden] { display: none; }
.edit-more-menu button { border: 0; background: none; text-align: left; padding: .55rem .7rem; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.edit-more-menu button:hover { background: var(--soft); }
.add-section { width: min(1180px, calc(100% - 2.5rem)); margin: 1.2rem auto; text-align: center; }
.section-hidden-note { color: var(--danger); font-weight: 700; }
.tools-hint { color: var(--muted); font-size: .82rem; align-self: center; }
.section-ajustes { position: relative; display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto 1rem; padding: 1rem; background: #fff8e6; border: 1px dashed var(--teal); border-radius: 14px; }
.section-ajustes > strong { width: 100%; color: var(--navy); }
.ajustes-cerrar { position: absolute; top: .55rem; right: .55rem; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--danger); font-size: 1.15rem; font-weight: 800; line-height: 1; cursor: pointer; }
.ajustes-cerrar:hover { border-color: var(--danger); background: #fef3f2; }
.ajuste-campo { display: grid; gap: .3rem; min-width: 240px; flex: 1; }
.ajuste-campo span { font-weight: 700; font-size: .85rem; color: var(--navy); }
.ajuste-campo input, .ajuste-campo select { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; font: inherit; background: #fff; }
.type-picker-inline { border: 2px dashed rgba(15,142,138,.55); border-radius: 18px; padding: 1.2rem; background: #fff; }
.item-remove { float: right; border: 1px solid var(--line); background: #fff; color: var(--danger); border-radius: 999px; width: 28px; height: 28px; cursor: pointer; font-weight: 800; }
.image-placeholder { display: grid; place-items: center; min-height: 180px; border: 2px dashed var(--line); border-radius: 22px; color: var(--muted); background: var(--soft); padding: 2rem; text-align: center; }
/* Textos editables sobre la propia página */
body.edit-on [data-campo], body.edit-on [data-campo-item] { cursor: text; border-radius: 6px; outline: 1px dashed transparent; outline-offset: 3px; transition: outline-color .15s, background .15s; }
body.edit-on [data-campo]:hover, body.edit-on [data-campo-item]:hover { outline-color: rgba(15,142,138,.7); background: rgba(15,142,138,.07); }
body.edit-on [data-campo]:focus, body.edit-on [data-campo-item]:focus { outline: 2px solid var(--teal); background: rgba(15,142,138,.1); }

/* Ventana centrada (datos del sitio, versiones, promociones).
   Los textos NO se editan aquí: se editan sobre la propia página. */
.drawer-overlay { position: fixed; inset: 0; background: rgba(7, 12, 35, .5); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.drawer-overlay[hidden] { display: none; }
.drawer { width: min(880px, 100%); max-height: 92dvh; background: #fff; border-radius: 20px; z-index: 95; box-shadow: 0 24px 70px rgba(0,1,86,.3); display: flex; flex-direction: column; overflow: hidden; }
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.drawer-head p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.drawer-body { overflow-y: auto; padding: 1.1rem 1.2rem 2rem; }
.drawer-foot { display: flex; gap: .6rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; flex: none; }
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); font-size: .92rem; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; font: inherit; background: #fff; }
.field textarea { min-height: 110px; resize: vertical; }
.field small { color: var(--muted); }
.item-card { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: 1rem; background: var(--soft); }
.item-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.item-card-head strong { color: var(--navy); }
.picker-categoria { color: var(--navy); margin: 1.1rem 0 .55rem; font-size: .95rem; }
.type-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.type-picker button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 1rem; text-align: left; font: inherit; cursor: pointer; }
.type-picker button strong { display: block; color: var(--navy); }
.type-picker button span { color: var(--muted); font-size: .88rem; }
.version-row, .promo-row { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .8rem; }
.version-row strong, .promo-row strong { color: var(--navy); }
.version-row p, .promo-row p { color: var(--muted); margin: .35rem 0 .7rem; line-height: 1.5; }

/* Modales y avisos */
.modal-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; background: rgba(7,12,35,.55); }
.modal-overlay[hidden] { display: none; }
.modal-card { width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow); }
.modal-card h2 { margin: 0 0 .5rem; color: var(--navy); }
.modal-card p { color: var(--muted); line-height: 1.6; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }
.login-error { background: #fef3f2; color: var(--danger); border-radius: 10px; padding: .7rem .9rem; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 150; background: var(--navy); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100vw - 2rem); text-align: center; }
.toast.error { background: var(--danger); }
.toast[hidden] { display: none; }

/* Barra de formato tipo editor de texto (al seleccionar un texto) */
.text-toolbar { position: fixed; z-index: 310; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 46px rgba(0,1,86,.28); padding: .45rem .55rem; max-width: calc(100vw - 1rem); }
.text-toolbar[hidden] { display: none; }
.text-toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .4rem; font: inherit; font-size: .88rem; background: #fff; max-width: 150px; }
.text-toolbar button { min-width: 34px; height: 34px; border: 1px solid transparent; background: none; border-radius: 8px; font: inherit; font-size: .95rem; cursor: pointer; }
.text-toolbar button:hover { background: var(--soft); }
.text-toolbar button.activo { background: #d9ecff; border-color: #9cc4ee; }
.text-toolbar .tt-sep { width: 1px; height: 24px; background: var(--line); margin: 0 .15rem; }
.tt-color { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; border-bottom: 3px solid #101828; padding: 0 .2rem; cursor: pointer; }
.tt-color input { width: 22px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
/* Imagen: con clic izquierdo no se toca. Solo se arrastra cuando se activó
   "Mover imagen" o "Cambiar tamaño" desde su menú de clic derecho. */
body.edit-on .hero-media, body.edit-on .image-block { position: relative; }
body.edit-on img[data-armada] { outline: 3px solid var(--teal); outline-offset: 3px; }
body.edit-on img[data-armada="mover"] { cursor: grab; }
body.edit-on img[data-armada="mover"]:active { cursor: grabbing; }
body.edit-on img[data-armada="tamano"] { cursor: ew-resize; }

/* Menú de clic derecho y panel flotante de estilo (sobre la página) */
.context-menu { position: fixed; z-index: 300; min-width: 250px; max-width: 320px; max-height: 78dvh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,1,86,.3); padding: .4rem; }
.context-menu[hidden] { display: none; }
.context-menu .menu-title { padding: .5rem .6rem .3rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.context-menu button { display: flex; width: 100%; align-items: center; gap: .5rem; border: 0; background: none; padding: .55rem .6rem; border-radius: 9px; font: inherit; font-size: .92rem; cursor: pointer; text-align: left; color: var(--ink); }
.context-menu button:hover { background: var(--soft); }
.context-menu button.danger { color: var(--danger); }
.context-menu hr { border: 0; border-top: 1px solid var(--line); margin: .35rem 0; }
.style-panel { position: fixed; z-index: 300; width: 300px; max-width: calc(100vw - 2rem); max-height: 82dvh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,1,86,.3); padding: 1rem; }
.style-panel[hidden] { display: none; }
.style-panel h3 { margin: 0 0 .2rem; color: var(--navy); font-size: 1rem; }
.style-panel .style-sub { margin: 0 0 .8rem; color: var(--muted); font-size: .83rem; }
.style-panel .field { margin-bottom: .7rem; }
.style-panel input[type="range"] { width: 100%; }
.style-panel .range-row { display: flex; gap: .6rem; align-items: center; }
.style-panel .range-row output { min-width: 52px; text-align: right; font-weight: 700; color: var(--navy); }
.style-panel input[type="color"] { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 2px; }
.check-line { display: flex; gap: .5rem; align-items: center; font-weight: 600; margin-bottom: .7rem; }
.check-line input { width: 18px; height: 18px; accent-color: var(--teal); }
.style-actions { display: flex; gap: .5rem; margin-top: .4rem; }
/* Grupos de secciones */
.grupo-bloque { outline: 2px solid rgba(38,95,158,.45); outline-offset: -2px; border-radius: 18px; margin: 0 auto; }
.grupo-banner { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; width: min(1180px, calc(100% - 2.5rem)); margin: 1rem auto 0; padding: .55rem .8rem; background: #e8effc; border: 1px solid #c3d4f2; border-radius: 12px; }
.grupo-banner strong { color: var(--navy); margin-right: auto; }
.grupo-banner button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .7rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }

/* Pulido profesional: aparición al scroll, volver arriba, vista previa */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}
.btn-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 140; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; font-size: 1.2rem; font-weight: 800; cursor: pointer; box-shadow: var(--shadow); }
.btn-top[hidden] { display: none; }
.btn-top:hover { background: var(--teal); }
body.preview-on .site-section { outline: none; }
.revision-lista { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; line-height: 1.55; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 1rem; border-bottom: 1px solid var(--line); }
    .site-nav.open { display: flex; }
    .hero-layout, .section-heading { grid-template-columns: 1fr; flex-direction: column; align-items: start; }
    .edit-bar { top: 61px; }
}
