/* Centro Terapêutico São Rafael — Mobile app shell */
:root {
  --md-primary: #0A2E1C;
  --md-primary-container: #D4EDE0;
  --md-on-primary: #FFFFFF;
  --md-secondary: #C9A227;
  --md-surface: #FBFCFA;
  --md-surface-container: #EEF2EF;
  --md-surface-high: #E4EBE6;
  --md-on-surface: #121C18;
  --md-on-variant: #4A5C54;
  --md-outline: #C5D0CA;
  --md-whatsapp: #25D366;
  --md-whatsapp-dark: #128C7E;
  --md-elevation-1: 0 1px 2px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.08);
  --md-elevation-2: 0 2px 6px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
  --md-elevation-fab: 0 6px 14px rgba(37,211,102,.35), 0 2px 8px rgba(0,0,0,.12);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --app-bar-h: 56px;
  --bottom-nav-h: 64px;
  --fab-offset: 28px;
  --font: 'Sora', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.android-app {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--md-on-surface);
  background: var(--md-surface-container);
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 20px);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  box-shadow: 0 0 0 1px var(--md-outline);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  line-height: 1;
  user-select: none;
}

/* App bar */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--app-bar-h) + var(--safe-t));
  padding: var(--safe-t) 8px 0 12px;
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: var(--md-elevation-2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.brand__logo {
  height: 34px;
  width: 34px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}
.brand__name {
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.app-bar__end { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
}
.icon-btn:active { background: rgba(255,255,255,.12); }
.md-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,.12);
}
.md-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,.25);
  animation: pulseDot 1.8s ease infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.app-content { padding: 12px 12px 8px; }

/* Hero surface */
.hero-surface {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px 18px 20px;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(10,46,28,.55) 0%, rgba(6,22,16,.9) 100%),
    url("../assets/fotos/fachada.jpg") center/cover no-repeat;
}
  box-shadow: var(--md-elevation-2);
  margin-bottom: 12px;
}
.hero-surface::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -40px;
  top: -40px;
  background: radial-gradient(circle, rgba(245,197,24,.35), transparent 70%);
  pointer-events: none;
}
.hero-surface__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  backdrop-filter: blur(6px);
}
.hero-surface__badge .material-symbols-outlined { font-size: 16px; }
.hero-surface h1 {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.hero-surface h1 em {
  font-style: italic;
  color: #E0B83A;
}
.hero-surface > p {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.86);
  font-size: 13.5px;
  margin-bottom: 16px;
  max-width: 34ch;
}
.hero-surface__actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 8px;
}

.md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.md-btn--filled { background: #fff; color: var(--md-primary); }
.md-btn--whatsapp { background: var(--md-whatsapp); color: #062116; }
.md-btn--tonal {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}
.md-btn .material-symbols-outlined { font-size: 18px; }

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.metric-card {
  background: var(--md-surface);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  box-shadow: var(--md-elevation-1);
}
.metric-card__num {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 650;
  color: var(--md-primary);
  line-height: 1.1;
}
.metric-card__label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-top: 2px;
}
.metric-card__sublabel {
  display: block;
  font-size: 11px;
  color: var(--md-on-variant);
}

/* Blocks */
.surface-block {
  background: var(--md-surface);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  margin-bottom: 12px;
  box-shadow: var(--md-elevation-1);
}
.surface-block--blue {
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(21, 115, 57, .16), transparent 65%),
    linear-gradient(160deg, #D4EDE0 0%, #EAF6EF 55%, #F4FAF6 100%);
  border: 1px solid rgba(10, 46, 28, .06);
}
.m-section__title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--md-primary);
  margin-bottom: 4px;
}
.m-section__sub {
  font-size: 12.5px;
  color: var(--md-on-variant);
  margin-bottom: 14px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.section-header__hint {
  font-size: 11px;
  color: var(--md-on-variant);
  white-space: nowrap;
}

/* Cards / list */
.m-card {
  background: var(--md-surface-container);
  border-radius: var(--radius-md);
  padding: 14px;
}
.m-card__leading {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--md-primary-container);
  color: var(--md-primary);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.m-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.m-card p {
  font-size: 12.5px;
  color: var(--md-on-variant);
}

.md-carousel__viewport {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.md-carousel__viewport::-webkit-scrollbar { display: none; }
.md-carousel__slide {
  flex: 0 0 78%;
  scroll-snap-align: start;
}
.md-carousel--photos .md-carousel__slide {
  flex-basis: 100%;
}
.md-carousel__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.md-carousel__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--md-surface-high);
  color: var(--md-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.md-carousel__dots { display: flex; gap: 6px; }
.md-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: var(--md-outline);
  padding: 0;
  cursor: pointer;
}
.md-carousel__dot--active {
  background: var(--md-primary);
  width: 18px;
  border-radius: 999px;
}
.stars {
  color: #E0B83A;
  font-size: 13px;
  letter-spacing: .12em;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(201,162,39,.24);
}
.testimonial-card-mobile {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(180px 90px at 15% 0%, rgba(201,162,39,.16), transparent 70%),
    var(--md-surface-container);
}
.testimonial-card-mobile p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--md-on-surface);
  margin-bottom: 12px;
}
.testimonial-card-mobile cite {
  display: block;
  color: var(--md-primary);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.facility {
  background: var(--md-surface-container);
  border-radius: 12px;
  padding: 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.facility .material-symbols-outlined {
  font-size: 20px;
  color: var(--md-primary);
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}
.photo-strip a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-strip a:first-child { grid-row: span 2; aspect-ratio: auto; height: 100%; }

/* Lightbox */
body.is-lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-t) + 54px) 12px calc(var(--safe-b) + 92px);
  background: rgba(5, 13, 10, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  backdrop-filter: blur(10px);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox__frame {
  width: 100%;
  display: grid;
  gap: 10px;
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
}
.lightbox.is-open .lightbox__frame {
  transform: none;
}
.lightbox__image {
  width: 100%;
  max-height: calc(100dvh - var(--bottom-nav-h) - 170px);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.lightbox__caption {
  justify-self: center;
  max-width: 92%;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  text-align: center;
}
.lightbox__close {
  position: fixed;
  top: calc(var(--safe-t) + 10px);
  right: 12px;
  z-index: 2001;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.lightbox__close:active {
  transform: scale(.96);
  background: rgba(255,255,255,.24);
}

/* FAQ expansion */
.md-expansion__panel {
  border-bottom: 1px solid var(--md-outline);
}
.md-expansion__panel:last-child { border-bottom: 0; }
.md-expansion__panel summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 2px;
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
}
.md-expansion__panel summary::-webkit-details-marker { display: none; }
.md-expansion__arrow {
  color: var(--md-on-variant);
  transition: transform .2s;
}
.md-expansion__panel[open] .md-expansion__arrow { transform: rotate(180deg); }
.m-faq__answer {
  padding: 0 2px 14px;
  font-size: 13px;
  color: var(--md-on-variant);
}

.cta-sheet {
  background: linear-gradient(160deg, var(--md-primary), #16352c);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: var(--md-elevation-2);
}
.cta-sheet h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 6px;
}
.cta-sheet p {
  font-size: 13px;
  color: rgba(255,255,255,.78);
  margin-bottom: 14px;
}

.m-footer {
  text-align: center;
  padding: 18px 8px 8px;
  color: var(--md-on-variant);
  font-size: 12px;
}
.m-footer__emergency {
  margin: 12px 4px 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  text-align: left;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--md-on-variant);
}
.m-footer__emergency strong {
  display: block;
  color: var(--md-primary);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.m-footer__emergency a {
  color: var(--md-primary);
  font-weight: 700;
}
.m-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--md-primary);
  font-weight: 700;
}
.m-footer__brand img {
  width: 32px;
  height: 32px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}
.m-footer__social {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
}
.m-footer__social a,
.m-footer .btn-ig {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 6px 16px rgba(188, 24, 136, .28);
}
.m-footer__social a svg,
.m-footer .btn-ig svg {
  width: 16px;
  height: 16px;
}
.m-footer a { color: var(--md-on-variant); }

/* Bottom nav + FAB */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 1100;
  display: flex;
  align-items: stretch;
  height: calc(var(--bottom-nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--md-surface);
  border-top: 1px solid var(--md-outline);
  box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--md-on-variant);
  font-size: 10px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav__item .material-symbols-outlined { font-size: 22px; }
.bottom-nav__item--active { color: var(--md-primary); }
.bottom-nav__item--active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.bottom-nav__fab-gap { flex: 0 0 72px; }

.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b) - var(--fab-offset));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--md-whatsapp);
  color: #062116;
  font-weight: 800;
  font-size: 13px;
  box-shadow: var(--md-elevation-fab);
  -webkit-tap-highlight-color: transparent;
}
.fab:active {
  transform: translateX(-50%) scale(.96);
  background: var(--md-whatsapp-dark);
  color: #fff;
}
.fab .material-symbols-outlined { font-size: 22px; }

@media (min-width: 769px) {
  body.android-app {
    /* still readable if opened on desktop intentionally */
  }
}

.hero-surface__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}
.hero-surface__pills span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 162, 39, .22);
  border: 1px solid rgba(224, 184, 58, .45);
  color: #F5E6B0;
  font-size: 11px;
  font-weight: 800;
}
.m-video {
  margin: 0 auto 14px;
  max-width: 320px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--md-elevation-1);
}
.m-video video {
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #000;
}
.m-video figcaption {
  padding: 10px 12px 12px;
  background: var(--md-surface);
  font-size: 13px;
  font-weight: 700;
  color: var(--md-primary);
}

/* Entradas mobile */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
.reveal--left { transform: translateX(-28px); }
.reveal--right { transform: translateX(28px); }
.reveal--up { transform: translateY(32px); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal-stagger.reveal-stagger--left > * { transform: translateX(-22px); }
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .2s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .28s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: .36s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: .44s; }

.hero-surface__pills,
.hero-surface__badge,
.hero-surface h1,
.hero-surface > p,
.hero-surface__actions {
  opacity: 0;
  animation: mRise .75s cubic-bezier(.22,1,.36,1) both;
}
.hero-surface__pills { animation-delay: .08s; }
.hero-surface__badge { animation-delay: .16s; }
.hero-surface h1 { animation-delay: .24s; }
.hero-surface > p { animation-delay: .34s; }
.hero-surface__actions { animation-delay: .44s; }
@keyframes mRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.metrics-grid.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.metrics-grid.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: .12s; }
.metrics-grid.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: .19s; }
.metrics-grid.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: .26s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *,
  .hero-surface__pills, .hero-surface__badge, .hero-surface h1,
  .hero-surface > p, .hero-surface__actions {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
