/* ═══════════════════════════════════════════════════════════════
   Wiclinic Shared CSS — header, nav, footer, wa-float, mobile-cta
   Incluir en todas las páginas del sitio
   Fuentes: precargar en el <head> de cada página
═══════════════════════════════════════════════════════════════ */

    /* ── RESET ──────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: auto; } /* Lenis handles smooth scrolling */
    body {
      font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
      font-size: 16px;
      line-height: 1.6;
      color: var(--text);
      background: #fff;
      min-width: 320px;
      overflow-x: hidden;
    }
    img, svg { max-width: 100%; height: auto; display: block; }
    a { color: inherit; text-decoration: none; }
    ul { list-style: none; }
    /* Poppins para cuerpo de texto — Montserrat para títulos (brand manual) */
    p, li, span, label, input, textarea, select, .form-help {
      font-family: 'Poppins', system-ui, sans-serif;
    }
    p, h1, h2, h3, h4, h5, span, a, li {
      word-break: break-word;
      overflow-wrap: break-word;
    }

    /* ── TOKENS ─────────────────────────────────────── */
    :root {
      --violeta: #7068F4;
      --violeta-dark: #5a52d5;
      --violeta-soft: #eeecfe;
      --celeste: #18B4D6;
      --celeste-soft: #e6f8fc;
      --navy: #032354;
      --navy-mid: #093575;
      --text: #1a2333;
      --text-light: #5a6474;
      --bg-light: #f5f7ff;
      --border: #e2e4f0;
      --white: #ffffff;
      --green-wa: #25D366;
      --green-ok: #16a34a;
      --header-h: 72px;
      --radius: 12px;
      --shadow-sm: 0 2px 8px rgba(7,28,72,.08);
      --shadow-md: 0 8px 28px rgba(7,28,72,.13);
      --shadow-lg: 0 20px 60px rgba(7,28,72,.18);
      --shadow-violeta: 0 8px 28px rgba(112,104,244,.22);
    }

    /* ── ANIMATIONS ─────────────────────────────────── */
    /* GSAP handles all reveals. CSS fallback: visible by default */
    .reveal { opacity: 1; transform: none; }
    /* WA float pulse */
    @keyframes wa-pulse {
      0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,.38), 0 0 0 0 rgba(37,211,102,.3); }
      50%       { box-shadow: 0 4px 16px rgba(37,211,102,.38), 0 0 0 10px rgba(37,211,102,0); }
    }
    .wa-float { animation: wa-pulse 2.8s cubic-bezier(0.32,0.72,0,1) infinite; }
    @media (prefers-reduced-motion: reduce) {
      .wa-float { animation: none; }
    }

    
    
    
    
    
    
    /* ── HEADER — floating glass pill ───────────────── */
    .site-header {
      position: fixed;
      top: 1rem;
      left: 50%;
      transform: translateX(-50%);
      z-index: 100;
      width: calc(100% - 3rem);
      max-width: 1160px;
      background: rgba(255,255,255,.88);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255,255,255,.72);
      border-radius: 16px;
      height: 64px;
      box-shadow: 0 4px 24px rgba(3,35,84,.09), 0 1px 4px rgba(3,35,84,.06);
      transition: background 300ms cubic-bezier(0.32,0.72,0,1), box-shadow 300ms cubic-bezier(0.32,0.72,0,1);
    }
    .site-header.scrolled {
      background: rgba(255,255,255,.97);
      box-shadow: 0 6px 32px rgba(3,35,84,.13), 0 1px 4px rgba(3,35,84,.07);
    }
    .header-inner {
      max-width: 100%;
      margin: 0;
      padding: 0 1.25rem;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }
    @media (max-width: 480px) {
      .site-header { width: calc(100% - 2rem); border-radius: 12px; top: 0.75rem; }
    }
    .logo img { height: 40px; width: auto; }
    .site-nav ul {
      display: flex;
      align-items: center;
      gap: .8rem;
      flex-wrap: nowrap;
    }
    .site-nav a {
      font-size: .82rem;
      font-weight: 600;
      color: var(--text);
      padding: .25rem 0;
      border-bottom: 2px solid transparent;
      white-space: nowrap;
      transition: color .2s, border-color .2s;
    }
    @media (hover: hover) and (pointer: fine) {
      .site-nav a:hover { color: var(--violeta); border-bottom-color: var(--violeta); }
    }
    .nav-cta {
      display: inline-flex;
      align-items: center;
      gap: .35rem;
      background: var(--violeta);
      color: var(--white) !important;
      font-size: .8rem !important;
      font-weight: 700 !important;
      padding: .55rem 1rem !important;
      border-radius: 8px;
      border-bottom: none !important;
      white-space: nowrap;
      transition: background .2s, transform .15s !important;
    }
    @media (hover: hover) and (pointer: fine) {
      .nav-cta:hover { background: var(--violeta-dark) !important; transform: translateY(-1px); }
    }
    /* ── NAV DROPDOWN ───────────────────────────────── */
    .nav-dropdown { position: relative; }
    .nav-dropdown > a {
      display: inline-flex;
      align-items: center;
      gap: .3rem;
    }
    .nav-dropdown-chevron {
      width: 13px; height: 13px;
      flex-shrink: 0;
      transition: transform .25s cubic-bezier(0.32,0.72,0,1);
    }
    .nav-dropdown:hover .nav-dropdown-chevron { transform: rotate(180deg); }
    .nav-dropdown-menu {
      position: absolute;
      top: calc(100% + 14px);
      left: 50%;
      transform: translateX(-50%) translateY(-6px);
      background: var(--white);
      border-radius: 14px;
      box-shadow: 0 10px 48px rgba(3,35,84,.14), 0 2px 8px rgba(3,35,84,.07);
      border: 1px solid var(--border);
      padding: .4rem;
      min-width: 270px;
      opacity: 0;
      visibility: hidden;
      transition: opacity .2s cubic-bezier(0.32,0.72,0,1), transform .2s cubic-bezier(0.32,0.72,0,1), visibility .2s;
      pointer-events: none;
      z-index: 200;
    }
    /* invisible bridge so hover doesn't break on gap */
    .nav-dropdown-menu::before {
      content: '';
      position: absolute;
      top: -14px; left: 0; right: 0;
      height: 14px;
    }
    .nav-dropdown:hover .nav-dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
      pointer-events: auto;
    }
    .nav-dropdown-item {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      padding: .6rem .9rem !important;
      border-radius: 9px !important;
      color: var(--navy) !important;
      font-weight: 700 !important;
      font-size: .88rem !important;
      border-bottom: none !important;
      transition: background .15s !important;
      font-family: 'Montserrat', system-ui, sans-serif !important;
    }
    @media (hover: hover) and (pointer: fine) {
      .nav-dropdown-item:hover {
        background: var(--bg-light) !important;
        color: var(--violeta) !important;
      }
      .nav-dropdown-item:hover .nav-dd-city { color: var(--violeta) !important; opacity: .6; }
    }
    .nav-dd-city {
      font-size: .8rem;
      font-weight: 400;
      color: var(--text-light);
      font-family: 'Poppins', system-ui, sans-serif;
    }
    .nav-dd-footer {
      margin-top: .3rem;
      padding: .55rem .9rem .45rem;
      border-top: 1px solid var(--border);
      font-size: .77rem;
      font-weight: 600;
      color: var(--violeta);
      font-family: 'Poppins', system-ui, sans-serif;
    }

    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      width: 32px;
      cursor: pointer;
      padding: 4px;
      background: none;
      border: none;
      min-height: 44px;
      min-width: 44px;
      align-items: center;
      justify-content: center;
      text-decoration: none;
    }
    .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--navy);
      border-radius: 2px;
      transition: transform .3s, opacity .3s;
    }

    /* Mobile nav */
    .mobile-nav {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 200;
    }
    .mobile-nav:target { display: block; }
    .mobile-nav-bg {
      position: absolute;
      inset: 0;
      background: rgba(3,35,84,.5);
      backdrop-filter: blur(2px);
      display: block;
    }
    .mobile-nav-panel {
      position: absolute;
      top: 0; right: 0; bottom: 0;
      width: min(85vw, 320px);
      background: var(--white);
      padding: 0;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }
    .mobile-nav-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.25rem 1.5rem 1rem;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }
    .mobile-nav-brand {
      font-size: .8rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--text-light);
    }
    .mobile-nav-close {
      background: var(--bg-light);
      border: none;
      cursor: pointer;
      min-height: 36px;
      min-width: 36px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s;
      text-decoration: none;
    }
    .mobile-nav-close:hover { background: var(--border); }
    .mobile-nav-body {
      flex: 1;
      overflow-y: auto;
      padding: .5rem 1.5rem 1rem;
    }
    .mobile-nav-body ul { display: flex; flex-direction: column; }
    .mobile-nav-body a {
      display: block;
      font-size: .98rem;
      font-weight: 600;
      color: var(--text);
      padding: .78rem 0;
      border-bottom: 1px solid var(--border);
    }
    /* Reset explícito para los CTAs — no heredar estilos de nav */
    .mob-actions-wrap a {
      display: flex !important;
      padding: .82rem 1rem !important;
      border-bottom: none !important;
      color: var(--white) !important;
      font-size: .92rem !important;
      width: 100%;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      border-radius: 10px;
      min-height: 48px;
      font-weight: 700;
    }
    .mob-actions-wrap {
      flex-shrink: 0;
      border-top: 2px solid var(--bg-light);
      padding: 1.25rem 1.5rem 1.5rem;
      display: flex;
      flex-direction: column;
      gap: .75rem;
      background: #fafbff;
    }
    .mob-actions-label {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .09em;
      text-transform: uppercase;
      color: var(--text-light);
      margin-bottom: .1rem;
    }
    .mobile-nav-wa {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      background: var(--green-wa);
      color: var(--white);
      font-weight: 700;
      padding: .85rem 1rem;
      border-radius: 10px;
      font-size: .92rem;
      min-height: 48px;
      box-shadow: 0 4px 12px rgba(37,211,102,.25);
    }

    /* ── FOOTER ──────────────────────────────────────── */
    .site-footer {
      background: #010e25;
      color: rgba(255,255,255,.65);
      padding: 3rem 1.5rem 1.5rem;
    }
    .footer-inner { max-width: 1200px; margin: 0 auto; }
    .footer-top {
      display: grid;
      grid-template-columns: 1fr;
      gap: 2rem;
      padding-bottom: 2rem;
      border-bottom: 1px solid rgba(255,255,255,.09);
      margin-bottom: 1.5rem;
    }
    @media (min-width: 640px) { .footer-top { grid-template-columns: 2fr 1fr 1fr; } }
    .footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; background: #fff; padding: 6px 10px; border-radius: 8px; }
    .footer-brand p { font-size: .84rem; line-height: 1.6; max-width: 280px; }
    .footer-col h4 {
      font-size: .76rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: rgba(255,255,255,.4);
      margin-bottom: .875rem;
    }
    .footer-col ul { display: flex; flex-direction: column; gap: .45rem; }
    .footer-social {
      display: flex;
      gap: .65rem;
      margin-top: 1.1rem;
    }
    .footer-social a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      background: rgba(255,255,255,.1);
      border-radius: 8px;
      color: rgba(255,255,255,.7);
      border-bottom: none !important;
      transition: background .2s, color .2s;
      flex-shrink: 0;
    }
    @media (hover: hover) and (pointer: fine) {
      .footer-social a:hover { background: var(--violeta); color: #fff; }
    }
    .footer-col a {
      font-size: .85rem;
      color: rgba(255,255,255,.6);
      transition: color .2s;
    }
    @media (hover: hover) and (pointer: fine) {
      .footer-col a:hover { color: var(--white); }
    }
    .footer-bottom {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: .75rem;
      font-size: .77rem;
      color: rgba(255,255,255,.38);
    }

    /* ── FLOATING WA ─────────────────────────────────── */
    .wa-float {
      position: fixed;
      bottom: 1.5rem; right: 1.5rem;
      z-index: 99;
      width: 56px; height: 56px;
      background: var(--green-wa);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 16px rgba(37,211,102,.38);
      transition: transform .2s, box-shadow .2s;
    }
    @media (hover: hover) and (pointer: fine) {
      .wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,.5); }
    }

    /* ── RESPONSIVE ──────────────────────────────────── */
    @media (max-width: 767px) { .site-nav { display: none; } .hamburger { display: flex; } }
    @media (min-width: 768px) { .hamburger { display: none; } }

    @media (max-width: 480px) {
      .btn-primary, .btn-outline, .btn-white, .btn-wa-final { clip-path: none !important; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
      }
      html { scroll-behavior: auto; }
    }

    /* ── PRINT ───────────────────────────────────────── */
    @media print {
      * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
      }
      @page { margin: 15mm 12mm; size: A4 portrait; }
      .site-header, .mobile-nav, .wa-float, .hero-actions, .cta-final-actions { display: none !important; }
      .hero { background: var(--navy) !important; }
      section, .service-card, .why-card, .testimonial-card, .centro-card, .faq-item { break-inside: avoid; }
      body { width: 100% !important; }
      .section-inner, .footer-inner { max-width: 100% !important; padding: 0 !important; }
    }

    /* ── SECTION LABEL CELESTE ACCENT ───────────────── */
    .section-label::before {
      content: '';
      display: inline-block;
      width: 5px;
      height: 5px;
      background: var(--celeste);
      border-radius: 50%;
      margin-right: .4rem;
      vertical-align: middle;
      margin-bottom: 2px;
      flex-shrink: 0;
    }

    /* ── CTA FORM DOT TEXTURE ────────────────────────── */
    .cta-form { position: relative; isolation: isolate; overflow: hidden; }
    .cta-form::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
      background-size: 22px 22px;
      pointer-events: none;
      z-index: -1;
    }

    /* ── HERO URGENCY MICROCOPY ──────────────────────── */
    .hero-urgency {
      display: flex;
      align-items: center;
      gap: .4rem;
      margin-top: .9rem;
      font-size: .8rem;
      font-weight: 600;
      color: rgba(255,255,255,.55);
      font-family: 'Poppins', system-ui, sans-serif;
    }
    .hero-urgency svg { flex-shrink: 0; color: var(--celeste); opacity: .9; }

    /* ── STICKY MOBILE CTA BAR ───────────────────────── */
    .mobile-cta-bar {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 90;
      background: var(--white);
      border-top: 1px solid var(--border);
      padding: .75rem 1rem;
      gap: .6rem;
      box-shadow: 0 -4px 16px rgba(3,35,84,.1);
    }
    @media (max-width: 767px) {
      .mobile-cta-bar { display: flex; }
      .wa-float { bottom: 5.5rem; right: 1rem; width: 48px; height: 48px; }
    }
    .mobile-cta-bar .mcta-wa {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .45rem;
      background: var(--green-wa);
      color: var(--white);
      font-weight: 700;
      font-size: .88rem;
      padding: .7rem .5rem;
      border-radius: 10px;
      min-height: 46px;
      text-decoration: none;
    }
    .mobile-cta-bar .mcta-agendar {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .45rem;
      background: var(--violeta);
      color: var(--white);
      font-weight: 700;
      font-size: .88rem;
      padding: .7rem .5rem;
      border-radius: 10px;
      min-height: 46px;
      text-decoration: none;
    }
    @media print {
      .mobile-cta-bar { display: none !important; }
    }
  </style>
