/* ============================================================
   GRUPO IMPULSO – Mobile Drawer Menu
   Pegar en: Apariencia → Personalizar → CSS adicional
   O cargar como archivo en functions.php
   ============================================================ */

/* Ocultar el menú inline antiguo (ya no existe en header.php
   pero por si quedara algún resto en caché) */
.mobile-nav { display: none !important; }

/* ── Overlay / fondo oscuro ── */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.mob-overlay.open {
  display: block;
  opacity: 1;
}

/* ── Panel drawer ── */
.mob-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 360px);
  z-index: 1200;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
  will-change: transform;
}
.mob-drawer.open {
  transform: translateX(0);
}

/* ── Cabecera del drawer ── */
.mob-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border, #e5ddd4);
  flex-shrink: 0;
  background: var(--foreground, #1a1209);
}
.mob-drawer-brand {
  font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  gap: 0.2rem;
  text-decoration: none;
}
.mob-brand-g { color: #ffffff; }
.mob-brand-i { color: var(--primary, #F97316); }

.mob-drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.2s;
  flex-shrink: 0;
}
.mob-drawer-close:hover { background: rgba(255, 255, 255, 0.22); }
.mob-drawer-close svg {
  width: 18px;
  height: 18px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
}

/* ── Área de navegación scrollable ── */
.mob-drawer-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mob-drawer-nav::-webkit-scrollbar { width: 3px; }
.mob-drawer-nav::-webkit-scrollbar-thumb {
  background: var(--border, #e5ddd4);
  border-radius: 2px;
}

/* ── Secciones internas ── */
.mob-nav-section {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border, #e5ddd4);
}
.mob-nav-section:last-child { border-bottom: none; }

/* ── Label de grupo ── */
.mob-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted, #6b5e50);
  padding: 0.85rem 1.25rem 0.35rem;
  margin: 0;
}

/* ── Enlace de navegación ── */
.mob-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text, #1a1209);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}
.mob-nav-link svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted, #6b5e50);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  transition: stroke 0.15s;
}
.mob-nav-link:hover {
  background: var(--muted, #f3f0ec);
  color: var(--primary, #F97316);
}
.mob-nav-link:hover svg { stroke: var(--primary, #F97316); }

/* ── Subenlaces de servicio ── */
.mob-nav-link--sub {
  padding: 0.7rem 1.25rem;
  font-size: 0.88rem;
}
.mob-svc-icon {
  width: 30px;
  height: 30px;
  border-radius: 0.45rem;
  background: var(--primary-light, rgba(249,115,22,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mob-svc-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--primary, #F97316);
  fill: none;
  stroke-width: 2;
}

/* ── Contacto rápido ── */
.mob-contact-quick {
  background: var(--muted, #f3f0ec);
}
.mob-contact-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text, #1a1209);
  text-decoration: none;
  transition: color 0.15s;
}
.mob-contact-row svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: var(--primary, #F97316);
  fill: none;
  stroke-width: 2;
}
/* WhatsApp icon usa fill */
.mob-contact-row svg[fill="#25D366"] { stroke: none; }
.mob-contact-row:hover { color: var(--primary, #F97316); }

/* ── CTA fijo en la parte inferior ── */
.mob-drawer-cta {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border, #e5ddd4);
  background: #ffffff;
}
.mob-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem;
  background: var(--primary, #F97316);
  color: #ffffff;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius, 0.75rem);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
  transition: background 0.2s, transform 0.2s;
}
.mob-cta-btn:hover {
  background: #EA6900;
  transform: translateY(-1px);
  color: #ffffff;
}
.mob-cta-btn svg {
  width: 18px;
  height: 18px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ── Bloquear scroll del body cuando el drawer está abierto ── */
body.mob-open {
  overflow: hidden;
  /* evita salto de layout en desktop por scrollbar */
  padding-right: 0 !important;
}

/* ── Solo visible en móvil ── */
@media (min-width: 769px) {
  .mob-overlay,
  .mob-drawer { display: none !important; }
}
