/* Shared responsive adjustments, loaded after the individual page styles. */
/* Keep the timeline readable on tablets without horizontal scrolling. */
@media (min-width: 768px) and (max-width: 991px) {
    .journey-showcase-track {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        gap: 16px;
        padding: 20px 0;
        min-height: 0;
        overflow: visible;
    }
    .journey-showcase .journey-step {
        width: auto;
        height: auto;
        min-height: 240px;
        margin: 0;
        clip-path: none;
        border-radius: 12px;
    }
    .journey-showcase .journey-step-inner { padding: 24px 16px; }
    .journey-showcase .journey-step-future { grid-column: 1 / -1; }
    .journey-showcase .journey-step-future::before { display: none; }
}

@media (max-width: 991px) {
    .careers-jobs-scroll {
        max-width: 100%;
        overscroll-behavior-x: contain;
    }
    .careers-apply-button { min-height: 44px; }
}

/* Keep the expanded desktop navigation and its arrows on one line. */
@media (min-width: 992px) {
    header.main-header .main-menu { min-width: 0; }
    header.main-header .main-menu .nav-menu-wrapper { margin: 0 0 0 16px; }
    header.main-header .main-menu .navbar-nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
    header.main-header .main-menu .navbar-nav > li { margin: 0 2px; }
    header.main-header .main-menu .navbar-nav > li > a {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 12px 8px !important;
        white-space: nowrap;
    }
    header.main-header .main-menu .navbar-nav > li.submenu > a::after {
        flex: 0 0 7px;
        margin: -4px 0 0;
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    header.main-header .navbar-brand img { width: 150px; }
    header.main-header .main-menu .nav-menu-wrapper { margin-left: 10px; }
    header.main-header .main-menu .navbar-nav > li { margin: 0; }
    header.main-header .main-menu .navbar-nav > li > a {
        font-size: 13px;
        gap: 6px;
        padding: 12px 6px !important;
    }
}

/* Allow text and grid children to shrink without clipping their contents. */
.culture-commitment-content > *,
.culture-csr-grid > *,
.clients-directory-heading > *,
.mfg-page .mfg-hub > * {
    min-width: 0;
}

.main-menu ul li:focus-within > ul {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
    padding: 5px 0;
}

@media (min-width: 992px) and (max-width: 1199px) {
    .culture-page .culture-commitment-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .culture-page .culture-commitment-heading h2 { font-size: 40px; }
    .culture-page .culture-commitment-heading p { max-width: 650px; }
    .culture-page .culture-commitment-list strong { font-size: 17px; }
}

@media (max-width: 767px) {
    .journey-showcase-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        overflow: visible;
        gap: 14px;
        padding: 20px 0;
        min-height: 0;
    }
    .journey-showcase .journey-step {
        height: auto;
        min-height: 220px;
        clip-path: none;
        border-radius: 12px;
    }
    .journey-showcase .journey-step-inner { padding: 22px 14px; }
    .journey-showcase .journey-step p { font-size: 13px; line-height: 1.6; }
    .journey-showcase .journey-step p strong { font-size: 14px; }
    .journey-showcase .journey-step-future { grid-column: 1 / -1; }
    .journey-showcase .journey-step-future::before { display: none; }
    .mfg-page .mfg-hub { grid-template-columns: minmax(0, 1fr); }
    .mfg-page .mfg-hub-size { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 575px) {
    .culture-page .culture-commitment-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding-left: 24px;
    }
    .culture-page .culture-commitment-list::before { left: 5px; top: 0; bottom: 0; }
    .culture-page .culture-commitment-list li,
    .culture-page .culture-commitment-list li:nth-child(even) {
        grid-template-columns: 24px 44px minmax(0, 1fr);
        gap: 12px;
        min-height: 70px;
    }
    .culture-page .culture-commitment-list li span { grid-column: 1; font-size: 14px; }
    .culture-page .culture-commitment-list li i { grid-column: 2; width: 44px; height: 44px; font-size: 19px; }
    .culture-page .culture-commitment-list li strong { grid-column: 3; font-size: 14px; overflow-wrap: normal; }
    .culture-page .culture-commitment-list li::after,
    .culture-page .culture-commitment-list li:nth-child(odd)::after {
        content: "";
        position: absolute;
        left: -24px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
        width: 10px;
        height: 10px;
        border: 2px solid #6bed96;
        border-radius: 50%;
        background: #c5ffd8;
        box-shadow: 0 0 12px #5eff91aa;
    }
    .culture-page .culture-commitment-heading h2 { font-size: clamp(27px, 7.6vw, 38px); }
    .culture-page .culture-csr-activity h3 { overflow-wrap: break-word; }
    .clients-page .clients-hero-link { min-height: 44px; }
    .clients-page .clients-connect a { min-height: 48px; max-width: 100%; }
    .storage-page .storage-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .storage-page .storage-benefits > div { justify-content: flex-start; padding: 0; gap: 10px; }
    .storage-page .storage-benefits > div + div { border-left: 0; }
    .storage-page .storage-benefits strong { font-size: 12px; }
    .storage-page .storage-benefits p > span { font-size: 11px; line-height: 1.5; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .culture-page .culture-banner { min-height: 420px; }
    .culture-page .culture-video { padding: 50px 0; }
    .slicknav_nav { max-height: calc(100dvh - 90px); }
}

@media (max-width: 991px) {
    .latest-news-carousel.is-initialized {
        padding: 8px 0;
        margin: -8px 0;
    }

    .slicknav_nav {
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .slicknav_nav a,
    .slicknav_nav .slicknav_row {
        min-height: 44px;
    }

    .career-form .form-control,
    .career-form .form-select {
        min-width: 0;
        max-width: 100%;
        font-size: 16px;
    }

    .page-header-box h1 {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .project-detail-layout>*,
    .project-detail-summary>div,
    .presence-layout>* {
        min-width: 0;
        overflow-wrap: break-word;
    }
}

@media (max-width: 767px) {
    .whatsapp-float {
        width: 48px;
        height: 48px;
        padding: 0;
        gap: 0;
        justify-content: center;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .whatsapp-float-text {
        display: none;
    }

    .latest-news-carousel.is-initialized .latest-news-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .presence-terrain .presence-overview h3 {
        letter-spacing: -.4px;
        line-height: 1.35;
    }
}

.hero.home-video-hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    display: flex;
    align-items: center;
    background-color: #000;
}

.hero.home-video-hero .hero-bg-video video {
    display: block;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 768px) and (max-width: 991px) {
    .latest-news-carousel.is-initialized .latest-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {

    /* The homepage video fills the first screen on phones and tablets too. */
    .hero.home-video-hero {
        align-items: flex-end;
        padding: 0 0 max(28px, env(safe-area-inset-bottom));
    }

    .hero.home-video-hero::before {
        display: none;
    }

    .hero.home-video-hero .hero-bg-video {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .hero.home-video-hero .hero-bg-video video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero.home-video-hero .hero-content {
        margin: 0;
    }

    .hero.home-video-hero .hero-content .section-title {
        margin: 0;
    }

    .hero.home-video-hero .hero-content .section-title h1,
    .hero.home-video-hero .hero-content .section-title p {
        display: none;
    }

    .hero.home-video-hero .hero-content-body {
        margin-top: 0;
        justify-content: center;
    }

    .people-page .people-banner,
    .life-page .life-banner,
    .manufacturing-page .manufacturing-banner {
        display: block;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 76px 0 0;
        background: #163d2d;
    }

    .people-page .people-banner-video,
    .life-page .life-banner-image,
    .manufacturing-page .manufacturing-banner-image {
        position: relative;
        inset: auto;
        z-index: auto;
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .people-page .people-banner-video {
        aspect-ratio: 1920 / 1014;
    }

    .people-page .people-banner::before,
    .life-page .life-banner::before,
    .manufacturing-page .manufacturing-banner::before {
        display: none;
    }

    .people-page .people-banner-content,
    .life-page .life-banner-content,
    .manufacturing-page .manufacturing-banner-content {
        position: relative;
        inset: auto;
        transform: none;
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .people-page .people-banner h1,
    .life-page .life-banner h1,
    .manufacturing-page .manufacturing-banner h1 {
        font-size: clamp(30px, 5.5vw, 44px);
        overflow-wrap: break-word;
    }

    .people-page .people-video-toggle {
        top: 86px;
        bottom: auto;
        right: 16px;
        min-height: 44px;
    }

    .people-page .people-banner .people-banner-description {
        max-width: 740px;
    }

    .about-page-header {
        min-height: max(250px, 56.25vw);
        display: flex;
        align-items: center;
        padding: 100px 0 44px;
        background: #163d2d;
    }

    .about-page-header-video {
        object-fit: contain;
    }

    .project-detail-hero {
        padding-top: 76px;
    }

    .life-intro-grid>*,
    .life-upskilling-heading>*,
    .life-upskilling-grid>*,
    .people-team-grid>*,
    .people-leader-inner,
    .main-footer-box>* {
        min-width: 0;
    }

    .life-page .life-intro-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .life-page .life-intro-photos {
        max-width: 620px;
        width: 100%;
        margin: 0 auto;
    }

    .life-page .life-upskilling-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .life-page .life-upskilling-grid {
        gap: 16px;
    }

    .life-page .life-upskilling-body {
        padding-right: 20px;
        padding-left: 20px;
    }

    .people-page .people-member-back {
        padding: 24px;
    }

    .people-page .people-leader-copy {
        width: 48%;
    }

    .people-page .people-leader-photo {
        left: 42%;
    }

    .contact-us-form-modern .contact-form .form-control,
    .contact-form input,
    .contact-form textarea,
    .contact-form select,
    .career-form input,
    .career-form textarea,
    .career-form select {
        font-size: 16px;
        max-width: 100%;
    }

    .main-footer .footer-social-links ul li a {
        width: 44px;
        height: 44px;
    }

    .main-footer .footer-links ul li a {
        display: inline-block;
        padding: 6px 0;
    }

    .slicknav_btn {
        min-width: 44px;
        min-height: 44px;
    }

    .slicknav_nav {
        padding-bottom: 16px;
    }
}

@media (max-width: 767px) {
    .people-page .people-leader-photo {
        left: auto;
    }

    .people-page .people-leader-copy {
        width: 100%;
    }

    .people-page .people-banner .people-eyebrow,
    .life-page .life-banner .life-eyebrow {
        font-size: 11px;
        letter-spacing: 1.5px;
    }

    .life-page .life-workforce-stats {
        gap: 8px;
    }

    .life-page .life-workforce-stats dd {
        font-size: clamp(25px, 6.4vw, 36px);
    }

    .life-page .life-workforce-stats dt {
        font-size: 12px;
        overflow-wrap: break-word;
    }

    .life-page .life-join-box {
        gap: 24px;
    }

    .life-page .life-careers-link {
        max-width: 100%;
        white-space: normal;
    }

    .project-detail-hero h1 {
        overflow-wrap: break-word;
    }

    .project-detail-facts>div {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
        gap: 12px;
    }

    .project-detail-figure img {
        height: auto;
        max-height: 360px;
        object-fit: contain;
    }

    .home-grow {
        background-position: center;
    }

    .journey-showcase-track {
        overscroll-behavior-x: contain;
    }
}

@media (max-width: 380px) {
    .life-page .life-upskilling-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .people-page .people-member-back {
        padding: 24px 20px;
    }

    .career-application-page .career-form-card {
        padding: 20px 14px;
    }

    .life-page .life-join-box {
        padding: 26px 20px;
    }
}

/* Preserve banner proportions on laptops and wide desktop displays. */
.life-page .life-banner-image,
.manufacturing-page .manufacturing-banner-image {
    object-fit: cover;
}

/* Keep the video and its close control inside short landscape viewports. */
.mfp-iframe-holder .mfp-content {
    max-width: min(900px, calc((100vh - 96px) * 16 / 9));
    max-width: min(900px, calc((100dvh - 96px) * 16 / 9));
}

@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-brand img {
        width: 180px;
    }

    .main-menu .nav-menu-wrapper {
        margin: 0 0 0 12px;
    }

    .main-menu .navbar-nav>li {
        margin: 0;
    }

    .main-menu .navbar-nav>li>a {
        padding: 12px 8px !important;
        font-size: 14px;
        white-space: nowrap;
    }

    .main-menu .navbar-nav>li:last-child>ul {
        left: auto;
        right: 0;
    }
}

@media (max-width: 991px) {

    .life-page .life-banner-image,
    .manufacturing-page .manufacturing-banner-image {
        object-fit: contain;
    }

    .life-page .life-upskilling-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .life-page .life-upskilling-grid> :last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .life-page .life-upskilling-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .people-page .people-member-name {
        font-size: 20px;
    }

    .people-page .people-member-bio {
        overflow-wrap: anywhere;
    }

    .project-detail-eyebrow {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .project-detail-eyebrow>span {
        flex-shrink: 0;
    }
}

@media (max-width: 575px) {

    /* Stack contact details so long email addresses remain readable. */
    .main-footer .about-footer .footer-contact-items-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .main-footer .footer-contact-item-content {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .career-application-page .career-form .form-control,
    .career-application-page .career-form .form-select {
        font-size: 16px;
    }
}

@media (max-height: 600px) and (min-width: 992px) {

    .people-page .people-banner,
    .manufacturing-page .manufacturing-banner {
        height: auto;
        min-height: 100svh;
    }

    .life-page .life-banner {
        min-height: 460px;
    }
}

/* Keep the About breadcrumb image full-screen at every viewport size. */
.page-header.about-page-header {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 48px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.about-page-header::before {
    background: rgba(0, 15, 23, 0.68);
}

.page-header.about-page-header .about-page-header-video {
    object-fit: cover;
}

.about-page-header .page-header-box {
    text-align: left;
}

.about-page-header .about-page-header-tagline {
    margin: 16px 0 0;
    color: var(--white-color);
    font-size: clamp(20px, 3vw, 36px);
    line-height: 1.35;
}
