/* Skin Problem Section */
.skin-problem-section {
    padding: 6rem 0;
    background: #f5f5f5;
    /* Light grey background */
    overflow: hidden;
    /* Prevent vertical scrollbar from popup */
}

body.dark-mode .skin-problem-section {
    background: #111;
}

.section-title-large {
    font-size: 3rem;
    font-weight: 800;
    color: #000;
}

body.dark-mode .section-title-large {
    color: #fff;
}

/* Slider Container */
.problem-slider-container {
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    /* Enable horizontal scrolling */
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.problem-slider-container::-webkit-scrollbar {
    display: none;
}

.problem-slider-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    height: 550px;
    width: 100%;
    padding: 0;
    transition: all 0.5s ease;
}

/* Problem Card */
.problem-card {
    width: 280px;
    height: 380px;
    flex: 0 1 auto;
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
    opacity: 0.6;
    filter: grayscale(0.6);
    background: #000;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .problem-slider-wrapper {
        gap: 1rem;
    }

    .problem-card {
        width: 220px;
        height: 320px;
    }

    .problem-card.active {
        width: 280px;
        height: 420px;
    }
}

@media (max-width: 768px) {
    .skin-problem-section {
        padding: 4rem 0;
    }

    .section-title-large {
        font-size: 2rem;
        margin-bottom: 2rem !important;
    }

    .problem-slider-container {
        padding-bottom: 3rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .problem-slider-wrapper {
        display: flex;
        flex-direction: row;
        /* Horizontal on mobile too */
        height: 400px;
        width: max-content;
        /* Fit all items */
        gap: 1.5rem;
        justify-content: flex-start;
        align-items: center;
    }

    .problem-card {
        width: 180px;
        height: 280px;
        flex-shrink: 0;
        scroll-snap-align: center;
        opacity: 0.5;
    }

    .problem-card.active {
        width: 240px;
        height: 360px;
        opacity: 1;
        border-width: 4px;
        transform: translateY(0);
    }

    .problem-description-box {
        padding: 1.5rem;
        margin-top: 2rem;
        width: 90%;
        min-height: auto;
    }

    .desc-content p {
        font-size: 0.95rem;
    }

    .problem-list li {
        font-size: 0.9rem;
    }

    .card-overlay h3 {
        font-size: 1.1rem;
    }

    .problem-card.active .card-overlay h3 {
        font-size: 1.3rem;
    }
}

/* Active State - The "Sliding Focus" Effect */
.problem-card.active {
    width: 380px;
    height: 520px;
    opacity: 1;
    filter: grayscale(0);
    z-index: 10;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    border: 8px solid #fff;
    transform: translateY(-20px);
}

body.dark-mode .problem-card.active {
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.problem-card:hover .card-image {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.3s ease;
}

.problem-card.active .card-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.card-overlay h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
    transition: all 0.5s ease;
    padding: 1rem;
}

.problem-card.active .card-overlay h3 {
    font-size: 2rem;
    /* Title gets bigger too */
    opacity: 1;
}

/* Description Box */
.problem-description-box {
    max-width: 900px;
    margin: 2rem auto 0;
    background: #e0e0e0;
    padding: 3rem;
    border-radius: 20px;
    position: relative;
    min-height: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

body.dark-mode .problem-description-box {
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.desc-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.desc-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.desc-content p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
}

body.dark-mode .desc-content p {
    color: #ddd;
}

.problem-list {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.problem-list li {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

body.dark-mode .problem-list li {
    color: #ccc;
}