/* Home: Problem vs Solution Block */

.home-problem-solution {
    background-color: #F7F9F9;
    padding: 3.5rem 0;
}

.home-problem-solution__container {
    max-width: 1140px;
    margin: 0 auto;
}

.home-problem-solution__heading {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #0A1A1C;
    text-align: center;
}

.home-problem-solution__heading em {
    color: #E84E0F;
    font-style: normal;
}

/* Problem cards (act as tabs) */

.home-problem-solution__problems {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background-color: #D8E5E7;
    border: 1px solid #D8E5E7;
    border-radius: 12px;
    overflow: hidden;
}

.home-problem-solution__problem-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    cursor: pointer;
    box-shadow: inset 0 -3px 0 0 transparent;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.home-problem-solution__problem-card:hover {
    background-color: #FBF6F3;
}

.home-problem-solution__problem-card.is-active {
    background-color: #FBF6F3;
    box-shadow: inset 0 -3px 0 0 #E84E0F;
}

.home-problem-solution__problem-card:focus-visible {
    outline: 2px solid #E84E0F;
    outline-offset: -2px;
}

.home-problem-solution__problem-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.home-problem-solution__problem-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-problem-solution__problem-body {
    padding: 1.75rem;
}

.home-problem-solution__problem-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7B7D;
    margin-bottom: 0.5rem;
}

.home-problem-solution__problem-card.is-active .home-problem-solution__problem-label {
    color: #E84E0F;
}

.home-problem-solution__problem-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #0A1A1C;
    margin: 0;
}

.home-problem-solution__arrow {
    display: none;
}

/* Divider */

.home-problem-solution__divider {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.home-problem-solution__divider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #E84E0F;
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

/* Solution panels (stacked, crossfade between the active one) */

.home-problem-solution__solutions {
    position: relative;
    display: grid;
}

.home-problem-solution__solution-panel {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #fff;
    border: 1px solid #D8E5E7;
    border-radius: 16px;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.home-problem-solution__solution-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.home-problem-solution__solution-media {
    position: relative;
    width: 100%;
}

.home-problem-solution__solution-image {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(10, 26, 28, 0.12);
}

.home-problem-solution__solution-image:not(:first-child) {
    margin-top: 1rem;
}

.home-problem-solution__solution-image img {
    width: 100%;
    height: auto;
    display: block;
}

.home-problem-solution__solution-content {
    display: flex;
    flex-direction: column;
}

.home-problem-solution__solution-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #E84E0F;
    margin-bottom: 0.75rem;
}

.home-problem-solution__solution-heading {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #0A1A1C;
    margin: 0 0 1rem;
}

.home-problem-solution__solution-heading em {
    color: #E84E0F;
    font-style: normal;
}

.home-problem-solution__solution-text {
    font-size: 16px;
    line-height: 1.6;
    color: #6B7B7D;
}

/* sm: 640px — 2 problem columns */
@media (min-width: 640px) {
    .home-problem-solution__problems {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* md: 768px — 3 problem columns with connecting arrows, side-by-side solution panel */
@media (min-width: 768px) {
    .home-problem-solution {
        padding: 4.5rem 0;
    }

    .home-problem-solution__heading {
        font-size: 36px;
        margin-bottom: 3rem;
    }

    .home-problem-solution__problems {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }

    .home-problem-solution__problem-body {
        padding: 2rem;
    }

    .home-problem-solution__arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        right: -14px;
        z-index: 2;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background-color: #E84E0F;
        color: #fff;
        font-size: 14px;
        line-height: 1;
    }

    .home-problem-solution__solution-panel {
        flex-direction: row;
        align-items: center;
        gap: 3rem;
        padding: 3rem;
    }

    .home-problem-solution__solution-media {
        flex: 0 0 42%;
        max-width: 42%;
        padding: 1rem 1.5rem 1rem 0;
    }

    .home-problem-solution__solution-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 92%;
        transform: translate(calc(var(--offset, 0) * 24px), calc(var(--offset, 0) * 24px));
    }

    .home-problem-solution__solution-image:not(:first-child) {
        margin-top: 0;
    }

    .home-problem-solution__solution-media::before {
        content: "";
        display: block;
        padding-top: 75%;
    }

    .home-problem-solution__solution-content {
        flex: 1;
    }

    .home-problem-solution__solution-heading {
        font-size: 32px;
    }
}
