/* Problem Section Styles */
.problem-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* paddingをclamp関数で調整 - 元の値は padding: 153px 135px; */
    padding: clamp(80px, 8vw + 50px, 153px) clamp(20px, 7vw + 40px, 135px);
    gap: clamp(40px, 2vw + 30px, 70px);
    align-self: stretch;
    background-color: #4885ed;
    overflow: hidden;
    position: relative;
    /* セクション間の隙間を防ぐ */
    margin-bottom: -1px;
    /* セクションを三角形で区切る*/
    clip-path: polygon(0 0,
            /* Top left */
            100% 0,
            /* Top right */
            100% calc(100% - 80px),
            /* Right point before triangle */
            50% 100%,
            /* Bottom middle (triangle point) */
            0 calc(100% - 80px)
            /* Left point before triangle */
        );
    z-index: 2;
}

/* あしらい */
.problem-section__background {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

/* ドット */
.problem-section__dot {
    position: absolute;
    background-size: cover;
    background-position: center;
    z-index: 2;
}

/* 左斜め上のあしらい */
.problem-section__ellipse-first {
    position: absolute;
    width: 40%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    top: 0;
    /* 上端を基準に */
    left: 0;
    /* 左端を基準に */
    transform: translate(-10%, -10%);
    /* 左上に少しはみ出すように */
    background-image: url(../images/problem/ellipse.png);
    background-size: cover;
    z-index: 1;
}

/* 左斜め上のドット */
.problem-section__dot-first {
    position: absolute;
    width: 15%;
    max-width: 189px;
    aspect-ratio: 189 / 191;
    top: 0;
    left: 0;
    /* 左端を基準に */
    transform: translateX(5%);
    /* 横方向に少し内側に */
    background-image: url(../images/problem/dot.png);
    background-size: cover;
    background-position: center;
    z-index: 2;
}

/* 右斜め下のあしらい */
.problem-section__ellipse-second {
    position: absolute;
    width: 40%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    bottom: 5%;
    right: -10%;
    background-image: url(../images/problem/ellipse.png);
    background-size: cover;
    z-index: 1;
}

/* 右斜め下のドット */
.problem-section__dot-second {
    width: 15%;
    max-width: 189px;
    aspect-ratio: 189 / 191;
    right: 0;
    bottom: 0;
    background-image: url(../images/problem/dot.png);
}

.problem-section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
    z-index: 3;
}

/* Cards Container */
.problem-section-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(15px, 1vw + 10px, 25px);
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    /* パディングの範囲内に収まるようにする */
    box-sizing: border-box;
    padding: 0 clamp(5px, 1vw, 15px);
}

/* Card */
.problem-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 372px;
    flex: 1 1 calc(33.333% - 30px);
    min-width: 280px;
    background-color: #ffffff;
    border-radius: 10px;
    /* 固定値から比率を保つclamp関数に変更 */
    padding: clamp(30px, 3vw + 20px, 47px) clamp(30px, 4vw + 15px, 53px);
    align-items: center;
    box-sizing: border-box;
    height: auto;
}

.problem-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 0.5vw + 18px, 24px);
    margin-bottom: clamp(25px, 1vw + 20px, 35px);
    width: 100%;
}

.problem-card__title {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 1.159rem + 0.45vw, 1.5rem);
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.38px;
    color: #142238;
    margin: 0;
    align-self: stretch;
}

.problem-card__title--accent {
    font-family: "Montserrat";
}

.problem-card__image {
    width: 100%;
    max-width: 237px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.problem-card__content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.problem-card__list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 0.5vw + 13px, 19px);
}

.problem-card__text {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    font-size: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    line-height: 1.8;
    letter-spacing: 0.22px;
    color: #142238;
    margin: 0;
    position: relative;
    padding-left: 25px;
}

.problem-card__text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    background-color: #142238;
    border-radius: 50%;
}

.problem-card__text--accent {
    font-family: "Montserrat";
}

@media (max-width: 1200px) {

    .problem-card__header,
    .problem-card__content {
        max-width: 100%;
    }

    .problem-card__image {
        max-width: min(237px, 60%);
    }

    .problem-card {
        flex: 1 1 100%;
    }

    .problem-card__header,
    .problem-card__content {
        max-width: 100%;
    }

    .problem-card__image {
        max-width: min(237px, 60%);
    }
}

@media (max-width: 900px) {
    .problem-section-cards {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .problem-section {
        clip-path: polygon(0 0,
                100% 0,
                100% calc(100% - 40px),
                50% 100%,
                0 calc(100% - 40px));
    }

    .problem-section__ellipse-first {
        width: 45%;
    }

    .problem-section__dot-first {
        width: 20%;
    }

    .problem-section__ellipse-second {
        width: 45%;
        bottom: 2%;
        right: -5%;
    }

    .problem-section__dot-second {
        width: 20%;
    }
}

@media (max-width: 600px) {
    .problem-card__image {
        max-width: 80%;
    }
}

@media (max-width: 480px) {

    /* 背景要素をすべて非表示にする */
    .problem-section__ellipse-first,
    .problem-section__ellipse-second,
    .problem-section__dot-first,
    .problem-section__dot-second {
        display: none;
    }

    .problem-section-cards {
        padding: 0;
        gap: 15px;
    }

    .problem-card__header {
        gap: 15px;
        margin-bottom: 20px;
    }

    .problem-card__list {
        gap: 12px;
    }
}