/* Shared responsive guardrails for every visitor-facing page. */
html {
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html {
        overflow-x: clip;
    }
}

.visitor-page-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    .visitor-page-body {
        overflow-x: clip;
    }
}

.visitor-page-body *,
.visitor-page-body *::before,
.visitor-page-body *::after {
    box-sizing: border-box;
}

.visitor-page-body main,
.visitor-page-body section,
.visitor-page-body header,
.visitor-page-body footer,
.visitor-page-body nav,
.visitor-page-body [class*="grid"],
.visitor-page-body [class*="flex"] {
    min-width: 0;
}

.visitor-page-body img,
.visitor-page-body video,
.visitor-page-body canvas,
.visitor-page-body svg {
    max-width: 100%;
}

.visitor-page-body iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

.visitor-page-body p,
.visitor-page-body li,
.visitor-page-body h1,
.visitor-page-body h2,
.visitor-page-body h3,
.visitor-page-body h4,
.visitor-page-body a,
.visitor-page-body span {
    overflow-wrap: anywhere;
}

.visitor-page-body table {
    max-width: 100%;
}

.visitor-page-body .table-responsive,
.visitor-page-body [class*="overflow-x-auto"] {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.visitor-page-body input,
.visitor-page-body select,
.visitor-page-body textarea,
.visitor-page-body button {
    max-width: 100%;
}

#mobileMenu {
    width: min(350px, calc(100vw - 24px));
    height: 100vh;
    height: 100dvh;
    overscroll-behavior: contain;
}

#mobileMenu > div:last-child {
    min-height: auto;
}

@media (max-width: 767.98px) {
    .visitor-page-body input,
    .visitor-page-body select,
    .visitor-page-body textarea {
        font-size: 16px;
    }

    .visitor-page-body [data-aos] {
        max-width: 100%;
    }

    .visitor-page-body [class*="w-["],
    .visitor-page-body [class*="max-w-["] {
        max-width: 100%;
    }

    .visitor-page-body .text-6xl {
        font-size: 2.5rem;
        line-height: 1.12;
    }

    .visitor-page-body .text-5xl {
        font-size: 2.25rem;
        line-height: 1.15;
    }

    .visitor-page-body .text-4xl {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .visitor-page-body .text-3xl {
        font-size: 1.625rem;
        line-height: 1.25;
    }

    .visitor-page-body .py-24,
    .visitor-page-body .py-20 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .visitor-page-body .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .visitor-page-body .gap-14,
    .visitor-page-body .gap-12,
    .visitor-page-body .gap-10 {
        gap: 2rem;
    }

    .visitor-page-body .p-10 {
        padding: 1.5rem;
    }

    .visitor-page-body .p-8 {
        padding: 1.25rem;
    }

    .visitor-page-body a[class*="px-8"],
    .visitor-page-body button[class*="px-8"] {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .visitor-page-body .faculty-leader-card {
        height: auto !important;
    }

    .visitor-page-body .faculty-leader-image {
        height: auto !important;
        aspect-ratio: 4 / 5;
        max-height: 370px;
    }

    .visitor-page-body #leadership [style*="height:500px"] {
        height: auto !important;
    }

    .visitor-page-body #leadership [style*="height:370px"] {
        height: auto !important;
        aspect-ratio: 4 / 5;
        max-height: 370px;
    }
}

@media (max-width: 479.98px) {
    #mobileMenu {
        width: calc(100vw - 16px);
    }

    .visitor-page-body .text-6xl,
    .visitor-page-body .text-5xl {
        font-size: 2rem;
    }

    .visitor-page-body .text-4xl {
        font-size: 1.75rem;
    }

    .visitor-page-body [class*="h-[350px]"] {
        height: auto;
        min-height: 300px;
    }

    .visitor-page-body [class*="h-[500px]"],
    .visitor-page-body [class*="h-[450px]"] {
        height: auto;
        min-height: 320px;
    }

    .visitor-page-body .rounded-3xl {
        border-radius: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .visitor-page-body {
        scroll-behavior: auto;
    }
}
