/* ==========================================================================
   MICROCIL - Solution pages (Mobility, Machine Monitoring, Environment Control)
   Builds on home.css tokens and section styles.
   ========================================================================== */

/* ---------- hero ---------- */
/* sub-banner sized exactly like the Forklift Fleet page banner (.fl-banner) */
.hm .sl-hero .banner-item {
    min-height: 0;
    padding-top: 130px !important;
    padding-bottom: clamp(40px, 4.5vw, 64px);
    align-items: flex-start;
}

/* content starts at the same left edge as the Forklift page (.hm-wrap) */
.hm .sl-hero .banner-item > .container-fluid {
    max-width: none !important;
    margin: 0 !important;
    padding-left: clamp(16px, 5vw, 96px) !important;
    padding-right: clamp(16px, 5vw, 96px) !important;
}

.hm .sl-hero .banner-item .row {
    margin-left: 0;
    margin-right: 0;
    justify-content: flex-start;
}

.hm .sl-hero .banner-item .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
}

.hm .sl-hero .banner-item,
.hm .sl-hero .banner-left {
    text-align: left;
}

.sl-hero .banner-left {
    padding: 0;
    max-width: 760px;
}

.sl-hero .banner-left h1 {
    font-size: clamp(26px, 2.6vw, 38px);
    line-height: 1.2;
    margin-bottom: 14px;
}

.sl-hero .banner-left p {
    max-width: 700px;
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 991.98px) {
    .hm .sl-hero .banner-item {
        padding-top: 100px !important;
        height: auto !important;
    }
}

.sl-hero-tag {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #55d8e3;
    margin-bottom: 12px;
}

.sl-hero-sub {
    font-size: clamp(17px, 1.4vw, 20px) !important;
    font-weight: 600;
    opacity: 1 !important;
}

.sl-hero .banner-left p strong {
    color: #ffffff;
}

.sl-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

/* white button, dark text, orange arrow, green fill-sweep on hover */
.sl-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border-radius: 9px;
    background: #ffffff;
    color: #111111 !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 6px 16px rgba(15, 42, 40, 0.12);
    transition: color 0.35s ease;
}

.sl-btn i {
    color: #ff7043;
    font-size: 17px;
    transition: transform 0.3s ease, color 0.35s ease;
}

.sl-btn::before {
    content: "";
    position: absolute;
    inset: -1px; /* 1px overscan so no white edge shows at fractional zoom */
    z-index: -1;
    background: #008080;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.sl-btn:hover {
    color: #ffffff !important;
}

.sl-btn:hover::before {
    transform: scaleX(1);
}

.sl-btn:hover i {
    color: #ffffff;
    transform: translateX(4px);
}

.sl-tagline {
    font-size: clamp(18px, 1.5vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    color: var(--hm-primary);
    margin: 6px 0 0;
}

.sl-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--hm-ink);
    margin: -6px 0 14px;
}

/* ---------- media / placeholders ---------- */
.sl-media {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 42, 40, 0.12);
    background: #e6eef0;
}

.sl-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.sl-media.is-wide {
    aspect-ratio: 16 / 10;
}

.sl-media.is-photo {
    aspect-ratio: 4 / 3;
}

.sl-media.is-plain {
    box-shadow: none;
    background: transparent;
}

/* ---------- challenge question cards ---------- */
.sl-q-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.sl-q-card {
    background: #ffffff;
    border: 1px solid var(--hm-line);
    border-radius: 14px;
    padding: 22px 18px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--hm-ink);
    box-shadow: 0 4px 14px rgba(15, 42, 40, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sl-q-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 128, 128, 0.3);
    box-shadow: 0 14px 28px rgba(15, 42, 40, 0.1);
}

.sl-q-card i {
    font-size: 34px;
    color: var(--hm-primary);
    line-height: 1;
}

/* ---------- checklist (capabilities) ---------- */
.sl-check {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.sl-check li {
    position: relative;
    padding-left: 32px;
}

.sl-check li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hm-teal-soft);
    color: var(--hm-primary);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sl-check h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0 0 4px;
}

.sl-check p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--hm-ink);
    margin: 0;
}

/* ---------- numbered steps (connectivity) ---------- */
.sl-steps {
    display: grid;
    gap: 16px;
}

.sl-step {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 6px 18px rgba(15, 42, 40, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sl-step:hover {
    transform: translateX(4px);
    box-shadow: 0 12px 26px rgba(15, 42, 40, 0.1);
}

.sl-step h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0 0 4px;
}

.sl-step p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--hm-ink);
    margin: 0;
}

/* ---------- benefit / impact cards ---------- */
.sl-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.sl-card-grid.is-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sl-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 22px;
    box-shadow: 4px 6px 14px rgba(15, 42, 40, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sl-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 12px 22px rgba(0, 128, 128, 0.14);
}

.sl-card h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0 0 10px;
}

.sl-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--hm-ink);
    margin: 0;
}

/* compact impact tiles (mobility) */
.sl-card.is-tile {
    text-align: center;
    padding: 22px 16px;
    background: #f4f7f8;
}

.sl-card.is-tile span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--hm-primary);
    margin-bottom: 6px;
}

.sl-card.is-tile strong {
    display: block;
    font-size: 16px;
    line-height: 1.35;
    color: var(--hm-ink);
}

/* ---------- application cards ---------- */
.sl-app {
    height: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 4px 6px 16px rgba(15, 42, 40, 0.09);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sl-app:hover {
    transform: translateY(-5px);
    box-shadow: 8px 14px 26px rgba(15, 42, 40, 0.14);
}

.row > [class*="col"]:has(> .sl-app) {
    display: flex;
    align-self: stretch;
}

.row > [class*="col"] > .sl-app {
    flex: 1;
    width: 100%;
}

.sl-app-img {
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: #e6eef0;
}

.sl-app-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    display: block;
}

.sl-app-body {
    flex: 1;
    padding: 20px 22px 24px;
}

.sl-app-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--hm-primary);
    margin: 0 0 8px;
}

.sl-app-body p {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--hm-ink);
    margin: 0;
}

.sl-app-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sl-app-body ul li {
    position: relative;
    padding-left: 22px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--hm-ink);
}

.sl-app-body ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--hm-primary);
    font-weight: 700;
}

/* applications carousel (mobility) */
.sl-app-carousel .owl-stage {
    display: flex;
    padding: 6px 0 16px;
}

.sl-app-carousel .owl-item {
    display: flex;
}

.sl-app-carousel .owl-item > .sl-app {
    flex: 1;
}

/* photos are 4:3 — a 3:2 frame keeps the vehicles in view instead of a thin 2:1 strip */
.sl-page .sl-app-carousel .sl-app-img {
    height: auto;
    aspect-ratio: 3 / 2;
}

.sl-app-carousel .owl-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px !important;
}

.sl-app-carousel .owl-nav button.owl-prev,
.sl-app-carousel .owl-nav button.owl-next {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: var(--hm-primary) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px !important;
    transition: background 0.25s ease;
}

.sl-app-carousel .owl-nav button:hover {
    background: var(--hm-primary-dark) !important;
}

.sl-app-carousel .owl-dots {
    display: none;
}

/* ---------- CTA (dark) ---------- */
.sl-cta {
    text-align: center;
}

/* floating card on the page background instead of a full-width band */
.hm-section.sl-cta {
    background: transparent;
}

.sl-cta::after {
    display: none;
}

.sl-cta-inner {
    max-width: none;
    margin: 0;
    padding: clamp(24px, 2.6vw, 36px) clamp(20px, 4vw, 64px);
    border-radius: 20px;
    background: linear-gradient(135deg, #012b27 0%, #014a44 60%, #016a62 100%);
    box-shadow: 0 24px 50px rgba(1, 43, 39, 0.28);
}

/* solution pages: photo background with a dark overlay so the text stays readable */
.sl-cta-inner.sl-cta-env,
.sl-cta-inner.sl-cta-machine,
.sl-cta-inner.sl-cta-fleet {
    padding-top: clamp(36px, 3.6vw, 56px);
    padding-bottom: clamp(36px, 3.6vw, 56px);
    background:
        radial-gradient(ellipse at center, rgba(4, 16, 22, 0.55) 0%, rgba(4, 16, 22, 0.3) 75%),
        var(--sl-cta-photo) var(--sl-cta-pos, center 75%) / cover no-repeat;
}

.sl-cta-env { --sl-cta-photo: url('../images/solutions/environment-cta-bg.webp'); --sl-cta-pos: center 35%; }
.sl-cta-machine { --sl-cta-photo: url('../images/solutions/machine-cta-bg.webp'); }
.sl-cta-fleet { --sl-cta-photo: url('../images/solutions/fleet-cta-bg.webp'); --sl-cta-pos: center 70%; }

.sl-cta .hm-eyebrow {
    justify-content: center;
}

.sl-cta .hm-title span {
    color: #14b8a6;
}

.sl-cta .hm-text {
    max-width: 1000px;
    margin: 0 auto 20px;
}

/* ---------- layout consistency ---------- */
/* top-align every two-column row so each section title starts the same distance below the
   section edge (matches the homepage) */
.sl-page .hm-section .row {
    align-items: flex-start !important;
}

/* columns without a section title (lists, card stacks) sit vertically centred beside the
   titled column, so there is no empty gap under them */
.sl-page .hm-section .row > [class*="col-"]:not(:has(.hm-eyebrow)):not(:has(> .sl-app)) {
    align-self: center;
}

/* challenge: the question grid stretches to the full height of the title + image column */
.sl-page .hm-section .row > .sl-q-col {
    align-self: stretch !important;
    display: flex;
}

.sl-q-col > .sl-q-grid {
    flex: 1;
}

/* question cards: equal height, icon + text centred */
.sl-q-grid {
    grid-auto-rows: 1fr;
    gap: 14px;
}

.sl-q-card {
    min-height: 118px;
    padding: 18px 16px;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sl-q-card i {
    font-size: 30px;
}

/* 6-question layout: 2 per row, 3 rows, so cards stay compact */
.sl-q-grid.is-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sl-q-grid.is-2col .sl-q-card {
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    gap: 18px;
    padding: 22px 24px;
    font-size: 16px;
    line-height: 1.5;
    min-height: 0;
}

.sl-q-grid.is-2col .sl-q-card i {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--hm-teal-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

/* left column becomes a flex column so the image only fills the space left after the text;
   the card grid then stretches to that same height with no oversized empty cards */
.sl-page .hm-section .row > .sl-q-text {
    align-self: stretch !important;
    display: flex;
    flex-direction: column;
}

.sl-page .hm-section .row > .sl-q-text {
    container-type: inline-size;
}

.sl-q-text .sl-media.is-short {
    position: relative;
    flex: 1 1 0;
    /* never flatter than 2:1, so wide screens don't turn the photo into a thin strip */
    min-height: max(220px, 50cqw);
    max-height: none;
    aspect-ratio: auto;
}

/* the photo never sets the height itself — the question cards beside it do */
.sl-page .sl-q-text .sl-media.is-short img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

@media (max-width: 991.98px) {
    .sl-q-text .sl-media.is-short {
        flex: none;
        height: 240px;
    }
}

/* small laptops: narrow cards, so tighten the icon and padding to give the text room */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .sl-q-grid.is-2col .sl-q-card {
        gap: 12px;
        padding: 18px 16px;
        font-size: 14px;
    }

    .sl-q-grid.is-2col .sl-q-card i {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    .sl-q-grid.is-2col {
        grid-template-columns: 1fr;
    }
}

/* photos and dashboards show whole, at their own proportions — no cropped tops or bottoms */
.sl-page .sl-media.is-photo,
.sl-page .sl-media.is-wide {
    aspect-ratio: auto;
    max-height: none;
    width: fit-content;
    max-width: 100%;
}

/* cap the height on wide screens by shrinking the width with it, so nothing is cut off */
.sl-page .sl-media.is-photo img,
.sl-page .sl-media.is-wide img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 520px;
}

.sl-page .sl-media img {
    object-fit: cover;
    border-radius: inherit;
}

/* image-only column beside text: the image is as tall as the text and ends where it ends */
@media (min-width: 992px) {
    .sl-page .hm-section .row > [class*="col-"]:has(> .sl-media:only-child) {
        align-self: stretch !important;
        display: flex;
    }

    .sl-page .row > [class*="col-"] > .sl-media:only-child {
        position: relative;
        width: 100%;
        max-width: none;
        min-height: 300px;
        flex: 1;
    }

    .sl-page .row > [class*="col-"] > .sl-media:only-child img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
    }
}

/* section headings use the full width so long titles don't stack into 3 lines */
.sl-page .hm-head {
    max-width: 1280px;
}

.sl-page .hm-head .hm-text {
    max-width: 760px;
}

/* keep the top of the photo (e.g. a person's head) when the frame crops it */
.sl-page .sl-media.is-top img {
    object-position: center top;
}

/* dashboard mockups: devices sit low in the photo, so crop from the top instead */
.sl-page .sl-media.is-low img {
    object-position: center var(--focus-y, 65%);
}

/* tall enough that the whole tablet + phone fit, even when the list beside it is short */
@media (min-width: 992px) {
    .sl-page .row > [class*="col-"] > .sl-media.is-low:only-child {
        min-height: min(460px, 34vw);
    }
}

/* Preserve compact cards while fitting the full image inside the frame. */
.sl-page .sl-app-img {
    aspect-ratio: auto;
    height: clamp(170px, 14vw, 230px);
}

/* cards inside a narrower column */
.col-lg-7 > .sl-card-grid .sl-card {
    padding: 20px 18px;
}

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .sl-card-grid.is-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* small laptops: three cards in a 7/12 column are too narrow, so stack them */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .col-lg-7 > .sl-card-grid:not(.is-4) {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 991.98px) {
    .sl-q-grid,
    .sl-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .sl-q-grid,
    .sl-card-grid,
    .sl-card-grid.is-4 {
        grid-template-columns: 1fr;
    }

    .sl-q-card {
        min-height: 0;
    }

    .sl-btn {
        width: 100%;
        justify-content: center;
    }
}
