/* ============================================================
   RIATLA PAPÉIS — CTA BAR + CONVERSION SECTIONS
   v1.0 · 2026-08-11
   Applies to: home (/), /historia, /catalogo
   NOT applied to: /links (linktree — untouched)
   ============================================================ */

/* ── 1. Sticky CTA Bar ──────────────────────────────────────── */

.riatla-cta-bar {
  position: fixed;
  top: 82px; /* sits directly below .x-nav (z-index:30, height:82px) */
  left: 0;
  right: 0;
  z-index: 25; /* under x-nav (30) and x-mobile-nav overlay (29) */
  height: 44px;
  background: #f4c400;
  color: #0e2a47;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  border-bottom: 2px solid rgba(14,42,71,.12);
  box-shadow: 0 4px 16px rgba(14,42,71,.14);
  transition: transform .3s ease, opacity .3s ease;
  font-family: Inter, Arial, sans-serif;
}

/* Hidden state — applied via JS when mobile menu opens */
.riatla-cta-bar--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Brand label */
.riatla-cta-bar__brand {
  font: 700 12px/1 Inter, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0e2a47;
  text-decoration: none;
  flex-shrink: 0;
}

/* Phone (desktop only) */
.riatla-cta-bar__phone {
  font: 500 13px/1 Inter, Arial, sans-serif;
  color: #0e2a47;
  text-decoration: none;
  letter-spacing: .01em;
  opacity: .85;
  transition: opacity .18s;
}
.riatla-cta-bar__phone:hover { opacity: 1; }

/* WhatsApp CTA button */
.riatla-cta-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: #0e2a47;
  color: #f4c400;
  font: 700 11px/1 Inter, Arial, sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
  flex-shrink: 0;
}
.riatla-cta-bar__cta:hover {
  background: #051524;
  transform: translateY(-1px);
}

/* Compensate body scroll for the 44px bar height */
/* Applied on html element via JS */
html.has-cta-bar {
  scroll-padding-top: 138px; /* 82px nav + 44px bar + 12px gap */
}

/* historia page: header is 88px not 82px */
.history-page ~ .riatla-cta-bar,
.has-cta-bar--historia .riatla-cta-bar {
  top: 88px;
}
html.has-cta-bar--historia {
  scroll-padding-top: 144px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 760px) {
  .riatla-cta-bar {
    top: 68px; /* x-nav mobile height */
    height: 40px;
    padding: 0 4vw;
  }
  .riatla-cta-bar__phone {
    display: none; /* phone hidden on mobile */
  }
  .riatla-cta-bar__brand {
    font-size: 10px;
  }
  .riatla-cta-bar__cta {
    font-size: 10px;
    padding: 6px 12px;
  }
  html.has-cta-bar {
    scroll-padding-top: 120px;
  }
}

@media (max-width: 600px) {
  /* historia mobile header is 72px */
  html.has-cta-bar--historia .riatla-cta-bar {
    top: 72px;
  }
}


/* ── 2. Social Proof Strip (home, below hero) ────────────────── */

.x-social-proof {
  background: #0e2a47;
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid rgba(244,196,0,.25);
  border-bottom: 2px solid rgba(244,196,0,.15);
}

.x-social-proof__item {
  padding: 36px 5vw;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid rgba(244,196,0,.12);
  transition: background .22s ease;
}
.x-social-proof__item:last-child { border-right: 0; }
.x-social-proof__item:hover { background: rgba(244,196,0,.06); }

.x-social-proof__number {
  display: block;
  font: 500 clamp(40px,4.5vw,64px)/.88 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: #f4c400;
  letter-spacing: -.03em;
}

.x-social-proof__label {
  display: block;
  font: 500 10px/1.5 'DM Mono', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a8bfc9;
}

@media (max-width: 860px) {
  .x-social-proof {
    grid-template-columns: 1fr 1fr;
  }
  .x-social-proof__item:nth-child(2) { border-right: 0; }
  .x-social-proof__item:nth-child(3) {
    border-right: 1px solid rgba(244,196,0,.12);
    border-top: 1px solid rgba(244,196,0,.12);
  }
  .x-social-proof__item:nth-child(4) {
    border-top: 1px solid rgba(244,196,0,.12);
    border-right: 0;
  }
}

@media (max-width: 480px) {
  .x-social-proof {
    grid-template-columns: 1fr 1fr;
  }
  .x-social-proof__item {
    padding: 28px 6vw;
  }
}


/* Removed x-home-products styles to keep it clean, and instead added spacing below social proof */
.x-social-proof {
  margin-bottom: 70px;
}
@media (max-width: 860px) {
  .x-social-proof {
    margin-bottom: 50px;
  }
}

/* Button inside x-solution block */
.x-solution__copy .x-button--solution {
  background: #f4c400; /* Yellow */
  color: #0e2a47; /* Navy */
  margin-top: 36px;
  align-self: flex-start;
  padding: 15px 22px;
}
.x-solution__copy .x-button--solution:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(244,196,0,.15);
}


/* ── 4. Historia — Final CTA Block ───────────────────────────── */

.history-page__final-cta {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px,9vw,130px) clamp(24px,5vw,80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-top: 1px solid #aebdba;
}

.history-page__final-cta h2 {
  margin: 0;
  max-width: 560px;
  color: #0e2a47;
  font: 500 clamp(36px,4.2vw,68px)/1.04 'Playfair Display', Georgia, serif;
  letter-spacing: -.04em;
}

.history-page__final-cta h2 em {
  display: block;
  font-style: italic;
}

.history-page__final-cta a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: #f4c400;
  color: #0e2a47;
  font: 700 11px/1 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
  flex-shrink: 0;
}
.history-page__final-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 26px rgba(14,42,71,.17);
}

@media (max-width: 760px) {
  .history-page__final-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
}
