/* MILOBRAS: the approved compact desktop composition on portrait tablets only. */
.mb-portrait-service-title { display: none; }
@media (min-width: 768px) and (max-width: 1199px) and (orientation: portrait) {
  html body.mb-responsive { margin-top: 0 !important; }
  html body.mb-responsive header#header { top: 0 !important; }
  html body.mb-responsive header#header .container.preheader {
    position: relative !important;
    top: 0 !important;
    height: 76px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  html body.mb-responsive header#header .preheader > .row {
    height: 76px !important;
    padding-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    position: relative !important;
    margin: 0 !important;
  }
  html body.mb-responsive header#header .preheader > .row::before,
  html body.mb-responsive header#header .preheader > .row::after {
    display: none !important;
  }
  html body.mb-responsive header#header .preheader > .row > .preheaderlogo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    flex: 0 0 auto !important;
    margin: 0 auto 0 0 !important;
    float: none !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header .preheader > .row > .preheaderlogo .brand,
  html body.mb-responsive header#header .preheader > .row > .preheaderlogo img {
    position: static !important;
    width: 195px !important;
    height: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    display: block !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header .preheader > .row > :is(.idiomas, .redesocias, .milobras-anniversary),
  html body.mb-responsive header#header .preheader .idiomas a.milobras-language-toggle {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
  html body.mb-responsive header#header .preheader > .row > :is(.idiomas, .redesocias, .milobras-anniversary) {
    flex: 0 0 auto !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header .preheader .milobras-anniversary {
    order: 1 !important;
    width: 45px !important;
    height: 45px !important;
    line-height: 0 !important;
  }
  html body.mb-responsive header#header .preheader .milobras-anniversary svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }
  html body.mb-responsive header#header .preheader .idiomas { order: 2 !important; width: 30px !important; }
  html body.mb-responsive header#header .preheader .redesocias { order: 3 !important; width: auto !important; }
  html body.mb-responsive header#header .preheader .idiomas a.milobras-language-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 20px !important;
  }
  html body.mb-responsive header#header .preheader .redesocias .widget,
  html body.mb-responsive header#header .preheader .redesocias .textwidget {
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header .preheader .redesocias .textwidget {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    gap: 10px !important;
  }
  html body.mb-responsive header#header .preheader .redesocias a {
    position: relative !important;
    top: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 25px !important;
    height: 25px !important;
    transform: none !important;
  }
  html body.mb-responsive header#header .navbar,
  html body.mb-responsive header#header .navbar-inner,
  html body.mb-responsive header#header .mp,
  html body.mb-responsive header#header #mysticky-wrap,
  html body.mb-responsive header#header #mysticky-nav {
    position: static !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }
  html body.mb-responsive header#header .menu_principal > .row {
    margin: 0 !important;
  }
  html body.mb-responsive header#header .menu_principal {
    width: calc(100% - 70px) !important;
    max-width: none !important;
    margin: 0 35px !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header .menu_principal .mp {
    width: 100% !important;
    padding: 0 !important;
    background: #666 !important;
  }
  html body.mb-responsive header#header .btn.btn-navbar { display: none !important; }
  html body.mb-responsive header#header .nav-collapse {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  html body.mb-responsive header#header #main-menu {
    display: flex !important;
    float: none !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.mb-responsive header#header #main-menu::before,
  html body.mb-responsive header#header #main-menu::after {
    display: none !important;
  }
  html body.mb-responsive header#header #main-menu > li {
    position: relative !important;
    float: none !important;
    flex: 1 1 auto !important;
    width: auto !important;
    margin: 0 !important;
  }
  html body.mb-responsive header#header #main-menu > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    margin: 0 !important;
    font-size: clamp(10px, 1.2vw, 14px) !important;
    line-height: 20px !important;
    padding: 0 clamp(3px, .5vw, 6px) !important;
    white-space: nowrap !important;
    color: #fff !important;
    text-shadow: none !important;
  }
  html body.mb-responsive header#header #main-menu > li:is(.current-menu-item, .current-menu-ancestor, :hover, .open) > a {
    color: #fff !important;
    background: #86d500 !important;
  }
  html body.mb-responsive header#header #main-menu > li > .dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 230px !important;
    max-width: calc(100vw - 70px) !important;
    margin: 0 !important;
    z-index: 20;
  }
  html body.mb-responsive header#header #main-menu > li:nth-last-child(-n+3) > .dropdown-menu {
    left: auto !important;
    right: 0 !important;
  }
  html body.mb-responsive header#header #main-menu > li.mb-portrait-submenu-open > .dropdown-menu {
    display: block !important;
  }

  html body.home.mb-responsive > .container:has(> .row > .AreaVideo) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-auto-rows: auto;
    --mb-portrait-wide: 66%;
    --mb-portrait-narrow: 34%;
  }
  html body.home.mb-responsive > .container > .row:has(> .AreaVideo) { grid-row: 1; }
  html body.home.mb-responsive > .container > .row:has(> .AreaNovidades) { grid-row: 2; }
  html body.home.mb-responsive > .container > .row:has(.AreaVideo) > .AreaVideo,
  html body.home.mb-responsive > .container > .row:has(.AreaNovidades) > .AreaServicos {
    width: var(--mb-portrait-wide) !important;
  }
  html body.home.mb-responsive > .container > .row:has(.AreaVideo) > .AreaBemvindos,
  html body.home.mb-responsive > .container > .row:has(.AreaNovidades) > .AreaNovidades {
    width: var(--mb-portrait-narrow) !important;
  }
  html body.home.mb-responsive .AreaVideo > .widget,
  html body.home.mb-responsive .AreaVideo .textwidget { align-items: flex-start !important; }
  html body.home.mb-responsive #videoContainer {
    height: var(--mb-portrait-video-height, auto) !important;
  }
  html body.home.mb-responsive #myVideo {
    object-fit: cover !important;
    object-position: center !important;
  }
  /* Add 8px to each photo using existing empty space, preserving card heights. */
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) > .widget {
    padding: 0 16px 40px !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) .textwidget,
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) .textwidget p {
    font-size: 12px !important;
    line-height: 16px !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) .textwidget p {
    margin: 0 0 5px !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) > .widget > .textwidget :is(h2, p) {
    padding: 0 !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) .textwidget > img {
    height: clamp(80px, calc(8.8vw + 8px), 98px) !important;
    aspect-ratio: auto !important;
    width: calc(100% + 32px) !important;
    max-width: none !important;
    margin-left: -16px !important;
  }
  html body.home.mb-responsive .SideBemvindos > .widget > .textwidget > p:nth-of-type(2),
  html body.home.mb-responsive .SideBemvindos > .widget > .textwidget > p:nth-of-type(4) br {
    display: none !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) > .widget > .textwidget h2 {
    margin: 10px 0 6px !important;
  }
  html body.home.mb-responsive :is(.SideBemvindos, .Sidenovidades) > .widget .textwidget a.LinkVerde {
    position: absolute !important;
    top: auto !important;
    bottom: 20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
  }
  html body.home.mb-responsive .Sidenovidades > .widget {
    padding-bottom: 56px !important;
  }
  html body.home.mb-responsive .SideBemvindos > .widget > .textwidget p.classMais {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }
  /* The 4px gained below the heading increases the photos, keeping row height. */
  html body.home.mb-responsive #menu-servicos.menuservicos {
    gap: 18px !important;
    min-height: 224px !important;
  }
  html body.home.mb-responsive .AreaServicos #text-7.widget_text {
    padding-top: 12px !important;
    margin-bottom: 8px !important;
  }
  html body.home.mb-responsive .AreaServicos #text-7.widget_text h2 {
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 6px !important;
  }
  html body.home.mb-responsive .AreaServicos #text-7.widget_text h2::after {
    display: none !important;
  }
  html body.home.mb-responsive .AreaServicos #text-7.widget_text .textwidget,
  html body.home.mb-responsive .AreaServicos #text-7.widget_text .textwidget p {
    font-size: 12px !important;
    line-height: 16px !important;
  }
  html body.home.mb-responsive .AreaServicos #text-7.widget_text .textwidget p {
    margin-bottom: 0 !important;
    position: relative !important;
    top: -2px !important;
  }
  html body.home.mb-responsive .AreaServicos :is(#text-7.widget_text, #better-menu-widget-2) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  html body.home.mb-responsive .AreaServicos h2 > :is(.milobras-home-service-title-full, .milobras-home-service-title-short) {
    display: none !important;
  }
  html body.home.mb-responsive .AreaServicos h2 > .mb-portrait-service-title {
    display: inline !important;
  }
  html body.home.mb-responsive :is(#text-6, #text-11, #text-7, #text-9, #strong-testimonials-view-widget-2, #googlemapswidget-2) h2,
  html body.home.mb-responsive :is(.AreaTestemunhos, .AreaMapa) .widget h2,
  html body.home.mb-responsive #milobras-home-projects-title,
  html body.mb-responsive #milobras-site-footer h2 {
    font: 700 16px/20px 'Roboto Condensed', sans-serif !important;
  }
  html body.home.mb-responsive #milobras-home-projects-title > span {
    font: inherit !important;
  }
  html body.home.mb-responsive .AreaSpot.AreaServicos #better-menu-widget-2 #menu-servicos.menuservicos > li:is(#menu-item-67, #menu-item-68, #menu-item-65) {
    height: 100% !important;
    aspect-ratio: auto !important;
  }
  html body.home.mb-responsive .AreaSpot.AreaServicos #better-menu-widget-2 #menu-servicos.menuservicos > li:is(#menu-item-67, #menu-item-68, #menu-item-65) > a,
  html body.home.mb-responsive .AreaSpot.AreaServicos #better-menu-widget-2 #menu-servicos.menuservicos > li > a > span {
    font-size: clamp(11px, 1.35vw, 14px) !important;
    line-height: 16px !important;
    max-width: 100% !important;
  }
  html body.home.mb-responsive .AreaSpot.AreaServicos #better-menu-widget-2 #menu-servicos.menuservicos > li:is(#menu-item-67, #menu-item-68, #menu-item-65) > a::after {
    width: min(60px, 70%) !important;
    bottom: 0 !important;
  }
  html body.mb-responsive :is(.AreaTestemunhos .widget a.TestemunhosLerTodos, .AreaMapa .widget a.mb-office-directions) {
    font-size: 12px !important;
    line-height: 20px !important;
  }
  html body.mb-responsive .AreaTestemunhos .widget a.TestemunhosLerTodos {
    right: 0 !important;
    margin-right: 20px !important;
  }
  html body.mb-responsive .AreaMapa .widget a.mb-office-directions {
    margin-right: 20px !important;
  }
  html body.mb-responsive #milobras-site-footer .milobras-site-footer__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .85fr) minmax(0, max-content) !important;
    gap: clamp(18px, 3.2vw, 32px) !important;
  }
  html body.mb-responsive #milobras-site-footer .milobras-site-footer__brand > p {
    max-width: 100% !important;
  }
}
@media (min-width: 768px) and (max-width: 899px) and (orientation: portrait) {
  html body.home.mb-responsive > .container:has(> .row > .AreaVideo) {
    --mb-portrait-wide: 62%;
    --mb-portrait-narrow: 38%;
  }
}
