/* Mavi Braz — ajustes do site novo (o visual vem do vendor.css: Flatsome 3.19 + tema filho + plugins do site antigo) */

/* ---------- correção pedida pela Hua: foto dos cartões "Brilharam com a Nossa Ajuda" cobre o cartão inteiro ---------- */
.my-grid-layout .listing-item .image { width: 100%; }
.my-grid-layout .listing-item .image img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; object-position: center; }
.my-grid-layout:not(.slick-initialized) { display: flex; overflow: hidden; }
.my-grid-layout:not(.slick-initialized) .listing-item { flex: 0 0 20%; }
@media (max-width: 989px) { .my-grid-layout:not(.slick-initialized) .listing-item { flex-basis: 33.333%; } }
@media (max-width: 599px) { .my-grid-layout:not(.slick-initialized) .listing-item { flex-basis: 50%; } }

/* foto em onda da "Conheça a Mavi" (era um iframe de uploads/preview.html) */
.mb-foto-onda { padding: 8px; box-sizing: border-box; overflow: hidden; }
.mb-foto-onda .foto-ondulada { max-width: 600px; margin: 0 auto; }
.mb-foto-onda[style*="350px"] .foto-ondulada { max-width: 336px; }
.mb-foto-onda .foto-ondulada svg { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { .mb-foto-onda animateTransform { display: none; } }

/* títulos que eram H1 repetidos: mesmo tamanho do H1 */
h2.mb-era-h1 { font-size: 1.7em; line-height: 1.3; }

/* ---------- Clientes (cartões 3:4 iguais aos do timthumb 450x600) ---------- */
.mb-clientes .img img { display: block; width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; }
.mb-clientes .mb-oculto { display: none !important; }
.wp-pagenavi a, .wp-pagenavi span { cursor: pointer; }

/* ---------- Galeria do trabalho (mesmo mosaico do jquery.mosaic: linhas de até 400 px, 3 px de espaço) ---------- */
#myMosaic.mb-mosaico { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; }
#myMosaic.mb-mosaico::after { content: ""; flex-grow: 999999; }
#myMosaic.mb-mosaico > a { position: relative; display: block; overflow: hidden; height: 400px; max-height: 400px; background: #e9e7e8; }
#myMosaic.mb-mosaico > a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, transform .4s; }
#myMosaic.mb-mosaico > a:hover img { transform: scale(1.02); }
@media (max-width: 1100px) { #myMosaic.mb-mosaico > a { height: 300px; } }
@media (max-width: 800px) { #myMosaic.mb-mosaico > a { height: 220px; } }
@media (max-width: 549px) {
  #myMosaic.mb-mosaico { gap: 3px 0; }
  #myMosaic.mb-mosaico > a { flex: 0 0 100% !important; height: auto; max-height: none; }
  #myMosaic.mb-mosaico > a img { position: static; height: auto; }
}
.imagemdestaque img { display: block; width: 100%; aspect-ratio: 1000 / 764; height: auto; object-fit: cover; }

/* lightbox das galerias (antes: fslightbox) */
.mb-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(30, 30, 30, .96); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.mb-lb[hidden] { display: none; }
.mb-lb img { max-width: calc(100vw - 120px); max-height: calc(100vh - 90px); object-fit: contain; box-shadow: 0 0 30px rgba(0, 0, 0, .4); user-select: none; }
.mb-lb button { position: absolute; background: rgba(35, 35, 35, .65); color: #ddd; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; }
.mb-lb button:hover, .mb-lb button:focus-visible { color: #fff; background: rgba(35, 35, 35, .95); }
.mb-lb .mb-lb-fechar { top: 0; right: 0; width: 45px; height: 45px; font-size: 30px; line-height: 1; }
.mb-lb .mb-lb-ant, .mb-lb .mb-lb-prox { top: 50%; margin-top: -25px; width: 50px; height: 50px; font-size: 32px; }
.mb-lb .mb-lb-ant { left: 0; }
.mb-lb .mb-lb-prox { right: 0; }
.mb-lb .mb-lb-cont { position: absolute; top: 0; left: 0; padding: 12px 15px; color: #ddd; font-size: 14px; font-family: Arial, sans-serif; }
@media (max-width: 549px) { .mb-lb img { max-width: 100vw; max-height: calc(100vh - 110px); } }

/* ---------- Blog ---------- */
.mb-blog .mb-oculto { display: none !important; }
.mb-blog img.mb-capa-lista { display: block; width: 100%; aspect-ratio: 600 / 250; height: auto; object-fit: cover; }

/* ---------- aviso de cookies (mesmo desenho do plugin Cookie Notice) ---------- */
#cookie-notice { position: fixed; min-width: 100%; height: auto; z-index: 100000; font-size: 13px; letter-spacing: 0; line-height: 20px; left: 0; text-align: center; font-weight: normal; font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, "Helvetica Neue", sans-serif; bottom: 0; background-color: rgba(50, 50, 58, .9); }
#cookie-notice[hidden] { display: none; }
#cookie-notice .cookie-notice-container { padding: 15px 30px; text-align: center; width: 100%; z-index: 2; color: #fff; }
#cookie-notice .cn-text-container { margin: 0 0 6px 0; display: inline-block; }
#cookie-notice .cn-buttons-container { display: inline-block; }
#cookie-notice .cn-button { margin: 0 0 0 10px; display: inline-block; font-family: inherit; font-weight: normal; font-size: 13px; letter-spacing: .25px; line-height: 20px; text-align: center; text-transform: none; cursor: pointer; touch-action: manipulation; white-space: nowrap; outline: none; box-shadow: none; text-shadow: none; border: none; border-radius: 3px; text-decoration: none; padding: 8.5px 10px; color: #fff; background-color: #5d5a5c; }
#cookie-notice .cn-close-icon { position: absolute; right: 15px; top: 50%; margin-top: -10px; width: 15px; height: 15px; opacity: .5; padding: 10px; outline: none; cursor: pointer; background: none; border: 0; }
#cookie-notice .cn-close-icon:before, #cookie-notice .cn-close-icon:after { position: absolute; content: " "; height: 15px; width: 2px; top: 3px; background-color: #fff; }
#cookie-notice .cn-close-icon:before { transform: rotate(45deg); }
#cookie-notice .cn-close-icon:after { transform: rotate(-45deg); }
@media all and (max-width: 900px) { #cookie-notice .cn-text-container { margin: 0 0 6px 0; display: block; } #cookie-notice .cn-button { margin: 0 5px 5px 5px; } }

/* ---------- formulários (o visual vem do CF7; aqui só as mensagens) ---------- */
.wpcf7 form .wpcf7-response-output.mb-ok { border-color: #46b450; }
.wpcf7 form .wpcf7-response-output.mb-erro { border-color: #dc3232; }
.wpcf7 form.mb-enviando .wpcf7-submit { opacity: .6; pointer-events: none; }

/* assinatura CDW no rodapé (no lugar da imagem PNG antiga) */
.mb-assinatura { display: flex; justify-content: flex-end; }
@media (max-width: 549px) { .mb-assinatura { justify-content: center; } }
.mb-assinatura a, .mb-assinatura svg { display: inline-block; max-width: 180px; height: auto; }

/* acessibilidade: foco visível igual em todo o site */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #5d5a5c; outline-offset: 2px; }
.skip-link:focus { clip: auto !important; clip-path: none; height: auto; width: auto; left: 6px; top: 7px; z-index: 100000; padding: 15px 23px 14px; background: #f1f1f1; color: #21759b; display: block; font-size: 14px; font-weight: 700; line-height: normal; text-decoration: none; position: absolute !important; }

/* títulos que no site antigo eram <p>: agora H1 com o mesmo visual */
h1.mb-titulo-p { font-size: 1em; line-height: inherit; font-weight: inherit; font-family: inherit; letter-spacing: inherit; text-transform: none; color: inherit; margin-bottom: 1.3em; }

/* ---------- hero da Início: a foto do 1º slide aparece junto com a página (Hua 27/11 ~22h) ----------
   O Slider Revolution só mostra o slide depois do JS (rs-module-wrap{visibility:hidden}); por baixo dele fica a mesma
   foto como <img> real (preload + srcset WebP) sobre a cor média/miniatura da foto, nunca branco. */
.mb-hero-sec > .section-content { position: relative; z-index: 1; }
.mb-hero-poster { position: absolute; inset: 0; z-index: 0; overflow: hidden; background-size: cover; background-position: center; background-repeat: no-repeat; }
.mb-hero-poster picture, .mb-hero-poster img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.mb-hero-sec rs-module-wrap { z-index: 1; }
#rev_slider_3_1_wrapper, #rev_slider_4_2_wrapper { height: 100vh; }
.mb-hero-poster { transition: opacity .6s ease, visibility 0s linear 0s; }
.mb-hero-poster.mb-hero-poster--fora { opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
@media (prefers-reduced-motion: reduce) { .mb-hero-poster { transition: none; } }

/* ---------- números de autoridade (antes: span.count-up do Flatsome com opacity:0 e sem contar) ---------- */
.mb-count { font-variant-numeric: tabular-nums; }

/* Hua 27/11 ~23h: paginação (WP-PageNavi) com "Última »" quebrando em 2 linhas dentro do círculo (erro do original) */
.wp-pagenavi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wp-pagenavi a, .wp-pagenavi span { margin: 0; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.wp-pagenavi a.last, .wp-pagenavi a.first { width: auto; padding: 5px 14px; white-space: nowrap; }
@media (max-width: 420px) { .wp-pagenavi { gap: 4px; } .wp-pagenavi a, .wp-pagenavi span { width: 28px; height: 28px; padding: 4px; } .wp-pagenavi a.last, .wp-pagenavi a.first { width: auto; padding: 4px 10px; } }

/* SEO 28/11: H1 que no WordPress era H2 (página sem H1 ganhou o H1; o visual continua o do H2 original) */
h1.mb-h1-h2 { font-size: 1.6em; }
@media (max-width: 549px) { h1.mb-h1-h2 { font-size: 1.2em; } }

/* CDW assinatura: na linha da ultima linha do copyright, mesmo quando ele quebra (>=550px). 30/11 */
@media (min-width:550px){.col:has(.mb-assinatura){align-self:flex-end}.mb-assinatura{margin-bottom:17px}}
