/* ============================================================
   HOW IT WORKS MODAL — Stitch Design System
   ============================================================ */

/* --- Full-screen modal content shell --- */
.modal-content.carousel-modal {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0c1324;
    position: relative;
}

/* Ambient background glow */
.modal-content.carousel-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 15% 20%, rgba(137, 206, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 80%, rgba(255, 185, 95, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* --- Close Button --- */
.carousel-modal .close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #bec7d4;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.carousel-modal .close-modal:hover {
    background: rgba(137, 206, 255, 0.15);
    border-color: rgba(137, 206, 255, 0.4);
    color: #89ceff;
    transform: rotate(90deg);
}

/* --- Main container --- */
.carousel-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 3rem 4rem;
    position: relative;
    z-index: 1;
}

/* --- Slides wrapper --- */
.carousel-content {
    position: relative;
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* --- Individual Slide --- */
.carousel-slide {
    display: none;
    opacity: 0;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.carousel-slide.active {
    display: grid;
    opacity: 1;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Image Panel --- */
.slide-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #151b2d;
    border: 1px solid rgba(63, 72, 82, 0.4);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(137, 206, 255, 0.04) inset;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Subtle glow on image container */
.slide-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(137, 206, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 1.5rem;
}

/* --- Description Panel --- */
.slide-description {
    padding: 0.5rem 0;
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(137, 206, 255, 0.25) transparent;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.slide-description::-webkit-scrollbar {
    width: 4px;
}

.slide-description::-webkit-scrollbar-track {
    background: transparent;
}

.slide-description::-webkit-scrollbar-thumb {
    background: rgba(137, 206, 255, 0.25);
    border-radius: 4px;
}

/* --- Step Number Badge --- */
.step-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #89ceff, #13a6ea);
    color: #00344d;
    border-radius: 14px;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 1.25rem;
    box-shadow:
        0 8px 24px rgba(137, 206, 255, 0.3),
        0 0 0 1px rgba(137, 206, 255, 0.2) inset;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* --- Slide Title --- */
.slide-description h3 {
    font-size: 2rem;
    font-weight: 900;
    color: #dce1fb;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-family: 'Inter', sans-serif;
}

/* --- Slide Body Text --- */
.slide-description p {
    font-size: 1rem;
    color: #bec7d4;
    line-height: 1.75;
    margin: 0 0 1.5rem 0;
    font-family: 'Inter', sans-serif;
}

/* --- Feature List --- */
.step-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.step-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.step-features li:hover {
    background: rgba(137, 206, 255, 0.05);
    border-color: rgba(137, 206, 255, 0.15);
}

.step-features li i {
    color: #89ceff;
    font-size: 0.9rem;
    margin-top: 0.22rem;
    flex-shrink: 0;
    width: 1rem;
    text-align: center;
}

.step-features li span {
    flex: 1;
    font-size: 0.92rem;
    color: #bec7d4;
    line-height: 1.55;
    font-family: 'Inter', sans-serif;
}

.step-features li strong {
    color: #c9e6ff;
    font-weight: 700;
}

/* --- Free Trial Badge --- */
.free-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.free-trial-badge i {
    font-size: 0.9rem;
    color: #34d399;
}

/* --- CTA Button inside slide --- */
.carousel-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.75rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #89ceff, #13a6ea);
    color: #003853;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(137, 206, 255, 0.25);
    align-self: flex-start;
}

.carousel-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(137, 206, 255, 0.35);
    opacity: 0.9;
}

.carousel-cta i {
    font-size: 1rem;
}

/* ============================================================
   CONTROLS
   ============================================================ */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(63, 72, 82, 0.4);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Step counter label (center area) */
.carousel-controls::before {
    content: '';
}

.carousel-btn {
    background: rgba(137, 206, 255, 0.08);
    border: 1px solid rgba(137, 206, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #89ceff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.carousel-btn:hover:not(:disabled) {
    background: rgba(137, 206, 255, 0.18);
    border-color: rgba(137, 206, 255, 0.5);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(137, 206, 255, 0.2);
}

.carousel-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.carousel-indicators {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(190, 199, 212, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background: rgba(137, 206, 255, 0.45);
}

.indicator.active {
    background: #89ceff;
    width: 28px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(137, 206, 255, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .carousel-container {
        padding: 2.5rem 3rem;
    }
    .carousel-slide {
        gap: 3rem;
    }
}

@media (max-width: 968px) {
    .carousel-slide {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .carousel-slide.active {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .slide-image {
        height: auto;
        aspect-ratio: 16 / 9;
        min-height: unset;
        max-height: 38vh;
        flex-shrink: 0;
        border-radius: 14px;
    }

    .slide-description {
        max-height: none;
        overflow-y: visible;
    }

    .carousel-container {
        padding: 2rem;
        overflow-y: auto;
    }

    .carousel-content {
        overflow-y: auto;
        flex: unset;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 1.5rem;
    }

    .slide-description h3 {
        font-size: 1.6rem;
    }

    .step-number-badge {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        border-radius: 12px;
    }

    .carousel-controls {
        gap: 1.25rem;
        margin-top: 1.5rem;
        padding-top: 1.25rem;
    }

    .carousel-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .carousel-modal .close-modal {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .carousel-container {
        padding: 1rem;
    }

    .slide-description h3 {
        font-size: 1.4rem;
    }

    .step-features li {
        padding: 0.6rem 0.85rem;
    }

    .indicator.active {
        width: 20px;
    }

    .indicator {
        width: 7px;
        height: 7px;
    }
}