/* Shared public-site mobile layout. Loaded after each page stylesheet. */
.site-logo {
    width: 100px;
    height: auto;
}

@media (max-width: 1199.98px) {
    .fixed-top .container {
        max-width: none;
    }

    .navbar {
        min-height: 68px;
    }

    .navbar-collapse {
        border-top: 1px solid rgba(0, 0, 0, .08);
        padding: .5rem 0 1rem;
    }

    .navbar .navbar-nav .nav-link {
        padding: .7rem 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, .06);
    }

    .navbar .dropdown-menu {
        border: 0;
        background: #f8f9fa !important;
        margin: 0 .75rem;
        padding: .25rem 0;
    }

    .navbar .dropdown-item {
        padding: .65rem 1rem;
        white-space: normal;
    }
}

@media (max-width: 767.98px) {
    /* Let the header participate in normal page flow on phones. This prevents
       breadcrumb titles and the first form fields from sitting underneath it. */
    .fixed-top {
        position: sticky !important;
        top: 0;
        z-index: 1030;
    }

    body {
        font-size: .95rem;
    }

    .fixed-top .container {
        width: 100%;
    }

    .topbar {
        padding: .4rem .75rem;
        font-size: .78rem;
        line-height: 1.35;
    }

    .topbar-info a {
        margin-right: 0 !important;
        max-width: 100%;
    }

    .topbar-icon .btn-square {
        width: 28px;
        height: 28px;
    }

    .topbar-info {
        row-gap: .35rem !important;
    }

    .navbar {
        min-height: 60px;
    }

    .site-logo {
        width: 76px;
    }

    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
    }

    .fixed-top .row,
    .fixed-top [class*="col-"] {
        overflow: visible;
    }

    .navbar .navbar-nav .nav-link {
        font-size: 1rem;
    }

    /* Keep page content inside the viewport without clipping it. */
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    .explore-section.container-fluid,
    .explore-section .container-fluid,
    .press-hero-section .container,
    .press-section .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .row {
        --bs-gutter-x: 1.25rem;
    }

    img,
    video,
    iframe,
    embed,
    object {
        max-width: 100%;
    }

    iframe {
        width: 100%;
    }

    .display-1,
    .display-2,
    .display-3,
    .display-4,
    .display-5 {
        overflow-wrap: anywhere;
    }

    .display-3 { font-size: clamp(2rem, 9vw, 3rem); }
    .display-4 { font-size: clamp(1.85rem, 8vw, 2.5rem); }

    /* Home banner: use a clear content-first stack instead of desktop's
       absolutely positioned portrait and excess top spacing. */
    #heroSlider .hero-section {
        height: auto;
        min-height: 0;
        padding: 0;
        background-position: 62% center;
    }

    #heroSlider .hero-container {
        min-height: min(760px, calc(100svh - 60px));
        margin-top: 0 !important;
    }

    #heroSlider .hero-content {
        height: auto !important;
        margin-top: 0 !important;
        padding-top: 2rem !important;
        padding-bottom: 0 !important;
    }

    #heroSlider .pd_top_100 {
        height: auto;
        padding-top: 0 !important;
    }

    #heroSlider .hero-copy {
        padding: 0 1rem;
    }

    #heroSlider .hero-title {
        margin-bottom: 1rem !important;
        font-size: clamp(1.9rem, 8vw, 2.55rem);
        line-height: 1.15;
    }

    #heroSlider .hero-text {
        margin-bottom: 1.5rem !important;
        font-size: 1rem;
        line-height: 1.55;
    }

    #heroSlider .hero-actions .btn {
        width: 100%;
        min-height: 48px;
        padding: .7rem 1rem !important;
    }

    #heroSlider .man-wrapper {
        position: relative;
        right: auto;
        bottom: auto;
        height: auto;
        margin-top: 1.25rem;
        justify-content: center;
    }

    #heroSlider .man-img-fluid {
        width: min(82vw, 310px);
        max-width: 100%;
        height: auto;
        max-height: 380px;
    }

    #heroSlider .hero-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .62) 56%, rgba(0, 0, 0, .28) 100%);
    }

    .pd_top_50 {
        padding-top: 2rem;
    }

    .card-body.p-4,
    .card-body.p-md-5 {
        padding: 1rem !important;
    }

    .btn {
        white-space: normal;
    }

    .input-group {
        flex-wrap: nowrap;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .footer .py-5.px-5 {
        padding: 2rem 1rem !important;
    }

    .footer-item,
    .footer-contact-office {
        overflow-wrap: anywhere;
    }

    .footer-item.d-flex.align-items-center {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .footer-img {
        width: 88px;
        height: 88px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        right: 1rem;
        bottom: 1rem;
    }

    /* Content-type links remain available and wrap instead of overflowing. */
    .content-type-nav,
    .category-tabs,
    .scheme-tabs {
        flex-wrap: wrap !important;
        gap: .5rem;
    }

    .content-type-nav .content-type-label,
    .content-type-nav .content-type-link,
    .category-tabs > *,
    .scheme-tabs .nav-link {
        margin: 0 !important;
    }

    /* These decorative labels were previously removed by gallery styles. */
    .explore-section .overlap-text {
        display: inline !important;
    }

    /* The latest-updates cards are content, so expose the complete list on
       phones instead of requiring a separate "See more" interaction. */
    #fb-posts-container .fb-post-card-wrapper.d-none {
        display: block !important;
    }

    #load-more-container {
        display: none;
    }
}
