/* ===========================================================
   Versión móvil del sitio público GH2.
   Se activa en pantallas <= 820px; oculta el diseño de
   escritorio (#viewport) y muestra el bloque .movil.
   =========================================================== */

.movil { display: none; }

@media (max-width: 820px) {
  #viewport { display: none !important; }
  .movil { display: block; }
}

/* ---- Base ---- */
.movil, .movil * { box-sizing: border-box; }
.movil {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a1d24;
  background: #ffffff;
  line-height: 1.55;
}
.movil h1, .movil h2, .movil h3 {
  font-family: 'Poppins', system-ui, sans-serif; margin: 0;
}
.movil img { max-width: 100%; display: block; }
.movil a { text-decoration: none; color: #2F49C9; }

/* ---- Barra superior + menú hamburguesa (sin JS) ---- */
.m-bar {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid rgba(26,29,36,0.08);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.m-logo { width: 116px; height: auto; }
.m-toggle { position: absolute; opacity: 0; pointer-events: none; }
.m-burger {
  width: 42px; height: 42px; display: flex; flex-direction: column;
  justify-content: center; gap: 5px; cursor: pointer; padding: 9px;
}
.m-burger span { height: 2.5px; background: #1a1d24; border-radius: 2px; transition: .2s; }
.m-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid #e7e9f0;
  box-shadow: 0 14px 30px rgba(16,24,48,.10);
  flex-direction: column; display: none;
}
.m-toggle:checked ~ .m-menu { display: flex; }
.m-toggle:checked ~ .m-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.m-toggle:checked ~ .m-burger span:nth-child(2) { opacity: 0; }
.m-toggle:checked ~ .m-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.m-menu a {
  padding: 15px 22px; font-size: 16px; color: #1a1d24;
  border-top: 1px solid #f0f1f6;
}
.m-menu a:first-child { border-top: none; }
.m-menu a.m-intra { color: #2F49C9; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.m-menu a.m-intra::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #5271FF; }

/* ---- Contenedor de contenido ---- */
.m-main { padding: 26px 20px 8px; }
.m-main > section { margin-bottom: 30px; }
.m-h { font-size: 22px; font-weight: 700; margin-bottom: 14px; color: #1a1d24; }

/* ---- Inicio (hero) ---- */
.m-hero { position: relative; }
.m-hero img { width: 100%; height: 300px; object-fit: cover; }
.m-hero-ov {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,16,28,.15), rgba(10,16,28,.72));
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 10px; padding: 22px 20px 24px;
}
.m-stat {
  color: #fff; font-family: 'Poppins', system-ui, sans-serif;
  font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 9px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.m-stat b { color: #BAC6FF; }
.m-cta { display: flex; gap: 12px; padding: 22px 20px 4px; }
.m-cta a {
  flex: 1; text-align: center; padding: 13px; border-radius: 6px; font-weight: 600; font-size: 15px;
}
.m-cta .pri { background: #2F49C9; color: #fff; }
.m-cta .sec { background: #eef0fb; color: #2F49C9; }

/* ---- Quiénes somos ---- */
.m-intro p { font-size: 15px; color: #3f4356; margin: 0 0 12px; text-align: justify; }
.m-socio { text-align: center; margin-bottom: 26px; }
.m-socio img {
  width: 210px; height: 300px; object-fit: cover; margin: 0 auto 14px; border-radius: 4px;
}
.m-socio .nom { font-family:'Poppins',sans-serif; font-size: 19px; font-weight: 700;
  text-transform: uppercase; color: #5271FF; }
.m-socio .rol { font-size: 14px; font-weight: 700; margin-top: 4px; }
.m-socio .prof { font-size: 14px; color: #4b5064; margin-top: 4px; }
.m-card {
  background: #fff; border: 1px solid #e7e9f0; border-radius: 8px;
  padding: 18px 20px; margin-bottom: 14px;
}
.m-card h3 { font-size: 17px; margin-bottom: 8px; }
.m-card p { font-size: 14px; color: #5a5f74; margin: 0 0 10px; }
.m-card p:last-child { margin-bottom: 0; }

/* ---- Proyectos (grilla táctil: título siempre visible) ---- */
.m-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 560px) and (max-width: 820px) { .m-grid { grid-template-columns: 1fr 1fr; } }
.m-tile { border: 1px solid #e7e9f0; border-radius: 8px; overflow: hidden; background: #fff; }
.m-tile img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.m-tile .cap { padding: 12px 14px 14px; }
.m-tile .t { font-family:'Poppins',sans-serif; font-size: 15px; font-weight: 600; }
.m-tile .d { font-size: 13px; color: #5a5f74; margin-top: 4px; }

/* ---- Contacto ---- */
.m-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.m-field label { font-size: 13px; font-weight: 700; }
.m-field input, .m-field textarea {
  font-family: inherit; font-size: 15px; border: 1px solid #d6dae6; border-radius: 6px;
  padding: 12px 13px; width: 100%;
}
.m-field textarea { resize: vertical; }
.m-btn {
  width: 100%; height: 48px; background: #2F49C9; color: #fff; border: none; border-radius: 6px;
  font-family: inherit; font-size: 16px; font-weight: 600;
}
.m-dato { display: flex; align-items: flex-start; gap: 11px; font-size: 15px; color: #3f4356; margin-bottom: 12px; }
.m-dato svg { flex: none; margin-top: 2px; }
.m-mapa { width: 100%; height: 230px; border-radius: 8px; overflow: hidden; border: 1px solid #e3e7f0; position: relative; }
.m-mapa img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Footer ---- */
.m-foot {
  background: #f7f8fb; border-top: 1px solid #e7e9f0; margin-top: 10px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  font-size: 14px; color: #3f4356; line-height: 1.7;
}
.m-foot .emp { font-weight: 700; color: #1a1d24; }
.m-foot .links { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.m-foot .links a { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Inicio móvil: foto grande (vertical) que llena la pantalla y pie abajo ---- */
@media (max-width: 820px) {
  .movil-inicio { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .movil-inicio .m-bar { flex: none; }
  .movil-inicio .m-hero { flex: 1 1 auto; min-height: 0; position: relative; }
  .movil-inicio .m-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; }
  .movil-inicio .m-foot { flex: none; margin-top: 0; }
}
