/* ==========================================================================
   AJUSTES RESPONSIVOS (mobile / tablet / iPhones modernos)
   Carregado por último no base.html para sobrescrever os demais CSS.
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* No iOS Safari o overflow-x: hidden do html/body não impede a rolagem
   lateral; por isso eliminamos os elementos que estouravam a largura
   e usamos overflow-x: clip quando suportado. */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html, body {
        overflow-x: clip;
    }
}

body {
    min-width: 0;
    width: 100%;
}

/* Evita que as seções (filhas do body flex) sejam espremidas e cortadas */
body > * {
    flex-shrink: 0;
    max-width: 100%;
}

#cabecalho,
footer,
section.section2 {
    min-width: 0;
    width: 100%;
}

/* ==========================================================================
   MOBILE + TABLET (mesmo breakpoint usado no restante do site)
   ========================================================================== */
@media screen and (max-width: 1276px) {

    /* Header desktop fica escondido (só sobrava a barra vazia por baixo) */
    #cabecalho {
        display: none;
    }

    /* ---------- HEADER MOBILE ---------- */
    .header2 {
        box-sizing: border-box;
        left: 0;
        right: 0;
        width: 100%;
        height: 70px;
        padding: 0 16px;
        justify-content: space-between;
    }

    .left-space {
        flex: 0 0 44px;
        width: 44px;
    }

    .logo-headermobile {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .logomarca1 {
        width: auto;
        max-width: 100%;
        height: 56px;
        margin: 0;
        padding: 0;
        object-fit: contain;
    }

    .menu-toggle {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        align-items: center;
    }

    .menu-toggle span {
        width: 30px;
    }

    .mobile-menu {
        box-sizing: border-box;
        top: 70px;
        width: 100%;
    }

    .mobile-menu ul li a {
        padding: 6px 4px;
    }

    /* ---------- SEÇÃO HOME ---------- */
    .section_home {
        box-sizing: border-box;
        padding-top: 70px;
    }

    .section_home > img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .title2 {
        padding: 0 12px;
    }

    .title2 h2 {
        font-size: clamp(24px, 7.2vw, 34px);
        line-height: 1.2;
    }

    .title2 h3 {
        font-size: clamp(32px, 9.5vw, 46px);
    }

    /* ---------- CARROSSEIS ANTES E DEPOIS ---------- */
    #carousel,
    .carousel,
    .slide {
        max-width: 100%;
    }

    .carousel-inner {
        margin-top: 0;
    }

    .contador {
        margin: 8px 12px;
    }

    .carousel-item img,
    .img_carrosel {
        display: block;
        height: auto;
        max-width: 100%;
    }

    .carrossel_label {
        box-sizing: border-box;
        height: auto;
        padding: 24px 16px 8px;
    }

    .carrossel_label h2 {
        font-size: clamp(20px, 6vw, 28px);
        margin: 0;
    }

    .carrossel_label > br {
        display: none;
    }

    .google-button {
        box-sizing: border-box;
        width: calc(100% - 32px);
    }

    /* ---------- ESPECIALIDADES ---------- */
    .especialidades {
        height: auto;
        overflow: visible;
    }

    .person-carousel {
        padding: 24px 0 40px;
    }

    .inner--carousel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .inner--carousel .item--carousel,
    .item--carousel {
        box-sizing: border-box;
        width: auto;
        min-height: 130px;
        height: auto;
        padding: 12px 8px;
    }

    .inner-item--carousel {
        width: 100%;
    }

    .inner-item--carousel .image {
        width: auto;
        height: auto;
        margin: 0 auto 8px;
        padding: 4px 0 0;
        text-align: center;
    }

    .inner-item--carousel .image img {
        width: 32px;
        height: 32px;
    }

    /* ---------- FORMULÁRIO (mobile) ---------- */
    .container_2 {
        box-sizing: border-box;
        width: 100%;
        height: auto;
        padding: 30px 16px;
    }

    .box_2 {
        box-sizing: border-box;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }

    .box_form_2 {
        width: 100%;
    }

    #formulario_2 {
        box-sizing: border-box;
        width: 100%;
        padding: 20px 16px;
    }

    .container_2 fieldset {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        left: 0;
        padding: 10px 14px 16px;
    }

    .logomarca_2 {
        max-width: 100%;
        height: auto;
    }

    /* Inputs com 16px evitam o zoom automático do iPhone ao focar */
    .inputUser_2,
    #miniform-footer input {
        font-size: 16px;
    }

    /* ---------- VISITE NOSSA CLÍNICA / MAPA ---------- */
    #section_maps {
        box-sizing: border-box;
        height: auto;
        padding-bottom: 16px;
    }

    #section_maps .labelMaps {
        box-sizing: border-box;
        width: 100%;
        padding: 0 16px;
    }

    section.section2 h1,
    #section_maps .labelMapsh1 {
        margin: 24px 0 8px;
        white-space: normal;
        text-align: center;
        font-size: clamp(22px, 7vw, 32px);
    }

    section.section2 span,
    #section_maps .labelMaps .fav-number,
    #section_maps .fav-location,
    #section_maps .fav-redes,
    #section_maps .fav-email {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin: 0 0 8px;
        padding: 0;
    }

    #section_maps .fav-location p,
    #section_maps .fav-number p,
    #section_maps .fav-redes p,
    #section_maps .fav-email p {
        font-size: 13px;
        padding-top: 0;
        text-align: left;
    }

    #section_maps .fav-location i,
    #section_maps .fav-number i,
    #section_maps .fav-redes i,
    #section_maps .fav-email i {
        font-size: 15px;
        width: 18px;
    }

    .google_maps,
    #google_maps_section {
        box-sizing: border-box;
        width: 100%;
        padding: 0 16px;
    }

    section.section2 iframe,
    .google_maps .iframe_maps {
        display: block;
        width: 100%;
        height: 300px;
        margin: 12px 0 0;
    }

    /* ---------- AVALIAÇÕES ---------- */
    #google-reviews-increment .title-review h2 {
        font-size: clamp(28px, 9vw, 40px);
        padding: 0 16px;
    }

    /* ---------- FAQ ---------- */
    #faq-section {
        padding-bottom: 48px;
    }

    .container-faq {
        box-sizing: border-box;
        width: 100%;
        max-width: 48rem;
        padding: 2.5rem 20px 0;
    }

    .accordion button {
        font-size: 1.05rem;
    }

    .accordion button .accordion-title {
        display: block;
        padding: 0.5em 36px 0.5em 0;
    }

    .accordion button .icon {
        top: 50%;
        margin-top: -11px;
    }

    /* ---------- FOOTER ---------- */
    footer {
        height: auto;
        min-width: 0;
        gap: 0;
    }

    #section_footer {
        box-sizing: border-box;
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 24px 16px 96px; /* espaço p/ o botão flutuante do WhatsApp */
    }

    .section3 .menu-footer,
    .menu-footer {
        flex: 0 0 auto;
        width: auto;
        height: auto;
    }

    .menu-footer ul {
        margin: 0;
        padding: 0;
    }

    .section3 .form-footer,
    .form-footer {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        height: auto;
    }

    .title-formfooter {
        margin: 0 0 4px;
        text-align: left;
    }

    #miniform-footer {
        margin-left: 0;
    }

    .inputUser-formfooter,
    #miniform-footer input {
        box-sizing: border-box;
        width: 100%;
        height: 36px;
        padding: 0 10px;
    }

    #miniform-footer #submit-formfooter,
    #miniform-footer #submit-formfooter:hover {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }

    /* ---------- BANNER DE COOKIES ---------- */
    .cookie-consent-banner__inner {
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    }

    .cookie-consent-banner__description {
        font-size: 14px;
        line-height: 20px;
        text-align: left;
    }

    .cookie-consent-banner__actions {
        display: flex;
        gap: 12px;
    }

    .cookie-consent-banner__cta {
        flex: 1 1 0;
        min-width: 0;
    }

    .cookie-consent-banner__cta:last-child {
        margin-left: 0;
    }
}

/* ==========================================================================
   TABLETS (iPad etc.)
   ========================================================================== */
@media screen and (min-width: 700px) and (max-width: 1276px) {

    .section_home > img {
        max-width: 640px;
        margin: 0 auto;
    }

    #carousel,
    .carousel,
    .slide {
        max-width: 720px;
        margin: 0 auto;
    }

    .inner--carousel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 900px;
        margin: 0 auto;
    }

    #section_maps .labelMaps,
    .google_maps,
    #google_maps_section {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }

    section.section2 iframe,
    .google_maps .iframe_maps {
        height: 400px;
    }

    #section_footer {
        justify-content: center;
        gap: 48px;
    }

    .section3 .form-footer,
    .form-footer {
        flex: 0 1 420px;
    }
}

/* ==========================================================================
   CELULARES PEQUENOS (iPhone SE / mini)
   ========================================================================== */
@media screen and (max-width: 380px) {

    .logomarca1 {
        height: 48px;
    }

    .inner--carousel {
        gap: 10px;
        padding: 0 10px;
    }

    .inner--carousel .name {
        font-size: 13px;
    }

    #section_footer {
        flex-direction: column;
        align-items: stretch;
    }
}
