/* GRADUS landing pages — phone layout (≤ 760 px).
   The desktop markup is inline-styled; this sheet re-composes each section for a phone instead of letting the
   desktop grid shrink: one column, phones listed one under the other, demo panels re-flowed, tighter rhythm.
   Hooks are the m-* classes in the HTML (plus a few attribute selectors on the inline styles). */

@media (max-width: 760px) {
  /* ── rhythm & type ─────────────────────────────────────────── */
  .lp .wrap { padding-inline: 18px; }
  .lp section[style*="padding-block: 1"] { padding-block: 60px !important; }
  .lp h2 { font-size: clamp(32px, 9.4vw, 40px) !important; line-height: 1.02 !important; letter-spacing: -0.04em !important; }
  .lp h2 + p, .lp section p[style*="font-size: 18px"], .lp section p[style*="font-size: 17px"] { font-size: 16px !important; }
  .lp .wrap[style*="gap: 56px"], .lp .wrap[style*="gap: 48px"] { gap: 32px !important; }
  .lp .wrap[style*="gap: 40px"] { gap: 28px !important; }
  /* Section headers: title block then the side note, both full width. */
  .lp .wrap > div[style*="align-items: flex-end; justify-content: space-between"] { gap: 14px !important; }
  .lp .wrap > div[style*="align-items: flex-end; justify-content: space-between"] > p { max-width: none !important; }
  /* Cards: smaller radius and padding on a narrow screen. */
  .lp article[style*="padding: 3"], .lp li[style*="padding: 32px"] { padding: 22px !important; border-radius: 22px !important; }
  .lp article h3[style*="font-size: 2"] { font-size: 21px !important; }

  /* ── hero ─────────────────────────────────────────────────── */
  #topo { padding-block: 36px 8px !important; }
  #topo > div[aria-hidden] { width: 100% !important; right: -20% !important; height: 520px !important; opacity: .5 !important; }
  .m-hero-copy { gap: 20px !important; }
  .m-hero-copy > div:has(> a.cta-p), section[aria-labelledby="hero-title"] div:has(> a.cta-p) { flex-direction: column; align-items: stretch !important; }
  .lp section[aria-labelledby="hero-title"] a.cta-p, .lp section[aria-labelledby="hero-title"] a.cta-g { justify-content: center; width: 100%; min-height: 54px !important; }
  .m-hero-copy > div:last-child { gap: 8px 16px !important; font-size: 13px !important; }
  .m-hero-dev { flex-basis: 100% !important; padding-block: 8px 0 !important; }
  .m-hero-dev .device { width: 236px !important; }

  /* ── sports band: one swipeable row of chips ─────────────── */
  .m-sports { flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 8px !important; padding-block: 14px !important; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .m-sports::-webkit-scrollbar { display: none; }
  .m-sports > span { flex: none; padding: 8px 14px; border: 1px solid #242b34; border-radius: 999px; background: #11151a; font-size: 14px; white-space: nowrap; }
  .m-sports > span:first-child { border: 0; background: none; padding-inline: 0 6px; }

  /* ── app screens: one under the other, phone and text side by side, alternating ── */
  .lp .phones { display: flex !important; flex-direction: column; gap: 26px !important; overflow: visible !important; padding: 0 !important; scroll-snap-type: none !important; }
  .lp .phones > figure { flex: none !important; padding-top: 0 !important; display: grid !important; grid-template-columns: 46% minmax(0, 1fr); align-items: center; gap: 18px !important; }
  .lp .phones > figure:nth-child(even) > .device { order: 2; }
  .lp .phones > figure > .device { width: 100% !important; height: auto !important; aspect-ratio: 1170 / 2532; padding: 7px; border-radius: 32px; }
  .lp .phones > figure > .device > .dv-screen { border-radius: 26px; border-top-width: 20px; }
  .lp .phones > figure > .device .dv-glare { inset: 7px; border-radius: 26px; }
  .lp .phones > figure > .device .dv-island { top: 12px; height: 14px; }
  .lp .phones > figure > .device.android .dv-island { width: 9px; height: 9px; top: 11px; }
  .lp .phones > figure > .device .dv-status { top: 12px; left: 18px; right: 18px; font-size: 9px; transform: scale(.85); }
  .lp .phones > figure figcaption { gap: 8px !important; }
  .lp .phones > figure figcaption b { font-size: 21px !important; letter-spacing: -0.02em; }
  .lp .phones > figure figcaption span { font-size: 15px !important; line-height: 1.5; }
  .lp .phones + .fx-dots { display: none !important; }

  /* ── feature grid (bento): a single column ───────────────── */
  .m-bento { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
  .m-bento > article { grid-column: auto !important; gap: 12px !important; }
  .m-bento > article:first-child { gap: 20px !important; }
  .m-bento > article:first-child > div:last-child { padding: 16px !important; border-radius: 18px !important; }
  .m-bento > article:first-child div[style*="padding: 12px 14px"] { padding: 10px 12px !important; }
  .m-bento > article:first-child div[style*="padding: 12px 14px"] b { font-size: 17px !important; }
  /* The last two short cards read as compact rows: icon beside the text. */
  .m-bento > article:nth-last-child(-n+2) { display: grid !important; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px !important; row-gap: 4px !important; align-items: start; }
  .m-bento > article:nth-last-child(-n+2) > span:first-child { grid-row: span 2; width: 44px !important; height: 44px !important; }
  .m-bento > article:nth-last-child(-n+2) > h3 { font-size: 19px !important; align-self: end; }

  /* ── gamification ladder ─────────────────────────────────── */
  #gamificacao .wrap { gap: 32px !important; }
  .m-jornada { padding: 20px !important; border-radius: 24px !important; gap: 16px !important; }
  .m-jornada b[style*="font-size: 30px"] { font-size: 24px !important; }
  .m-steps { height: 190px !important; gap: 3px !important; padding-top: 12px !important; }
  .fx-degrau-labels { font-size: 9px !important; letter-spacing: .02em !important; gap: 3px !important; }

  /* ── professionals: three cards and the Coach panel demo ── */
  .m-pros { gap: 14px !important; }
  .m-panel > div { border-radius: 22px !important; }
  .m-panel > div > div:last-child { padding: 18px !important; gap: 16px !important; }
  .m-panel > div > div:last-child > div:first-child b { font-size: 21px !important; }
  .m-panel div[style*="minmax(170px, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .m-panel div[style*="minmax(170px, 1fr)"] > div { padding: 14px !important; border-radius: 14px !important; }
  .m-panel div[style*="minmax(170px, 1fr)"] b { font-size: 28px !important; }
  /* Rows: avatar beside the name and status; the action sits under them. */
  .m-panel div[style*="padding: 14px 18px"], .m-gympanel div[style*="padding: 14px 16px"] { display: grid !important; grid-template-columns: 34px minmax(0, 1fr); align-items: start; column-gap: 12px !important; row-gap: 3px !important; padding: 12px 14px !important; }
  .m-panel div[style*="padding: 14px 18px"] > :nth-child(1), .m-gympanel div[style*="padding: 14px 16px"] > :nth-child(1) { grid-row: 1 / span 3; }
  .m-panel div[style*="padding: 14px 18px"] > :nth-child(n+2), .m-gympanel div[style*="padding: 14px 16px"] > :nth-child(n+2) { grid-column: 2; }
  .m-panel div[style*="padding: 14px 18px"] > :nth-child(2) { font-size: 14px !important; }
  .m-panel div[style*="padding: 14px 18px"] > :nth-child(3) { font-size: 13px !important; line-height: 1.35; }
  .m-panel div[style*="padding: 14px 18px"] > :last-child:not(:nth-child(-n+3)), .m-gympanel div[style*="padding: 14px 16px"] > :nth-child(3) { justify-self: start; margin-top: 6px; padding: 6px 10px !important; font-size: 12px !important; }

  /* ── GRADUS GYM block ────────────────────────────────────── */
  .m-gympanel { padding: 18px !important; border-radius: 22px !important; gap: 14px !important; }
  .m-gympanel div[style*="minmax(140px, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .m-gympanel div[style*="minmax(140px, 1fr)"] b { font-size: 28px !important; }
  #academia div[style*="padding: 22px; border-radius: 22px"] { padding: 16px 18px !important; border-radius: 18px !important; }
  .m-offer { padding: 26px 22px !important; border-radius: 26px !important; gap: 22px !important; }
  .m-offer > div { flex-basis: 100% !important; }

  /* ── plans ───────────────────────────────────────────────── */
  #planos div[role="group"] { width: 100%; }
  #planos div[role="group"] > button { flex: 1; padding: 0 10px !important; font-size: 14px !important; }
  .m-plans { gap: 12px !important; }
  .m-plans > article { padding: 22px !important; gap: 10px !important; border-radius: 22px !important; }
  .m-plans > article > b { font-size: 38px !important; }
  #planos div[style*="padding: 26px 30px"] { padding: 20px !important; border-radius: 20px !important; }

  /* ── FAQ ─────────────────────────────────────────────────── */
  .lp summary { min-height: 60px !important; padding-block: 14px !important; font-size: 16px !important; gap: 14px !important; }
  .lp details > p { padding: 0 0 18px !important; font-size: 15px !important; }
  #duvidas .wrap { gap: 24px !important; }

  /* ── final call to action ────────────────────────────────── */
  section[aria-labelledby="cta-title"] { padding-block: 64px 72px !important; }
  section[aria-labelledby="cta-title"] h2 { font-size: clamp(48px, 15vw, 64px) !important; line-height: .92 !important; }
  .m-ctas, section[aria-labelledby="cta-title"] div:has(> a.cta-p) { flex-direction: column; align-items: stretch !important; width: 100%; max-width: 360px; }
  .m-ctas > a, section[aria-labelledby="cta-title"] div:has(> a.cta-p) > a { justify-content: center; min-height: 54px !important; }

  /* ── footer: two columns of links ────────────────────────── */
  .m-foot { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px !important; padding-block: 40px 24px !important; }
  .m-foot > div:first-child { grid-column: 1 / -1; }
  .m-foot nav { gap: 2px !important; }
  .m-foot nav b { margin-bottom: 6px; }
  .lp .m-foot nav a { min-height: 38px !important; font-size: 14px; }
  .m-foot nav[aria-label="Contato"] { grid-column: 1 / -1; }
}

/* ═══ professional pages (Coach · Nutri · GYM) ═══ */
@media (max-width: 760px) {
  /* Hero demo panel: the desktop layout reserved room on the right for a floating phone that phones don't show. */
  [data-fx="hero-visual"] > div { border-radius: 22px !important; }
  [data-fx="hero-visual"] div[style*="padding-right: clamp"] { padding: 18px !important; gap: 16px !important; }
  [data-fx="hero-visual"] b[style*="font-size: 28px"] { font-size: 22px !important; }

  /* "Por dentro do painel": compact tabs and a screenshot you can pan sideways at a readable size. */
  .pnl-tabs { gap: 8px !important; }
  .pnl-tab { padding: 12px 10px !important; border-radius: 14px !important; align-items: center; text-align: center !important; }
  .pnl-tab b { font-size: 13.5px !important; line-height: 1.2; }
  .pnl-shot { overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .pnl-shot::-webkit-scrollbar { display: none; }
  .pnl-shot img { width: 880px !important; max-width: none !important; }
  .pnl-frame::after { content: '← Arraste para ver o painel inteiro →'; display: block; padding: 10px 14px; border-top: 1px solid #1b2027; background: #11151a; color: #9aa4b2; font-size: 12px; font-weight: 600; text-align: center; }

  /* Before → after strip: one per line, tighter. */
  section[aria-label^="Antes e depois"] .wrap > div { padding: 18px 0 !important; border-left: 0 !important; border-top: 1px solid #1b2027; }
  section[aria-label^="Antes e depois"] .wrap > div:first-child { border-top: 0; }
  section[aria-label^="Antes e depois"] b { font-size: 18px !important; }
}

@media (max-width: 760px) {
  /* Coach hero: week chips and the exercise table re-flowed. */
  [data-fx="hero-visual"] div[style*="repeat(7, minmax(0, 1fr))"] { gap: 4px !important; }
  [data-fx="hero-visual"] div[style*="repeat(7, minmax(0, 1fr))"] > span { padding: 8px 1px !important; border-radius: 10px !important; }
  [data-fx="hero-visual"] div[style*="repeat(7, minmax(0, 1fr))"] > span b[style*="font-size: 13px"] { font-size: 11px !important; }
  [data-fx="hero-visual"] div[style*="repeat(7, minmax(0, 1fr))"] > span[style*="dashed"] > span { font-size: 0 !important; }
  [data-fx="hero-visual"] div[style*="repeat(7, minmax(0, 1fr))"] > span[style*="dashed"] > span::after { content: 'folga'; font-size: 10px; }
  [data-fx="hero-visual"] .num[style*="minmax(0, 2.4fr)"] { grid-template-columns: repeat(3, max-content) !important; column-gap: 16px !important; row-gap: 3px !important; padding: 11px 14px !important; }
  [data-fx="hero-visual"] .num[style*="minmax(0, 2.4fr)"] > b { grid-column: 1 / -1; }
  [data-fx="hero-visual"] div[style*="justify-content: space-between; align-items: center; padding: 14px 18px"] { flex-direction: column; align-items: flex-start !important; gap: 2px; padding: 12px 14px !important; }
  /* Periodização: three phase cards side by side, sized for a phone. */
  #programas div[style*="padding: 28px; border-radius: 26px"], #programas div[style*="padding: 24px 28px; border-radius: 26px"] { padding: 18px !important; border-radius: 20px !important; }
  #programas .num[style*="repeat(3, minmax(0, 1fr))"] { gap: 8px !important; }
  #programas .num[style*="repeat(3, minmax(0, 1fr))"] > div { padding: 12px 10px !important; border-radius: 14px !important; }
  #programas .num[style*="repeat(3, minmax(0, 1fr))"] > div > span:first-child { font-size: 10px !important; letter-spacing: .03em !important; }
  #programas .num[style*="repeat(3, minmax(0, 1fr))"] > div > b { font-size: 18px !important; }
  /* Nutri hero: the weekly menu fits the screen (letters only). */
  .mx { overflow: hidden !important; }
  .mx > div[style*="min-width: 560px"] { min-width: 0 !important; grid-template-columns: 76px repeat(7, minmax(0, 1fr)) !important; font-size: 11px !important; }
  .mx > div[style*="min-width: 560px"] > b[style*="padding: 12px 4px"] { padding: 10px 0 !important; font-size: 10px; }
  .mx > div[style*="min-width: 560px"] > b[style*="padding: 12px 14px"] { padding: 10px 8px !important; line-height: 1.2; }
  .mx > div[style*="min-width: 560px"] > span { padding: 6px 1px !important; }
  .mx > div[style*="min-width: 560px"] > span > span { padding: 3px 6px !important; border-radius: 6px !important; }
}

@media (max-width: 760px) {
  /* Checkout: the main buttons span the column. */
  form button[type="submit"] { width: 100%; justify-content: center; }
}
