/* ==================== HOW WE WORK SECTION ==================== */

.how-we-work-section {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
}

/* Title */
.how-we-work-title {
    font-weight: 700;
    color: #141414;
    text-align: center;
    margin: 0;
}

/* Content Row */
.how-we-work-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

/* ==================== LEFT SIDE - LIST ==================== */

.how-we-work-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Item */
.how-we-work-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.how-we-work-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.how-we-work-item.active {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 2rem;
}

/* Icon Circle */
.how-we-work-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #D9D6FE;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.how-we-work-item.active .how-we-work-icon {
    background-color: #BDB4FE;
    width: 24px;
    height: 24px;
}

/* Item Content */
.how-we-work-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.how-we-work-item-title {
    font-family: 'PlusJakartaSans';
    font-size: 1.2rem;
    font-weight: 700;
    color: #737373;
    line-height: 1.7rem;
    margin: 0;
    text-align: left;
    transition: all 0.3s ease;
}

.how-we-work-item.active .how-we-work-item-title {
    font-family: 'PlusJakartaSans';
    color: #141414;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight:700;
}

.how-we-work-item-description {
    font-family: 'PlusJakartaSans';
    font-size: 1.1rem;
    font-weight: 400;
    color: #424242;
    line-height: 1.6rem;
    margin: 0;
    text-align: left;
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RIGHT SIDE - STACKED IMAGES ==================== */

.how-we-work-images {
    flex: 0 0 380px;
    position: relative;
    height: 380px;
}

.how-we-work-image {
    position: absolute;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base positioning for all images */
.how-we-work-image.image-1,
.how-we-work-image.image-2,
.how-we-work-image.image-3,
.how-we-work-image.image-4 {
    width: 340px;
    height: 340px;
    top: 20px;
    right: 0;
    opacity: 0;
    z-index: 1;
    transform: scale(0.95);
}

/* Active image - front and center */
.how-we-work-image.active {
    opacity: 1;
    z-index: 10;
    transform: scale(1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Next image in queue - show behind active (slightly visible) */
.how-we-work-image.image-1:not(.active) {
    opacity: 0.4;
    z-index: 5;
    transform: scale(0.92) translate(-20px, -15px);
}

.how-we-work-image.image-2:not(.active) {
    opacity: 0.35;
    z-index: 4;
    transform: scale(0.88) translate(-35px, -25px);
}

.how-we-work-image.image-3:not(.active) {
    opacity: 0.3;
    z-index: 3;
    transform: scale(0.84) translate(-50px, -35px);
}

.how-we-work-image.image-4:not(.active) {
    opacity: 0.25;
    z-index: 2;
    transform: scale(0.80) translate(-65px, -45px);
}

/* When image 1 is active, show others behind */
.how-we-work-image.image-1.active ~ .how-we-work-image.image-2 {
    opacity: 0.4;
    z-index: 5;
    transform: scale(0.92) translate(-20px, -15px);
}

.how-we-work-image.image-1.active ~ .how-we-work-image.image-3 {
    opacity: 0.35;
    z-index: 4;
    transform: scale(0.88) translate(-35px, -25px);
}

.how-we-work-image.image-1.active ~ .how-we-work-image.image-4 {
    opacity: 0.3;
    z-index: 3;
    transform: scale(0.84) translate(-50px, -35px);
}

/* When image 2 is active */
.how-we-work-image.image-2.active ~ .how-we-work-image.image-3 {
    opacity: 0.4;
    z-index: 5;
    transform: scale(0.92) translate(-20px, -15px);
}

.how-we-work-image.image-2.active ~ .how-we-work-image.image-4 {
    opacity: 0.35;
    z-index: 4;
    transform: scale(0.88) translate(-35px, -25px);
}

/* When image 3 is active */
.how-we-work-image.image-3.active ~ .how-we-work-image.image-4 {
    opacity: 0.4;
    z-index: 5;
    transform: scale(0.92) translate(-20px, -15px);
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet - 768px to 1199px */
@media (max-width: 1199px) {
    .how-we-work-title {
        font-size: 2.5rem;
    }

    .how-we-work-content {
        gap: 2rem;
    }

    .how-we-work-images {
        flex: 0 0 340px;
        height: 340px;
    }

    .how-we-work-image.image-1,
    .how-we-work-image.image-2,
    .how-we-work-image.image-3,
    .how-we-work-image.image-4 {
        width: 300px;
        height: 300px;
    }

    .how-we-work-item-title {
        font-size: 1rem;
    }

    .how-we-work-item.active .how-we-work-item-title {
        font-size: 1.0625rem;
    }

    .how-we-work-item-description {
        font-size: 0.8125rem;
    }
}

/* Mobile - 767px and below */
@media (max-width: 767px) {
    .how-we-work-section {
        gap: 2.5rem;
    }

    .how-we-work-title {
        font-size: 1.75rem;
    }

    .how-we-work-content {
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
    }

    .how-we-work-list {
        gap: 1.25rem;
        width: 100%;
    }

    .how-we-work-item {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .how-we-work-item.active {
        padding: 1.25rem 1.5rem;
    }

    .how-we-work-icon {
        width: 18px;
        height: 18px;
    }

    .how-we-work-item.active .how-we-work-icon {
        width: 20px;
        height: 20px;
    }

    .how-we-work-item-title {
        font-size: 0.9375rem;
    }

    .how-we-work-item.active .how-we-work-item-title {
        font-size: 1rem;
    }

    .how-we-work-item-description {
        font-size: 0.8125rem;
    }

    .how-we-work-images {
        width: 320px;
        height: 320px;
        flex: none;
    }

    .how-we-work-image.image-1,
    .how-we-work-image.image-2,
    .how-we-work-image.image-3,
    .how-we-work-image.image-4 {
        width: 280px;
        height: 280px;
    }

    .how-we-work-image.image-1:not(.active) {
        transform: scale(0.92) translate(-15px, -12px);
    }

    .how-we-work-image.image-2:not(.active) {
        transform: scale(0.88) translate(-25px, -20px);
    }

    .how-we-work-image.image-3:not(.active) {
        transform: scale(0.84) translate(-35px, -28px);
    }

    .how-we-work-image.image-4:not(.active) {
        transform: scale(0.80) translate(-45px, -36px);
    }
}

/* Mobile Small - 479px and below */
@media (max-width: 479px) {
    .how-we-work-section {
        gap: 2rem;
    }

    .how-we-work-title {
        font-size: 1.5rem;
    }

    .how-we-work-images {
        width: 280px;
        height: 280px;
    }

    .how-we-work-image.image-1,
    .how-we-work-image.image-2,
    .how-we-work-image.image-3,
    .how-we-work-image.image-4 {
        width: 300px;
        height: 240px;
    }
}
