/* Emprende con Éxito Digital · estilos comunes del sitio.
   El diseño de cada sección vive en el HTML de cada página; aquí van las piezas compartidas. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F7F2E8; color: #1D2B22; font-family: Montserrat, 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: #1F3D2E; }
a:hover { color: #2D4B39; }
:focus-visible { outline: 3px solid #B8975A; outline-offset: 2px; }
[hidden], .oculto { display: none !important; }
.solo-lectores { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
main { display: block; }
main p, main li { overflow-wrap: break-word; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
section[id] { scroll-margin-top: 84px; }

/* ── Encabezado ── */
.encabezado { position: sticky; top: 0; z-index: 40; background: rgba(247, 242, 232, 0.96); border-bottom: 1px solid #E4D9C3; backdrop-filter: blur(6px); }
.encabezado__marco { max-width: 1180px; margin: 0 auto; padding: 10px clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.encabezado__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #1D2B22; }
.encabezado__logo img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.encabezado__logo b { display: block; font-family: Lora, Georgia, serif; font-weight: 600; font-size: 18px; line-height: 1.1; }
.encabezado__logo small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #8A6524; }
.encabezado__nav { display: flex; align-items: center; gap: 24px; }
.encabezado__nav a { color: #1D2B22; text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 12px 0; white-space: nowrap; }
.encabezado__nav a:hover { color: #8A6524; }
.encabezado__cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px; background: #1F3D2E; color: #F5EEDD !important; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.encabezado__cta:hover { background: #2D4B39; }
.encabezado__menu { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1.5px solid #1F3D2E; border-radius: 10px; background: transparent; color: #1F3D2E; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
@media (max-width: 860px) {
  .encabezado__menu { display: inline-flex; }
  .encabezado__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px clamp(18px, 4vw, 48px) 18px; background: #F7F2E8; border-bottom: 1px solid #E4D9C3; box-shadow: 0 18px 30px rgba(10, 24, 16, 0.12); }
  .encabezado__nav.abierto { display: flex; }
  .encabezado__nav a { padding: 14px 0; border-bottom: 1px solid #EDE4D2; font-size: 16px; }
  .encabezado__nav .encabezado__cta { margin-top: 12px; justify-content: center; border-bottom: 0; }
}

/* ── Botón flotante de WhatsApp ── */
.whatsapp { position: fixed; right: 18px; bottom: 18px; z-index: 45; width: 58px; height: 58px; border-radius: 50%; background: #1F3D2E; color: #F5EEDD; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(10, 24, 16, 0.3); border: 2px solid #D9B777; transition: transform 0.2s; }
.whatsapp:hover { transform: scale(1.06); color: #F5EEDD; }
.whatsapp svg { width: 28px; height: 28px; }

/* ── Barra fija de la guía (solo celular, en el inicio) ── */
.barra-guia { display: none; }
@media (max-width: 760px) {
  .barra-guia { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: flex; align-items: center; gap: 12px; padding: 10px 84px 10px 16px; background: #1F3D2E; color: #F5EEDD; box-shadow: 0 -8px 20px rgba(10, 24, 16, 0.18); transform: translateY(0); transition: transform 0.25s; }
  .barra-guia.escondida { transform: translateY(110%); }
  .barra-guia span { font-size: 13px; line-height: 1.35; color: #C7D1C2; }
  .barra-guia a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; background: #D9B777; color: #1F3D2E; font-weight: 600; font-size: 14px; text-decoration: none; }
  body.con-barra .whatsapp { bottom: 12px; }
}

/* ── Aviso de cookies ── */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin: 0 auto; background: #FFFCF5; color: #1D2B22; border: 1px solid #E4D9C3; border-radius: 16px; padding: 18px 20px; box-shadow: 0 18px 44px rgba(10, 24, 16, 0.25); display: flex; flex-direction: column; gap: 12px; }
.cookies p { margin: 0; font-size: 14px; line-height: 1.6; color: #4A5A4F; }
.cookies b { font-family: Lora, Georgia, serif; font-weight: 600; font-size: 17px; color: #1D2B22; }
.cookies__botones { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies__botones button { flex: 1 1 140px; min-height: 46px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.cookies__si { border: 0; background: #1F3D2E; color: #F5EEDD; }
.cookies__no { border: 1.5px solid #1F3D2E; background: transparent; color: #1F3D2E; }

/* ── Formularios ── */
.formulario-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #F8E3DF; color: #93302A; font-size: 13.5px; line-height: 1.5; }
.formulario-ok { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; text-align: center; }
button[disabled] { opacity: 0.7; cursor: wait; }
input:focus, select:focus, textarea:focus { outline: 2px solid #B8975A; outline-offset: 1px; }

/* ── Test y Ruta ── */
.opcion-test:hover { border-color: #1F3D2E !important; }
.dia-ruta:hover { background: rgba(217, 183, 119, 0.06) !important; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
