.service-accordion-area {
    overflow: hidden;
    padding-bottom: 80px;
    position: relative;
}

.accordion-container {
    display: flex;
    width: 100%;
    height: 450px;
    gap: 15px;
    padding: 0 15px;
}

.accordion-item {
    flex: 1;
    position: relative;
    border-radius: 20px !important;
    overflow: hidden !important;
    background-size: cover;
    background-position: center;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    min-width: 75px; 
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Active State */
.accordion-item.active {
    flex: 5.5;
    cursor: default;
}

/* Background Overlay for Collapsed State */
.accordion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Active State Background */
.accordion-item.active::before {
    background: #f8f9fc; 
    opacity: 1;
    z-index: 1;
    border: 1px solid #e1e4ed;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

/* Vertical Text */
.accordion-item .vertical-text {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    white-space: nowrap;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    opacity: 1;
    transition: opacity 0.3s;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.accordion-item.active .vertical-text {
    opacity: 0;
    transition: opacity 0.2s;
}

/* Numbering */
.accordion-item .item-number {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    font-weight: 800;
    z-index: 2;
    transition: opacity 0.3s;
}

.accordion-item.active .item-number {
    opacity: 0;
}

/* Content Box */
.accordion-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px 25px; 
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px; 
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s 0.2s;
    z-index: 3;
}

.accordion-item.active .accordion-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity 0.5s 0.3s ease-out, transform 0.5s 0.3s ease-out, visibility 0s 0s;
}

/* Inner Image */
.content-img-wrapper {
    flex: 0 0 38%; 
    height: 94%; 
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    background: #fff;
}

.content-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Inner Text Wrapper */
.content-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-width: 250px;
}

.content-text-wrapper h3 {
    font-size: 28px; 
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--header);
    line-height: 1.2;
}

.content-text-wrapper p {
    font-size: 15px; 
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Bullet Points */
.service-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.service-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 6px;
    font-size: 15px; 
    color: var(--header);
    font-weight: 500;
    line-height: 1.4;
}

.service-features li::before {
    content: "\f00c"; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--theme);
    font-size: 13px;
}

/* Button */
.learn-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    background-color: var(--theme);
    color: #fff;
    font-weight: 600;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    width: fit-content;
    gap: 10px; 
}

.learn-more-btn:hover {
    background-color: var(--header);
    color: #fff;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .accordion-container {
        height: 550px; /* Increased height to give more room */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 20px 10px 20px;
        gap: 20px;
        display: flex;
        flex-direction: row;
        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE/Edge */
    }

    .accordion-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .accordion-item {
        flex: 0 0 85vw;
        width: 85vw;
        height: 100%;
        scroll-snap-align: start;
        min-width: auto;
        transition: none;
    }

    .accordion-item::before,
    .accordion-item.active::before {
        background: #fff;
        border: 1px solid #eee;
        opacity: 1;
    }

    .accordion-content {
        position: relative;
        flex-direction: column;
        padding: 20px;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        gap: 15px;
        height: 100%;
        justify-content: flex-start;
    }
    
    .content-text-wrapper {
        min-width: auto;
        justify-content: flex-start;
        /* Allow scroll if text is too long */
        overflow-y: auto; 
        padding-bottom: 10px;
    }

    .content-img-wrapper {
        flex: 0 0 150px; /* Fixed smaller image to prioritize text/button */
        width: 100%;
        height: 150px;
    }

    .content-text-wrapper h3 {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .content-text-wrapper p {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .service-features li {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .vertical-text, .item-number {
        display: none;
    }

    /* Dot Navigation Styling */
    .accordion-dots {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 20px;
    }

    .accordion-dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #ccc;
        transition: all 0.3s;
        cursor: pointer;
    }

    .accordion-dots .dot.active {
        background: var(--theme);
        width: 25px;
        border-radius: 10px;
    }
    
    /* Hide old arrows */
    .mobile-scroll-indicator {
        display: none !important;
    }
}
