/* =========================================================
   Terminals — shared styles across all Terminal product pages
   ========================================================= */

/* ── Product Showcase: light theme, wider images, subtle animations ── */
.rt-product-showcase-v1 {
    padding: 100px 0;
    background-color: #fdfdfd;
    overflow: hidden;
}

.rt-product-showcase-gallery {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.rt-product-showcase-item {
    flex: 1 1 0;
    min-width: 0; /* allow flex items to shrink below intrinsic content size */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transform: translateY(24px);
    animation: rt-showcase-fade-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

    .rt-product-showcase-item:nth-child(1) {
        animation-delay: 0.05s;
    }

    .rt-product-showcase-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .rt-product-showcase-item:nth-child(3) {
        animation-delay: 0.35s;
    }

    .rt-product-showcase-item:nth-child(4) {
        animation-delay: 0.5s;
    }

    .rt-product-showcase-item:nth-child(5) {
        animation-delay: 0.65s;
    }

.rt-product-showcase-img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    animation: rt-showcase-float 6s ease-in-out infinite;
}

    .rt-product-showcase-item:nth-child(2) .rt-product-showcase-img {
        animation-delay: -1.2s;
    }

    .rt-product-showcase-item:nth-child(3) .rt-product-showcase-img {
        animation-delay: -2.4s;
    }

    .rt-product-showcase-item:nth-child(4) .rt-product-showcase-img {
        animation-delay: -3.6s;
    }

    .rt-product-showcase-item:nth-child(5) .rt-product-showcase-img {
        animation-delay: -4.8s;
    }

.rt-product-showcase-item:hover .rt-product-showcase-img {
    transform: translateY(-6px) scale(1.04);
}

/* Five-item gallery: shrink padding + max-height a touch so all 5 sit in a row comfortably */
.rt-product-showcase-gallery.rt-showcase-5 {
    gap: 20px;
}

    .rt-product-showcase-gallery.rt-showcase-5 .rt-product-showcase-item {
        padding: 12px;
    }

    .rt-product-showcase-gallery.rt-showcase-5 .rt-product-showcase-img {
        max-height: 260px;
    }

/* Four-item gallery: slightly tighter gap */
.rt-product-showcase-gallery.rt-showcase-4 {
    gap: 24px;
}

@keyframes rt-showcase-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rt-showcase-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .rt-product-showcase-v1 {
        padding: 80px 0;
    }

    .rt-product-showcase-gallery,
    .rt-product-showcase-gallery.rt-showcase-4,
    .rt-product-showcase-gallery.rt-showcase-5 {
        flex-wrap: wrap;
        gap: 20px;
    }

    .rt-product-showcase-item {
        flex: 1 1 40%;
        padding: 12px;
    }

    .rt-product-showcase-img,
    .rt-product-showcase-gallery.rt-showcase-5 .rt-product-showcase-img {
        max-height: 240px;
    }
}

@media (max-width: 575px) {
    .rt-product-showcase-v1 {
        padding: 60px 0;
    }

    .rt-product-showcase-gallery,
    .rt-product-showcase-gallery.rt-showcase-4,
    .rt-product-showcase-gallery.rt-showcase-5 {
        gap: 12px;
    }

    .rt-product-showcase-item {
        flex: 1 1 45%;
        padding: 8px;
    }

    .rt-product-showcase-img,
    .rt-product-showcase-gallery.rt-showcase-5 .rt-product-showcase-img {
        max-height: 200px;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .rt-product-showcase-item {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .rt-product-showcase-img {
        animation: none;
    }

    .rt-product-showcase-item:hover .rt-product-showcase-img {
        transform: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   Bento Grid Showcase — shared across all terminal pages
   ══════════════════════════════════════════════════════════════ */
.rt-moxa73-showcase {
    background-color: #ffffff;
    padding: 5rem 0 5.5rem;
}

.rt-moxa73-showcase-head {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-column-gap: 3rem;
    align-items: end;
    padding-bottom: 2.75rem;
}

.rt-moxa73-showcase-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #0f172a;
    padding: 0.35rem 0;
    margin-bottom: 0.75rem;
}

.rt-moxa73-showcase-title {
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    line-height: 1.12;
    color: #0f172a;
    font-weight: 500;
    margin: 0;
    max-width: 36rem;
    letter-spacing: -0.02em;
}

.rt-moxa73-showcase-lead {
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.6;
    padding-top: 0;
    margin: 0;
    font-style: italic;
}

.rt-moxa73-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
    column-gap: 1.25rem;
    row-gap: 1.25rem;
}

.rt-moxa73-showcase-card {
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.rt-moxa73-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.rt-moxa73-showcase-card:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
.rt-moxa73-showcase-card:nth-child(2) { grid-column: 3; grid-row: 1; }
.rt-moxa73-showcase-card:nth-child(3) { grid-column: 1; grid-row: 2; }
.rt-moxa73-showcase-card:nth-child(4) { grid-column: 2 / span 2; grid-row: 2; }

.rt-moxa73-card-overlay {
    position: relative;
    height: 100%;
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-media {
    border-radius: 0;
    overflow: hidden;
    height: 100%;
    min-height: 22rem;
    background: #dfd9d1;
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.rt-moxa73-card-overlay:hover .rt-moxa73-showcase-media img {
    transform: scale(1.05);
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.05) 70%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.rt-moxa73-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #000000;
    background: rgb(255 255 255 / 77%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.65rem;
    border-radius: 0;
    z-index: 2;
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.5rem;
    z-index: 2;
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-caption-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.rt-moxa73-card-overlay .rt-moxa73-showcase-caption-body {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.rt-moxa73-card-caption {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    height: 100%;
}

.rt-moxa73-card-caption .rt-moxa73-showcase-media {
    border-radius: 0;
    overflow: hidden;
    flex: 1;
    min-height: 10rem;
    background: #eee;
}

.rt-moxa73-card-caption .rt-moxa73-showcase-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.rt-moxa73-card-caption:hover .rt-moxa73-showcase-media img {
    transform: scale(1.05);
}

.rt-moxa73-card-caption .rt-moxa73-showcase-caption {
    padding: 1rem 1.25rem 1.35rem;
}

.rt-moxa73-card-caption .rt-moxa73-showcase-caption-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.rt-moxa73-card-caption .rt-moxa73-showcase-caption-body {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #64748b;
    margin: 0;
    font-style: italic;
}

@media (max-width: 991px) {
    .rt-moxa73-showcase { padding: 3.5rem 0 4rem; }
    .rt-moxa73-showcase-head { grid-template-columns: 1fr; grid-row-gap: 1rem; padding-bottom: 2rem; align-items: start; }
    .rt-moxa73-showcase-grid { grid-template-columns: 1fr 1fr; column-gap: 1rem; row-gap: 1rem; }
    .rt-moxa73-showcase-card:nth-child(1),
    .rt-moxa73-showcase-card:nth-child(4) { grid-column: 1 / span 2; }
    .rt-moxa73-showcase-card:nth-child(2) { grid-column: 1; grid-row: 2; }
    .rt-moxa73-showcase-card:nth-child(3) { grid-column: 2; grid-row: 2; }
    .rt-moxa73-showcase-card:nth-child(4) { grid-row: 3; }
    .rt-moxa73-card-overlay .rt-moxa73-showcase-media { height: 100%; min-height: 16rem; }
    .rt-moxa73-card-caption .rt-moxa73-showcase-media { min-height: 9rem; }
}

@media (max-width: 640px) {
    .rt-moxa73-showcase { padding: 2.5rem 0 3rem; }
    .rt-moxa73-showcase-grid { grid-template-columns: 1fr; row-gap: 1rem; }
    .rt-moxa73-showcase-card,
    .rt-moxa73-showcase-card:nth-child(1),
    .rt-moxa73-showcase-card:nth-child(2),
    .rt-moxa73-showcase-card:nth-child(3),
    .rt-moxa73-showcase-card:nth-child(4) { grid-column: 1; grid-row: auto; }
    .rt-moxa73-card-overlay .rt-moxa73-showcase-media { height: clamp(13rem, 50vw, 16rem); min-height: auto; }
    .rt-moxa73-card-caption .rt-moxa73-showcase-media { flex: none; height: clamp(10rem, 40vw, 13rem); min-height: auto; }
    .rt-moxa73-showcase-title { font-size: 1.5rem; }
}

/* ── Fix: "About Three Solutions" section fitting on laptop screens (992px–1400px) ── */
@media screen and (min-width: 992px) and (max-width: 1400px) {
    .rt-about-three-solutions-main {
        gap: 1rem;
    }

    .rt-about-three-solutions-image {
        max-width: 40%;
        flex: 0 0 40%;
    }

    .rt-about-three-solutions-text {
        flex: 1;
        max-width: none;
        padding: 1.5rem 1.25rem;
    }

    .rt-about-three-solutions-text .rt-about-three-heading {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .rt-about-three-solutions-text .rt-body-color-two {
        font-size: 0.85rem;
        line-height: 1.55;
    }

    .rt-about-three-solutions-image-left {
        max-width: 12rem;
        margin-top: 0;
        justify-content: flex-start;
    }

    .rt-about-three-solutions-image-left .rt-moxa73-showcase-eyebrow {
        margin-bottom: 0.25rem;
    }

    .rt-about-three-solutions .rt-large-text {
        font-size: 3.5rem;
    }

    .rt-about-three-solutions {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .rt-about-three-solutions-image-left .rt-about-three-solutions-shorttext .rt-sub-text {
        font-size: 0.9rem;
    }
}


/* ── Brochure Download Button: distinct from "Connect with Us" ── */
.rt-button-brochure {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: 2px solid #f97316;
    border-radius: 6.25rem;
    padding: 12px 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

    .rt-button-brochure .rt-button-text {
        color: #ffffff;
        font-weight: 600;
        font-size: 14px;
        letter-spacing: 0.5px;
        display: inline-flex;
        align-items: center;
        position: relative;
        z-index: 2;
    }

    .rt-button-brochure:hover {
        background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
        border-color: #ea580c;
        box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
        transform: translateY(-2px);
    }

    .rt-button-brochure:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
    }

    .rt-button-brochure .rt-button-overlay-v3 {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .rt-button-brochure:hover .rt-button-overlay-v3 {
        transform: translateY(0);
    }

    .rt-button-brochure svg {
        flex-shrink: 0;
    }

/* ── "Connect with Us" button: solid primary blue fill with slide hover ── */
.rt-inner-hero-content .rt-button-wrapper .rt-button-white {
    background-color: var(--msid-primary, #034694);
    border: 2px solid var(--msid-primary, #034694);
    border-radius: 6.25rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

    .rt-inner-hero-content .rt-button-wrapper .rt-button-white:hover {
        background-color: var(--msid-primary, #034694);
        border-color: var(--msid-primary, #034694);
    }

    .rt-inner-hero-content .rt-button-wrapper .rt-button-white .rt-button-text {
        color: #ffffff;
    }

    /* White overlay slides in from left on hover */
    .rt-inner-hero-content .rt-button-wrapper .rt-button-white .rt-button-overlay-v3 {
        display: block;
        background-color: var(--white, #ffffff);
        position: absolute;
        inset: 0;
        border-radius: 6.25rem;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .rt-inner-hero-content .rt-button-wrapper .rt-button-white:hover .rt-button-overlay-v3 {
        transform: translateX(0);
    }

    /* Keep text visible and dark on hover when white overlay is showing */
    .rt-inner-hero-content .rt-button-wrapper .rt-button-white:hover .rt-button-text {
        color: var(--msid-primary, #034694);
    }

/* ── Fix: Ensure banner buttons are always visible (override IX2 animation initial state) ── */
.rt-inner-hero-content .rt-button-wrapper.rt-overflow-hidden.rt-slider-v2-text {
    transform: none !important;
    overflow: visible;
}

/* ── Button wrapper: proper spacing and layout ── */
.rt-inner-hero-content .rt-button-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    position: relative;
    z-index: 5;
}

/* ── Responsive: tablet ── */
@media screen and (max-width: 991px) {
    .rt-inner-hero-content .rt-button-wrapper {
        margin-top: 0.75rem;
    }
}

/* ── Responsive: stack buttons on small tablet ── */
@media screen and (max-width: 767px) {
    .rt-inner-hero-content .rt-button-wrapper {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-top: 0.75rem;
    }

    .rt-button-brochure {
        padding: 11px 24px;
    }
}

/* ── Responsive: mobile ── */
@media screen and (max-width: 479px) {
    .rt-inner-hero-content .rt-button-wrapper {
        flex-direction: column;
        gap: 10px;
        margin-top: 0.5rem;
    }

    .rt-button-brochure {
        padding: 10px 20px;
        font-size: 13px;
    }

    .rt-inner-hero-content .rt-button-wrapper .rt-button-body {
        padding: 10px 20px;
        font-size: 13px;
    }
}
