:root {
    --portfolio-section-gap: clamp(4rem, 6vw, 7rem);
    --cta-padding-top: 0;
    --cta-padding-bottom: var(--portfolio-section-gap);
}

.portfolio-section-gap {
    width: 100%;
    height: var(--portfolio-section-gap);
    flex-shrink: 0;
}

/* ======================
   WORK HERO
   ====================== */
.work-hero {
    padding-top: var(--hero-padding-top, clamp(6.5rem, 10vw, 9.5rem));
    padding-bottom: 0;
    background-color: #05010a;
}

.work-header-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--section-header-mb);
}

.work-main-title {
    margin-bottom: 30px;
    color: #fff;
}

.work-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: #888;
}

/* ======================
   PROJECT GRID
   ====================== */

.blog-categories-nav .blog-cat-link {
    text-decoration: none;
}

.blog-categories-nav .blog-cat-link:hover,
.blog-categories-nav .blog-cat-link:focus,
.blog-categories-nav .blog-cat-link:active,
.blog-categories-nav .blog-cat-link.active {
    text-decoration: none;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* 5 cards: row1 = 3, row2 = 2 centered */
.project-grid:has(.project-card:nth-child(5):last-child) {
    grid-template-columns: repeat(6, 1fr);
}

.project-grid:has(.project-card:nth-child(5):last-child) .project-card {
    grid-column: span 2;
}

.project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(5) {
    grid-column: 4 / span 2;
}

/* ======================
   CARD — UNIFIED DARK THEME
   ====================== */
.project-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.project-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- Visual / Logo Area --- */
.card-top {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex-shrink: 0;
    background: #0c0817;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

/* Card Media Arrow Button (Matching Services Page) */
.card-top .service-row-arrow-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    background-color: rgba(5, 1, 10, 0.6);
    backdrop-filter: blur(8px);
}

@media (hover: hover) {
    .project-card:hover .service-row-arrow-btn {
        background-color: var(--purple-light, #A594FD);
        border-color: var(--purple-light, #A594FD);
        box-shadow: 0 0 20px rgba(165, 148, 253, 0.45);
        transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.16s,
            border-color 0.4s ease 0.16s,
            box-shadow 0.4s ease 0.16s;
    }

    .project-card:hover .service-row-arrow-btn .arrow-icon-primary {
        transform: translate(125%, -125%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    }

    .project-card:hover .service-row-arrow-btn .arrow-icon-secondary {
        transform: translate(0, 0);
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.22s;
    }
}

/* Subtle gradient at bottom for logo cards */
.card-top::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(5, 1, 10, 0.4) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Screenshot variant — full web image covering card top completely without cutting */
.card-top.card-screenshot {
    padding: 0;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #0c0817;
}

.card-top.card-screenshot>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

/* ============================================================
   MOBILE APP CARD — FIGMA-INSPIRED EDITORIAL COVER TEMPLATE
   ============================================================ */
.card-top.card-screenshot.card-screenshot-app,
.card-top.card-screenshot.card-screenshot-trio {
    aspect-ratio: 16 / 10;
    padding: 0;
    display: block;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #4f5791;
}

.app-cover-template {
    position: absolute;
    inset: 0;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 78% 26%, rgba(165, 148, 253, 0.16), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(30, 27, 74, 0.34), transparent 35%),
        linear-gradient(135deg, #343c72 0%, #4f5791 55%, #5b649c 100%);
}

.app-cover-surface {
    position: absolute;
    inset: -10% -6% -8% -6%;
    transform: scale(1.02);
}

.app-cover-surface::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .06) 0 24%, transparent 24.2% 100%),
        linear-gradient(18deg, transparent 0 61%, rgba(255, 255, 255, .025) 61.2% 77%, transparent 77.2% 100%);
    pointer-events: none;
}

.app-cover-blob,
.app-cover-curve {
    position: absolute;
    pointer-events: none;
}

.app-cover-blob-left {
    left: -25%;
    top: -18%;
    width: 57%;
    height: 118%;
    border-radius: 48% 52% 56% 44%;
    transform: rotate(-14deg);
    background: linear-gradient(145deg, #46518f 0%, #5c66a3 70%, #4c568f 100%);
}

.app-cover-blob-right {
    right: -18%;
    top: -20%;
    width: 49%;
    height: 103%;
    border-radius: 52% 48% 45% 55%;
    transform: rotate(12deg);
    background: linear-gradient(145deg, #6670a9 0%, #4f5890 100%);
    opacity: .72;
}

.app-cover-curve-one {
    left: 31%;
    top: -34%;
    width: 43%;
    height: 63%;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
    transform: rotate(-12deg);
}

.app-cover-curve-two {
    right: 6%;
    bottom: -44%;
    width: 50%;
    height: 65%;
    border: 1px solid rgba(20, 22, 55, .18);
    border-radius: 50%;
    transform: rotate(18deg);
}

.app-cover-sheet,
.app-cover-device {
    position: absolute;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.app-cover-sheet {
    background: linear-gradient(145deg, #ffffff 0%, #f5f5f7 100%);
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: clamp(10px, 1.2vw, 18px);
    padding: clamp(5px, .55vw, 8px);
    box-shadow: 0 24px 50px rgba(16, 16, 36, .20), 0 8px 18px rgba(16, 16, 36, .10);
    transition: transform .65s cubic-bezier(.16, 1, .3, 1), box-shadow .65s cubic-bezier(.16, 1, .3, 1);
}

.app-cover-sheet-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: #f2f2f6;
}

.app-cover-sheet-left {
    left: -8%;
    top: 9%;
    width: 46%;
    height: 76%;
    z-index: 3;
    transform: rotate(-10deg);
}

.app-cover-sheet-center {
    left: 17%;
    bottom: -10%;
    width: 44%;
    height: 38%;
    z-index: 6;
    transform: rotate(-7deg);
}

.app-cover-sheet-foreground {
    left: 46%;
    bottom: -11%;
    width: 27%;
    height: 25%;
    z-index: 9;
    transform: rotate(7deg);
}

.app-cover-sheet-heading {
    position: absolute;
    left: 7%;
    top: 7%;
    width: 32%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-cover-sheet-heading span {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(50, 52, 76, .18);
}

.app-cover-sheet-heading span:nth-child(2) {
    width: 76%;
}

.app-cover-sheet-heading .short {
    width: 52%;
}

.app-cover-sheet-screen {
    position: absolute;
    overflow: hidden;
    border-radius: 10px;
    background: #09070f;
    box-shadow: 0 10px 22px rgba(20, 20, 35, .12);
}

.app-cover-sheet-screen img,
.app-cover-sheet-mini-grid img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
}

.app-cover-sheet-screen-large {
    width: 47%;
    height: 70%;
    right: 7%;
    bottom: 7%;
}

.app-cover-sheet-screen-wide {
    inset: 11% 7%;
}

.app-cover-sheet-mini-grid {
    position: absolute;
    inset: 9%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.app-cover-sheet-mini-grid>div {
    overflow: hidden;
    border-radius: 8px;
    background: #09070f;
    box-shadow: 0 6px 14px rgba(20, 20, 35, .12);
}

.app-cover-device {
    transition: transform .68s cubic-bezier(.16, 1, .3, 1), filter .68s cubic-bezier(.16, 1, .3, 1);
}

.app-cover-device-hero {
    right: 2%;
    top: 3%;
    width: 27%;
    height: 91%;
    z-index: 14;
    filter: drop-shadow(0 28px 38px rgba(7, 8, 27, .42));
}

.app-cover-device-secondary {
    right: 24%;
    top: -2%;
    width: 16%;
    height: 63%;
    z-index: 10;
    transform: rotate(-8deg);
    filter: drop-shadow(0 18px 26px rgba(9, 10, 31, .30));
}

.app-cover-device-shell {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: clamp(18px, 2vw, 30px);
    background: linear-gradient(145deg, #24252f 0%, #06070b 100%);
    border: 2px solid rgba(255, 255, 255, .28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 0 18px rgba(255, 255, 255, .03);
    overflow: hidden;
}

.app-cover-device-shell img {
    position: absolute;
    left: 2%;
    top: 2.1%;
    width: 96%;
    height: 95.8%;
    object-fit: cover;
    object-position: top center;
    border-radius: clamp(15px, 1.7vw, 26px);
    display: block;
    background: #09070f;
}

.app-cover-device-island {
    position: absolute;
    top: 1.4%;
    left: 50%;
    transform: translateX(-50%);
    width: 31%;
    height: 2.2%;
    min-height: 7px;
    border-radius: 999px;
    background: #000;
    z-index: 3;
}

.app-cover-template::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 57%, rgba(5, 1, 10, .10) 100%);
}

@media (hover:hover) {
    .project-card:hover .app-cover-sheet-left {
        transform: translate(-1%, -1%) rotate(-12deg) scale(1.015);
        box-shadow: 0 30px 58px rgba(12, 12, 34, .24), 0 10px 22px rgba(12, 12, 34, .11);
    }

    .project-card:hover .app-cover-sheet-center {
        transform: translate(-1%, -3%) rotate(-8deg) scale(1.012);
    }

    .project-card:hover .app-cover-sheet-foreground {
        transform: translate(1%, -7%) rotate(9deg) scale(1.018);
    }

    .project-card:hover .app-cover-device-secondary {
        transform: translate(-6%, -2%) rotate(-11deg) scale(1.01);
    }

    .project-card:hover .app-cover-device-hero {
        transform: translateY(-3%) scale(1.035);
        filter: drop-shadow(0 34px 44px rgba(7, 8, 27, .48));
    }
}

@media (max-width:1024px) {
    .app-cover-device-hero {
        width: 29%;
        right: 1%;
    }

    .app-cover-device-secondary {
        width: 18%;
        right: 22%;
    }

    .app-cover-sheet-left {
        width: 49%;
        left: -11%;
    }

    .app-cover-sheet-center {
        width: 45%;
        left: 16%;
    }
}

@media (max-width:768px) {
    .app-cover-surface {
        inset: -6% -8%;
    }

    .app-cover-device-hero {
        width: 31%;
        height: 88%;
        top: 6%;
    }

    .app-cover-device-secondary {
        width: 20%;
        height: 60%;
        right: 24%;
    }

    .app-cover-sheet-left {
        width: 53%;
        height: 73%;
        left: -14%;
        top: 11%;
    }

    .app-cover-sheet-center {
        width: 50%;
        height: 34%;
        left: 11%;
    }

    .app-cover-sheet-foreground {
        width: 30%;
        height: 23%;
        left: 43%;
    }
}

@media (max-width:480px) {
    .app-cover-device-hero {
        width: 37%;
        height: 83%;
        right: 0;
        top: 8%;
    }

    .app-cover-device-secondary {
        width: 24%;
        height: 53%;
        right: 27%;
    }

    .app-cover-sheet-left {
        width: 61%;
        height: 68%;
        left: -22%;
        top: 13%;
    }

    .app-cover-sheet-center {
        width: 54%;
        height: 30%;
        left: 3%;
    }

    .app-cover-sheet-foreground {
        width: 34%;
        height: 21%;
        left: 42%;
    }
}

@media (max-width:360px) {
    .app-cover-device-hero {
        width: 41%;
    }

    .app-cover-device-secondary {
        width: 26%;
    }

    .app-cover-sheet-left {
        width: 65%;
        left: -26%;
    }

    .app-cover-sheet-center {
        width: 57%;
        left: 0;
    }
}

/* ============================================================
   FIGMA NECTAR 3D ISOMETRIC SHOWCASE TEMPLATE (Group 6865)
   Mobile Screen Mockups Only — App Theme Colors Matched
   ============================================================ */
.figma-nectar-tpl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, var(--tpl-accent, #53b175) 0%, #0b0f19 100%);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    font-family: inherit;
}

/* Large App-Theme Color Blob matching Group 6865 SVG */
.figma-nectar-tpl .nectar-bg-blob {
    position: absolute;
    left: -35%;
    bottom: -45%;
    width: 130%;
    height: 170%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, var(--tpl-accent, #53b175) 0%, transparent 75%), var(--tpl-accent, #53b175);
    opacity: 0.85;
    filter: blur(15px);
    pointer-events: none;
    z-index: 1;
}

.figma-nectar-tpl .nectar-sparkle {
    position: absolute;
    color: #ffffff;
    font-size: 16px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 2;
}

.figma-nectar-tpl .sparkle-1 {
    top: 12%;
    left: 15%;
}

.figma-nectar-tpl .sparkle-2 {
    bottom: 20%;
    left: 25%;
    color: #ffffff;
}

.figma-nectar-tpl .sparkle-3 {
    top: 15%;
    right: 42%;
    color: #ffffff;
}

.figma-nectar-tpl .sparkle-4 {
    bottom: 12%;
    right: 28%;
}

/* Left Column Branding */
.figma-nectar-tpl .nectar-left-branding {
    width: 38%;
    padding: 24px 20px 24px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
    position: relative;
    box-sizing: border-box;
}

.figma-nectar-tpl .nectar-brand-header {
    margin-bottom: 12px;
}

.figma-nectar-tpl .nectar-brand-logo {
    max-height: 32px;
    max-width: 125px;
    object-fit: contain;
    object-position: left center;
}

.figma-nectar-tpl .nectar-brand-logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.figma-nectar-tpl .nectar-logo-icon {
    color: #ffffff;
    font-size: 20px;
}

.figma-nectar-tpl .nectar-badge-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-bottom: 18px;
    white-space: nowrap;
    text-transform: uppercase;
}

.figma-nectar-tpl .nectar-headline {
    font-size: clamp(14px, 1.5vw, 21px);
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.3px;
    max-width: 240px;
    word-break: normal;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Right 3D Isometric Mobile Mockups Stage (Exact Group 6865.svg Layout) */
.figma-nectar-tpl .nectar-3d-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.figma-nectar-tpl .nectar-phone {
    position: absolute;
    width: 17.2%;
    aspect-ratio: 317.897 / 640;
    transform: rotate(-30deg);
    transform-origin: top left;
    background: #000000;
    border-radius: 16px;
    padding: 3px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.22);
    overflow: hidden;
    transition: transform 0.4s ease;
    pointer-events: auto;
}

.figma-nectar-tpl .nectar-phone-notch {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 3px;
    background: #1a1a1a;
    border-radius: 999px;
    z-index: 10;
}

.figma-nectar-tpl .nectar-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 17px;
    overflow: hidden;
    background: #111111;
}

.figma-nectar-tpl .nectar-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Exact Group 6865.svg Phone Placements (-30deg Grid Coordinates - Overlapping) */

/* Hero Phone (Front Center-Left: pattern3) */
.figma-nectar-tpl .phone-pattern3 {
    left: 40.95%;
    top: 14.94%;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Left Phone (pattern9) */
.figma-nectar-tpl .phone-pattern9 {
    left: 17.68%;
    top: 17.05%;
    z-index: 6;
}

/* Middle-Right Phone (pattern10) */
.figma-nectar-tpl .phone-pattern10 {
    left: 67.62%;
    top: 22.18%;
    z-index: 6;
}

/* Far-Right Phone (pattern8) */
.figma-nectar-tpl .phone-pattern8 {
    left: 97.62%;
    top: 38.37%;
    z-index: 4;
}

/* Bottom-Left Phone (pattern1) */
.figma-nectar-tpl .phone-pattern1 {
    left: 38.81%;
    top: 74.58%;
    z-index: 8;
}

/* Bottom-Middle Phone (pattern4) */
.figma-nectar-tpl .phone-pattern4 {
    left: 62.04%;
    top: 72.37%;
    z-index: 7;
}

/* Bottom-Right Phone (pattern5) */
.figma-nectar-tpl .phone-pattern5 {
    left: 88.81%;
    top: 79.83%;
    z-index: 5;
}

/* Top-Center Phone (pattern6) */
.figma-nectar-tpl .phone-pattern6 {
    left: 46.66%;
    top: -34.97%;
    z-index: 4;
    opacity: 0.9;
}

/* Top-Right Phone (pattern7) */
.figma-nectar-tpl .phone-pattern7 {
    left: 76.35%;
    top: -19.57%;
    z-index: 3;
    opacity: 0.9;
}

/* Hover Interactivity */
@media (hover: hover) {
    .project-card:hover .figma-nectar-tpl .phone-hero {
        transform: translateY(-6px) scale(1.03);
    }

    .project-card:hover .figma-nectar-tpl .phone-mid {
        transform: translateY(-3px) scale(1.015);
    }
}

/* Responsive Breakpoints for Figma Nectar Showcase Card */
@media (max-width: 768px) {
    .figma-nectar-tpl .nectar-left-branding {
        width: 48%;
        padding: 18px 16px 18px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .figma-nectar-tpl .nectar-brand-header {
        margin-bottom: 12px;
        align-self: flex-start;
    }

    .figma-nectar-tpl .nectar-brand-logo {
        max-height: clamp(22px, 3vw, 28px);
        max-width: 120px;
        object-position: left center;
    }

    .figma-nectar-tpl .nectar-badge-pill {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 12px;
        align-self: flex-start;
    }

    .figma-nectar-tpl .nectar-headline {
        font-size: clamp(13px, 2.4vw, 18px);
        line-height: 1.25;
        max-width: 240px;
        text-align: left;
    }

    .figma-nectar-tpl .nectar-3d-stage {
        width: 100%;
        inset: 0;
        transform: scale(0.82);
        transform-origin: 75% 40%;
    }
}

@media (max-width: 480px) {
    .figma-nectar-tpl .nectar-left-branding {
        width: 50%;
        padding: 14px 12px 14px 14px;
    }

    .figma-nectar-tpl .nectar-brand-logo {
        max-height: 22px;
        max-width: 100px;
    }

    .figma-nectar-tpl .nectar-badge-pill {
        font-size: 9px;
        padding: 4px 9px;
        margin-bottom: 10px;
    }

    .figma-nectar-tpl .nectar-headline {
        font-size: clamp(12px, 2.8vw, 15px);
        max-width: 190px;
    }

    .figma-nectar-tpl .nectar-3d-stage {
        width: 100%;
        inset: 0;
        transform: scale(0.70);
        transform-origin: 78% 40%;
    }
}

/* Client logos — centred & contained inside portfolio card-top */
.card-top > .client-logo,
.card-top > .portfolio-card-logo,
.project-card .portfolio-card-logo {
    max-width: 65% !important;
    max-height: 65% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    object-position: center;
    display: block !important;
    margin: auto !important;
    opacity: 1 !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

/* Fallback project title if no logo */
.card-fallback-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    line-height: 1.4;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

/* --- Details Area --- */
.card-bottom {
    padding: 22px 26px 26px;
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.card-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--purple-light, #a594fd);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-pill-badge {
    font-size: 9.5px;
    font-weight: 800;
    background: rgba(165, 148, 253, 0.12);
    color: var(--purple-light, #a594fd);
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid rgba(165, 148, 253, 0.25);
    text-transform: uppercase;
    line-height: 1.2;
    display: inline-block;
}

.card-subcats-row {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-gray, rgba(255, 255, 255, 0.6));
    margin-top: -2px;
    margin-bottom: 12px;
    opacity: 0.85;
    letter-spacing: 0.2px;
}

.card-bottom h3 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.card-bottom p {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

/* Card tags list & pills */
.card-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.card-tag-pill {
    font-size: 10px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 9px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
}

.project-card:hover .card-tag-pill {
    border-color: rgba(165, 148, 253, 0.25);
    color: rgba(255, 255, 255, 0.95);
    background: rgba(165, 148, 253, 0.06);
}

/* CTA label */
.view-project {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-decoration: none;
    color: var(--purple-light, #A594FD);
    font-size: 18px;
    font-weight: 700;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    background: none;
    border-radius: 0;
    transition: color 0.25s ease;
}

.view-project-arrow {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), color 0.25s ease;
}

/* =====================
   HOVER — mouse only
   ===================== */
@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-6px);
        border-color: rgba(165, 148, 253, 0.35);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6),
            0 0 25px rgba(99, 44, 155, 0.2);
    }

    .project-card:hover .portfolio-card-logo,
    .project-card:hover .card-top > .client-logo {
        transform: scale(1.05);
    }

    .project-card:hover .card-fallback-title {
        transform: scale(1.04);
    }

    .project-card:hover .card-top.card-screenshot>img {
        transform: scale(1.04);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(165, 148, 253, 0.25);
    }


    .project-card:hover .view-project {
        color: #ffffff;
    }

    .project-card:hover .view-project-arrow {
        transform: translate(5px, -5px);
        color: #ffffff;
    }
}

/* ======================
   1200px
   ====================== */
@media (max-width: 1200px) {
    .work-hero {
        padding-top: var(--hero-padding-top, clamp(6.5rem, 10vw, 9.5rem));
    }

    .project-grid {
        gap: 24px;
    }
}

/* ======================
   1100px — 2 col (tablet landscape only)
   min-width: 769px ensures it doesnt affect mobile
   ====================== */
@media (min-width: 769px) and (max-width: 1100px) {

    .project-grid,
    .project-grid:has(.project-card:nth-child(5):last-child) {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100%;
    }

    .project-grid:has(.project-card:nth-child(5):last-child) .project-card,
    .project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(4),
    .project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(5) {
        grid-column: span 1 !important;
    }
}

/* ======================
   1024px
   ====================== */
@media (max-width: 1024px) {
    .work-hero {
        padding-top: var(--hero-padding-top-tablet, clamp(5.5rem, 8.5vw, 7.5rem));
    }

    .work-header-content {
        margin-bottom: var(--section-header-mb);
    }

    .card-top {
        aspect-ratio: 16 / 10;
    }

    .card-bottom {
        padding: 20px 22px 24px;
    }
}

/* ======================
   768px — 1 col starts here
   ====================== */
@media (max-width: 768px) {
    .work-hero {
        padding-top: var(--hero-padding-top-mobile, clamp(5rem, 8vw, 6.5rem));
    }

    .work-header-content {
        margin-bottom: var(--section-header-mb);
    }

    .work-subtitle {
        font-size: 16px;
    }

    /* SINGLE COLUMN */
    .project-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 20px;
    }

    /* Reset 5-card layout */
    .project-grid:has(.project-card:nth-child(5):last-child) {
        grid-template-columns: 1fr !important;
    }

    .project-grid:has(.project-card:nth-child(5):last-child) .project-card,
    .project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(4),
    .project-grid:has(.project-card:nth-child(5):last-child) .project-card:nth-child(5) {
        grid-column: span 1 !important;
    }

    .card-top {
        aspect-ratio: 16 / 9.5;
    }

    .card-bottom {
        padding: 20px 22px 24px;
    }

    .card-bottom h3 {
        font-size: 20px;
    }

    .card-bottom p {
        font-size: 15px;
    }

    .view-project {
        font-size: 12px;
    }

    .card-top .service-row-arrow-btn {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .card-top .service-row-arrow-btn .arrow-icon-wrapper {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .card-top .service-row-arrow-btn .arrow-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 18px;
        height: 18px;
        display: block;
        margin: 0;
        padding: 0;
    }
}

/* ======================
   480px
   ====================== */
@media (max-width: 480px) {
    .work-hero {
        padding-top: clamp(4.5rem, 8vw, 6rem);
    }

    .work-header-content {
        margin-bottom: var(--section-header-mb);
    }

    .work-subtitle {
        font-size: 15px;
        line-height: 1.6;
    }

    .project-grid {
        width: 100%;
        gap: 16px;
    }

    .card-top {
        aspect-ratio: 16 / 10;
    }

    .card-top .service-row-arrow-btn {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .card-top .service-row-arrow-btn .arrow-icon-wrapper {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
    }

    .card-top .service-row-arrow-btn .arrow-icon {
        width: 16px;
        height: 16px;
    }

    .card-bottom {
        padding: 18px 20px 22px;
    }

    .card-bottom h3 {
        font-size: 18px;
    }

    .card-bottom p {
        font-size: 14px;
        margin-bottom: 16px;
    }
}

/* ======================
   360px
   ====================== */
@media (max-width: 360px) {
    .work-hero {
        padding-top: clamp(4.5rem, 9vw, 6rem);
    }

    .project-grid {
        width: 100%;
    }

    .card-bottom {
        padding: 16px 18px 20px;
    }

    .card-bottom h3 {
        font-size: 17px;
    }

    .card-bottom p {
        font-size: 13px;
    }

    .view-project {
        font-size: 11px;
    }
}

/* ======================
   320px AND BELOW (ULTRA-SMALL)
   ====================== */
@media (max-width: 320px) {
    .project-grid {
        width: 100%;
        gap: 15px;
    }

    .card-top {
        aspect-ratio: 4 / 3;
    }

    .card-top > .client-logo,
    .card-top > .portfolio-card-logo,
    .project-card .portfolio-card-logo {
        max-width: 80% !important;
    }

    .card-bottom {
        padding: 14px 16px 18px;
    }

    .card-bottom h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .card-bottom p {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 14px;
    }

    .view-project {
        font-size: 10px;
    }
}






/* ============================================================
    TRUSTED PARTNERS - PREMIUM RESPONSIVE
   ============================================================ */
.partners-section {
    padding-top: 10px;
    padding-bottom: 0;
    background: #05010a;
    overflow: hidden;
}

.partners-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(40px, 6vw, 80px);
}

.partners-content {
    width: 40%;
    position: sticky;
    /* top: 120px; */
    /* Sticks the text while scrolling through logos on desktop */
}

.partners-title {
    margin-bottom: 25px;
    color: #fff;
}

.partners-title span {
    color: var(--purple-light, #A594FD);
}

.partners-subtitle {
    font-size: clamp(16px, 1.1vw, 18px);
    color: #888;
    line-height: 1.6;
    max-width: 480px;
}

/* THE GRID & TILES */
.partners-grid {
    width: 55%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 20px);
}

.partner-tile {
    background: rgba(255, 255, 255, 0.02);
    /* Box shadow used as border for pixel-perfect alignment on all devices */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    aspect-ratio: 1.5 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(15px, 2vw, 30px);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.partner-tile img {
    max-width: 85%;
    max-height: 55%;
    object-fit: contain;
    opacity: 0.85;
    transition: all 0.4s ease;
}

.partner-tile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* MARQUEE GRID SYSTEM FOR > 6 LOGOS */
.partners-grid-marquee {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 20px);
}

.marquee-row-wrapper {
    width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    padding-top: 2px;
    padding-bottom: 2px;
    position: relative;
    container-type: inline-size;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 20px);
    width: max-content;
    will-change: transform;
}

.marquee-track-left {
    animation: partnerMarqueeLeft 30s linear infinite;
}

.marquee-track-right {
    animation: partnerMarqueeRight 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track .partner-tile {
    width: calc((100cqw - (2 * clamp(10px, 1.5vw, 20px))) / 3);
    flex: 0 0 calc((100cqw - (2 * clamp(10px, 1.5vw, 20px))) / 3);
    aspect-ratio: 1.5 / 1;
}

@keyframes partnerMarqueeLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - (clamp(10px, 1.5vw, 20px) / 2)));
    }
}

@keyframes partnerMarqueeRight {
    0% {
        transform: translateX(calc(-50% - (clamp(10px, 1.5vw, 20px) / 2)));
    }

    100% {
        transform: translateX(0);
    }
}

/* --- HOVER EFFECTS --- */
@media (hover: hover) {
    .partner-tile:hover {
        background: rgba(165, 148, 253, 0.08);
        box-shadow: 0 0 0 1px rgba(165, 148, 253, 0.3), 0 20px 40px -10px rgba(0, 0, 0, 0.5);
        transform: translateY(-5px);
        z-index: 2;
    }

    .partner-tile:hover img {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ============================================================
    RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Laptop / Small Desktop */
@media (max-width: 1100px) {
    .partners-wrapper {
        gap: 40px;
    }

    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet (Switch to Vertical) */
@media (max-width: 1024px) {
    .partners-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0;
    }

    .partners-content {
        width: 100%;
        position: static;
        /* Remove sticky on mobile */
        margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    }

    .partners-subtitle {
        margin: 0 auto;
    }

    .partners-grid,
    .partners-grid-marquee {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Devices */
@media (max-width: 650px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .marquee-track .partner-tile {
        width: calc((100cqw - 12px) / 2);
        flex: 0 0 calc((100cqw - 12px) / 2);
    }

    .partner-tile {
        aspect-ratio: 1.4 / 1;
        padding: 20px;
    }
}

/* Ultra Small Devices (iPhone SE / Galaxy Fold) */
@media (max-width: 340px) {
    .partners-grid {
        grid-template-columns: 1fr;
        /* Single column for extreme narrowness */
    }

    .partners-title {
        font-size: 2rem;
    }
}




/* Related Projects Section Header & Responsive Button Placement */
.related-projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 50px;
}

.related-projects-header-left {
    text-align: left;
}

.related-projects-header-right {
    display: flex;
}

.related-projects-bottom-cta {
    display: none;
    justify-content: center;
    margin-top: 40px;
}

@media (max-width: 1023.98px) {
    .related-projects-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 36px !important;
    }

    .related-projects-header-left {
        text-align: center !important;
        width: 100% !important;
    }

    .related-projects-header-left .heading-tag,
    .related-projects-section .heading-tag {
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .related-projects-header-left h2 {
        text-align: center !important;
    }

    .related-projects-header-right {
        display: none !important;
    }

    .related-projects-bottom-cta {
        display: flex !important;
    }
}

/* ============================================================
   MODULAR PROJECT CARD TEMPLATES
   ============================================================ */
.card-browser-template {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0d091a;
    position: relative;
    overflow: hidden;
}
.card-browser-bar {
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
}
.card-browser-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.card-browser-dots .browser-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.card-browser-dots .browser-dot.red { background: #ff5f56; }
.card-browser-dots .browser-dot.yellow { background: #ffbd2e; }
.card-browser-dots .browser-dot.green { background: #27c93f; }
.card-browser-address-pill {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}
.card-browser-actions span {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-left: 2px;
}
.card-browser-screen {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #080410;
}
.card-browser-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .card-browser-img {
    transform: scale(1.03);
}

.card-single-template {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.card-single-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .card-single-img {
    transform: scale(1.04);
}

/* ============================================================
   APP 3D ROTATING AXIS CAROUSEL & EDITORIAL SHOWCASE (app_trio_stage)
   ============================================================ */
.trio-rotator-tpl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, var(--tpl-accent, #53b175) 0%, #0b0f19 100%);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
}

/* Right Stage Container with 3D Perspective Depth */
.nectar-trio-stage {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 62%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    perspective: 1100px;
}

.trio-rotator-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

/* Base Phone Mockup Frame (True 9:19.5 iPhone Pro Geometry & Titanium Bezel) */
.nectar-trio-phone {
    position: absolute;
    height: 84%;
    aspect-ratio: 9 / 19.5;
    background: #000000;
    padding: 3px;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 24px 50px -8px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    will-change: transform, opacity, filter;
    pointer-events: auto;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    box-sizing: border-box;
}

.nectar-trio-phone .nectar-phone-glare {
    position: absolute;
    inset: 3px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, transparent 45%);
    pointer-events: none;
    z-index: 5;
    border-radius: 17px;
}

.nectar-trio-phone .nectar-dynamic-island {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 28%;
    height: 5px;
    background: #000000;
    border-radius: 999px;
    z-index: 6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.nectar-trio-phone .nectar-phone-screen {
    width: 100%;
    height: 100%;
    background: #05020a;
    overflow: hidden;
    border-radius: 17px;
    position: relative;
}

.nectar-trio-phone .nectar-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 17px;
}

/* Continuous 3D Axis Rotation Animations */
.phone-rotator-slot1 {
    animation: rotateAxisSlot1 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.phone-rotator-slot2 {
    animation: rotateAxisSlot2 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.phone-rotator-slot3 {
    animation: rotateAxisSlot3 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Continuous unhindered rotation on hover */
.project-card:hover .nectar-trio-phone {
    animation-play-state: running;
}

/* KEYFRAMES FOR SLOT 1 (Center -> Right -> Left -> Center) */
@keyframes rotateAxisSlot1 {
    0%, 27% {
        transform: translate3d(0, 0, 36px) rotateY(0deg) scale(1.05);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1.2px rgba(255, 255, 255, 0.35), 0 30px 65px -8px rgba(0, 0, 0, 0.88);
    }
    33.3%, 60.3% {
        transform: translate3d(48px, 8px, -18px) rotateY(-22deg) scale(0.92);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    66.6%, 93.6% {
        transform: translate3d(-48px, 8px, -18px) rotateY(22deg) scale(0.92);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    100% {
        transform: translate3d(0, 0, 36px) rotateY(0deg) scale(1.05);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1.2px rgba(255, 255, 255, 0.35), 0 30px 65px -8px rgba(0, 0, 0, 0.88);
    }
}

/* KEYFRAMES FOR SLOT 2 (Right -> Left -> Center -> Right) */
@keyframes rotateAxisSlot2 {
    0%, 27% {
        transform: translate3d(48px, 8px, -18px) rotateY(-22deg) scale(0.92);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    33.3%, 60.3% {
        transform: translate3d(-48px, 8px, -18px) rotateY(22deg) scale(0.92);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    66.6%, 93.6% {
        transform: translate3d(0, 0, 36px) rotateY(0deg) scale(1.05);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1.2px rgba(255, 255, 255, 0.35), 0 30px 65px -8px rgba(0, 0, 0, 0.88);
    }
    100% {
        transform: translate3d(48px, 8px, -18px) rotateY(-22deg) scale(0.92);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
}

/* KEYFRAMES FOR SLOT 3 (Left -> Center -> Right -> Left) */
@keyframes rotateAxisSlot3 {
    0%, 27% {
        transform: translate3d(-48px, 8px, -18px) rotateY(22deg) scale(0.92);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    33.3%, 60.3% {
        transform: translate3d(0, 0, 36px) rotateY(0deg) scale(1.05);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1.2px rgba(255, 255, 255, 0.35), 0 30px 65px -8px rgba(0, 0, 0, 0.88);
    }
    66.6%, 93.6% {
        transform: translate3d(48px, 8px, -18px) rotateY(-22deg) scale(0.92);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
    100% {
        transform: translate3d(-48px, 8px, -18px) rotateY(22deg) scale(0.92);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 18px 40px -8px rgba(0, 0, 0, 0.7);
    }
}

/* Responsive adjustments for Tablet & Mobile */
@media (max-width: 1024px) {
    .nectar-trio-stage {
        width: 60%;
        perspective: 950px;
    }
    .trio-rotator-tpl .nectar-trio-phone {
        height: 80%;
        padding: 2.5px;
        border-radius: 16px;
    }
    .trio-rotator-tpl .nectar-phone-glare,
    .trio-rotator-tpl .nectar-phone-screen,
    .trio-rotator-tpl .nectar-phone-screen img {
        border-radius: 13.5px;
    }
    .trio-rotator-tpl .nectar-dynamic-island {
        width: 28%;
        height: 4px;
        top: 3.5px;
    }
}

@media (max-width: 768px) {
    .nectar-trio-stage {
        width: 58%;
        perspective: 850px;
    }
    .trio-rotator-tpl .nectar-trio-phone {
        height: 78%;
        padding: 2px;
        border-radius: 14px;
    }
    .trio-rotator-tpl .nectar-phone-glare,
    .trio-rotator-tpl .nectar-phone-screen,
    .trio-rotator-tpl .nectar-phone-screen img {
        border-radius: 12px;
    }
    .trio-rotator-tpl .nectar-dynamic-island {
        width: 27%;
        height: 3.5px;
        top: 3px;
    }
}

@media (max-width: 600px) {
    .trio-rotator-tpl .nectar-left-branding {
        width: 44%;
        padding: 14px 10px 14px 14px;
    }
    .nectar-trio-stage {
        width: 56%;
        right: 1%;
        perspective: 700px;
    }
    .trio-rotator-tpl .nectar-trio-phone {
        height: 76%;
        padding: 2px;
        border-radius: 12px;
    }
    .trio-rotator-tpl .nectar-phone-glare,
    .trio-rotator-tpl .nectar-phone-screen,
    .trio-rotator-tpl .nectar-phone-screen img {
        border-radius: 10px;
    }
    .trio-rotator-tpl .nectar-dynamic-island {
        width: 26%;
        height: 3px;
        top: 3px;
    }

    .phone-rotator-slot1 {
        animation-name: rotateAxisSlot1Mobile;
    }
    .phone-rotator-slot2 {
        animation-name: rotateAxisSlot2Mobile;
    }
    .phone-rotator-slot3 {
        animation-name: rotateAxisSlot3Mobile;
    }
}

@media (max-width: 420px) {
    .trio-rotator-tpl .nectar-left-branding {
        width: 43%;
        padding: 10px 8px;
    }
    .nectar-trio-stage {
        width: 57%;
        right: 0;
        perspective: 620px;
    }
    .trio-rotator-tpl .nectar-trio-phone {
        height: 74%;
        padding: 1.5px;
        border-radius: 10px;
    }
    .trio-rotator-tpl .nectar-phone-glare,
    .trio-rotator-tpl .nectar-phone-screen,
    .trio-rotator-tpl .nectar-phone-screen img {
        border-radius: 8.5px;
    }
    .trio-rotator-tpl .nectar-dynamic-island {
        width: 25%;
        height: 2.5px;
        top: 2.5px;
    }
}

/* Mobile-optimized Keyframes (Scaled offsets for 100% complete card fit) */
@keyframes rotateAxisSlot1Mobile {
    0%, 27% {
        transform: translate3d(0, 0, 16px) rotateY(0deg) scale(1.03);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 16px 36px -6px rgba(0, 0, 0, 0.88);
    }
    33.3%, 60.3% {
        transform: translate3d(24px, 4px, -12px) rotateY(-20deg) scale(0.91);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    66.6%, 93.6% {
        transform: translate3d(-24px, 4px, -12px) rotateY(20deg) scale(0.91);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    100% {
        transform: translate3d(0, 0, 16px) rotateY(0deg) scale(1.03);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 16px 36px -6px rgba(0, 0, 0, 0.88);
    }
}

@keyframes rotateAxisSlot2Mobile {
    0%, 27% {
        transform: translate3d(24px, 4px, -12px) rotateY(-20deg) scale(0.91);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    33.3%, 60.3% {
        transform: translate3d(-24px, 4px, -12px) rotateY(20deg) scale(0.91);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    66.6%, 93.6% {
        transform: translate3d(0, 0, 16px) rotateY(0deg) scale(1.03);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 16px 36px -6px rgba(0, 0, 0, 0.88);
    }
    100% {
        transform: translate3d(24px, 4px, -12px) rotateY(-20deg) scale(0.91);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
}

@keyframes rotateAxisSlot3Mobile {
    0%, 27% {
        transform: translate3d(-24px, 4px, -12px) rotateY(20deg) scale(0.91);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    33.3%, 60.3% {
        transform: translate3d(0, 0, 16px) rotateY(0deg) scale(1.03);
        z-index: 10;
        filter: brightness(1);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 16px 36px -6px rgba(0, 0, 0, 0.88);
    }
    66.6%, 93.6% {
        transform: translate3d(24px, 4px, -12px) rotateY(-20deg) scale(0.91);
        z-index: 4;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
    100% {
        transform: translate3d(-24px, 4px, -12px) rotateY(20deg) scale(0.91);
        z-index: 3;
        filter: brightness(0.85);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -6px rgba(0, 0, 0, 0.7);
    }
}