/* =========================================================
   CASE STUDIES — WORDPRESS SHORTCODE WIDTH FIX

   navigation.css already resets the general Astra wrappers.
   This only removes the remaining Gutenberg/shortcode
   content-width restriction.
   ========================================================= */

body.has-algorix-case-studies-page
.entry-content > .wp-block-shortcode,

body.has-algorix-case-studies-page
.entry-content > * {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* =========================================================
   PAGE
   ========================================================= */

.ax-case-studies-page {
    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;

    overflow: clip;

    color: #102b36;
    background: #ffffff;
}


.ax-case-studies-page .ax-shell {
    width:
        min(
            1180px,
            calc(
                100% -
                clamp(32px, 7vw, 96px)
            )
        );

    max-width: 1180px;

    margin-inline: auto;
}



/* =========================================================
   HERO
   ========================================================= */

.ax-case-studies-hero {
    position: relative;

    width: 100%;

    overflow: hidden;

    padding:
        clamp(150px, 14vw, 205px)
        0
        clamp(105px, 9vw, 135px);

    color: #ffffff;

    background:
        radial-gradient(
            circle at 82% 22%,
            rgba(74, 143, 163, .35),
            transparent 29%
        ),
        linear-gradient(
            100deg,
            #143f50 0%,
            #1b4b5a 58%,
            #2b6675 100%
        );
}


.ax-case-studies-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    opacity: .11;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, .08) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .08) 1px,
            transparent 1px
        );

    background-size: 50px 50px;
}


.ax-case-studies-hero__inner {
    position: relative;
    z-index: 2;
}


.ax-case-studies-eyebrow {
    margin: 0 0 18px;

    color: #a7d7e0;

    font-size: .8rem;
    font-weight: 850;

    letter-spacing: .13em;

    text-transform: uppercase;
}


.ax-case-studies-hero__title {
    max-width: 930px;

    margin: 0 0 24px;

    color: #ffffff;

    font-family:
        "Rajdhani",
        "Exo 2",
        Inter,
        system-ui,
        sans-serif;

    font-size:
        clamp(
            3rem,
            5.2vw,
            5.2rem
        );

    font-weight: 800;

    line-height: .98;

    letter-spacing: -.045em;
}


.ax-case-studies-hero__body {
    max-width: 720px;

    margin: 0;

    color: #d7e8ec;

    font-size:
        clamp(
            1rem,
            1.3vw,
            1.12rem
        );

    line-height: 1.75;
}



/* =========================================================
   CASE STUDIES LIST
   ========================================================= */

.ax-case-studies-list {
    width: 100%;

    padding:
        clamp(80px, 8vw, 115px)
        0
        clamp(105px, 10vw, 150px);

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f6fafb 100%
        );
}


.ax-case-studies-grid {
    display: grid;

    gap:
        clamp(
            42px,
            6vw,
            76px
        );
}



/* =========================================================
   CASE STUDY CARD
   ========================================================= */

.ax-case-study-card {
    display: grid;

    grid-template-columns:
        minmax(330px, .92fr)
        minmax(0, 1.08fr);

    overflow: hidden;

    border:
        1px solid
        rgba(27, 75, 90, .11);

    border-radius: 26px;

    background: #ffffff;

    box-shadow:
        0 20px 55px
        rgba(18, 64, 78, .075);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


.ax-case-study-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 28px 70px
        rgba(18, 64, 78, .12);
}



/* =========================================================
   CARD MEDIA
   ========================================================= */

.ax-case-study-card__media {
    position: relative;

    min-height: 440px;

    overflow: hidden;

    display: block;

    background: #eaf3f5;
}


.ax-case-study-card__media::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            transparent 48%,
            rgba(8, 36, 46, .35) 100%
        );
}


.ax-case-study-card__media img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transform: scale(1);

    transition:
        transform
        .55s
        cubic-bezier(.2, .7, .2, 1);
}


.ax-case-study-card:hover
.ax-case-study-card__media img {
    transform: scale(1.045);
}


.ax-case-study-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 440px;

    display: grid;

    place-items: center;

    color: #d9f1f5;

    background:
        radial-gradient(
            circle at 68% 25%,
            rgba(99, 187, 207, .28),
            transparent 28%
        ),
        linear-gradient(
            120deg,
            #143f50,
            #2b6675
        );
}


.ax-case-study-card__placeholder span {
    font-family:
        "Rajdhani",
        Inter,
        sans-serif;

    font-size:
        clamp(
            4rem,
            8vw,
            7rem
        );

    font-weight: 800;
}


.ax-case-study-card__number {
    position: absolute;

    z-index: 3;

    right: 22px;
    bottom: 20px;

    color:
        rgba(
            255,
            255,
            255,
            .96
        );

    font-family:
        "Rajdhani",
        Inter,
        sans-serif;

    font-size:
        clamp(
            2.2rem,
            4vw,
            3.5rem
        );

    font-weight: 800;

    line-height: 1;
}



/* =========================================================
   CARD CONTENT
   ========================================================= */

.ax-case-study-card__content {
    min-width: 0;

    padding:
        clamp(
            34px,
            5vw,
            58px
        );
}


.ax-case-study-card__category {
    margin: 0 0 12px;

    color: #39788a;

    font-size: .76rem;
    font-weight: 850;

    letter-spacing: .1em;

    text-transform: uppercase;
}


.ax-case-study-card__title {
    margin: 0 0 14px;

    color: #102b36;

    font-family:
        "Rajdhani",
        "Exo 2",
        Inter,
        system-ui,
        sans-serif;

    font-size:
        clamp(
            2rem,
            3.2vw,
            3rem
        );

    line-height: 1;

    letter-spacing: -.025em;
}


.ax-case-study-card__title a {
    color: inherit;

    text-decoration: none;
}


.ax-case-study-card__subtitle {
    margin: 0 0 15px;

    color: #2f6170;

    font-size: 1rem;
    font-weight: 750;

    line-height: 1.55;
}


.ax-case-study-card__excerpt {
    margin: 0 0 28px;

    color: #60757d;

    line-height: 1.75;
}



/* =========================================================
   CHALLENGE / SOLUTION / RESULTS
   ========================================================= */

.ax-case-study-story {
    display: grid;

    gap: 12px;

    margin: 0 0 26px;
}


.ax-case-study-story__item {
    padding:
        15px
        17px;

    border:
        1px solid
        rgba(43, 102, 117, .10);

    border-radius: 13px;

    background: #f4f9fa;
}


.ax-case-study-story__item span {
    display: block;

    margin-bottom: 5px;

    color: #39788a;

    font-size: .7rem;
    font-weight: 850;

    letter-spacing: .09em;

    text-transform: uppercase;
}


.ax-case-study-story__item p {
    margin: 0;

    color: #516b74;

    font-size: .9rem;

    line-height: 1.6;
}



/* =========================================================
   TECHNOLOGIES
   ========================================================= */

.ax-case-study-card__tech {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 25px;
}


.ax-case-study-card__tech span {
    padding:
        6px
        10px;

    border:
        1px solid
        rgba(43, 102, 117, .13);

    border-radius: 999px;

    color: #315e6c;

    background: #eef6f8;

    font-size: .76rem;
    font-weight: 750;
}



/* =========================================================
   READ CASE STUDY LINK
   ========================================================= */

.ax-case-study-card__link {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    color: #286a7b;

    font-weight: 850;

    text-decoration: none;

    transition:
        transform .2s ease,
        color .2s ease;
}


.ax-case-study-card__link:hover {
    color: #174f60;

    transform: translateX(3px);
}



/* =========================================================
   ALTERNATING / REVERSED CARD
   ========================================================= */

.ax-case-study-card--reverse
.ax-case-study-card__media {
    order: 2;
}


.ax-case-study-card--reverse
.ax-case-study-card__content {
    order: 1;
}



/* =========================================================
   BOTTOM PORTFOLIO CTA
   ========================================================= */

.ax-case-studies-footer {
    display: flex;

    justify-content: center;

    margin-top:
        clamp(
            50px,
            7vw,
            82px
        );
}


.ax-case-studies-portfolio-button {
    display: inline-flex;

    min-height: 50px;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding:
        13px
        24px;

    border-radius: 10px;

    color: #ffffff;

    background: #2b6675;

    font-weight: 800;

    text-decoration: none;

    box-shadow:
        0 10px 25px
        rgba(43, 102, 117, .14);

    transition:
        transform .2s ease,
        background .2s ease;
}


.ax-case-studies-portfolio-button:hover {
    transform: translateY(-2px);

    color: #ffffff;

    background: #245b69;
}



/* =========================================================
   EMPTY STATE
   ========================================================= */

.ax-case-studies-empty {
    min-height: 420px;

    display: grid;

    place-items: center;

    align-content: center;

    gap: 14px;

    padding:
        60px
        25px;

    border:
        1px solid
        rgba(27, 75, 90, .12);

    border-radius: 26px;

    text-align: center;

    background:
        linear-gradient(
            180deg,
            #f0f7f9,
            #ffffff
        );
}


.ax-case-studies-empty__mark {
    width: 76px;
    height: 76px;

    display: grid;

    place-items: center;

    border-radius: 22px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            #143f50,
            #4a8fa3
        );

    font-family:
        "Rajdhani",
        Inter,
        sans-serif;

    font-size: 1.8rem;
    font-weight: 800;
}


.ax-case-studies-empty h2 {
    margin: 4px 0 0;

    color: #102b36;

    font-size:
        clamp(
            1.7rem,
            3vw,
            2.3rem
        );
}


.ax-case-studies-empty p {
    max-width: 560px;

    margin: 0;

    color: #60757d;

    line-height: 1.7;
}


.ax-case-studies-empty a {
    margin-top: 8px;

    color: #286a7b;

    font-weight: 800;
}



/* =========================================================
   IPAD / TABLET
   ========================================================= */

@media (max-width: 920px) {

    .ax-case-studies-hero {
        padding:
            135px
            0
            95px;
    }


    .ax-case-study-card {
        grid-template-columns:
            minmax(280px, .85fr)
            minmax(0, 1.15fr);
    }


    .ax-case-study-card__media,
    .ax-case-study-card__placeholder {
        min-height: 420px;
    }


    .ax-case-study-card__content {
        padding: 32px;
    }

}



/* =========================================================
   TABLET / MOBILE STACK
   ========================================================= */

@media (max-width: 760px) {

    .ax-case-study-card {
        grid-template-columns: 1fr;
    }


    .ax-case-study-card__media,
    .ax-case-study-card__placeholder {
        min-height: 320px;
    }


    .ax-case-study-card--reverse
    .ax-case-study-card__media,

    .ax-case-study-card--reverse
    .ax-case-study-card__content {
        order: initial;
    }

}



/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {

    .ax-case-studies-page .ax-shell {
        width:
            min(
                calc(100% - 30px),
                560px
            );
    }


    .ax-case-studies-hero {
        padding:
            118px
            0
            82px;
    }


    .ax-case-studies-hero__title {
        font-size:
            clamp(
                2.55rem,
                12vw,
                3.65rem
            );
    }


    .ax-case-studies-hero__body {
        font-size: 1rem;
    }


    .ax-case-studies-list {
        padding:
            70px
            0
            95px;
    }


    .ax-case-study-card {
        border-radius: 19px;
    }


    .ax-case-study-card__media,
    .ax-case-study-card__placeholder {
        min-height: 270px;
    }


    .ax-case-study-card__content {
        padding:
            28px
            22px
            31px;
    }


    .ax-case-study-card__title {
        font-size:
            clamp(
                1.9rem,
                8vw,
                2.45rem
            );
    }


    .ax-case-studies-portfolio-button {
        width: 100%;
    }

}



/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

    .ax-case-studies-page .ax-shell {
        width:
            calc(
                100% -
                24px
            );
    }


    .ax-case-studies-hero {
        padding:
            108px
            0
            74px;
    }


    .ax-case-study-card__media,
    .ax-case-study-card__placeholder {
        min-height: 235px;
    }


    .ax-case-study-card__content {
        padding:
            25px
            19px
            28px;
    }

}



/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .ax-case-study-card,
    .ax-case-study-card__media img,
    .ax-case-study-card__link,
    .ax-case-studies-portfolio-button {
        transition: none !important;
    }


    .ax-case-study-card:hover,
    .ax-case-study-card:hover
    .ax-case-study-card__media img,
    .ax-case-study-card__link:hover,
    .ax-case-studies-portfolio-button:hover {
        transform: none !important;
    }

}