/*
 * Public mobile layout corrections — v2.
 * This file is intentionally loaded last.
 */
.portal-vlibras-mobile-close {
    display: none;
}

@media (max-width: 767.98px) {
    html,
    body,
    .portal-body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    /* Header and expanded navigation must remain comfortably touchable. */
    .portal-navbar {
        --portal-navbar-min-height: 4rem;
        --portal-navbar-toggle-padding-y: 0.65rem;
        --portal-navbar-toggle-padding-x: 1rem;
        --portal-navbar-toggle-gap: 0.5rem;
        --portal-navbar-toggle-font-size: 1rem;
        --portal-navbar-toggle-icon-size: 1.5rem;
    }

    .portal-navbar .container,
    .portal-header.is-condensed .portal-navbar .container {
        min-height: 4rem;
        flex-wrap: wrap;
    }

    .portal-nav-toggle {
        min-width: 6.25rem;
        min-height: 3rem;
        justify-content: center;
    }

    .portal-navbar .navbar-collapse,
    .portal-header.is-condensed .portal-navbar .navbar-collapse {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        flex: 0 0 100%;
        width: 100%;
        margin-top: 0;
        padding: 0.75rem;
    }

    .portal-navbar .nav-link,
    .portal-navbar .portal-nav-link-main,
    .portal-navbar .portal-nav-link-dropdown-only,
    .portal-navbar .portal-nav-dropdown-toggle {
        min-height: 2.75rem;
        padding: 0.7rem 0.85rem;
        font-size: 1rem;
        line-height: 1.25;
    }

    .portal-navbar .portal-nav-dropdown-toggle {
        min-width: 2.75rem;
    }

    /*
     * On mobile, the informative is the artwork itself. The desktop caption
     * layer is removed so the carousel ends exactly at the image boundary.
     */
    .portal-body .portal-home-informative-carousel .portal-home-carousel-item,
    .portal-body .portal-home-informative-carousel .portal-home-carousel-media,
    .portal-body .portal-home-informative-carousel .portal-home-carousel-placeholder {
        min-height: 0 !important;
        height: auto !important;
    }

    .portal-body .portal-home-informative-carousel .portal-home-carousel-media {
        display: block;
        background: transparent;
    }

    .portal-body .portal-home-informative-carousel .portal-home-carousel-media img {
        position: static;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: contain;
        object-position: center top;
        background: transparent;
    }

    .portal-body .portal-home-informative-carousel .portal-home-carousel-body,
    .portal-body .portal-home-informative-carousel .portal-home-carousel-overlay {
        display: none !important;
        min-height: 0 !important;
        height: 0 !important;
        padding: 0 !important;
    }

    /* Other central banners also follow their natural image proportion. */
    .portal-home-central-banner-section .portal-home-central-banner-frame {
        aspect-ratio: auto;
        min-height: 0;
        height: auto;
        background: transparent;
    }

    .portal-home-central-banner-section .portal-home-central-banner-image {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        object-fit: contain;
    }

    /* Public home and service cards use the complete mobile width. */
    .portal-home-shell,
    .portal-home-shell .portal-home-container,
    .portal-home-shell .portal-home-container--wide {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        padding-inline: 0;
    }

    .portal-home-layout-b .portal-home-b-services-layout {
        width: 100%;
        margin-inline: 0;
        padding-inline: 0;
    }

    .portal-home-layout-b .layout-b-services-grid {
        --bs-gutter-x: 0;
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .portal-home-layout-b .layout-b-services-grid > [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        padding-inline: 0;
    }

    .portal-home-layout-b .layout-b-services-grid .portal-shortcut-card-service--layout-b-clean {
        width: 100%;
        max-width: none;
        border-radius: 0;
    }

    /* Floating tools overlay content without reserving a right-hand rail. */
    .portal-floating-sidebar,
    .portal-client-layout-body .portal-floating-sidebar {
        right: 0;
        max-width: 100vw;
    }

    .portal-floating-panel {
        width: min(20rem, calc(100vw - 4.25rem));
        max-width: calc(100vw - 4.25rem);
    }

    .portal-vlibras-host .vw-plugin-wrapper {
        top: max(0.5rem, env(safe-area-inset-top)) !important;
        right: max(0.5rem, env(safe-area-inset-right)) !important;
        bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
        left: max(0.5rem, env(safe-area-inset-left)) !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        overflow: auto !important;
        transform: none !important;
    }

    .portal-vlibras-mobile-close:not([hidden]) {
        position: fixed;
        top: max(0.65rem, env(safe-area-inset-top));
        right: max(0.65rem, env(safe-area-inset-right));
        z-index: 2147483647;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        min-height: 2.75rem;
        padding: 0.55rem 0.8rem;
        border: 2px solid #ffffff;
        border-radius: 999px;
        color: #ffffff;
        background: #142f4c;
        box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.28);
        font: 700 0.82rem/1.1 "Source Sans Pro", sans-serif;
    }

    .portal-vlibras-mobile-close > span[aria-hidden="true"] {
        font-size: 1.35rem;
        line-height: 0.75;
    }

    .portal-vlibras-mobile-close:focus-visible {
        outline: 3px solid #ffbf47;
        outline-offset: 2px;
    }

    /* Cookie content stays full-width while leaving the tool column usable. */
    .portal-cookie-banner {
        left: 50%; right: auto; bottom: max(1rem, env(safe-area-inset-bottom));
        width: calc(100% - 32px); max-width: 640px; margin: 0;
        transform: translateX(-50%); box-sizing: border-box;
        padding: 1rem; border: 1px solid rgba(21,48,77,.12);
        border-radius: 12px;
    }

    .portal-cookie-banner-copy,
    .portal-cookie-banner-actions {
        flex: 1 1 100%;
        min-width: 0;
    }

    .portal-cookie-banner-actions {
        justify-content: center;
        gap: 0.6rem;
    }

    .portal-cookie-banner-actions .btn,
    .portal-cookie-banner-link {
        max-width: 100%;
        white-space: normal;
    }

    .portal-home-layout-b .portal-home-services-section,
    .portal-home-layout-b .portal-home-services-card {
        width: 100%;
        max-width: none;
        margin-inline: 0;
        padding-inline: 0 !important;
        border-radius: 0;
    }

    .portal-home-layout-b .portal-home-services-section > .row {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .portal-home-layout-b .portal-home-services-section > .row > [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
        padding-inline: 0;
    }

    .portal-home-layout-b .portal-home-services-section .portal-shortcut-card-service--layout-b-clean {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
    }
    .portal-body .portal-home-shell,
    .portal-layout-c-active .portal-home-shell,
    .portal-body .portal-home-shell.portal-home-layout-b {
        width: 100% !important;
        max-width: none !important;
        margin-inline: 0 !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .portal-body .portal-home-shell > .portal-home-container,
    .portal-body .portal-home-shell > .portal-home-container--wide,
    .portal-layout-c-active .portal-home-layout-c .portal-home-container {
        width: 100% !important;
        max-width: none !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
    }

    .portal-body .portal-home-container > section,
    .portal-body .portal-home-faq-section,
    .portal-body .portal-faq-shell {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }
    .portal-body .portal-home-layout-b .portal-home-services-section > .row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .portal-body .portal-home-layout-b .portal-home-services-section > .row > [class*="col-"] {
        display: flex;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }

    .portal-body .portal-home-layout-b .portal-home-services-section .portal-shortcut-card-service--layout-b-clean {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 1rem !important;
        overflow: hidden;
    }}
