.spotlight-carousel {
    margin-top: 86px;
    margin-bottom: 86px;
}

.spotlight-carousel__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;

}

/* Wrapper - Flexbox layout */
.spotlight-carousel__wrapper {
    display: flex;
    gap: 0px;
    align-items: stretch;
}

/* Header - Takes 40% (2/5) */
.spotlight-carousel__header {
    flex: 0 0 40%;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid #D0D0D0;
    border-bottom: 1px solid #D0D0D0;
}

.spotlight-carousel__title {
    font-size: 46px;
    font-weight: 700;
    margin: 0 0 16px 0;
    max-width: 481px;
}

.spotlight-carousel__subtitle {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 425px;
}

.spotlight-carousel__header-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: gap 0.3s ease;
    color: #000 !important;
    text-decoration: none !important;
}

.spotlight-carousel__header-link:hover {
    gap: 12px;
}

/* Grid Wrapper - Takes 60% (3/5) normally */
.spotlight-carousel__grid-wrapper {
    flex: 1 1 auto;
    position: relative;
    overflow: visible;
    min-height: 575px;
    transition: flex 0.5s ease;
}

/* When active, wrapper takes full width and header is hidden */
.spotlight-carousel__wrapper.has-active {
    gap: 0;
}

.spotlight-carousel__wrapper.has-active .spotlight-carousel__header {
    flex: 0 0 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
}

.spotlight-carousel__wrapper.has-active .spotlight-carousel__grid-wrapper {
    flex: 1 1 100%;
}

/* Grid - Flexbox for 3 slides */
.spotlight-carousel__grid {
    display: flex;
    gap: 0;
    height: 575px;
    width: 100%;
}

/* Items - Each takes equal space when closed (33.333%) */
.spotlight-carousel__item {
    position: relative;
    cursor: pointer;
    flex: 1 1 33.333%;
    height: 100%;
    transition: flex 0.5s ease;
}

/* When has active, redistribute: active gets 60% (3/5), others get 20% (1/5) each */
.spotlight-carousel__wrapper.has-active .spotlight-carousel__item {
    flex: 0 0 20%;
}

.spotlight-carousel__wrapper.has-active .spotlight-carousel__item.active {
    flex: 0 0 60%;
}

/* Image Wrapper */
.spotlight-carousel__image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
}

.spotlight-carousel__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease, object-position 0.5s ease;
}

/* Shift image to the right when active */
.spotlight-carousel__item.active .spotlight-carousel__image {
    object-position: 200px center;
}

.spotlight-carousel__item:hover .spotlight-carousel__image {
    transform: scale(1.05);
}

/* Overlay - Different gradients for closed vs open */
.spotlight-carousel__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0.08%, #000 99.92%);
    transition: background 0.5s ease;
}

.spotlight-carousel__item.active .spotlight-carousel__overlay {
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.00) 0.08%, #000 48.06%, #000 99.92%);
}

/* Label - Hidden when active */
.spotlight-carousel__label {
    position: absolute;
    bottom: 30px;
    left: 36px;
    right: 36px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    z-index: 2;
    line-height: normal;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.spotlight-carousel__item.active .spotlight-carousel__label {
    opacity: 0;
    pointer-events: none;
}

/* Content - Hidden by default, slides in from left */
.spotlight-carousel__content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: transparent;
    color: #ffffff;
    padding: 0;
    opacity: 0;
    transition: width 0.5s ease, padding 0.5s ease, opacity 0.3s ease 0.3s;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.spotlight-carousel__item.active .spotlight-carousel__content {
    width: 500px;
    padding: 60px;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
}

.spotlight-carousel__heading {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #ffffff;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease 0.4s, transform 0.3s ease 0.4s;
}

.spotlight-carousel__item.active .spotlight-carousel__heading {
    opacity: 1;
    transform: translateX(0);
}

.spotlight-carousel__text {
    font-size: 12px;
    line-height: normal;
    color: #e2e8f0;
    font-style: normal;
    font-weight: 400;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease 0.5s, transform 0.3s ease 0.5s;
}

.spotlight-carousel__item.active .spotlight-carousel__text {
    opacity: 1;
    transform: translateX(0);
}

.spotlight-carousel__text p {
    margin: 0 0 16px 0;
    font-size: 16px;
}

.spotlight-carousel__text p a{
    color: white !important;
}

.spotlight-carousel__text p:last-child {
    margin-bottom: 0;
}

.spotlight-carousel__text ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.spotlight-carousel__text li {
    margin-bottom: 8px;
}

.spotlight-carousel__text strong {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .spotlight-carousel__item.active .spotlight-carousel__content {
        width: 350px;
        padding: 35px;
    }
    
    .spotlight-carousel__item.active .spotlight-carousel__image {
        object-position: 150px center;
    }
}

@media (max-width: 1024px) {
    .spotlight-carousel {
        margin-top: 40px;
        margin-bottom: 40px;
    }
    
    .spotlight-carousel__wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .spotlight-carousel__wrapper.has-active {
        gap: 40px;
    }
    
    .spotlight-carousel__wrapper.has-active .spotlight-carousel__header {
        flex: 1 1 auto;
        opacity: 1;
    }
    
    .spotlight-carousel__header {
        flex: 1 1 auto;
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .spotlight-carousel__title {
        font-size: 40px;
    }
    
    .spotlight-carousel__grid {
        height: 450px;
    }
    
    .spotlight-carousel__grid-wrapper {
        min-height: 450px;
    }
    
    .spotlight-carousel__image-wrapper {
        height: 450px;
    }
    
    .spotlight-carousel__item.active .spotlight-carousel__image {
        object-position: center;
    }
    
    .spotlight-carousel__label {
        font-size: 24px;
        bottom: 24px;
        left: 24px;
        right: 24px;
    }
    
    .spotlight-carousel__heading {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .spotlight-carousel {
    }
    
    .spotlight-carousel__title {
        font-size: 32px;
    }
    
    .spotlight-carousel__subtitle {
        font-size: 15px;
    }
    
    .spotlight-carousel__grid {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    
    .spotlight-carousel__item {
        cursor: default;
        flex: 1 1 auto;
        height: auto;
    }
    
    .spotlight-carousel__wrapper.has-active .spotlight-carousel__item {
        flex: 1 1 auto;
    }
    
    .spotlight-carousel__image-wrapper {
        position: relative;
        height: 300px;
    }
    
    /* Remove overlay on mobile when active */
    .spotlight-carousel__item.active .spotlight-carousel__overlay {
        display: none;
    }
    
    .spotlight-carousel__label {
        font-size: 20px;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    /* Content expands below on mobile */
    .spotlight-carousel__content {
        position: relative;
        width: 100%;
        left: auto;
        top: auto;
        bottom: auto;
        max-height: 0;
        background: #000000;
        transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.3s ease 0.3s;
    }
    
    .spotlight-carousel__item.active .spotlight-carousel__content {
        width: 100%;
        max-height: 2000px;
        padding: 30px 20px;
    }
    
    .spotlight-carousel__heading {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .spotlight-carousel__text {
        font-size: 14px;
    }
}

/* ============================================================================
   Terra-Gen Single Project Template Styles
   ========================================================================== */

/* Header Banner */
.terragen-project__header {
    background-color: #f5f5f5;
    padding: 40px 0;
    margin-bottom: 80px;
    position: relative;
}

.terragen-project__header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    direction: ltr;
    overflow: hidden;
    height: 20px;
}

.terragen-project__header::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M615.2,96.7C240.2,97.8,0,18.9,0,0v100h1000V0C1000,19.2,989.8,96,615.2,96.7z' fill='%23f5f5f5'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transform: rotate(180deg);
}

.terragen-project__header-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.terragen-project__title {
    color: #009846;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Container */
.terragen-project__container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Layout */
.terragen-project__layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* Content */
.terragen-project__content {
    flex: 1;
    font-family: "Poppins", Sans-serif;
    font-size: 18px;
    font-weight: 300;
    text-transform: none;
    font-style: normal;
    text-decoration: none;
    line-height: 1.5em;
    letter-spacing: 0px;
    color: #000000;
}

.terragen-project__content p {
    margin-bottom: 24px;
}

.terragen-project__content p:last-child {
    margin-bottom: 0;
}

.terragen-project__content h2,
.terragen-project__content h3,
.terragen-project__content h4 {
    color: #009846;
    margin-top: 40px;
    margin-bottom: 20px;
}

.terragen-project__content h2 {
    font-size: 32px;
}

.terragen-project__content h3 {
    font-size: 24px;
}

.terragen-project__content ul,
.terragen-project__content ol {
    margin-left: 24px;
    margin-bottom: 24px;
}

.terragen-project__content li {
    margin-bottom: 12px;
}

/* Featured Image - Desktop & Tablet */
.terragen-project__image {
    flex-shrink: 0;
    width: 456px;
    position: sticky;
    top: 40px;
}

.terragen-project__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Tablet Styles (768px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .terragen-project__header {
        padding: 40px 0;
        margin-bottom: 60px;
    }

    .terragen-project__header::after {
        height: 18px;
    }

    .terragen-project__container {
        padding: 0 20px 60px;
    }

    .terragen-project__layout {
        gap: 40px;
    }

    .terragen-project__content {
        font-size: 16px;
    }
}

/* ============================================================================
   Mobile Styles (below 768px)
   ========================================================================== */

@media (max-width: 767px) {
    .terragen-project__header {
        padding: 40px 0;
        margin-bottom: 40px;
    }

    .terragen-project__header::after {
        height: 15px;
    }

    .terragen-project__container {
        padding: 0 20px 40px;
    }

    /* Stack layout for mobile */
    .terragen-project__layout {
        display: flex;
        flex-direction: column;
        gap: 0px;
    }

    /* Image comes before content on mobile */
    .terragen-project__image {
        width: 100%;
        order: -1;
        margin-bottom: 32px;
        position: static;
    }

    .terragen-project__content {
        font-size: 16px;
    }

    .terragen-project__content h2 {
        font-size: 24px;
        margin-top: 32px;
    }

    .terragen-project__content h3 {
        font-size: 20px;
    }
}

/* ============================================================================
   Small Mobile Styles (below 480px)
   ========================================================================== */

@media (max-width: 480px) {
    .terragen-project__header {
        padding: 32px 0;
    }

    .terragen-project__header::after {
        height: 12px;
    }

    .terragen-project__container {
        padding: 0 16px 32px;
    }

    .terragen-project__content {
        font-size: 15px;
    }
}