/* site-modern.css — Universal mobile polish + modern menu drawer for migrated static sites.
   Drop-in: shared across all 5 ex-WordPress sites in Sites_Clientes/.
   Idempotent; uses .smnu- prefix to avoid collisions with Elementor classes. */

/* ---------- 1. Mobile baseline (applies on small screens) ---------- */
@media (max-width: 1024px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  img, video { max-width: 100%; height: auto; }

  /* Safer touch targets */
  a, button { min-height: 44px; }
  .elementor-button, .elementor-button-link {
    min-height: 48px;
    padding: 12px 22px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  /* Typography rhythm on phones */
  h1 { font-size: clamp(28px, 7.5vw, 38px) !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(22px, 6vw, 30px) !important; line-height: 1.2 !important; }
  h3 { font-size: clamp(18px, 5vw, 24px) !important; line-height: 1.25 !important; }
  p, li { font-size: 15px; line-height: 1.55; }

  /* Containers: tighter padding on phones */
  .elementor-section .elementor-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Stack columns naturally */
  .elementor-row > .elementor-column,
  .elementor-container > .elementor-column {
    width: 100% !important;
  }
}

/* ---------- 2. Modern sticky header + hamburger (.smnu-) ---------- */
.smnu-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9990;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transform: translateY(0);
  transition: transform .25s ease, background .2s ease;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.smnu-header.smnu-hidden { transform: translateY(-110%); }
.smnu-header.smnu-dark {
  background: rgba(15, 23, 42, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.smnu-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.smnu-brand img { height: 36px; width: auto; display: block; }
.smnu-brand-text {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.smnu-dark .smnu-brand-text { color: #f1f5f9; }

/* Desktop quick links (hidden on mobile) */
.smnu-desktop-links {
  display: none;
  gap: 22px;
  align-items: center;
  flex: 0 0 auto;        /* don't grow, don't shrink, sized to content */
  width: auto !important;
  margin: 0 auto;        /* push to center when in flex parent */
  list-style: none;
}
.smnu-header > * { flex: 0 0 auto; }
.smnu-header .smnu-brand { width: auto !important; }
.smnu-desktop-links a {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  padding: 8px 4px;
  position: relative;
  transition: color .15s ease;
}
.smnu-desktop-links a:hover { color: #0f172a; }
.smnu-desktop-links a::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.smnu-desktop-links a:hover::after { transform: scaleX(1); }
.smnu-dark .smnu-desktop-links a { color: #cbd5e1; }
.smnu-dark .smnu-desktop-links a:hover { color: #fff; }

@media (min-width: 900px) {
  .smnu-desktop-links { display: inline-flex; }
}

/* Desktop CTA button in header (right side, between links and hamburger area) */
.smnu-header-cta {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff !important;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
  margin-left: 12px;
}
.smnu-header-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ea580c, #c2410c);
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.45);
  color: #fff !important;
}
.smnu-header-cta svg { width: 16px; height: 16px; fill: currentColor; }
@media (min-width: 900px) {
  .smnu-header-cta { display: inline-flex; }
}

/* Hamburger button */
.smnu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.smnu-toggle:hover { background: rgba(15, 23, 42, 0.06); }
.smnu-toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.smnu-toggle-bars {
  display: inline-block;
  position: relative;
  width: 22px;
  height: 16px;
}
.smnu-toggle-bars span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #0f172a;
  border-radius: 2px;
  transition: transform .25s ease, top .25s ease, opacity .15s ease;
}
.smnu-toggle-bars span:nth-child(1) { top: 0; }
.smnu-toggle-bars span:nth-child(2) { top: 7px; }
.smnu-toggle-bars span:nth-child(3) { top: 14px; }
.smnu-dark .smnu-toggle-bars span { background: #f1f5f9; }
.smnu-open .smnu-toggle-bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.smnu-open .smnu-toggle-bars span:nth-child(2) { opacity: 0; }
.smnu-open .smnu-toggle-bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .smnu-toggle { display: none; }
}

/* Backdrop */
.smnu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 9995;
}
.smnu-backdrop.smnu-show {
  opacity: 1;
  visibility: visible;
}

/* Drawer (slides in from right) */
.smnu-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: #ffffff;
  z-index: 9996;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.smnu-drawer.smnu-show { transform: translateX(0); }
.smnu-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.smnu-drawer-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.smnu-drawer-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #475569;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: background .15s ease;
}
.smnu-drawer-close:hover { background: rgba(15, 23, 42, 0.06); }
.smnu-drawer-close::before { content: "×"; }
.smnu-drawer ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1;
}
.smnu-drawer li { margin: 0; }
.smnu-drawer a {
  display: flex;
  align-items: center;
  padding: 14px 22px;
  font-size: 17px;
  font-weight: 500;
  color: #0f172a;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  border-left: 3px solid transparent;
}
.smnu-drawer a:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), transparent);
  color: #2563eb;
  border-left-color: #2563eb;
}
.smnu-drawer .smnu-cta {
  margin: 16px 20px 22px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  border-left: 0;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.smnu-drawer .smnu-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  color: #fff;
  border-left: 0;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
}
.smnu-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

/* Push body content down so it doesn't hide under fixed header */
body.smnu-body { padding-top: 60px; }

/* Hide existing site headers/menus on ALL screen sizes — the modern header replaces them. */
/* The .smnu-hide class is applied by site-modern.js to detected redundant headers. */
body.smnu-body header.elementor-location-header,
body.smnu-body .elementor-location-header > .elementor-element,
body.smnu-body .ehf-template-hello-elementor .site-header,
body.smnu-body .smnu-hide,
body.smnu-body .smnu-hide-mobile {
  display: none !important;
}

/* Prevent scroll while drawer open */
body.smnu-locked { overflow: hidden; }

/* ---------- 3. Floating WhatsApp button (mobile-first) ---------- */
.smnu-wa-float {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 9985;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.smnu-wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
}
.smnu-wa-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
.smnu-wa-float::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid rgba(37, 211, 102, 0.55);
  animation: smnu-pulse 2.2s ease-out infinite;
}
@keyframes smnu-pulse {
  0% { transform: scale(.95); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ---------- 4. Juxtapose (before/after) hardening ---------- */
.jet-juxtapose, .juxtapose {
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}
.juxtapose .veil { background: transparent !important; }
.juxtapose .handle {
  width: 44px !important;
  height: 44px !important;
  margin-left: -22px !important;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.juxtapose .handle .controller {
  background: transparent !important;
}

/* ---------- 5. Section accents (animate on view) ---------- */
.smnu-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.smnu-fade-in.smnu-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 6. Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .smnu-wa-float::after { display: none; }
}
