/*
 * Public mobile layout corrections — v2.
 * This file is intentionally loaded last.
 */
@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 {
        right: 3.4rem !important;
    }

    /* Cookie content stays full-width while leaving the tool column usable. */
    .portal-cookie-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        padding: 1rem 4.15rem 1rem 1rem;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 1.1rem 1.1rem 0 0;
    }

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

    .portal-cookie-banner-actions {
        justify-content: flex-start;
        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;
    }}
