/* Bora Doutor: rules used only on the receita page(s). Loaded after base.css. */

/* --- Hero ---------------------------------------------------------------- */
.rx-hero { padding: 64px 0 80px; background: var(--color-bg-soft); overflow: hidden; }
.rx-hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.rx-hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 300;
}
.rx-hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.rx-hero-note svg { width: 15px; height: 15px; color: var(--color-primary-strong); flex-shrink: 0; }

/* --- The signature: a receituário slip, stamped ------------------------- */
.rx-hero-art { position: relative; justify-self: center; width: 100%; max-width: 400px; }
/* The slip behind, just enough to read as a second sheet */
.rx-hero-art::before {
  content: '';
  position: absolute;
  inset: 18px -14px -14px 22px;
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  transform: rotate(4deg);
  box-shadow: 0 12px 28px rgba(16, 40, 64, 0.08);
}
.rx-slip {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  padding: 26px 26px 22px;
  transform: rotate(-1.6deg);
  box-shadow: 0 22px 48px rgba(16, 40, 64, 0.16);
}
.rx-slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--color-dark);
  margin-bottom: 18px;
}
.rx-slip-line { padding: 11px 0; border-bottom: 1px dashed var(--color-rule); }
.rx-slip-line:last-of-type { border-bottom: 0; }
.rx-slip-line b { display: block; font-size: 0.98rem; font-weight: 600; color: var(--color-dark); }
.rx-slip-line span { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 300; }
.rx-slip-sign { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-rule); }
.rx-slip-sign p { margin: 0; font-size: 0.78rem; color: var(--color-text-muted); font-weight: 300; line-height: 1.5; }
.rx-slip-sign p strong { color: var(--color-dark); font-weight: 600; }

/* The stamp presses in once on load, then stays put. Deliberately not gated
   on prefers-reduced-motion — the whole site ignores it, see WARNINGS.md. */
.rx-stamp {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 2px dashed var(--color-primary-strong);
  color: var(--color-primary-strong);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(2px);
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(-13deg);
}
.rx-stamp b {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}
.rx-stamp span {
  display: block;
  margin-top: 4px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* --- The receituário types --------------------------------------------- */
.rx-types { padding: var(--section-y) 0; }
.rx-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.rx-type {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 14px;
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  --rx-edge: var(--rx-simple);
  --lift: 0px;
  transform: translateY(var(--lift));
  transition: transform 0.4s var(--ease-snap), box-shadow 0.3s var(--ease-snap), border-color 0.3s var(--ease-snap);
}
.rx-type::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 14px 14px 0 0;
  background: var(--rx-edge);
}
.rx-type:hover { --lift: -4px; box-shadow: 0 12px 24px rgba(16, 40, 64, 0.1); border-color: #DCE3EF; }
.rx-type--special { --rx-edge: var(--rx-special); }
/* "Duas vias" is literally two sheets — say it with a second sheet peeking out
   of the right edge. It sits entirely outside the card box on purpose: the
   card's transform makes it a stacking context, so a z-index:-1 sheet tucked
   behind would be painted under the card's own background and never show. */
.rx-type--special::after {
  content: '';
  position: absolute;
  top: 16px;
  right: -7px;
  width: 7px;
  height: 64px;
  border: 1px solid var(--color-rule);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #FBFCFF;
}
.rx-type-label { color: var(--rx-edge); margin-bottom: 10px; }
.rx-type h3 { font-family: var(--font-serif); font-size: 1.22rem; line-height: 1.3; margin-bottom: 14px; }
.rx-type-validity { display: flex; align-items: baseline; gap: 7px; margin-bottom: 4px; }
.rx-type-validity b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--color-dark);
  font-variant-numeric: tabular-nums;
}
.rx-type-validity span { font-size: 0.95rem; font-weight: 500; color: var(--color-dark); }
.rx-type-scope { margin: 0 0 16px; font-size: 0.8rem; color: var(--color-text-muted); font-weight: 300; }
.rx-type p.rx-type-covers {
  margin: 0 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-rule);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.55;
}
.rx-chip {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(0, 209, 255, 0.1);
  color: var(--color-primary-strong);
}
.rx-chip svg { width: 13px; height: 13px; flex-shrink: 0; }
.rx-chip--check { background: #E3F6EA; color: #15803D; }

/* --- Conditions --------------------------------------------------------- */
.rx-uses { padding: var(--section-y) 0; }
.rx-uses-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rx-use {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 12px;
  font-weight: 500;
  color: var(--color-dark);
  transition: border-color 0.3s var(--ease-snap), transform 0.3s var(--ease-snap);
}
.rx-use:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.rx-use-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 209, 255, 0.08);
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rx-use-icon svg { width: 19px; height: 19px; }

/* --- What to have ready ------------------------------------------------- */
.rx-ready { padding: 0 0 104px; }
.rx-ready-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
.rx-aside {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.rx-aside-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.rx-aside-icon svg { width: 22px; height: 22px; }
.rx-aside h3 { font-size: 1.1rem; margin-bottom: 10px; }
.rx-aside p { color: var(--color-text-muted); font-weight: 300; font-size: 0.95rem; margin: 0 0 18px; }
.rx-aside p:last-child { margin-bottom: 0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .rx-hero { padding: 64px 0 72px; }
  /* minmax(0, …) rather than a bare 1fr — see WARNINGS.md. `1fr` has an
     implicit min-width:auto, so the track cannot shrink below its content's
     min-content and the page scrolls sideways instead. This bit
     /emagrecimento/ for real on a 360px phone. */
  .rx-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .rx-hero-art { max-width: 380px; }  .rx-ready { padding: 0 0 80px; }
  .rx-uses-grid { grid-template-columns: repeat(2, 1fr); }
  .rx-ready-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767px) {
  .rx-hero { padding: 48px 0 56px; }
  .rx-hero-art { max-width: 320px; }
  .rx-slip { padding: 20px 18px 18px; }
  .rx-stamp { width: 92px; height: 92px; right: 0; bottom: -14px; }  .rx-ready { padding: 0 0 56px; }
  .rx-types-grid { grid-template-columns: 1fr; }
  .rx-uses-grid { grid-template-columns: 1fr; }
  .rx-type--special::after { display: none; }
  .rx-aside { padding: 24px; }
}

/* --- Hero animations on the three service pages -------------------------- */
/* Each of these is ADDITIVE. The seal's dashed ring, its words and the value
   markers are all drawn in CSS above and keep being drawn: if the Lottie never
   mounts, every card is still correct and still says the same thing. The
   animations add the sweep, the breath and the ripple — the parts CSS cannot
   do — and nothing is drawn twice.
   None of the four carries text, which is what makes them safe here: these
   cards reflow (.ex-card and .at-card are 748px wide with 9.6px text in them)
   and a Lottie's viewBox cannot. Animate the moving part, never the card. */

/* The seal on /cholo-receita/. Absolute so it cannot disturb the grid that
   centres "Renovada", and behind it. */
.rx-stamp-anim {
  position: absolute;
  inset: -2px;
  z-index: 0;
  pointer-events: none;
}
.rx-stamp b,
.rx-stamp > span { position: relative; z-index: 1; }

/* The price, stated in the hero rather than buried on /cholo-precos/ — this is
   the page people land on for a renovação, and the number is the question. */
.rx-hero-price {
  margin: 0 0 22px;
  color: var(--color-text-muted);
  font-size: 0.98rem;
  font-weight: 300;
}
