﻿/* Mobile / tablet responsive overrides extracted from main.css.
   Loaded after main.css so these viewport-width media queries can override it. */



/* Below md, breadcrumbs are the only "back up a level" affordance on most
   pages (no sidebar, no nav-toggler) — a 4-5 level chain doesn't fit a
   phone width, so instead of hiding the whole thing outright, collapse it
   to just the parent + current crumb (the two items closest to where the
   user actually is). Items stay in the DOM (for the >=768px view below)
   so this is a display-only collapse, not a content change. */
@media (max-width: 767.98px) {
    .breadcrumb-item {
        display: none;
    }

    .breadcrumb-item:nth-last-child(2),
    .breadcrumb-item:nth-last-child(2) ~ .breadcrumb-item {
        display: flex;
        align-items: center;
        max-width: 45vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-item:nth-last-child(2)::before {
        content: none !important;
        padding-left: 0 !important;
    }
}

/* Force a single column on phones; the auto-fit base rule below handles tablets & up */
@media (max-width: 767.98px) {
    .tile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .banner-img-global {
        height: 150px; /* smaller height for mobile */
    }
}

@media (max-width: 768px) {
    .table {
        width: 100%;
    }

        .table thead {
            font-size: .75rem;
            text-transform: uppercase;
            vertical-align: middle;
        }

        .table tbody {
            font-size: .65rem;
            text-transform: uppercase;
            vertical-align: middle;
            height: 30px;
            padding: 10px;
        }

            .table tbody a {
                font-size: .55rem;
                text-decoration: none;
            }

            .table tbody span {
                display: inline-flex;
                margin: auto;
            }
}

@media (max-width: 576px) { /* Bootstrap 'sm' breakpoint and below */
    #logo-img {
        height: 35px !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .popup-btn {
        left: -30px; /* Adjust button position for smaller screens */
    }

    .popup-container.open .popup-btn {
        left: -60px;
    }
}

/* Mobile: make it responsive */
@media (max-width: 576px) {
    .preview-img {
        width: 100%;
        height: auto; /* keep aspect ratio */
        max-height: 150px; /* optional: cap height */
    }
}

@media (max-width: 767.98px) {
    .mf-page-header .d-flex.justify-content-between {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .mf-hero img {
        height: 150px;
    }

    .mf-hero-content {
        padding: 0 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .mf-tab-link span {
        display: none;
    }

    .mf-tab-link {
        padding: .55rem;
    }
}

@media (max-width: 575.98px) {
    .mf-stat-tile-value {
        font-size: 1.6rem;
    }
}

@media (min-width: 576px) {
    .mf-link-preview-link {
        flex-direction: row;
        align-items: stretch;
    }
}

@media (min-width: 576px) {
    .mf-link-preview-img {
        width: 200px;
        height: auto;
    }
}

@media (max-width: 767.98px) {
    .mf-destination-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991.98px) {
    .mf-filter-toggle {
        display: block;
    }
}

@media (min-width: 992px) {
    #filterRouteCollapse {
        display: block !important;
    }
}

@media (max-width: 767.98px) {
    .mf-dispatch-table tbody tr {
        padding: .85rem;
    }

    .td-lm {
        order: -1;
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .mf-band-stop__label {
        display: none;
    }
}