/* =========================================================
   RECENT WORKS SECTION
========================================================= */

.works-section{

    position:relative;

    overflow:hidden;

    background:#ffffff;

}


/* =========================================================
   SECTION INTRO
========================================================= */

.works-heading{

    position:relative;

    min-height:370px;

    display:flex;

    align-items:center;

    justify-content:center;

    padding:90px 30px 70px;

    background:#111b2b;

    overflow:hidden;

}


/* =========================================================
   WATERMARK
========================================================= */

.works-watermark{

    position:absolute;

    top:-18px;

    left:50%;

    transform:translateX(-50%);

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

    font-family:'Manrope',sans-serif;

    font-size:clamp(150px,18vw,280px);

    font-weight:800;

    line-height:1;

    letter-spacing:-10px;

    white-space:nowrap;

    pointer-events:none;

    user-select:none;

}


/* =========================================================
   INTRO CONTENT
========================================================= */

.works-heading-inner{

    position:relative;

    z-index:2;

    width:min(900px,100%);

    text-align:center;

}


/* =========================================================
   HEADING
========================================================= */

.works-heading h2{

    color:#fff;

    font-family:'Manrope',sans-serif;

    font-size:clamp(45px,5vw,70px);

    line-height:1.05;

    letter-spacing:-2.3px;

    font-weight:800;

}

.works-heading h2 span{

    color:var(--primary);

}


/* =========================================================
   DESCRIPTION
========================================================= */

.works-heading p{

    max-width:760px;

    margin:22px auto 0;

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

    font-size:17px;

    line-height:1.8;

}


/* =========================================================
   SIGNATURE
========================================================= */

.works-signature{

    position:absolute;

    right:55px;

    top:60px;

    z-index:2;

    display:flex;

    flex-direction:column;

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

    font-family:cursive;

    font-size:24px;

    line-height:1;

    transform:rotate(-7deg);

}

.works-signature::after{

    content:"";

    width:70px;

    height:2px;

    margin-top:12px;

    background:var(--primary);

    transform:rotate(-8deg);

}


/* =========================================================
   CONTAINER
========================================================= */

.works-container{

    width:min(1280px,92%);

    margin:0 auto;

    padding:65px 0 80px;

}


/* =========================================================
   GRID
========================================================= */

.works-grid{

    display:grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap:28px;

}


/* =========================================================
   WORK CARD
========================================================= */

.work-card{

    overflow:hidden;

    border:
        1px solid
        rgba(11,18,32,.08);

    border-radius:17px;

    background:#fff;

    box-shadow:
        0 8px 25px
        rgba(11,18,32,.055);

    transition:
        transform .35s ease,
        box-shadow .35s ease;

}

.work-card:hover{

    transform:translateY(-7px);

    box-shadow:
        0 20px 40px
        rgba(11,18,32,.12);

}


/* =========================================================
   WORK IMAGE
========================================================= */

.work-image{

    position:relative;

    height:250px;

    overflow:hidden;

    background:#eef0f2;

}

.work-image img{

    width:100%;

    height:100%;

    object-fit:cover;

    transition:
        transform .6s
        cubic-bezier(.22,1,.36,1);

}

.work-card:hover
.work-image img{

    transform:scale(1.045);

}


/* =========================================================
   IMAGE OVERLAY
========================================================= */

.work-overlay{

    position:absolute;

    inset:0;

    background:
        linear-gradient(
            to bottom,
            transparent 45%,
            rgba(5,10,18,.50)
        );

    pointer-events:none;

}


/* =========================================================
   CATEGORY
========================================================= */

.work-category{

    position:absolute;

    top:18px;

    left:18px;

    z-index:3;

    display:inline-flex;

    padding:7px 12px;

    border:
        1px solid
        rgba(244,180,0,.35);

    border-radius:50px;

    background:
        rgba(11,18,32,.86);

    color:var(--primary);

    font-family:'Manrope',sans-serif;

    font-size:10px;

    font-weight:800;

    letter-spacing:1.2px;

}


/* =========================================================
   WORK CONTENT
========================================================= */

.work-content{

    position:relative;

    padding:27px 23px 25px;

}

.work-content h3{

    margin:0 0 10px;

    color:#111827;

    font-family:'Manrope',sans-serif;

    font-size:21px;

    line-height:1.3;

    font-weight:800;

}

.work-content p{

    min-height:70px;

    margin:0 0 21px;

    color:#6b7280;

    font-size:14px;

    line-height:1.7;

}


/* =========================================================
   LINK
========================================================= */

.work-link{

    display:inline-flex;

    align-items:center;

    gap:10px;

    color:#111827;

    font-family:'Manrope',sans-serif;

    font-size:14px;

    font-weight:800;

}

.work-link span{

    width:34px;

    height:34px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:50%;

    background:var(--primary);

    color:#111;

    transition:
        transform .3s ease,
        background .3s ease;

}

.work-link:hover span{

    transform:translateX(4px);

    background:#e3a600;

}


/* =========================================================
   CTA
========================================================= */

.works-cta{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:30px;

    margin-top:38px;

    padding:27px 30px;

    border-radius:16px;

    background:#111b2b;

    box-shadow:
        0 15px 35px
        rgba(11,18,32,.10);

}

.works-cta-label{

    display:block;

    margin-bottom:5px;

    color:var(--primary);

    font-family:'Manrope',sans-serif;

    font-size:11px;

    font-weight:800;

    letter-spacing:2px;

}

.works-cta h3{

    color:#fff;

    font-family:'Manrope',sans-serif;

    font-size:23px;

    line-height:1.3;

}

.works-cta h3 span{

    color:var(--primary);

}

.works-cta-button{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:10px;

    min-height:52px;

    padding:0 25px;

    border-radius:10px;

    background:var(--primary);

    color:#111;

    font-family:'Manrope',sans-serif;

    font-size:14px;

    font-weight:800;

    white-space:nowrap;

    transition:
        transform .3s ease,
        background .3s ease;

}

.works-cta-button i{

    transition:transform .3s ease;

}

.works-cta-button:hover{

    transform:translateY(-2px);

    background:#e3a600;

}

.works-cta-button:hover i{

    transform:translateX(4px);

}


/* =========================================================
   SCROLL REVEAL INITIAL STATE
========================================================= */

.reveal-work{

    opacity:0;

    transform:translateY(35px);

}


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

@media(max-width:991px){

    .works-heading{

        min-height:350px;

        padding:
            80px
            25px
            60px;

    }

    .works-signature{

        right:25px;

        top:35px;

        font-size:20px;

    }

    .works-container{

        width:92%;

        padding:
            55px
            0
            70px;

    }

    .works-grid{

        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:20px;

    }

    .work-image{

        height:235px;

    }

    .works-cta{

        flex-direction:column;

        align-items:flex-start;

    }

}


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

@media(max-width:767px){

    .works-heading{

        min-height:350px;

        padding:
            75px
            20px
            50px;

    }

    .works-watermark{

        top:25px;

        font-size:105px;

        letter-spacing:-5px;

    }

    .works-heading h2{

        font-size:41px;

        letter-spacing:-1.5px;

    }

    .works-heading p{

        margin-top:19px;

        font-size:14.5px;

        line-height:1.7;

    }

    .works-signature{

        display:none;

    }

    .works-container{

        width:
            calc(100% - 32px);

        padding:
            42px
            0
            55px;

    }

    .works-grid{

        grid-template-columns:1fr;

        gap:18px;

    }

    .work-image{

        height:240px;

    }

    .work-content{

        padding:
            25px
            20px
            23px;

    }

    .work-content h3{

        font-size:20px;

    }

    .work-content p{

        min-height:auto;

        font-size:14px;

    }

    .works-cta{

        padding:
            24px
            20px;

        text-align:center;

        align-items:stretch;

    }

    .works-cta h3{

        font-size:20px;

    }

    .works-cta-button{

        width:100%;

    }

}


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

@media(max-width:430px){

    .works-heading h2{

        font-size:37px;

    }

    .works-watermark{

        font-size:90px;

    }

    .work-image{

        height:220px;

    }

}


/* =========================================================
   WORKS CAROUSEL CONTROLS
   Hidden on desktop and tablet
========================================================= */

.works-carousel-toolbar {
    display: none;
}

.works-carousel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.works-carousel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 1px solid rgba(17, 27, 43, 0.12);
    border-radius: 50%;

    background: #ffffff;
    color: #111b2b;

    font-size: 19px;
    cursor: pointer;

    box-shadow: 0 4px 14px rgba(11, 18, 32, 0.08);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        opacity 0.25s ease;
}

.works-carousel-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #111111;
    transform: translateY(-2px);
}

.works-carousel-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.works-carousel-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.works-carousel-status {
    color: #6b7280;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* =========================================================
   MOBILE: HORIZONTAL WORKS CAROUSEL
   Desktop and tablet grids remain unchanged
========================================================= */

@media (max-width: 767px) {

    .works-carousel-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;

        margin-bottom: 18px;
    }

    .works-carousel-btn {
        width: 44px;
        height: 44px;
    }

    .works-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 18px;

        width: 100%;
        min-width: 0;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 0 1px 12px;
        margin: 0;

        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scroll-padding-inline: 1px;

        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .works-grid::-webkit-scrollbar {
        display: none;
    }

    .works-grid > .work-card {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;

        scroll-snap-align: start;
        scroll-snap-stop: always;

        /* Prevent the card hover lift from interfering
           with the mobile swipe layout. */
        transform: none;
    }

    .works-grid > .work-card:hover {
        transform: none;
    }

    .works-grid .work-image {
        height: 240px;
    }

    .works-grid .work-content {
        padding: 25px 20px 23px;
    }

    .works-grid .work-content h3 {
        font-size: 20px;
    }

    .works-grid .work-content p {
        min-height: auto;
        font-size: 14px;
    }

    /* Keep the existing enquiry banner below the carousel. */
    .works-cta {
        margin-top: 28px;
    }

}


/* =========================================================
   SMALL MOBILE: SHOW A LITTLE OF THE NEXT CARD
========================================================= */

@media (max-width: 430px) {

    .works-grid {
        gap: 14px;
    }

    .works-grid > .work-card {
        /*
         * Approximately 90% width: the next card peeks
         * into view to communicate horizontal scrolling.
         */
        flex-basis: 90%;
        width: 90%;
        max-width: 90%;
    }

    .works-grid .work-image {
        height: 220px;
    }

}


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

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

    .works-grid {
        scroll-behavior: auto;
    }

    .works-carousel-btn {
        transition: none;
    }

}
