/* ==========================================================================
   product-slider.css
   Baridata (item five) and Transwayz (item six) slides in the "p-slider" /
   mySwiperNew carousel on the Products page.

   These two slides reuse the SAME swiper-card design and spacing as items
   one–four (auto height, border-radius 6px, .swiper-slide padding 45px 60px,
   .p-thumb max-width 480px, .app-name h2 38px). Only the bits that make them
   visually distinct are defined here: their background colours, the black
   "Learn More" button, and the translucent stat boxes.
   ========================================================================== */

/* Distinct slide backgrounds (items one–four each have their own tint too) */
.p-slider-main .item.five {
    background: rgba(236, 255, 239, 1);
}

.p-slider-main .item.six {
    background: rgba(220, 238, 250, 1);
}

/* Learn More button — black background, white text */
.p-slider-main .item.five .learn_more_btn,
.p-slider-main .item.five .learn_more_btn:hover,
.p-slider-main .item.five .learn_more_btn:active,
.p-slider-main .item.six .learn_more_btn,
.p-slider-main .item.six .learn_more_btn:hover,
.p-slider-main .item.six .learn_more_btn:active {
    background: rgba(0, 0, 0, 1) !important;
    color: rgba(255, 255, 255, 1) !important;
}

/* Learn More button — Figma size 368 × 61, radius 9.8, padding 9.8/19.6.
   Responsive (mobile/tablet) only; desktop keeps its default styling. */
@media (max-width: 991.98px) {

    .p-slider-main .item.five .learn_more_btn,
    .p-slider-main .item.six .learn_more_btn {
        width: 100%;
        max-width: 368px;
        min-height: 61px;
        border-radius: 9.8px;
        padding: 9.8px 19.6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Stat boxes — translucent so they sit nicely on the coloured backgrounds */
.p-slider-main .item.five .rev-ratings .one,
.p-slider-main .item.six .rev-ratings .one {
    background-color: rgba(255, 255, 255, 0.45);
}

/* On mobile/tablet the content card turns white, where translucent white is
   invisible — so give each slide's stat boxes its own card tint (Baridata
   green / Transwayz blue) so the boxes stay visible. */
@media (max-width: 991.98px) {

    .p-slider-main .item.five .rev-ratings .one {
        background-color: rgba(236, 255, 239, 1);
    }

    .p-slider-main .item.six .rev-ratings .one {
        background-color: rgba(220, 238, 250, 1);
    }
}

/* Transwayz product name — align with the base .app-name h2 used by items one–four */
.p-slider-main .item.six .app-name h2 {
    font-size: 38px;
    font-weight: 590;
    line-height: normal;
    margin: 0;
}

/* Baridata wordmark as text — "Bari" navy, "data" teal (brand colours) */
.p-slider-main .item.five .app-name h2.baridata-title {
    font-size: 38px;
    font-weight: 700;
    line-height: normal;
    margin: 0;
    color: rgba(0, 35, 94, 1);
    /* "Bari" */
}

.p-slider-main .item.five .app-name h2.baridata-title span {
    color: rgba(1, 183, 168, 1);
    /* "data" */
}

/* ==========================================================================
   Responsive: place the Baridata & Transwayz logos as a centered badge that
   overlaps the top of the white content card — exactly like Poster Maker
   (items one–four). Their logos use inline styles and no .app-logo class, so
   we override them here (scoped to ≤991px; desktop is untouched).
   ========================================================================== */
@media (max-width: 991.98px) {

    .p-slider-main .item.five .app-name img,
    .p-slider-main .item.six .app-name img {
        position: absolute !important;
        top: -53px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
    }

    /* Transwayz mark is a square icon — match Poster Maker's badge size */
    .p-slider-main .item.six .app-name img {
        width: 56px !important;
        height: 56px !important;
    }

    /* Baridata mark is a horizontal wordmark — keep it readable, just center it.
       It is shorter than the Transwayz icon, so it needs a smaller offset to
       straddle the card edge rather than float above it. */
    .p-slider-main .item.five .app-name img {
        height: 42px !important;
        width: auto !important;
        max-width: 70% !important;
        top: -30px !important;
    }
}

@media (max-width: 767.98px) {

    .p-slider-main .item.six .app-name img {
        top: -38px !important;
    }

    /* center the short Baridata wordmark on the card's top edge */
    .p-slider-main .item.five .app-name img {
        top: -20px !important;
    }
}

/* ==========================================================================
   Transwayz (item six) — DESKTOP Figma layout (≥992px)
   Figma frame 1391 × 692:
     • text block  568 × 598  at top:44  left:45
     • image       694 × 657  at top:35  left:696
   Expressed as percentages of the frame so the exact coordinates are hit at
   the 1391px design width and scale down cleanly on smaller desktops (no
   horizontal overflow). Mobile/tablet (≤991px) keeps the compact card above.
   ========================================================================== */
@media (min-width: 992px) {

    .p-slider-main .item.six {
        position: relative;
        width: 100%;
        max-width: 1391px;
        margin-inline: auto;
        aspect-ratio: 1391 / 692;
        overflow: hidden;
    }

    .p-slider-main .item.six .row {
        height: 100%;
        margin: 0;
    }

    /* Text block — Figma: 568 × 598 at top:44 left:45 */
    .p-slider-main .item.six .col-md-6.left {
        position: absolute;
        top: 6.36%;
        /* 44 / 692 */
        left: 3.23%;
        /* 45 / 1391 */
        width: 40.83%;
        /* 568 / 1391 */
        height: 86.42%;
        /* 598 / 692 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* lets the h3 size itself relative to this column's width */
        container-type: inline-size;
    }

    /* Image — Figma: 694 × 657 at top:35 left:696 */
    .p-slider-main .item.six .col-md-6.text-center {
        position: static;
    }

    .p-slider-main .item.six .p-thumb {
        position: absolute;
        top: 5.06%;
        /* 35 / 692 */
        left: 50.04%;
        /* 696 / 1391 */
        width: 49.89%;
        /* 694 / 1391 */
        height: 94.94%;
        /* 657 / 692 */
        max-width: none;
        object-fit: contain;
        object-position: center;
    }

    /* Keep the text readable as the frame scales between 992px and 1391px */
    .p-slider-main .item.six .app-name h2 {
        font-size: clamp(22px, 2.9vw, 40px);
    }

    /* sub-heading — Gabarito 700, #1a1a1a. Kept on ONE line (per reference) by
       sizing it to the column width (container units); 24px can't fit on a
       single line in this ~568px column, so it fills the column at ~18px. */
    .p-slider-main .item.six .text-poster-app h3 {
        font-family: 'Gabarito', sans-serif;
        font-weight: 700;
        letter-spacing: 0px;
        color: rgba(26, 26, 26, 1);
        white-space: nowrap;
        line-height: 1.3;
        font-size: clamp(25px, 3cqi, 22px);
    }

    .p-slider-main .item.six .p-desc {
        font-size: clamp(12px, 1.35vw, 19px);
        line-height: 1.5;
    }

    /* Stat boxes — share the column width evenly (equal widths + even gaps)
       instead of fixed 29% widths that leave a gap on the right. */
    .p-slider-main .item.six .rev-ratings {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .p-slider-main .item.six .rev-ratings .one {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        margin-right: 0;
    }
}

/* ==========================================================================
   Baridata (item five) — DESKTOP Figma layout (≥992px), same 1391 × 692 frame
   as Transwayz. Image — Figma: 475.5 × 330.9 at top:128.32 left:282.25.
   Coordinates expressed as percentages of the frame so they hit the exact
   values at the 1391px design width and scale down on smaller desktops.
   ========================================================================== */
@media (min-width: 992px) {

    .p-slider-main .item.five {
        position: relative;
        width: 100%;
        max-width: 1391px;
        margin-inline: auto;
        aspect-ratio: 1391 / 692;
        overflow: hidden;
    }

    .p-slider-main .item.five .row {
        height: 100%;
        margin: 0;
    }

    /* Text block — same frame position as Transwayz (568 × 598 @ 44,45) */
    .p-slider-main .item.five .col-md-6.left {
        position: absolute;
        top: 6.36%;
        left: 3.23%;
        width: 40.83%;
        height: 86.42%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        z-index: 2;
        /* text above the image */
        container-type: inline-size;
    }

    .p-slider-main .item.five .col-md-6.text-center {
        position: static;
    }

    /* Image — Figma size 475.5 × 330.9 (34.19% × 47.82% of the frame),
       centered in the right region (right of the text column) so it does not
       overlap the text. */
    .p-slider-main .item.five .p-thumb {
        position: absolute;
        top: 48%;
        left: 42.9%;
        transform: translateY(-50%);
        width: 34.19%;
        /* 475.5451965332031 / 1391 */
        height: 80.82%;
        /* 330.93267822265625 / 692 */
        max-width: none;
        object-fit: contain;
        object-position: center;
        z-index: 1;
    }

    /* keep text readable as the frame scales */
    .p-slider-main .item.five .text-poster-app h3 {
        font-size: clamp(14px, 1.7vw, 22px);
    }

    .p-slider-main .item.five .p-desc {
        font-size: clamp(12px, 1.35vw, 19px);
        line-height: 1.5;
    }

    /* stat boxes share the column width evenly (like Transwayz) */
    .p-slider-main .item.five .rev-ratings {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .p-slider-main .item.five .rev-ratings .one {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        margin-right: 0;
    }
}
