/* Tribunal Manaus - Identidade visual e ajustes responsivos */
:root{--tm-green:#0f3d2e;--tm-green-deep:#092e23;--tm-gold:#c9a46b;--tm-ivory:#f5f2e9;--tm-text:#21372f}
html{scroll-behavior:smooth}body{color:var(--tm-text)}
#sp-header{border-top:4px solid var(--tm-gold)}
#sp-header .logo, #sp-header .logo a {display:flex;align-items:center;max-width:100%;}
#sp-header .tm-brand-logo{height:auto!important;width:clamp(230px,35vw,435px)!important;max-width:100%;display:block}
#sp-header .tm-header-strapline{font-size:.76rem;letter-spacing:.16em;text-transform:uppercase;color:var(--tm-green);margin:0 0 5px}
#sp-header #sp-logo .sp-column{gap:10px;flex-wrap:wrap}
#sp-header #sp-logo .sp-module{display:none!important}
.logo-image-phone.tm-brand-logo{width:min(85vw,390px)!important;height:auto!important}
#sp-header .logo-image-phone{max-width:100%}
#sp-header .logo-image.tm-brand-logo{object-fit:contain}
#sp-header a:hover,#sp-top-bar a:hover{color:var(--tm-gold)}
#sp-main-menu a:focus-visible,a:focus-visible,button:focus-visible{outline:3px solid var(--tm-gold);outline-offset:3px}
#sp-header .sp-megamenu-parent>li.active>a,#sp-header .sp-megamenu-parent>li:hover>a{color:var(--tm-green)!important}
a{transition:color .16s ease}a:hover{color:var(--tm-green)}
#sp-bottom,#sp-footer{background-color:var(--tm-green-deep)!important}
#sp-bottom a,#sp-footer a{color:#e6eee8}
#sp-bottom a:hover,#sp-footer a:hover{color:var(--tm-gold)}
.footer-carousel-track{gap:10px}
.banneritem img[src*="banner-tribunal-manaus"]{max-width:100%;width:100%;height:auto;object-fit:cover;border-radius:10px}
#sp-header-mobile .tm-brand-logo,.mobile-logo .tm-brand-logo{width:min(84vw,370px)!important;height:auto!important}
#offcanvas-toggler,.offcanvas-toggler{color:var(--tm-green)!important}
.tm-notice{position:fixed;right:22px;bottom:20px;background:var(--tm-green-deep);color:white;box-shadow:0 10px 32px #0003;padding:13px 20px;border-left:4px solid var(--tm-gold);border-radius:9px;font:500 14px/1.5 Arial,sans-serif;z-index:99999;max-width:min(400px,90vw);transition:opacity .2s}
.tm-notice[hidden]{display:none!important}
mark.tm-search-match{background:#ffeaab;outline:2px solid #b68b4f}
@media(max-width:991px){#sp-header .tm-brand-logo{width:min(86vw,385px)!important}#sp-header .sp-megamenu-parent{font-size:13px}}
@media(max-width:767px){#sp-header{display:none!important}#sp-header-mobile{border-top:4px solid var(--tm-gold)}.logo-image-phone.tm-brand-logo{width:min(75vw,305px)!important}.banneritem img[src*="banner-tribunal-manaus"]{min-height:88px;object-fit:cover;object-position:left center}}

/* Ajustes finais: marca, rodapé e cabeçalho em telas menores */
.tm-footer-name{font-family:Georgia,serif!important;font-size:1.2rem!important;font-weight:600;color:#f7f0e5!important;margin-top:.4rem}
#sp-bottom img[src*="logo-tribunal-manaus-claro"],#sp-footer img[src*="logo-tribunal-manaus-claro"]{width:min(100%,280px)!important;height:auto!important;}
#mobiletitle .tm-brand-logo{display:block;width:min(85vw,330px)!important;height:auto!important;}
#mobiletitle{font-size:inherit;margin:0}


/* ==== CABEÇALHO CORRIGIDO — versão 2 ====================================== */
/* Substitui floats e deslocamentos herdados do arquivo original por grid/flex. */
#sp-top-bar{background:#fff;border-top:5px solid #0f3d2e;border-bottom:1px solid #e4e8e5;padding:9px 0!important;font:400 12px/1.3 Arial,Helvetica,sans-serif!important;color:#47574f}
#sp-top-bar>.container>.container-inner>.row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 20px;margin:0!important}
#sp-top-bar #sp-top1,#sp-top-bar #sp-top2{width:auto!important;max-width:none!important;padding:0!important;min-width:0;float:none!important}
#sp-top-bar #sp-top2{justify-self:end}
#sp-top-bar .sp-module{display:block!important;margin:0!important;float:none!important}
#sp-top-bar .sp-module-content{display:block}
#sp-top-bar .menu{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:12px;margin:0!important;padding:0!important;list-style:none}
#sp-top-bar .menu li{float:none!important;display:flex!important;align-items:center;padding:0!important;white-space:nowrap;border:none!important;line-height:1.2}
#sp-top-bar .menu li a{display:inline-flex;align-items:center;gap:4px;color:#43534b;font-size:12px;white-space:nowrap}
#sp-top-bar .menu .image-title{display:inline-block}
#sp-top-bar .menu li img{float:none!important;display:inline-block!important;height:14px;width:auto;max-width:17px;max-height:15px;margin:0!important;order:2}
#sp-top-bar #sp-top2 .menu li:not(:first-child):not(:last-child):before{content:"";display:block;width:1px;height:16px;background:#dbe2dc;margin-right:12px}
#sp-top-bar #sp-top2 .menu li:last-child img{height:22px;max-height:22px;max-width:22px}
#sp-top-bar .tm-icon{width:15px!important;height:15px!important;order:0!important}
#sp-top-bar a:focus-visible{outline:2px solid var(--tm-gold)}
section#sp-horario{padding:6px 0!important;background:#f6f8f7;border-bottom:1px solid #e7eee9}
section#sp-horario p{font:500 12px/1.5 Arial,Helvetica,sans-serif!important;margin:0!important;color:#52635b}
section#sp-horario a{color:inherit;text-decoration:none}

#sp-header{background:#f8faf8!important;height:auto!important;min-height:142px!important;border-top:3px solid #c9a46b!important;box-shadow:none!important;padding:17px 0 15px!important;animation:none!important}
#sp-header>.container>.container-inner>.row{display:grid!important;grid-template-columns:minmax(0,4.3fr) minmax(0,7.7fr);align-items:center!important;column-gap:23px;margin:0!important}
#sp-header #sp-logo,#sp-header #sp-top3{width:100%!important;max-width:none!important;min-width:0!important;padding:0!important;float:none!important;margin:0!important}
#sp-header #sp-logo .sp-column{display:flex!important;justify-content:flex-start!important;align-items:center!important;height:auto!important;gap:0!important;flex-wrap:nowrap!important}
#sp-header #sp-logo .sp-module{display:none!important}
#sp-header #sp-logo .logo{height:auto!important;display:flex!important;margin:0!important;max-width:100%!important}
#sp-header #sp-logo .logo a{display:flex!important;width:100%;align-items:center;max-width:100%}
#sp-header #sp-logo .tm-brand-logo{width:min(100%,365px)!important;max-width:100%!important;height:auto!important;object-fit:contain;display:block}
#sp-header #sp-top3>.sp-column{display:grid!important;grid-template-columns:minmax(0,1fr) 240px;grid-template-rows:42px 42px;gap:12px 14px;align-content:center;align-items:center!important;height:auto!important;min-height:96px;margin:0!important;flex:none!important}
#sp-header #sp-top3 .sp-module{margin:0!important;position:static!important;float:none!important;width:auto!important;max-width:none!important;padding:0!important}
#sp-header #sp-top3> .sp-column > .social-icons{display:flex!important;grid-column:1;grid-row:1;justify-content:flex-end;gap:6px;align-items:center;margin:0!important;padding:0!important;white-space:nowrap}
#sp-header .social-icons li{display:flex!important;align-items:center;margin:0!important;padding:0!important;line-height:1}
#sp-header .social-icons a{display:grid!important;place-items:center;width:32px;height:32px;border:1px solid #e2e8e3;border-radius:8px;background:#fff;color:#0f3d2e!important;transition:background .18s,border-color .18s}
#sp-header .social-icons a:hover{background:#f1e8d9;border-color:var(--tm-gold)}
#sp-header .social-icons .tm-icon{height:17px!important;width:17px!important}
#sp-header .social-icons svg{display:block;width:17px!important;height:17px!important;top:0!important;position:static!important}
#sp-header #sp-top3> .sp-column > .sp-module:not(.ndline):not(.breakline){grid-column:2;grid-row:1;justify-self:end;align-self:center}
#sp-header #sp-top3 .item-2702 a{width:36px;height:36px;display:grid;place-items:center;background:white;border:1px solid #e2e8e3;border-radius:8px}
#sp-header #sp-top3 .item-2702 img{height:22px!important;max-height:22px!important;width:auto;margin:0!important;float:none!important}
#sp-header #sp-top3> .sp-column > .ndline{grid-column:2;grid-row:2;align-self:center}
#sp-header #sp-top3 .search,#sp-header #sp-top3 .search form{position:relative!important;width:100%!important;margin:0!important;display:block!important}
#sp-header #sp-top3 .search input{box-sizing:border-box!important;width:100%!important;height:39px!important;border:1px solid #ccd7d0!important;border-radius:7px!important;background:#fff!important;padding:7px 40px 7px 12px!important;font:400 14px/1.5 Arial,sans-serif!important;box-shadow:none!important;color:#1b3328}
#sp-header #sp-top3 .search input:focus{outline:2px solid #c9a46b;outline-offset:1px}
#sp-header #sp-top3 .tm-search-submit{display:grid!important;place-items:center!important;position:absolute!important;right:2px;top:2px;width:35px;height:35px;padding:0!important;margin:0!important;background:transparent;border:0;border-radius:6px;cursor:pointer}
#sp-header #sp-top3 .tm-search-submit img{height:18px!important;width:18px!important;max-height:none!important;float:none!important;margin:0!important}
#sp-header #sp-top3>.sp-column>.breakline{grid-column:1;grid-row:2;align-self:center;justify-self:end}
#sp-header #sp-top3 .breakline .menu{display:flex!important;flex-wrap:wrap!important;align-items:center;justify-content:flex-end;gap:7px 13px;margin:0!important;padding:0!important}
#sp-header #sp-top3 .breakline li{display:flex!important;padding:0!important;margin:0!important;white-space:nowrap}
#sp-header #sp-top3 .breakline a{display:inline-flex!important;align-items:center;gap:5px;color:#234939!important;font:500 12px/1.4 Arial,sans-serif!important}
#sp-header #sp-top3 .breakline a:hover{color:#b18c50!important}
#sp-header #sp-top3 .breakline a img.tm-icon{width:18px!important;height:18px!important;max-height:18px!important;float:none!important;margin:0!important}
#sp-header .tm-icon{display:inline-block;object-fit:contain;vertical-align:middle}
#sp-header #sp-top3 .sp-module.ndline form::after{display:none!important;content:none!important}
/* Prevent the old CSS from pushing the second-row modules out of position. */
#sp-header #sp-top3 .ndline,#sp-header #sp-top3 .breakline{top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important}

/* Other Font Awesome icons now use local SVG images. */
.tm-icon{width:1em;height:1em;display:inline-block;vertical-align:middle;object-fit:contain;flex:0 0 auto}
#sp-mobile-footer .tm-icon{width:22px;height:22px}
#sp-top3 .tm-icon{max-height:22px!important}

@media(max-width:1199px) and (min-width:768px){
 #sp-top-bar>.container>.container-inner>.row{grid-template-columns:1fr!important;gap:9px}
 #sp-top-bar #sp-top2{justify-self:start}
 #sp-header>.container>.container-inner>.row{grid-template-columns:minmax(0,4fr) minmax(0,8fr);column-gap:14px}
 #sp-header #sp-top3>.sp-column{grid-template-columns:minmax(0,1fr) 205px;gap:9px}
 #sp-header #sp-top3 .breakline .menu{gap:7px}
 #sp-header #sp-top3 .breakline a{font-size:11.5px!important}
 #sp-header #sp-logo .tm-brand-logo{width:min(100%,325px)!important}
}
@media(max-width:991px) and (min-width:768px){
 #sp-header #sp-top3>.sp-column{grid-template-columns:minmax(0,1fr) 175px;grid-template-rows:38px auto}
 #sp-header #sp-top3 .social-icons a{width:27px;height:27px}
 #sp-header #sp-top3 .social-icons .tm-icon{width:14px!important;height:14px!important}
 #sp-header #sp-top3 .breakline .menu{row-gap:4px}
}
@media(max-width:767px){
 #sp-header{display:none!important}
 section#sp-horario{padding:7px 0!important}
 section#sp-horario p{font-size:11px!important}
 #sp-mobile-header{background:#f8faf8;border-top:3px solid var(--tm-gold)}
 #sp-mobile-header #mobiletitle .tm-brand-logo{width:min(75vw,310px)!important;max-height:100px!important;object-fit:contain}
 #sp-mobile-header .sp-column{min-width:0}
}

/* Ajustes de validação visual: logo começa à esquerda, navegação não extrapola. */
#sp-header #sp-logo .sp-column{flex-direction:row!important;justify-content:flex-start!important}
#sp-header #sp-logo .logo{width:100%!important;justify-content:flex-start!important;flex:1 1 auto!important}
#sp-header #sp-logo .logo a{justify-content:flex-start!important}
#sp-header #sp-logo img.tm-brand-logo{width:min(100%,365px)!important;max-width:100%!important}
#sp-sub-menu{background-color:#0f3d2e!important;overflow:hidden!important}
#sp-sub-menu .container-inner,#sp-sub-menu .row,#sp-sub-menu #sp-position1{max-width:100%!important;min-width:0!important}
#sp-sub-menu #sp-position1 .menu{display:flex!important;flex-wrap:nowrap!important;white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;max-width:100%!important;padding-bottom:2px!important;scrollbar-width:thin}
#sp-sub-menu #sp-position1 .menu>li{flex:0 0 auto!important;white-space:nowrap!important}
#sp-sub-menu a,#sp-sub-menu .menu-separator{color:#fff!important}
#sp-sub-menu a:hover,#sp-sub-menu .menu-separator:hover{color:#f1d5a7!important}
#sp-mobile-footer .menu img.tm-icon{width:20px!important;height:20px!important;display:inline-block!important;margin:0 4px 0 0!important;vertical-align:middle}
#sp-mobile-header{padding:12px 0!important}
#sp-mobile-header #mobiletitle{margin:0!important;line-height:1}
#sp-mobile-header #mobiletitle a{display:block;max-width:100%}
#sp-mobile-header #mobiletitle img{max-height:92px}
@media(max-width:1199px) and (min-width:768px){
 #sp-sub-menu #sp-position1 .menu>li>a,#sp-sub-menu #sp-position1 .menu>li>span{white-space:nowrap!important}
}
/* Barra de atalhos mobile: cinco opções sempre alinhadas. */
@media (max-width:767px){
 #sp-mobile-footer .menu{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;align-items:center!important;padding:5px 0!important;margin:0!important;width:100%!important}
 #sp-mobile-footer .menu li{display:block!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:0!important}
 #sp-mobile-footer .menu li a{display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:3px!important;white-space:nowrap!important;font:500 10px/1.15 Arial,sans-serif!important;padding:6px 0!important}
 #sp-mobile-footer .menu img.tm-icon{width:18px!important;height:18px!important;margin:0!important}
}
