
/* ========================================
   POWER PRESS MACHINES PAGE
======================================== */

.page {
    width: 100%;
    padding: 200px 70px 0 70px;
    background: #fff8f4;
    overflow: hidden;
    box-sizing: border-box;
}

.page *,
.page *::before,
.page *::after {
    box-sizing: border-box;
}

/* ========================================
   HEADING
======================================== */

.heading {
    width: 100%;
}

.heading-container {
    width: calc(100% - 15%);
    max-width: 1400px;
    margin: 0 auto;
}

.heading-container h1 {
    margin: 0;
    padding: 0;

    font-family: "Oxanium", sans-serif;
    font-size: 65px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: uppercase;

    background: linear-gradient(
        180deg,
        #c0004d 10%,
        #a00079 70%,
        #5422c5 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ========================================
   PRODUCT GRID
======================================== */

.products-section {
    width: 100%;
}

.products-container {
    width: 1000px;
    max-width: calc(100% - 10%);

    margin: 20px auto 0;

    display: grid;
    grid-template-columns: repeat(2, 380px);
    justify-content: space-between;
    column-gap: 10px;
}

/* ========================================
   PRODUCT CARD
======================================== */

.card {
    position: relative;
    width: 420px;
    height: 550px;

    background: #f2e5bf;
    border-radius: 0 25px 0 25px;

    transition: box-shadow 0.25s ease;
}

.card-link {
    position: absolute;
    inset: 0;

    display: block;
    color: inherit;
    text-decoration: none;
}

/* Product title strip */

.card-title {
    position: absolute;
    z-index: 2;

    top: 25px;
    left: -25px;
    right: 25px;

    min-height: 100px;
    padding: 15px;

    display: flex;
    align-items: center;

    background: #45367f;
    color: #ffffff;

    font-family: "Oxanium", sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.55;
    text-transform: uppercase;
}

/* Gradient strip */

.card-accent {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;

    width: 38px;

    background: linear-gradient(
        180deg,
        #8135ca 10%,
        #bd258d 55%,
        #f20e60 100%
    );
}

/* Machine images */

.machine-image {
    position: absolute;

    top: 150px;
    left: 77%;
    transform: translateX(-50%);

    display: block;
    width: 100%;
    height: 370px;

    object-fit: contain;
    object-position: center;

    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.24));

    user-select: none;
    -webkit-user-drag: none;
}

/* Hover and keyboard focus */

.card:hover {
    box-shadow: 0 10px 24px rgba(62, 40, 90, 0.10);
}

.card-link:focus-visible {
    outline: 3px solid #8b2ec6;
    outline-offset: 5px;
}

/* ========================================
   RESPONSIVE TABLET
======================================== */

@media (max-width: 1000px) {
    .heading-container h1 {
        font-size: 42px;
    }

    .products-container {
        width: 800px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 45px;
    }

    .card {
        width: 100%;
    }

    .card-title {
        font-size: 15px;
    }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 700px) {
    .heading {
        padding-top: 22px;
    }

    .heading-container {
        width: calc(100% - 36px);
    }

    .heading-container h1 {
        font-size: clamp(32px, 7vw, 40px);
        line-height: 1.08;
    }

    .products-container {
        width: min(380px, calc(100% - 36px));
        max-width: none;

        margin-top: 42px;

        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .card {
        width: 100%;
        height: 460px;
    }

    .card-title {
        top: 24px;
        left: -10px;
        right: 12px;

        min-height: 76px;
        padding: 10px 46px 10px 12px;

        font-size: 15px;
        line-height: 1.5;
    }

    .card-accent {
        width: 34px;
    }

    .machine-image {
        top: 125px;
        height: 245px;
    }
}

/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 400px) {
    .heading-container h1 {
        font-size: 30px;
    }

    .card {
        height: 410px;
    }

    .card-title {
        font-size: 13px;
    }

    .machine-image {
        top: 115px;
        height: 220px;
    }
}




/* ========================================
   BLUE BOX EXPANSION - TEXT STAYS FIXED
======================================== */

.card-title {
    --title-expand: 20px;

    position: absolute;
    background: transparent;
    overflow: visible;
}

/* Fixed blue background layer */
.card-title::before {
    content: "";
    position: absolute;
    inset: 0;

    background: #45367f;
    z-index: 0;

    transition: right 0.45s ease;
    right: 0;
}

/* Keep title text unchanged */
.card-title > span:first-child {
    position: relative;
    z-index: 1;
}

/* Gradient strip moves with the blue box */
.card-accent {
    z-index: 2;
    transition: transform 0.45s ease;
}

/* Expand only the background, not the text */
.card-link:hover .card-title::before {
    right: -20px;
}

.card-link:hover .card-accent {
    transform: translateX(20px);
}

/* Keyboard focus */
.card-link:focus-visible .card-title::before {
    right: -20px;
}

.card-link:focus-visible .card-accent {
    transform: translateX(20px);
}

/* Mobile: match the smaller expansion */
@media (max-width: 700px) {
    .card-title {
        --title-expand: 12px;
    }

    .card-link:hover .card-title::before,
    .card-link:focus-visible .card-title::before {
        right: -12px;
    }

    .card-link:hover .card-accent,
    .card-link:focus-visible .card-accent {
        transform: translateX(12px);
    }
}

/* Space between square pipe product cards */

.card {
    margin-bottom: 60px !important;
}