/* ================================================================
   MOBILE OVERRIDES — max-width: 768px
   Nunca muda nada acima de 768px. Desktop intacto.
================================================================ */
@media (max-width: 768px) {

    html, body { overflow-x: hidden !important; max-width: 100vw !important; }

    /* ── Geral: padding/gap único para todas as seções ── */
    :root { --section-gap: 32px; }

    .pagina-blocos {
        gap: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Reset de todos os paddings/margens customizados por seção no desktop */
    .pagina-blocos section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Garante que containers internos não adicionem padding duplo */
    .pagina-blocos section .container,
    .pagina-blocos section .container-largo,
    .pagina-blocos section .container-estreito {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Seções sem padding (hero, banner) mantém zero */
    .section-0,
    .section-8 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* ── Títulos de seção ── */
    .secao-titulo {
        font-size: 50px !important;
        line-height: 1.1 !important;
    }
    .secao-subtitulo {
        font-size: 14px !important;
        line-height: 18px !important;
    }

    /* ── Texto corpo padrão ── */
    p, li, span, td {
        font-size: 16px !important;
        line-height: 22px !important;
    }

    /* ── Botões padrão ── */
    a[style*="height:55px"],
    a[style*="height:50px"],
    button[style*="height:55px"],
    button[style*="height:50px"] {
        height: 41px !important;
        font-size: 14px !important;
    }
    [style*="width:210px"][style*="height:55px"],
    [style*="width:370px"][style*="height:55px"] {
        width: 100% !important;
        max-width: 320px !important;
        height: 41px !important;
        font-size: 14px !important;
    }

    /* ════════════════════════════════════════════════════════════
       HERO (todas as páginas)
    ════════════════════════════════════════════════════════════ */
    /* Banner ocupa a tela inteira, sem margens/padding laterais */
    .pagina-blocos section[data-block="hero"] {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100vw !important;
        width: 100vw !important;
    }
    [class*="__slider"] {
        height: 85vh !important;
        min-height: 85vh !important;
    }
    [class*="__title"][style*="font-size:80px"],
    h1[style*="font-size:80px"] {
        font-size: clamp(26px, 8vw, 44px) !important;
        line-height: 1.1 !important;
        width: 100% !important;
    }
    [class*="__subtitle"][style*="font-size:25px"],
    p[style*="font-size:25px"][style*="color:#FFFFFF"] {
        font-size: clamp(14px, 4vw, 18px) !important;
        max-width: 100% !important;
        line-height: 1.4 !important;
    }
    /* <br> do hero controlado por JS (hero.blade.php) — remove só se houver wrap forçado */

    /* ════════════════════════════════════════════════════════════
       LIGHTBOX (galeria) — imagem usa largura máxima no mobile
    ════════════════════════════════════════════════════════════ */
    .lightboxOverlay { width: 100% !important; }
    .lightbox { width: 100% !important; left: 0 !important; right: 0 !important; margin: 0 !important; padding: 0 !important; }
    .lb-outerContainer { width: 94vw !important; max-width: 94vw !important; margin: 0 auto !important; }
    .lb-container { width: 100% !important; }
    .lb-image { width: 100% !important; height: auto !important; max-width: 94vw !important; }
    [class*="__content"].px-6 {
        padding-top: 5vh !important;
    }

    /* ════════════════════════════════════════════════════════════
       [1] CARDS IMAGEM
    ════════════════════════════════════════════════════════════ */
    .section-1 [style*="font-size:20px"][style*="text-transform:uppercase"] { font-size: 15px !important; }
    .section-1 [style*="font-size:15px"] { font-size: 13px !important; }

    /* ════════════════════════════════════════════════════════════
       [2] FEATURES / DIFERENCIAIS
    ════════════════════════════════════════════════════════════ */
    .section-2 [style*="flex-wrap:nowrap"] { flex-wrap: wrap !important; gap: 20px !important; }
    .section-2 [style*="flex:1; min-width:0"] { flex: 0 0 calc(50% - 10px) !important; min-width: 0 !important; }
    .section-2 [style*="height:143px"] { height: 80px !important; }
    .section-2 img[style*="height:143px"] { height: 80px !important; }
    .section-2 p[style*="font-size:18px"] { font-size: 13px !important; line-height: 16px !important; }
    .section-2 [style*="width:95%"] { width: 100% !important; border-radius: 0 !important; }
    .section-2 [style*="width:80%"] { width: 94% !important; }

    /* ════════════════════════════════════════════════════════════
       [3] MAPA CLIENTES
    ════════════════════════════════════════════════════════════ */
    .section-3 [style*="width:361px"] { width: 100% !important; }
    .section-3 [style*="width:115px"] { width: calc(33.33% - 6px) !important; font-size: 10px !important; height: 36px !important; }
    .section-3 p[style*="font-size:20px"] { font-size: 13px !important; line-height: 16px !important; }
    .section-3 p[style*="font-size:13px"] { margin-top: 24px !important; }

    /* ════════════════════════════════════════════════════════════
       [4] CONTADORES
    ════════════════════════════════════════════════════════════ */
    .section-4 [style*="height:279px"] { height: auto !important; padding: 28px 16px !important; }
    .section-4 [style*="font-size:90px"] { font-size: clamp(32px, 10vw, 56px) !important; line-height: 1.1 !important; letter-spacing: -1.5px !important; }
    .section-4 p[style*="font-size:20px"] { font-size: clamp(10px, 2.5vw, 13px) !important; }

    /* ════════════════════════════════════════════════════════════
       [5] DEPOIMENTOS
    ════════════════════════════════════════════════════════════ */
    .section-5 p[style*="font-size:20px"] { font-size: 15px !important; }
    .section-5 p[style*="font-size:16px"] { font-size: 13px !important; }


    /* ════════════════════════════════════════════════════════════
       [6] BENEFICIÁRIOS
    ════════════════════════════════════════════════════════════ */
    .section-6 [style*="padding-left:2vw"] { flex-direction: column !important; padding-left: 16px !important; padding-right: 16px !important; }
    .section-6 [style*="width:199px"] { width: clamp(100px, 35vw, 160px) !important; }
    .section-6 [style*="padding-bottom:70px"] { padding-bottom: 24px !important; }
    .section-6 [style*="pl-4 md:pl-8"] { padding-left: 0 !important; }

    /* Beneficiários — card e margens (independente do índice da seção) */
    [style*="padding-left:2vw"] { padding-left: 16px !important; padding-right: 0 !important; }
    .ben-carousel-col { padding-left: 0 !important; padding-right: 0 !important; }
    .ben-card { width: calc(100vw - 32px) !important; max-width: 360px !important; }
    .ben-title-col { width: 100% !important; align-self: center !important; padding-left: 0 !important; padding-right: 0 !important; }

    /* ════════════════════════════════════════════════════════════
       [7] MEDNEWS
    ════════════════════════════════════════════════════════════ */
    .section-7 [style*="display:flex; flex-direction:row; gap:12px"] { flex-direction: column !important; padding: 0 16px !important; }
    .section-7 [style*="width:1000px"] { width: 100% !important; height: auto !important; aspect-ratio: 16/9 !important; }
    .section-7 [style*="width:553px"] { width: 100% !important; height: auto !important; padding: 24px 20px !important; }
    .section-7 h3[style*="font-size:30px"] { font-size: clamp(18px, 5vw, 26px) !important; line-height: 1.2 !important; margin-bottom: 12px !important; }
    .section-7 p[style*="font-size:18px"] { font-size: 14px !important; margin-bottom: 20px !important; }

    /* Mednews — card do carrossel ocupa a largura da tela (peek centralizado) */
    .mn-card { width: calc(100vw - 32px) !important; }

    /* ════════════════════════════════════════════════════════════
       [8] BANNER FOOTER
    ════════════════════════════════════════════════════════════ */
    .section-8 [style*="height:700px"] { height: auto !important; min-height: 400px !important; padding-bottom: 48px !important; }
    .section-8 h2[style*="font-size:70px"] { font-size: clamp(26px, 8vw, 44px) !important; line-height: 1.1 !important; }
    .section-8 p[style*="font-size:25px"] { font-size: clamp(13px, 4vw, 17px) !important; max-width: 100% !important; line-height: 1.4 !important; }
    img[src*="imagem-d"] { display: none !important; }
    /* Banner footer — fundo full-bleed (sem margens) e padding só no texto */
    section[data-block="banner_footer"] { padding: 0 !important; margin: 0 !important; }
    section[data-block="banner_footer"] [class*="__wrapper"] { height: 80vh !important; min-height: unset !important; }
    .banner-footer-content { justify-content: flex-end !important; text-align: center !important; padding: 0 24px 60px !important; }
    .banner-footer-content h2 { font-size: 50px !important; line-height: 56px !important; text-align: center !important; }
    .banner-footer-content p { font-size: 12px !important; line-height: 16px !important; }
    .banner-footer-content p { text-align: center !important; max-width: 100% !important; }
    .banner-footer-content > div { display: flex !important; justify-content: center !important; }

    /* ════════════════════════════════════════════════════════════
       CANAL DE DENÚNCIAS
    ════════════════════════════════════════════════════════════ */
    [class*="__wrapper"][style*="height:640px"] { height: auto !important; min-height: 380px !important; padding-bottom: 40px !important; }
    [style*="font-size:70px"] { font-size: clamp(26px, 8vw, 44px) !important; line-height: 1.1 !important; }
    [style*="font-size:20px"][style*="color:#ffffff"] { font-size: 14px !important; }

    /* ════════════════════════════════════════════════════════════
       VÍDEO
    ════════════════════════════════════════════════════════════ */
    [style*="width:804px"][style*="height:425px"] {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    /* ════════════════════════════════════════════════════════════
       NOTICIAS RADAR
    ════════════════════════════════════════════════════════════ */
    [style*="grid-template-columns:892px 438px"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        gap: 12px !important;
    }
    [style*="grid-column:1; grid-row:1/3"] {
        aspect-ratio: 16/9 !important;
        height: auto !important;
    }

    /* ════════════════════════════════════════════════════════════
       NOTICIAS LISTA (cards 439px)
    ════════════════════════════════════════════════════════════ */
    [style*="width:439px"][style*="height:562px"] {
        width: calc(100vw - 32px) !important;
        height: auto !important;
        min-height: 400px !important;
    }
    [style*="width:439px"][style*="height:252px"] {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    /* ════════════════════════════════════════════════════════════
       UNIDADES LISTA (cards 390px)
    ════════════════════════════════════════════════════════════ */
    [style*="width:390px"][style*="flex-direction:column"] {
        width: calc(100vw - 32px) !important;
    }
    [style*="width:390px"][style*="height:220px"] {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    /* ════════════════════════════════════════════════════════════
       REVISTA (capa 293x373px)
    ════════════════════════════════════════════════════════════ */
    [style*="width:293px"][style*="height:373px"],
    [style*="width:293px"][style*="height:372px"] {
        width: 100% !important;
        max-width: 220px !important;
        height: auto !important;
        aspect-ratio: 3/4 !important;
    }

    /* ════════════════════════════════════════════════════════════
       STAT DESTAQUE (número 222px)
    ════════════════════════════════════════════════════════════ */
    /* Card empilha vertical, centralizado, largura/altura fluida */
    .stat-card {
        width: 100% !important;
        height: auto !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 32px 20px !important;
    }
    .stat-num-col { width: 100% !important; }
    .stat-content-col { max-width: 100% !important; }
    /* Número grande */
    .stat-num-col [style*="font-size:222px"] {
        font-size: clamp(72px, 26vw, 130px) !important;
        line-height: 1 !important;
        letter-spacing: -4px !important;
    }
    /* Título dir / label laranja */
    [style*="font-size:30px"][style*="color:#EE7629"] {
        font-size: clamp(18px, 5vw, 24px) !important;
    }
    [style*="font-size:30px"][style*="color:#13284B"] {
        font-size: clamp(16px, 4vw, 22px) !important;
    }
    /* Texto e itens do lado direito */
    .stat-content-col [style*="font-size:20px"] {
        font-size: 15px !important;
        line-height: 20px !important;
    }

    /* ════════════════════════════════════════════════════════════
       SECAO DUPLA (padding-left/right:120px)
    ════════════════════════════════════════════════════════════ */
    [style*="padding-left:120px"] { padding-left: 16px !important; }
    [style*="padding-right:120px"] { padding-right: 16px !important; }
    /* Cruz decorativa — esconde */
    img[src*="cruz-outline"] { display: none !important; }

    /* ════════════════════════════════════════════════════════════
       TRABALHE CONOSCO CONTEÚDO
    ════════════════════════════════════════════════════════════ */
    [style*="padding-right:55px"] { padding-right: 16px !important; }
    [style*="padding-left:55px"] { padding-left: 16px !important; }
    [style*="font-size:60px"][style*="color:#EE7629"] {
        font-size: clamp(28px, 9vw, 44px) !important;
        line-height: 1.2 !important;
        margin-bottom: 32px !important;
    }

    /* ════════════════════════════════════════════════════════════
       NEWSLETTER FORM (input 300px)
    ════════════════════════════════════════════════════════════ */
    [style*="width:300px"] { width: 100% !important; }
    /* Esconde imagem absoluta da newsletter no mobile */
    img[style*="width: 220px"] { display: none !important; }
    /* Corrige alinhamento do form e faz campos empilharem */
    [style*="flex-wrap:wrap; align-items:flex-end"] {
        align-items: stretch !important;
        flex-direction: column !important;
    }
    [style*="flex-wrap:wrap; align-items:flex-end"] > div {
        width: 100% !important;
    }

    /* ════════════════════════════════════════════════════════════
       TRABALHE CONOSCO CONTEÚDO (grid 2 colunas)
    ════════════════════════════════════════════════════════════ */
    [style*="font-size:60px"][style*="line-height:116px"] {
        font-size: clamp(24px, 7vw, 36px) !important;
        line-height: 1.2 !important;
        margin-bottom: 32px !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    [style*="height:444px"] {
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }
    [style*="text-align:right; padding-right:55px"] {
        text-align: left !important;
        padding-right: 0 !important;
    }
    [style*="font-size:30px"][style*="text-align:right"] {
        text-align: left !important;
    }

    /* ════════════════════════════════════════════════════════════
       CONTATO FORM (grid 356px 1fr)
    ════════════════════════════════════════════════════════════ */
    [style*="grid-template-columns:356px"] {
        grid-template-columns: 1fr !important;
    }

    /* ════════════════════════════════════════════════════════════
       PESSOAS CAROUSEL (missão/visão/valores tabs + título 70px)
    ════════════════════════════════════════════════════════════ */
    /* Seção (caixa creme) full-width, sem margem/padding lateral */
    section[data-block="pessoas_carousel"] { padding-left: 0 !important; padding-right: 0 !important; }
    section[data-block="pessoas_carousel"] [class*="__wrapper"] { background: #FFF7ED !important; }
    section[data-block="pessoas_grid"] [class*="__wrapper"] { background: #FFF7ED !important; }
    /* Menos espaço no topo, com respiro lateral */
    section[data-block="pessoas_carousel"] .guia-wrap {
        margin-top: 8px !important;
        margin-bottom: 24px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    /* Ordem no mobile: título + texto primeiro, depois os botões, depois CEO */
    .guia-centro { order: 1 !important; width: 100% !important; }
    .guia-abas {
        order: 2 !important;
        flex-direction: row !important;
        width: 100% !important;
        padding-top: 0 !important;
        margin-top: 20px !important;
        gap: 8px !important;
    }
    .guia-abas button {
        width: auto !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 0 4px !important;
        height: 55px !important;
        font-size: 14px !important;
    }
    .guia-ceo { order: 3 !important; margin-top: 24px !important; }
    h2[style*="font-size:70px"][style*="line-height:116px"] {
        font-size: clamp(26px, 8vw, 44px) !important;
        line-height: 1.15 !important;
    }
    /* CEO image column */
    [style*="width:260px"][style*="height:344px"] {
        width: 100% !important;
        max-width: 220px !important;
        height: auto !important;
        aspect-ratio: 3/4 !important;
    }
    div[style*="width:260px"]:has([style*="height:344px"]) {
        width: 100% !important;
        align-items: center !important;
    }

    /* ════════════════════════════════════════════════════════════
       DIRETORES TÉCNICOS (padding-top grande)
    ════════════════════════════════════════════════════════════ */
    [style*="padding-top:160px"] { padding-top: 40px !important; }

    /* ════════════════════════════════════════════════════════════
       INTERNA DE NOTÍCIA (padding 72px)
    ════════════════════════════════════════════════════════════ */
    .noticia-wrap {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-top: 100px !important;
    }
    [style*="width:357px"] { width: 100% !important; }

    /* ════════════════════════════════════════════════════════════
       FOOTER
    ════════════════════════════════════════════════════════════ */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
    .footer-grid > div {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    /* SOS Unimed — remove largura fixa da coluna */
    .footer-grid > div[style*="width:374px"] { width: 100% !important; }
    .footer-grid > div[style*="width:276px"] { width: 100% !important; }
    /* SOS Unimed — dropdown abre abaixo, centralizado */
    .footer-grid > div[style*="width:374px"] ul { text-align: center !important; }
    .footer-grid > div[style*="width:374px"] ul li { display: block !important; width: 100% !important; }
    .footer-grid > div[style*="width:374px"] [style*="display:flex; align-items:center; padding"] { justify-content: center !important; }
    .footer-grid > div[style*="width:374px"] [style*="display:flex; align-items:center; gap:8px"] { justify-content: center !important; }
    .footer-grid > div[style*="width:374px"] [style*="border:1px solid #EE7629"] { display: block !important; width: 100% !important; box-sizing: border-box !important; margin-top: 6px !important; text-align: center !important; }

    /* Endereço administrativo */
    .footer-endereco { max-width: 180px !important; margin-left: auto !important; margin-right: auto !important; }

    /* Logo centralizada */
    .footer-col-logo { text-align: center !important; }
    .footer-logo-img { margin-left: auto !important; margin-right: auto !important; }

    /* Barra inferior: Política de Privacidade acima do © Medilar, centralizado */
    .footer-bottom {
        flex-direction: column-reverse !important;
        align-items: center !important;
        gap: 10px !important;
        text-align: center !important;
    }
    .footer-bottom p, .footer-bottom a, .footer-bottom span {
        max-width: 300px !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ════════════════════════════════════════════════════════════
       SOLUÇÃO CONTEÚDO — 2 imagens + 2 textos
       Mobile: intercala img1 > texto1 > img2 > texto2
    ════════════════════════════════════════════════════════════ */
    .sol-pair {
        grid-template-columns: 1fr !important;
        row-gap: 20px !important;
    }
    .sol-pair-1 { order: 1 !important; }
    .sol-pair-2 { order: 2 !important; padding-top: 8px !important; padding-bottom: 8px !important; }
    .sol-pair-3 { order: 3 !important; }
    .sol-pair-4 { order: 4 !important; padding-top: 8px !important; padding-bottom: 8px !important; }
    /* Textos após imagem nas variações de solucao_conteudo */
    section[data-block="solucao_conteudo"] .solucao-rich { padding-top: 0 !important; padding-bottom: 0 !important; }
    section[data-block="solucao_conteudo"] [style*="padding-top:40px"] { padding-top: 8px !important; }
    section[data-block="solucao_conteudo"] [style*="padding-top: 40px"] { padding-top: 8px !important; }
    section[data-block="solucao_conteudo"] [style*="padding-top:48px"] { padding-top: 8px !important; }
    section[data-block="solucao_conteudo"] [style*="margin-top:48px"] { margin-top: 8px !important; }
    section[data-block="solucao_conteudo"] [style*="margin-top: 48px"] { margin-top: 8px !important; }
    section[data-block="solucao_conteudo"] .sol-pair { row-gap: 0 !important; margin-bottom: 8px !important; }

    /* ════════════════════════════════════════════════════════════
       A-MEDILAR — SEÇÃO DUPLA (imagem + texto / texto + imagem)
    ════════════════════════════════════════════════════════════ */
    section[data-block="secao_dupla"] [class*="__wrapper"] { margin-top: 0 !important; }
    /* Imagens fluidas — sangra até a borda no mobile */
    .sdupla-img {
        width: 100vw !important;
        height: auto !important;
        aspect-ratio: 16/10 !important;
        margin-left: calc(-1 * (100vw - 100%) / 2) !important;
        margin-right: calc(-1 * (100vw - 100%) / 2) !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
    }
    /* Linhas empilham; imagem sempre em cima (linha 2 inverte) */
    .sdupla-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 32px !important;
    }
    .sdupla-row:last-child { margin-bottom: 0 !important; }
    .sdupla-row-rev { flex-direction: column-reverse !important; }
    /* Texto ocupa largura total, sem paddings laterais/verticais grandes */
    .sdupla-texto {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        width: 100% !important;
    }
    /* Texto sempre à esquerda no mobile */
    .sdupla-texto,
    .sdupla-texto h2,
    .sdupla-texto .secao-dupla-texto,
    .sdupla-texto .secao-dupla-texto * { text-align: left !important; }

    /* Diferenciais — título da modalidade */
    .diferenciais-mod-titulo { max-width: 300px !important; margin-left: auto !important; margin-right: auto !important; }

    /* <br> dos títulos controlado por JS (secao_dupla.blade.php) — remove só se houver wrap forçado */

    /* ════════════════════════════════════════════════════════════
       A-MEDILAR — PROCESSOS (pílulas)
    ════════════════════════════════════════════════════════════ */
    section[data-block="processos"] [style*="padding:0 40px"] { padding: 14px 20px !important; }
    section[data-block="processos"] [style*="min-height:86px"] { min-height: 0 !important; }

    /* ════════════════════════════════════════════════════════════
       A-MEDILAR — PESSOAS CAROUSEL (texto das abas absoluto)
    ════════════════════════════════════════════════════════════ */
    /* Texto das abas: fluido (sem position absolute) pra o container crescer */
    .guia-centro [style*="min-height:120px"] { min-height: 0 !important; }
    .guia-centro [style*="min-height:120px"] > p { position: static !important; }

    /* ════════════════════════════════════════════════════════════
       REVISTAS LISTA
    ════════════════════════════════════════════════════════════ */
    .revistas-card-inner { flex-direction: column !important; align-items: center !important; }
    .revistas-capa-wrap { width: 94% !important; height: auto !important; }
    .revistas-capa-wrap img { width: 100% !important; height: auto !important; }
    .revistas-card-titulo { font-size: 25px !important; line-height: 30px !important; text-align: center !important; }
    .revistas-card-texto { font-size: 14px !important; line-height: 20px !important; text-align: center !important; }
    .revistas-card-btn-wrap { display: flex !important; justify-content: center !important; }
}
