/* Layout H: estrutura compartilhada; cores e paisagem da propria Empresa. */
@media(min-width:1200px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar{height:clamp(160px,13.2vw,214px)!important;min-height:0!important;max-width:1600px;margin-inline:auto;background:#fff var(--portal-layout-h-image,none) center 54%/cover no-repeat!important;border-radius:0!important;padding:0!important;overflow:visible}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:before,.portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:after{display:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar>.container{height:100%}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar-inner{height:100%;min-height:0!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:20px!important;flex-wrap:nowrap!important;padding:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-column{display:flex!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;gap:26px!important;flex-wrap:nowrap!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-column>.portal-brand{flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-copy{display:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-logo{width:230px!important;min-width:0!important;max-width:none!important;flex:none!important;min-height:0!important;height:101px!important;padding:0!important;border:0!important;background:transparent!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-logo img{width:230px!important;height:101px!important;max-height:none!important;object-fit:contain!important;filter:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-municipal-crest{padding:0!important;border:0!important;margin:0!important;flex:none!important;width:66px!important;height:78px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-municipal-crest img{width:66px!important;height:78px!important;max-height:none!important;object-fit:contain}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-certification{flex:none!important;width:168px!important;min-width:0!important;max-width:none!important;margin:0!important;border:0!important;padding:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-certification img{width:168px!important;max-height:66px!important;filter:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header-actions{display:flex!important;flex:none!important;margin-left:auto!important;gap:12px!important;align-items:center!important;position:relative}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header-actions>.portal-actions-toggle{display:inline-flex!important;align-items:center;gap:9px;height:42px;padding:0 16px!important;background:#fff!important;color:var(--portal-primary,#042339)!important;border:0!important;border-radius:9px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header-actions>.portal-header-search-button{display:inline-flex!important;width:42px!important;height:42px!important;align-items:center;justify-content:center;background:#f5f9fc!important;color:#174e70!important;border:1px solid #dce7ed!important;border-radius:9px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header-actions>.portal-actions-list:not(.show){display:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar,.portal-layout-h-active:not(.portal-high-contrast) .portal-navbar>.container{border-radius:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar-nav{width:100%;justify-content:space-between!important;column-gap:0!important;padding-inline:0!important;margin-inline:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar-nav>.nav-item>.nav-link{font-size:14px!important;font-weight:700!important;padding-inline:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar-nav>.nav-item:first-child>.nav-link{padding-left:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar-nav>.nav-item:last-child>.nav-link{padding-right:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar-nav>.nav-item>.nav-link{font-size:12.5px!important;font-weight:650!important}
}
@media(min-width:1200px) and (max-width:1399.98px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brand-column{gap:19px!important}.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-logo,.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-logo img{width:205px!important}.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-certification,.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-certification img{width:145px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-navbar-nav>.nav-item>.nav-link{font-size:13.5px!important}
}
@media(min-width:1200px){.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-column>.portal-brand{width:230px!important;max-width:none!important;justify-content:flex-start!important}.portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar>.container{padding-inline:12px!important}}@media(min-width:1200px) and (max-width:1399.98px){.portal-layout-h-active:not(.portal-high-contrast) .portal-brand-column>.portal-brand{width:205px!important}}
@media(min-width:1200px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header:not(.is-condensed) .portal-brandbar{height:130px!important;max-height:130px!important;min-height:130px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar>.container{height:100%!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar-inner{height:100%!important;min-height:0!important;max-height:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar{background-image:var(--portal-layout-h-image,none)!important;background-position:center 66%!important}
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .portal-layout-h-active:not(.portal-high-contrast) .portal-header:not(.is-condensed) .portal-brandbar {
        background: #fff var(--portal-layout-h-image,none) center 66% / cover no-repeat;
    }

    .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar .portal-brand-copy {
        display: none !important;
    }

    .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar .portal-header-actions > .portal-actions-toggle {
        color: var(--portal-primary, #042339) !important;
        background-color: #fff !important;
        border-color: var(--portal-primary, #042339);
    }

    .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar .portal-header-actions > .portal-header-search-button {
        color: #174e70;
        background-color: #f5f9fc;
        border-color: #b9cfdd;
    }
}

@media (max-width: 991.98px) {
    .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar {
        background:
            linear-gradient(90deg, transparent 72%, rgb(255 255 255 / 92%)),
            #fff var(--portal-layout-h-image,none) center 66% / cover no-repeat;
    }
}

/* As faixas pertencem ao layout, sem depender da foto cadastrada. */
@media(min-width:992px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar{position:relative;isolation:isolate}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar>.container{position:relative;z-index:2}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:before,
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:after{content:"";display:block!important;position:absolute;inset:0;pointer-events:none;z-index:0;opacity:1!important;transform:none!important;border-radius:0!important;background-image:none!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:before{background:color-mix(in srgb,var(--portal-primary) 14%,white)!important;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H470C540 0 510 130 660 160H0Z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:after{background:#fff!important;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H450C520 0 490 130 630 160H0Z'/%3E%3C/svg%3E") 0 0/100% 100% no-repeat}
}
@media(max-width:991.98px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar{position:relative;isolation:isolate}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar>.container{position:relative;z-index:1}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar:before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;background:linear-gradient(110deg,#fff 0 39%,color-mix(in srgb,var(--portal-primary) 12%,white) 39% 44%,transparent 45%)}
}

/* O mesmo desenho de onda e compartilhado por desktop, tablet e mobile. */
.portal-layout-h-active{
 --portal-h-wave-outer:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H425C475 0 475 110 535 160H0Z'/%3E%3C/svg%3E");
 --portal-h-wave-inner:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H400C445 0 445 110 500 160H0Z'/%3E%3C/svg%3E");
 --portal-h-wave-tint:linear-gradient(125deg,hsl(from var(--portal-primary) h 82% 84%),hsl(from var(--portal-primary) h 82% 95%));
}
@media(min-width:992px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar{border-bottom:0!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header:not(.is-condensed) .portal-navbar{border-top:0!important;margin-top:-1px!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar{background-size:58% auto!important;background-position:right 76%!important;background-repeat:no-repeat!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:before{background:var(--portal-h-wave-tint)!important;opacity:.85!important;mask:var(--portal-h-wave-outer) 0 0/100% 100% no-repeat}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-brandbar:after{mask:var(--portal-h-wave-inner) 0 0/100% 100% no-repeat}
}
@media(max-width:991.98px){
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar{background:#fff var(--portal-layout-h-image,none) calc(100% + 16px) -16px/auto 81px no-repeat!important}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar:before,
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar:after{content:"";position:absolute;inset:0 0 auto;pointer-events:none;z-index:0;width:auto;height:60px;border-radius:0;box-shadow:none}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar:before{background:var(--portal-h-wave-tint);opacity:.85;mask:var(--portal-h-wave-outer) 0 0/clamp(440px,110vw,490px) 100% no-repeat}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-header.is-condensed .portal-navbar:after{background:#fff;mask:var(--portal-h-wave-inner) 0 0/clamp(440px,110vw,490px) 100% no-repeat}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-nav-toggle{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;padding:10px!important;display:inline-flex!important;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--portal-primary) 22%,white)!important;border-radius:9px!important;background:rgb(255 255 255 / 82%)!important;color:var(--portal-primary)!important;box-shadow:0 2px 6px #00000014}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-nav-toggle .navbar-toggler-icon{display:block;width:26px;height:22px;background-image:linear-gradient(currentColor 0 3px,transparent 3px 9px,currentColor 9px 12px,transparent 12px 18px,currentColor 18px 21px)!important;background-size:100% 100%;background-repeat:no-repeat}
 .portal-layout-h-active:not(.portal-high-contrast) .portal-nav-toggle:focus-visible{outline:3px solid var(--portal-primary);outline-offset:2px}
}
