.nebula-success-carousel {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    background-color: transparent;
}
.nebula-success-carousel.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden; /* FIX: Added to enforce horizontal boundaries */
}

/* --- HEADER SECTION --- */
.success-carousel__header-area {
    padding: 0 40px;
    margin-bottom: 20px;
}

.success-carousel__header-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.success-carousel__main-heading {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--scheme-text, #313a4c);
}

.success-carousel__sub-heading {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--scheme-text, #313a4c);
    opacity: 0.9;
}

/* --- CAROUSEL CONTAINERS --- */
.success-carousel__container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.success-carousel__carousel {
    position: relative;
    width: 100%;
}

/* PERFECT FRAMING LOGIC */
.sc-track-viewport {
    overflow: hidden; 
    width: 100%;
    max-width: 1328px; /* Perfect frame for EXACTLY 3 cards */
    margin: -20px auto 0; /* Centers the carousel */
    padding: 20px 0 40px; 
}

@media (max-width: 1400px) {
    .sc-track-viewport {
        max-width: 964px; /* Screen is too small for 3, drops to 2 cards */
    }
}

.sc-track {
    display: flex;
    gap: 24px;
    width: max-content; 
}

/* --- ROCK-SOLID SLIDE WIDTHS --- */
.sc-slide {
    flex-shrink: 0;
    width: calc(100vw - 80px); /* Mobile default */
    height: auto;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .sc-slide {
        width: 340px !important; /* Exact width of small cards */
        z-index: 5;
    }
    .sc-slide.is-active {
        width: 600px !important; /* Exact width of active large card */
        z-index: 10;
    }
}

@media (max-width: 767px) {
    .sc-slide {
        width: calc(100vw - 40px);
    }
}

/* --- CARD DESIGN --- */
.sc-card {
    background: var(--nebula-blue, #313a4c);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--nebula-blue, #313a4c);
    display: flex;
    flex-direction: column; 
    text-decoration: none;
    color: #ffffff;
    width: 100%; 
    height: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--aurora-green, #BAD532);
}

@media (min-width: 768px) {
    .sc-slide.is-active .sc-card {
        flex-direction: row;
    }
}

/* --- CARD CONTENT --- */
.sc-card__header,
.sc-card__body,
.sc-card__footer {
    position: relative;
    z-index: 1; 
}

/* Header / Image Area */
.sc-card__header {
    height: 180px; 
    min-height: 180px; 
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-card__bg-img,
.sc-card__bg-img--placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.4s ease;
}

.sc-card__bg-img--placeholder {
    background: linear-gradient(135deg, #313A4C, #3B824B);
}

.sc-card:hover .sc-card__bg-img {
    transform: scale(1.05);
}

/* Badge */
.sc-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #0D5C22;
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #3B824B;
    z-index: 2;
}

/* White Logo Card */
.sc-logo-card {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75%;
    max-width: 220px;
    height: 85px;
}

.sc-logo {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

.sc-logo-placeholder {
    color: var(--aurora-green, #BAD532);
    font-size: 32px;
    line-height: 1;
}

@media (min-width: 768px) {
    .sc-slide.is-active .sc-card__header {
        width: 260px; 
        height: 100%;
        min-height: 100%;
        flex-shrink: 0; 
    }
}

/* Body / Text Area */
.sc-card__body {
    position: relative; 
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .sc-slide.is-active .sc-card__body {
        width: 340px; 
        padding: 40px; 
        justify-content: center;
        flex-shrink: 0;
    }
}

/* --- DYNAMIC BACKGROUND LAYER --- */
.sc-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.sc-card__bg.is-loaded {
    opacity: 1;
}

.sc-card__content {
    color: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.sc-content-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

/* Star Rating */
.sc-rating {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-bottom: 20px;
    line-height: 1;
}

.sc-star {
    position: relative;
    display: inline-block;
    font-size: 20px;
    width: 1em;
    height: 1em;
    transition: font-size 0.5s cubic-bezier(2, 0, 0.2, 1);
}

.sc-star__bg {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1;
}

.sc-star__fill {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
    color: var(--aurora-green, #BAD532);
    line-height: 1;
}

.sc-star--active {
    font-size: 26px;
    animation: sc-star-grow 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.sc-star--active .sc-star__fill {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

@keyframes sc-star-grow {
    0%   { font-size: 20px; }
    60%  { font-size: 30px; }
    100% { font-size: 26px; }
}

/* Success Story Content */
.sc-success-content {
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sc-success-title {
    color: #ffffff;
    font-size: 20px; 
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.sc-success-text {
    font-size: 14px; 
    line-height: 1.6;
    color: #ffffff; 
    display: -webkit-box;
    /* UPDATE: Increased from 5 to 10 to comfortably hold 250 characters */
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}

@media (min-width: 768px) {
    .sc-slide.is-active .sc-success-title { font-size: 24px; margin-bottom: 20px; }
    /* UPDATE: Increased from 6 to 12 */
    .sc-slide.is-active .sc-success-text { font-size: 15px; -webkit-line-clamp: 12; }
}

/* Testimonial Content */
.sc-quote {
    font-size: 15px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: auto;
    color: #ffffff;
    display: -webkit-box;
    /* UPDATE: Increased from 6 to 10 to comfortably hold 250 characters */
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sc-quote p {
    margin: 0;
    padding: 0;
    font-size: inherit;
}

.sc-author {
    margin-top: 15px;
}

.sc-author strong {
    color: var(--aurora-green, #BAD532);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px; 
}

.sc-author-title {
    font-size: 12px;
    opacity: 0.85;
    display: block;
}

@media (min-width: 768px) {
    /* UPDATE: Increased from 7 to 12 */
    .sc-slide.is-active .sc-quote { font-size: 17px; -webkit-line-clamp: 12; }
    .sc-slide.is-active .sc-author strong { font-size: 14px; }
    .sc-slide.is-active .sc-author-title { font-size: 13px; }
}

/* Footer & Links */
.sc-card__footer {
    position: relative;
    z-index: 1;
    padding: 20px 0 0;
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    margin-top: 20px;
    flex-shrink: 0;
    width: 100%;
    border-top: none; 
}

.sc-card .sc-link,
.sc-link {
    display: inline-flex;
    align-items: center;
    padding: 5px 0;
    color: #ffffff !important; 
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sc-card .sc-link::after,
.sc-link::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    margin: 5px 0 0 16px;
    background-image: url("../../../img/icon_arrow_right_white.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    transition: transform 0.3s ease;
}

.sc-card:hover .sc-link::after {
    transform: translateX(5px);
}

.sc-card .sc-link:hover,
.sc-link:hover {
    color: #BAD532 !important; 
}

/* --- CUSTOM CSS PAGINATION PILLS --- */
.success-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px; 
}

.success-pagination-bullet {
    width: 50px;
    height: 8px;
    background: #E5E5E5;
    border-radius: 10px;
    opacity: 1;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
}

.success-pagination-bullet:hover {
    background: #D0D0D0;
}

.success-pagination-bullet.is-active {
    width: 90px;
    background: #E5E5E5; 
}

.pill-progress {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #BAD532, #0D5C22 100%);
    border-radius: 10px;
}

/* Pure CSS Autoplay Progress Animation */
.success-pagination-bullet.is-active .pill-progress {
    animation: fillProgress 8s linear forwards;
}

.sc-track-viewport:hover ~ .success-pagination .success-pagination-bullet.is-active .pill-progress,
.success-pagination:hover .success-pagination-bullet.is-active .pill-progress {
    animation-play-state: paused;
}

@keyframes fillProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ==========================================================================
   MOBILE & TABLET PADDING OVERRIDES
   ========================================================================== */
@media (max-width: 768px) {
    .nebula-success-carousel {
        padding: 40px 0;
    }
    
    .sc-track-viewport {
        padding: 0 20px 40px; 
    }
    
    .success-pagination {
        gap: 8px;
        margin-top: 30px;
    }
    
    .success-pagination-bullet {
        width: 40px;
        height: 6px;
    }
    
    .success-pagination-bullet.is-active {
        width: 70px;
    }
}