:root{--g1:#79b465; --g2:#4f8a45; --ink:#222; --bg:#fafafa}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6}
.wrap{max-width:1080px;margin:0 auto;padding:0 1rem}
header{background:linear-gradient(90deg,var(--g1),var(--g2));color:#fff}
.topbar{display:flex;gap:.75rem;justify-content:space-between;align-items:center;padding:1rem 0}
.brand{font-weight:700;font-size:1.25rem}
nav ul{display:flex;gap:1rem;list-style:none;margin:0;padding:0}
nav a{color:#fff;text-decoration:none}
nav a.active{font-weight:700;text-decoration:underline}
.lang{display:flex;gap:.5rem}
.lang a{padding:.25rem .5rem;border:1px solid rgba(255,255,255,.35);border-radius:.5rem}
.lang a.active{background:#fff;color:#1f5f25}
.hero{padding:2rem 0;text-align:center}
.hero h1{margin:.2rem 0}
.grid{display:grid;grid-template-columns:1fr;gap:1rem}
.card{background:#fff;border:1px solid #eee;border-radius:12px;padding:1rem;box-shadow:0 1px 8px rgba(0,0,0,.04)}
footer{background:#eee;text-align:center;padding:1rem;margin-top:3rem;font-size:.95rem}
@media (min-width:900px){.grid{grid-template-columns:1fr 1fr}}
img{max-width:100%;height:auto}

/* FAB WhatsApp */
.whatsapp-fab{
  position: fixed;
  inset-inline-end: 18px;        /* equivale a right en LTR */
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  z-index: 9999;
  transition: transform .15s ease, filter .15s ease;
}
.whatsapp-fab:focus-visible{ outline: 3px solid #0b5; outline-offset: 3px; }
.whatsapp-fab:hover{ filter: brightness(1.05); transform: translateY(-1px); }

/* Deja “colchón” abajo para que el FAB no tape contenido */
body.has-fab { padding-bottom: 84px; }

/* Respeto a safe areas (iOS) */
@supports (bottom: env(safe-area-inset-bottom)) {
  .whatsapp-fab { bottom: calc(18px + env(safe-area-inset-bottom)); }
}

/* Ajustes móviles: súbelo un poco para que no choque con el footer */
@media (max-width: 480px){
  .whatsapp-fab{
    inset-inline-end: 14px;
    bottom: 80px; /* más alto en móvil */
    width: 54px; height: 54px;
  }
  body.has-fab { padding-bottom: 110px; }
}

/* ===== Footer con iconos ===== */
.footer-grid{display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;align-items:center}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:#fff;border:1px solid #e9e9e9;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.footer-social a:hover{transform:translateY(-1px)}
.footer-social svg{display:block}

/* ===== Menú móvil (drawer) ===== */
.hamburger{display:none;background:transparent;border:0;cursor:pointer;padding:.5rem;margin-left:-.5rem}
.hamburger span{display:block;width:24px;height:2px;background:#fff;margin:5px 0;transition:transform .2s ease, opacity .2s ease}

.drawer{position:fixed;inset:0 0 0 auto;width:280px;max-width:85vw;background:#fff;transform:translateX(100%);transition:transform .25s ease;z-index:10010;box-shadow:-8px 0 24px rgba(0,0,0,.18);padding:1rem}
.drawer-nav{display:flex;flex-direction:column;gap:.5rem}
.drawer-nav a{color:#2c6e2f;text-decoration:none;padding:.5rem;border-radius:.5rem}
.drawer-nav a:hover{background:#f0f6f0}
.drawer-lang a{margin-right:.5rem}
.drawer-close{position:absolute;top:6px;right:10px;background:transparent;border:0;font-size:32px;line-height:1;color:#666;cursor:pointer}
.drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);opacity:0;visibility:hidden;transition:opacity .2s ease;z-index:10005}

.drawer.open{transform:translateX(0)}
.drawer-overlay.show{opacity:1;visibility:visible}
body.drawer-lock{overflow:hidden}

@media (max-width: 900px){
  .topnav{display:none}        /* escondemos menú horizontal */
  .hamburger{display:inline-block}
  .brand{margin-left:.25rem}
  .lang{display:none}          /* el selector de idioma vive en el drawer */
}
