/*
 * Home — "¿Cómo funciona Weilo?" section. Tokens sampled from the Figma node 1:267.
 * Hidden entirely on mobile (per design spec).
 */
:root {
  --weilo-cf-bg:        #FAF6EE;   /* brand/cream */
  --weilo-cf-bg-card:   #14120F;   /* neutro/negro-profundo */
  --weilo-cf-text:      #14120F;
  --weilo-cf-text-grey: #736E66;   /* neutro/gris */
  --weilo-cf-card-w:    344px;
  --weilo-cf-card-h:    490px;
  --weilo-cf-gap:       12px;
}

/* Make sure the PP Nikkei Journal face is available even on pages where
   hero.css isn't enqueued — browsers de-dupe by URL. */
@font-face {
  font-family: "PP Nikkei Journal";
  font-weight: 800;
  font-style:  normal;
  font-display: swap;
  src: url("../fonts/pp-nikkei-journal/PPNikkeiJournal-Ultrabold.woff2") format("woff2"),
       url("../fonts/pp-nikkei-journal/PPNikkeiJournal-Ultrabold.woff")  format("woff");
}

.weilo-como-funciona {
  background: var(--weilo-cf-bg);
  color: var(--weilo-cf-text);
  padding: 32px 0 48px;
  /* Break out of the UAGB / ast-container parents (which cap at 1200/1240).
     The other full-bleed sections use the same pattern. */
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left:  calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 20px;
  /* `100vw` includes the scrollbar — clip locally so the slider's
     internal scroll never leaks into the page body. */
  overflow-x: hidden;
}
.weilo-como-funciona, .weilo-como-funciona * { box-sizing: border-box; }

.weilo-como-funciona__inner {
  max-width: calc(4 * var(--weilo-cf-card-w) + 3 * var(--weilo-cf-gap) + 100px);
  margin: 0 auto;
  padding: 0 50px;
  text-align: center;
}

.weilo-como-funciona__eyebrow {
  display: block;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 30px;
  letter-spacing: 0.1em;            /* ≈ 10/16em from Figma */
  text-transform: uppercase;
  color: var(--weilo-cf-text-grey);
}

.weilo-como-funciona .weilo-como-funciona__title {
  margin: 0;                                      /* defeat .woocommerce-js h2 { margin-bottom: .7em } */
  font-family: "PP Nikkei Journal", "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 800;
  font-size: 46px;
  line-height: 51px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--weilo-cf-text);
}

.weilo-como-funciona__subtitle {
  margin: 16px auto 0;
  max-width: 615px;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: -0.01em;
  color: var(--weilo-cf-text);
}

.weilo-como-funciona__grid {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  /* Flex (not grid) — `display: grid` on this row caused weird left-side
     clipping on card 1 in some browsers. Flex keeps the same visual
     layout (4 cards × 344, centred) without that issue. */
  display: flex;
  gap: var(--weilo-cf-gap);
  justify-content: center;
  flex-wrap: nowrap;
}
.weilo-como-funciona__card {
  margin: 0;
  width: var(--weilo-cf-card-w);
  min-height: var(--weilo-cf-card-h);
  border-radius: 0;
  overflow: hidden;
  background: var(--weilo-cf-bg-card);
  position: relative;
  color: #fff;
  /* Flex column lets the body grow to whatever space is left after the
     photo. min-height (not height) keeps the cards uniform but allows
     them to grow if a long body needs more room. */
  display: flex;
  flex-direction: column;
}
/* ============================================================
   Cards — shared layout: photo on top, body below.
   Photo is a fixed 287px tall on every card (Figma node 1:267) — when
   the card narrows on tablet the image gets cropped by object-fit:cover
   instead of getting shorter, keeping all four cards visually consistent.
   ============================================================ */
.weilo-como-funciona__photo {
  display: block;
  width: 100%;
  height: 287px;
  object-fit: cover;
  flex: 0 0 auto;
}
.weilo-como-funciona__step-num {
  position: absolute;
  top: 18px; left: 30px;
  font-family: "PP Nikkei Journal", "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  z-index: 2;
}
.weilo-como-funciona__card-body {
  flex: 1 1 auto;
  min-height: 0;            /* let the body shrink instead of overflowing */
  padding: 20px 24px;
}
/* Card 1 — title sits next to the plan pills on a single row. */
.weilo-como-funciona__card-body--pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 20px 24px 30px;
}
.weilo-como-funciona__card-body--pills .weilo-como-funciona__step-title {
  text-align: left;
  flex: 0 1 auto;
  min-width: 0;
}
.weilo-como-funciona__card-body--pills .weilo-como-funciona__plans {
  flex: 0 0 auto;
}
/* Cards 2-4 — title above a short body paragraph, both stacked. */
.weilo-como-funciona__card-body--text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
}
.weilo-como-funciona__step-title {
  margin: 0;
  font-family: "Absans", "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 32px;
  color: #fff;
  text-align: left;
}
.weilo-como-funciona__step-body {
  margin: 0;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.78);
}
.weilo-como-funciona__plans {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.weilo-cf-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;            /* uniform width across the 3 plan pills */
  height: 30px;
  padding: 0 18px;
  border-radius: 100px;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.weilo-cf-pill:hover,
.weilo-cf-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  outline: none;
}
.weilo-cf-pill--white  { background: #fff;     color: var(--weilo-cf-bg-card); }
.weilo-cf-pill--orange { background: #F07840;  color: #fff; }
.weilo-cf-pill--violet { background: #7B6BAE;  color: #fff; }
/* Pin the text colour on hover/focus too — the parent theme has a global
   `a:hover { color: #8d5425 }` rule that would otherwise win.
   `a.<variant>` selectors raise specificity above the theme's `a:hover`. */
a.weilo-cf-pill--white:hover,
a.weilo-cf-pill--white:focus,
a.weilo-cf-pill--white:focus-visible  { color: var(--weilo-cf-bg-card); }
a.weilo-cf-pill--orange:hover,
a.weilo-cf-pill--orange:focus,
a.weilo-cf-pill--orange:focus-visible,
a.weilo-cf-pill--violet:hover,
a.weilo-cf-pill--violet:focus,
a.weilo-cf-pill--violet:focus-visible { color: #fff; }

/* The CTA inherits its look from .weilo-cta-primary (global, in promo-bar.css).
   This rule only handles layout/positioning specific to this section. */
.weilo-como-funciona__cta {
  width: 428px;
  max-width: 100%;
  margin: 32px auto 0;
  display: inline-flex;
  align-self: center;
}

.weilo-como-funciona__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 12px;
  margin: 24px 0 0;
  font-family: "Google Sans Flex", "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 24px;
  color: var(--weilo-cf-text);
}
.weilo-como-funciona__footer > span:first-child { flex-basis: 100%; font-weight: 600; }
.weilo-como-funciona__footer strong { font-weight: 600; }
.weilo-como-funciona__footer-sep    { color: black; opacity: 1; }

/* Tablet — let cards shrink proportionally to avoid horizontal scroll.
   No fixed aspect-ratio: cards keep min-height 490 and grow vertically
   if the body copy needs the extra space. */
@media (max-width: 1499px) and (min-width: 769px) {
  .weilo-como-funciona__card {
    /* Share remaining row width equally; min-width 0 lets them shrink
       past their declared 344 base. */
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}

/* Mobile — horizontal scroll-snap slider (same pattern as planes). */
@media (max-width: 768px) {
  .weilo-como-funciona { padding: 32px 0 40px; margin-top: 0; }
  .weilo-como-funciona__inner { padding: 0; }
  .weilo-como-funciona__eyebrow,
  .weilo-como-funciona__title,
  .weilo-como-funciona__subtitle {  }
  .weilo-como-funciona__title { font-size: clamp(34px, 9vw, 44px) !important; line-height: 1; }
  .weilo-como-funciona__subtitle { font-size: 18px; line-height: 26px; padding: 0 20px; }
  

  .weilo-como-funciona__grid {
    /* Scroller pattern that survives scroll-snap on this layout:
       block container + inline-flex cards + white-space: nowrap. */
    display: block;
    grid-template-columns: none !important;
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
    padding: 4px 20px 24px;
    margin-top: 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .weilo-como-funciona__grid::-webkit-scrollbar { display: none; }
  .weilo-como-funciona__card {
    display: inline-flex;
    flex-direction: column;
    vertical-align: top;
    white-space: normal;
    width: calc(100vw - 64px);
    max-width: 344px;
    min-height: 490px;
    margin-right: 12px;
    scroll-snap-align: center;
  }
  .weilo-como-funciona__card:first-child { margin-left: 15px; }
  .weilo-como-funciona__card:last-child { margin-right: 15px; }
  .weilo-prueba__promo-headline { margin-right: 20px;}
  .weilo-como-funciona__cta { margin-left: 20px; margin-right: 20px; width: calc(100% - 40px); max-width: 360px; }
  .weilo-como-funciona__footer { padding: 0 20px; }
}
