.out-projects-container {
    padding: 0 80px;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

.out-projects-container .cmp-tabs {
    position: relative;
}

/* Tablist - pill style buttons */
.out-projects-container .cmp-tabs__tablist {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    gap: 12px;
    position: relative;
}

.out-projects-container .cmp-tabs__tab {
    padding: 12px 20px;
    border: 1px solid #E6E6E8;
    border-radius: 60px;
    color: #74798A;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: Archivo;
    font-weight: 500;
    font-style: Medium;
    font-size: 20px;
    line-height: 126%;
}

.out-projects-container .cmp-tabs__tab--active {
    background: #E6E6E8;
    color: #000000;
}

/* "Our Projects" heading - added via JS or pseudo */
.out-projects-container::before {
    font-family: Archivo;
    font-weight: 500;
    font-size: 32px;
    line-height: 101%;
    color: #232426;
    content: "Our Projects";
    display: block;
    margin-bottom: 20px;
}

/* Navigation arrows - top right */
.out-projects-container .slider-nav {
    position: absolute;
    top: 0;
    right: 80px;
    display: flex;
    gap: 12px;
    z-index: 5;
}

.out-projects-container .slider-nav button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid #D9D9D9;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    color: #2C2C2C;
}

.out-projects-container .slider-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Pagination indicator below arrows */
.out-projects-container .slider-progress {
    position: absolute;
    top: 90px;
    right: 80px;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.out-projects-container .slider-progress span {
    width: 30px;
    height: 3px;
    background: #E0E0E0;
    transition: background 0.3s ease;
}

.out-projects-container .slider-progress span.active {
    background: #000000;
    width: 56px;
}

/* Tab panels */
.out-projects-container .cmp-tabs__tabpanel {
    display: none;
}

.out-projects-container .cmp-tabs__tabpanel--active {
    display: block;
}

/* Slider container - override AEM grid */
.out-projects-container .cmp-tabs__tabpanel .aem-Grid {
    display: flex !important;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.out-projects-container .cmp-tabs__tabpanel .aem-Grid::-webkit-scrollbar {
    display: none;
}

/* Override AEM full-width column to flex item */
.out-projects-container .teaser.aem-GridColumn {
    width: auto !important;
    max-width: none !important;
    scroll-snap-align: start;
    clear: none !important;
}

/* Card */
.out-projects-container .cmp-teaser {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    height: 395px;
    cursor: pointer;
}

.out-projects-container .cmp-teaser__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 395px;
    width: 280px;
}

.out-projects-container .cmp-teaser__image .cmp-image,
.out-projects-container .cmp-teaser__image>div {
    width: 100%;
    height: 100%;
}

.out-projects-container .cmp-teaser__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.out-projects-container .cmp-teaser:hover .cmp-teaser__image img {
    transform: scale(1.15);
}

/* Card content - hidden on desktop, visible on mobile */
.out-projects-container .cmp-teaser__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgb(0 0 0 / 66%) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.out-projects-container .cmp-teaser:hover .cmp-teaser__content {
    opacity: 1;
}

.out-projects-container .cmp-teaser__pretitle {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-transform: capitalize;
    margin: 0;
    text-align: center;
}

/* ============================================ */
/* MOBILE VIEW - Stacked cards with peek effect */
/* ============================================ */
/* ============================================ */
/* MOBILE VIEW - Stacked cards with peek effect */
/* ============================================ */
@media (max-width: 767px) {
    .out-projects-container {
        padding: 0;
        overflow: hidden;
    }

    .out-projects-container::before {
        text-align: center;
        font-size: 24px;
        margin-bottom: 14px;
        padding: 0 20px;
    }

    /* Show tabs on mobile - centered pill style */
    .out-projects-container .cmp-tabs__tablist {
        display: flex !important;
        justify-content: center;
        padding: 0 20px;
        margin-bottom: 28px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .out-projects-container .cmp-tabs__tab {
        padding: 8px 20px;
        font-size: 13px;
    }

    /* Hide desktop nav arrows on mobile */
    .out-projects-container .slider-nav {
        display: none;
    }

    /* Pagination dots - centered below card */
    .out-projects-container .slider-progress {
        position: relative;
        top: auto;
        right: auto;
        justify-content: center;
        margin-top: 24px;
        gap: 6px;
    }

    .out-projects-container .slider-progress span {
        width: 28px;
        height: 3px;
        border-radius: 2px;
    }

    /* Mobile slider container - stacked card effect */
    .out-projects-container .cmp-tabs__tabpanel .aem-Grid {
        position: relative;
        display: block !important;
        height: 460px;
        overflow: visible;
        padding: 0;
        margin: 0 16px;
    }

    .out-projects-container .teaser.aem-GridColumn {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: calc(100% - 80px) !important;
        max-width: 280px !important;
        height: 440px;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
        will-change: transform, opacity;
    }

    .out-projects-container .cmp-teaser {
        height: 100%;
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    /* Active card - centered, in front */
    .out-projects-container .teaser.aem-GridColumn.active {
        transform: translateX(0) scale(1);
        z-index: 3;
        opacity: 1;
        margin: 0;
        min-width: 85%;
        min-height: 460px;
    }
.out-projects-container .cmp-teaser__image{
    width: 100%;
}
    /* First peek card - offset right, slightly smaller */
    .out-projects-container .teaser.aem-GridColumn.next-1 {
        transform: translateX(11px) scale(0.95);
        z-index: 2;
        opacity: 0.9;
        min-height: 460px;
    }

    /* Second peek card - offset more right, smaller */
    .out-projects-container .teaser.aem-GridColumn.next-2 {
        transform: translateX(30px) scale(0.9);
        z-index: 1;
        opacity: 0.7;
    }

    /* Hidden cards */
    .out-projects-container .teaser.aem-GridColumn.hidden-card {
        transform: translateX(0) scale(0.85);
        z-index: 0;
        opacity: 0;
        pointer-events: none;
    }

    /* Always show title overlay on mobile */
    .out-projects-container .cmp-teaser__content {
        opacity: 1;
        padding: 24px 20px;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
        padding-bottom: 0;
    }

    .out-projects-container .cmp-teaser__pretitle {
  font-weight: 500;
        text-transform: capitalize;
        color: #fff;
        text-align: left;
        font-size: 14px;
        line-height: 140%;
    }
}

@media (max-width: 380px){
        /* First peek card - offset right, slightly smaller */
    .out-projects-container .teaser.aem-GridColumn.next-1 {
        transform: translateX(15px) scale(0.95);
    }

    /* Second peek card - offset more right, smaller */
    .out-projects-container .teaser.aem-GridColumn.next-2 {
        transform: translateX(35px) scale(0.9);
    }
}
@media (min-width: 376px) and (max-width: 391px){
        /* First peek card - offset right, slightly smaller */
    .out-projects-container .teaser.aem-GridColumn.next-1 {
        transform: translateX(16px) scale(0.95);
    }

    /* Second peek card - offset more right, smaller */
    .out-projects-container .teaser.aem-GridColumn.next-2 {
        transform: translateX(35px) scale(0.9);
    }
}
@media (min-width: 391px) and (max-width: 415px){
        /* First peek card - offset right, slightly smaller */
    .out-projects-container .teaser.aem-GridColumn.next-1 {
        transform: translateX(26px) scale(0.95);
    }

    /* Second peek card - offset more right, smaller */
    .out-projects-container .teaser.aem-GridColumn.next-2 {
        transform: translateX(45px) scale(0.9);
    }
}
@media (min-width: 415px) and (max-width: 500px){
        /* First peek card - offset right, slightly smaller */
    .out-projects-container .teaser.aem-GridColumn.next-1 {
        transform: translateX(32px) scale(0.95);
    }

    /* Second peek card - offset more right, smaller */
    .out-projects-container .teaser.aem-GridColumn.next-2 {
        transform: translateX(50px) scale(0.9);
    }
}
/* ============================================ */
/* TABLET */
/* ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .out-projects-container {
        padding: 0 24px;
    }

    .out-projects-container .slider-nav,
    .out-projects-container .slider-progress {
        right: 24px;
    }

    .out-projects-container .teaser.aem-GridColumn {
        flex: 0 0 calc((100% - 32px) / 2.5);
    }

    .out-projects-container .cmp-teaser {
        height: 320px;
    }
}