/**
 * Mobile UI refinements — complementa main.css até próximo build.
 * Breakpoints: 1023px (tablet), 767px (mobile).
 */

@media (max-width: 1023px) {
  :root {
    /* top-bar min-h-[38px] + header-inner h-20 (80px) */
    --emir-header-top-bar: 38px;
    --emir-header-nav: 80px;
    --emir-header-total: 118px;
    --emir-page-header-gap: 1.75rem;
  }

  .home-surgeries {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }h

  .home-surgeries .home-section-title {
    font-size: 1.625rem;
    line-height: 1.35;
  }

  .home-surgeries__subtitle {
    margin-top: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.65;
  }

  .page-shell,
  .page-sobre-hero.page-shell {
    padding-top: calc(var(--emir-header-total) + var(--emir-page-header-gap));
  }

  .page-intro__title {
    font-size: 1.875rem;
    line-height: 1.35;
  }

  .page-cirurgia-content__title {
    font-size: 1.625rem;
    line-height: 1.35;
    margin: 3rem auto 1.5rem;
  }

  .page-cirurgia-faq__title {
    font-size: 1.375rem;
    line-height: 1.4;
    margin: 3rem auto 1.5rem;
  }
}

@media (max-width: 767px) {
  :root {
    /* top-bar min-h-8 (32px) + header-inner h-16 (64px) */
    --emir-header-top-bar: 32px;
    --emir-header-nav: 64px;
    --emir-header-total: 96px;
    --emir-page-header-gap: 2rem;
  }

  body {
    font-size: 1rem;
    line-height: 1.65;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Footer fica fora de .site-main; padding aqui expunha faixa branca (body.bg-white). */
  .site-main {
    padding-bottom: 0;
  }

  .container-emir,
  .site-header .container-emir {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .top-bar {
    min-height: 2rem;
  }

  .site-header .header-inner .container-emir {
    height: 4rem;
  }

  .site-header .header-inner .container-emir img {
    height: 2rem;
  }

  /* ── Header offset (não zerar padding-top nas heros) ── */

  .page-shell,
  .page-sobre-hero.page-shell {
    padding-top: calc(var(--emir-header-total) + var(--emir-page-header-gap));
    padding-bottom: max(5rem, calc(3rem + env(safe-area-inset-bottom, 0))) !important;
  }

  .page-sobre-hero {
    padding-bottom: 2.5rem;
  }

  .page-sobre-hero.page-shell {
    padding-bottom: max(3rem, calc(2rem + env(safe-area-inset-bottom, 0))) !important;
  }

  /* ── Page intro / heros internos ── */

  .page-intro__title,
  .page-sobre-hero__title {
    margin-top: 0;
  }

  .page-intro__title {
    max-width: none;
    font-size: 1.75rem;
    line-height: 1.35;
  }

  .page-intro__subtitle {
    margin-top: 1.25rem;
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
  }

  /* ── Sobre ── */

  .page-sobre-hero__grid {
    gap: 2rem;
  }

  .page-sobre-hero__title {
    font-size: 1.75rem;
    line-height: 1.35;
  }

  .page-sobre-hero__crm,
  .page-sobre-hero__role {
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.65;
  }

  .page-sobre-hero__body {
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
    background: transparent;
  }

  .page-sobre-hero__body .page-sobre-hero__badges,
  .page-sobre-hero__badges {
    margin-top: 2rem;
    gap: 1.5rem;
  }

  .page-sobre-hero__badge-logo {
    max-height: 3.25rem;
    width: auto;
    filter: grayscale(100%) brightness(1.05);
    mix-blend-mode: multiply;
  }

  .page-sobre-hero__media {
    position: relative;
    width: 100%;
    max-width: none;
    margin-top: 0.5rem;
    overflow: hidden;
    background-color: #d6d6d6;
    border-radius: 0;
    box-shadow: none;
  }

  .page-sobre-hero__media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    mix-blend-mode: multiply;
    filter: grayscale(100%) contrast(1.08) brightness(1.02);
    opacity: 0.92;
    border-radius: 0;
    box-shadow: none;
  }

  .page-sobre-diferenciais__title,
  .page-sobre-equipe__title,
  .page-sobre-estrutura__title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .page-sobre-equipe__intro {
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
  }

  /* ── Exames ── */

  .page-exame-item__title {
    max-width: none;
    font-size: 1.375rem;
    line-height: 1.4;
  }

  .page-exame-item__body {
    line-height: 1.65;
  }

  /* ── Single cirurgia ── */

  .page-cirurgia-content {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .page-cirurgia-content__title {
    max-width: none;
    font-size: 1.5rem;
    line-height: 1.35;
    margin: 2rem auto 1.25rem;
  }

  .page-cirurgia-content__body,
  .prose-emir {
    max-width: none;
    line-height: 1.65;
  }

  .page-cirurgia-faq {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .page-cirurgia-faq__title {
    max-width: none;
    font-size: 1.25rem;
    line-height: 1.4;
    margin: 2rem auto 1.25rem;
  }

  .page-cirurgia-faq__list {
    margin-top: 1.5rem;
  }

  .page-cirurgia-faq .faq-item summary {
    line-height: 1.5;
  }

  .page-cirurgia-faq__answer {
    line-height: 1.65;
  }

  /* ── Contato ── */

  .section-contato__title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .section-contato__address {
    line-height: 1.65;
  }

  /* ── Home ── */

  .home-hero__title {
    max-width: none;
    font-size: 1.75rem;
    line-height: 1.35;
  }

  .home-hero__subtitle {
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
  }

  .home-section-kicker {
    font-size: 1.75rem;
    line-height: 1.35;
  }

  .home-section-title {
    font-size: 1.375rem;
    line-height: 1.4;
  }

  .home-incomoda__title,
  .home-testimonials__title,
  .home-instagram__title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .home-incomoda__subtitle {
    font-size: 1rem;
    line-height: 1.65;
  }

  .home-clinic__body {
    max-width: none;
    line-height: 1.65;
  }

  .home-surgeries {
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  .home-surgeries .home-section-title {
    max-width: none;
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .home-surgeries__subtitle {
    margin-top: 1.25rem;
    max-width: none;
    font-size: 1rem;
    line-height: 1.65;
  }

  .home-surgeries__grid {
    margin-top: 2.5rem;
  }


  /* ── CTAs: texto em uma linha ── */
  .btn,
  .home-hero__actions .btn,
  .home-incomoda__cta .btn,
  .home-surgeries__cta .btn,
  .section-contato__form .ff-btn-submit button,
  .section-contato__form .ff-btn-submit input[type="submit"],
  .header-cta {
    white-space: nowrap;
    width: auto;
    max-width: none;
    min-width: min(100%, 17.5rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
  }

  .home-hero__actions {
    width: 100%;
    max-width: none;
    flex-direction: column;
    gap: 0.75rem;
  }

  .home-hero__actions .btn {
    width: auto;
    min-width: 12.5rem;
  }

  .home-incomoda__cta .btn {
    width: auto;
    min-width: 12.5rem;
    max-width: none;
  }

  .home-surgeries__cta .btn {
    width: auto;
    min-width: 15rem;
    max-width: none;
  }

  /* ── Home hero ── */
  .home-hero {
    min-height: 640px;
  }

  .home-hero__content {
    min-height: 640px;
    padding-top: calc(var(--emir-header-total) + 1.5rem);
    padding-bottom: 2.5rem;
  }

  .home-hero__title {
    font-size: 1.5rem;
    line-height: 1.3;
    max-width: none;
  }

  .home-hero__subtitle {
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    max-width: none;
  }

  .home-hero__actions {
    margin-top: 1.5rem;
  }

  /* ── Incomoda (olhar) ── */
  .home-incomoda__title {
    font-size: 1.375rem;
    line-height: 1.35;
    max-width: none;
  }

  .home-incomoda__subtitle {
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .home-incomoda__card-text {
    font-size: 0.8125rem;
    line-height: 1.35;
    white-space: nowrap;
  }

  /* ── Depoimentos ── */
  .home-testimonials {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .home-testimonials__kicker {
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .home-testimonials__title {
    margin-top: 0.5rem;
    font-size: 1.375rem;
    line-height: 1.35;
    max-width: none;
  }

  .home-testimonials__carousel {
    margin-top: 1.5rem;
  }

  .home-testimonials__quote {
    line-height: 1.65;
  }

  .home-testimonials__dots {
    margin-top: 1rem;
  }

  /* ── Instagram ── */
  .home-instagram {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .home-instagram__kicker {
    font-size: 1rem;
    line-height: 1.4;
  }

  .home-instagram__title {
    margin-top: 0.5rem;
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .home-instagram__grid {
    margin-top: 1.5rem;
    gap: 0.5rem;
  }

  /* ── Contato ── */
  .section-contato {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .section-contato__icon {
    margin-bottom: 1.5rem;
    height: 4.5rem;
    width: 4.5rem;
  }

  .section-contato__title {
    font-size: 1.5rem;
    line-height: 1.25;
    white-space: nowrap;
  }

  .section-contato__phones {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .section-contato__address {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.65;
  }

  /* ── Single cirurgia content + FAQ ── */
  .page-cirurgia-content__title {
    font-size: 1.375rem;
    line-height: 1.35;
    margin: 1.5rem auto 1rem;
  }

  .page-cirurgia-content__body {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  .page-cirurgia-faq {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .page-cirurgia-faq__title {
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 0 auto 1rem;
    max-width: none;
  }

  .section-contato:last-of-type {
    margin-bottom: 0;

  .home-hero {
    min-height: auto;
  }

  .home-hero__content {
    min-height: min(100svh, 720px);
  }

  .home-instagram__title {
    white-space: nowrap;
  }

  .home-testimonials__card {
    min-height: auto;
    padding: 1.5rem 1.25rem;
  }

  .page-cirurgia-faq .faq-item summary {
    font-size: 0.8125rem;
    line-height: 1.4;
  }

  .page-intro__title {
    font-size: 1.375rem;
  }
  }
