/*
  CORREÇÃO RESPONSIVA — TELEFONES
  Todas as regras visuais abaixo estão limitadas a telas de até 700 px.
  O layout aprovado para desktop permanece intocado.
*/

.mobile-nav-toggle{
  display: none;
}

@media (max-width: 700px){
  html{
    overflow-x: hidden;
    scroll-padding-top: 4.4rem;
  }

  body{
    min-width: 0;
    overflow-x: hidden;
    font-size: 1rem;
    line-height: 1.55;
  }

  main{
    width: 100%;
    padding: 1rem .75rem 2rem;
  }

  main > section{
    width: 100%;
    min-width: 0;
    scroll-margin-top: 7.2rem;
  }

  /* Cabeçalho compacto */
  .section-header{
    padding: .78rem 0 .72rem;
  }

  .section-header .brand{
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: .7rem;
    padding: 0 .85rem;
  }

  .section-header .brand-text{
    justify-self: start;
    text-align: left;
  }

  .section-header h1{
    font-size: clamp(1.55rem, 7.4vw, 1.95rem);
    line-height: 1.05;
  }

  .section-header p{
    margin-top: .2rem;
    font-size: .8rem;
    line-height: 1.3;
  }

  .brand-logo-wrap,
  .section-header .brand-logo-wrap{
    width: 56px;
    height: 56px;
    padding: 3px;
    border-radius: 14px;
  }

  .section-header .brand-logo-img{
    border-radius: 11px;
  }

  /* Menu móvel acessível; o menu horizontal do desktop não é alterado. */
  .mobile-nav-toggle{
    position: sticky;
    top: 0;
    z-index: 95;
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(8,43,77,.14);
    background: rgba(255,255,255,.98);
    color: #082b4d;
    box-shadow: 0 8px 22px rgba(8,43,77,.12);
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    backdrop-filter: blur(10px);
  }

  .mobile-nav-toggle-icon{
    display: grid;
    width: 25px;
    gap: 4px;
  }

  .mobile-nav-toggle-icon i{
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(1){
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(2){
    opacity: 0;
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon i:nth-child(3){
    transform: translateY(-6px) rotate(-45deg);
  }

  .main-nav{
    position: sticky;
    top: 52px;
    z-index: 94;
    display: none;
    width: 100%;
    max-height: calc(100dvh - 52px);
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: .35rem;
    padding: .6rem .75rem .75rem;
    overflow: auto;
    background: rgba(255,255,255,.99);
    border-bottom: 1px solid rgba(8,43,77,.14);
    box-shadow: 0 14px 28px rgba(8,43,77,.15);
  }

  .main-nav.is-open{
    display: grid;
  }

  .main-nav a,
  .main-nav .nav-access-btn{
    width: 100%;
    max-width: none;
    min-height: 42px;
    justify-content: flex-start;
    margin: 0;
    padding: .58rem .75rem;
    border-radius: 9px;
    font-size: .94rem;
    line-height: 1.25;
    text-align: left;
  }

  .main-nav a{
    color: #082b4d;
  }

  .main-nav .nav-access-btn{
    justify-content: center;
    border-color: #082b4d;
    background: #082b4d;
    color: #fff;
    text-align: center;
  }

  /* Apresentação do profissional */
  #inicio{
    margin: 0 0 1rem;
  }

  .profile-hero{
    min-height: 0;
    grid-template-columns: 1fr;
    gap: .9rem;
    justify-items: center;
    margin: 0 0 .9rem;
    padding: 1.2rem 1rem 1.3rem;
    border-radius: 20px;
    text-align: center;
  }

  .profile-hero-media{
    gap: .45rem;
    padding-top: 0;
  }

  .profile-hero-photo{
    width: 112px;
    height: 140px;
    border-width: 3px;
    outline-width: 2px;
    outline-offset: 3px;
  }

  .profile-hero-lattes{
    margin-top: .35rem;
    font-size: .76rem;
  }

  .profile-hero-content{
    width: 100%;
    min-width: 0;
    align-items: center;
    padding-top: 0;
  }

  .profile-hero-kicker{
    margin: 0 0 .6rem;
    padding: .4rem .65rem;
    font-size: .7rem;
    line-height: 1.3;
    letter-spacing: .07em;
  }

  .profile-hero-name{
    max-width: 19ch;
    margin: 0 auto .7rem;
    font-size: clamp(1.7rem, 8vw, 2rem);
    line-height: 1.08;
    letter-spacing: -.025em;
    white-space: normal;
    text-align: center;
    text-wrap: balance;
  }

  .profile-hero-role{
    display: grid;
    justify-items: center;
    gap: .55rem;
    margin-bottom: .8rem;
  }

  .profile-hero-badge{
    min-height: 32px;
    padding: .3rem .65rem;
    font-size: .88rem;
  }

  .profile-hero-role-text{
    max-width: 28ch;
    font-size: .92rem;
    line-height: 1.45;
  }

  .profile-hero-summary,
  .service-desc,
  .service-card .service-desc,
  #sobre .service-desc{
    font-size: 1rem;
    line-height: 1.58;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    text-align: left;
  }

  .profile-hero-actions{
    display: grid;
    width: 100%;
    gap: .65rem;
    justify-items: center;
    margin-top: .85rem;
  }

  .profile-hero-actions .cta-btn,
  .profile-hero-actions .cta-btn--ghost{
    width: 100%;
    max-width: 310px;
    min-height: 44px;
  }

  /* Carrossel: mantém todas as imagens e o movimento sem recorte. */
  .carousel-container{
    width: 100%;
    height: auto;
    aspect-ratio: 880 / 378;
    margin: .85rem 0 1.1rem;
    border-width: 4px;
    border-radius: 17px;
  }

  .carousel-item img{
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .carousel-prev,
  .carousel-next{
    width: 36px;
    height: 44px;
    font-size: 1.5rem;
  }

  .carousel-prev{ left: 5px; }
  .carousel-next{ right: 5px; }

  .carousel-dots{
    bottom: 4px;
    gap: 5px;
    padding: 4px 7px;
  }

  .carousel-dots button{
    width: 7px;
    height: 7px;
  }

  .carousel-dots button[aria-current="true"]{
    width: 18px;
  }

  /* Seções, serviços e conteúdos */
  #sobre,
  #servicos,
  #publicacoes,
  #contato{
    width: 100%;
    margin: 1rem 0;
    padding: 1.25rem 1rem;
    border-radius: 19px;
  }

  #sobre::before,
  #servicos::before,
  #publicacoes::before,
  #contato::before{
    top: .9rem;
    right: .9rem;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: .82rem;
  }

  #sobre > h2,
  #servicos > h2,
  #publicacoes > h2,
  #contato > h2{
    max-width: calc(100% - 50px);
    margin-bottom: .8rem;
    padding-right: 0;
    padding-bottom: .55rem;
    font-size: clamp(1.75rem, 8.4vw, 2.05rem);
    line-height: 1.08;
    text-wrap: balance;
  }

  #sobre .cta-btn,
  .service-card .cta-btn{
    width: 100%;
    max-width: 310px;
    min-height: 44px;
  }

  .services-grid,
  .conteudos-grid{
    grid-template-columns: 1fr;
    gap: .85rem;
    margin-top: 1rem;
  }

  .service-card{
    min-height: 0;
    gap: .7rem;
    padding: 1.25rem 1rem 1.05rem;
    border-radius: 17px;
  }

  .service-card::before{
    height: 6px;
  }

  .service-card::after{
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: .9rem;
  }

  .service-title{
    max-width: calc(100% - 52px);
    font-size: 1.55rem;
    line-height: 1.12;
  }

  .conteudos-intro{
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.58;
    text-align: left;
  }

  .principios-lista{
    justify-content: flex-start;
    gap: .45rem;
    margin: 0 0 1rem;
  }

  .principios-lista li{
    flex: 0 1 auto;
    margin: 0;
    padding: .48rem .68rem;
    font-size: .8rem;
    line-height: 1.15;
  }

  .conteudo-card{
    min-height: 0;
    gap: .45rem;
    padding: 1.35rem 1rem 1.1rem;
    border-radius: 17px;
  }

  .conteudo-card::before{
    height: 6px;
  }

  .conteudo-card::after{
    top: 1rem;
    right: 1rem;
    font-size: 2.35rem;
  }

  .conteudo-card-titulo{
    max-width: calc(100% - 52px);
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .conteudo-card-desc{
    font-size: .96rem;
    line-height: 1.5;
  }

  /* Contato e cartão digital em uma coluna, sem alturas artificiais. */
  #contato{
    display: block;
  }

  #contato > * + *{
    margin-top: .85rem;
  }

  #contato-form{
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 16px;
  }

  #contato-form label{
    font-size: .94rem;
  }

  #contato-form input,
  #contato-form textarea{
    min-height: 46px;
    padding: .68rem .75rem;
    font-size: 16px;
  }

  #contato-form textarea{
    min-height: 118px;
  }

  #contato-form .main-btn{
    width: 100%;
    min-height: 44px;
  }

  #contato > p{
    padding: .8rem .9rem;
    font-size: .94rem;
    line-height: 1.45;
  }

  #contato > ul{
    gap: .45rem;
  }

  #contato > ul a{
    min-height: 42px;
    padding: .58rem .75rem;
    border-radius: 10px;
    font-size: .94rem;
  }

  #contato > .qrcode-container{
    width: 100%;
    max-width: none;
    gap: .55rem;
    padding: 1rem;
    border-top-width: 5px;
    border-radius: 16px;
  }

  .qrcode-container h3{
    font-size: 1.45rem;
  }

  .qrcode-copy{
    max-width: 28ch;
    font-size: .88rem;
  }

  .qrcode-container img{
    width: 116px;
    border-width: 6px;
  }

  .qrcode-actions{
    flex-direction: row;
    gap: .5rem;
    margin-top: .25rem;
  }

  .qrcode-actions .cta-btn{
    width: auto;
    max-width: none;
    min-height: 42px;
    padding: .55rem .8rem;
  }

  /* Modais */
  .access-backdrop{
    padding: .65rem;
  }

  .access-modal,
  .restricted-modal{
    width: calc(100vw - 1.3rem);
    max-height: calc(100dvh - 1.3rem);
    padding: 1.2rem;
    border-radius: 17px;
  }

  .access-close{
    top: .55rem;
    right: .55rem;
  }

  /* Rodapé, WhatsApp e reCAPTCHA sem sobreposição. */
  footer{
    padding: 1.15rem 1rem calc(1.35rem + env(safe-area-inset-bottom));
    font-size: .84rem;
    line-height: 1.55;
  }

  footer p{
    max-width: 42ch;
    margin: 0 auto .7rem;
  }

  footer .footer-link{
    display: inline-block;
    margin: 0 0 0 .35rem;
  }

  .restricted-access-btn{
    display: flex;
    width: max-content;
    min-height: 34px;
    margin: .8rem 0 0 auto;
    padding: .35rem .75rem;
    font-size: .75rem;
  }

  .whatsapp-button{
    right: calc(9px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
    transition: opacity .18s ease, transform .18s ease;
  }

  .whatsapp-button::before{
    width: 21px;
    height: 21px;
  }

  body.mobile-footer-visible .whatsapp-button{
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  body.cookie-ativo .whatsapp-button{
    bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .grecaptcha-badge{
    left: 4px !important;
    bottom: calc(4px + env(safe-area-inset-bottom)) !important;
    transform: scale(.38) !important;
    opacity: .5 !important;
  }
}

@media (max-width: 380px){
  .section-header h1{
    font-size: 1.5rem;
  }

  .section-header p{
    font-size: .75rem;
  }

  .profile-hero-name{
    font-size: 1.65rem;
  }

  #sobre,
  #servicos,
  #publicacoes,
  #contato{
    padding-inline: .9rem;
  }

  .qrcode-actions{
    flex-direction: column;
  }

  .qrcode-actions .cta-btn{
    width: 100%;
  }
}
