/* 共通 */
.procedure-list {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.procedure-list li {
    display: flex;
    position: relative;
    width: 25%;
    height: 183px;
    padding: 15px 15px 20px;
    margin: 0 40px 30px 0;
    background: #f7f0e7;
}
.procedure-list h6,
.procedure-list .procedure-right h6 {
   font-size: 20px;
   font-weight: bold;
   color: #5f3f39;
}
.procedure-list p {
    font-size: 16px;
}
.before-departure-title {
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin-right: 20px;
    padding-right: 10px;
    border-right: 1px solid #5f3f39;
}
.procedure-right h6 {
    display: inline-block;
    margin: 17px 0 10px;
    height: 42px;
}
.before-departure-title span {
    text-combine-upright: all;
}
.procedure-list.bottom li {
    background: #e7d5bc;
}

/* 日本でのお手続き */
.procedure-list.top li::after {
    position: absolute;
    top: 0;
    content: "";
    position: absolute;
    right: -25px;
    top: 0;
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-top: 91px solid transparent;
    border-bottom: 91px solid transparent;
    border-left: 25px solid #f7f0e7;
    border-right: 0;
}
.procedure-list.bottom li:nth-child(2):after,
.procedure-list.bottom li:nth-child(3):after,
.procedure-list.bottom li:nth-child(4):after {
    position: absolute;
    top: 0;
    content: "";
    position: absolute;
    right: -25px;
    top: 0;
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-top: 91px solid transparent;
    border-bottom: 91px solid transparent;
    border-left: 25px solid #e7d5bc;
    border-right: 0;
}
.procedure-list.bottom li:first-child .before-departure-title,
.procedure-list.bottom li:last-child .before-departure-title {
    border-right: none;
}
.procedure-list.bottom li:first-child {
   width: 5%;
   margin-right: 5px;
}
.procedure-list.bottom li:last-child {
   width: 5%;
   margin-right: 0;
}
.before-departure-title.stay {
    text-orientation: unset;
}

/* ハワイでのお手続き */
.procedure-list.hawaii li {
    background: #e7d5bc;
}
.procedure-list.hawaii li:last-child {
    width: 5%;
    margin-right: 0;
}
.procedure-list.hawaii li:last-child::after {
    content: none;
}
.procedure-list.hawaii li:nth-child(2) h6 {
    width: 100%;
    writing-mode: unset;
    text-orientation: unset;
    line-height: 1;
    border-right: none;
}
.procedure-list.hawaii li:last-child h6 {
    border-right: none;
}
.procedure-list.hawaii li:first-child:after,
.procedure-list.hawaii li:nth-child(2):after,
.procedure-list.hawaii li:nth-child(3):after {
    position: absolute;
    top: 0;
    content: "";
    position: absolute;
    right: -25px;
    top: 0;
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-top: 91px solid transparent;
    border-bottom: 91px solid transparent;
    border-left: 25px solid #e7d5bc;
    border-right: 0;
}

@media screen and (max-width: 768px) {
    .procedure-list {
        flex-direction: column;
    }

    .procedure-list li {
        width: 95%;
        margin: 0 auto 50px;
        height: auto;
    }

    .procedure-list.top li::after,
    .procedure-list.bottom li::after {
        width: 0;
        height: 0;
        border-style: solid;
        border-right: 27px solid transparent;
        border-left: 27px solid transparent;
        border-top: 25px solid #5f3f39;
        border-bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        bottom: -40px;
        top: auto;
    }

    .procedure-list.bottom li:first-child:after,
    .procedure-list.bottom li:nth-child(2):after,
    .procedure-list.bottom li:nth-child(3):after,
    .procedure-list.bottom li:nth-child(4):after {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-right: 27px solid transparent;
        border-left: 27px solid transparent;
        border-top: 25px solid #5f3f39;
        border-bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        bottom: -40px;
        top: auto;
    }   

    .before-departure-title {
       border-right: none;
    }

    .procedure-list h6,
    .procedure-list .procedure-right h6 {
        font-size: 24px;
        height: auto;
        padding: 0;
        line-height: 1.4;
    }

    .procedure-list p {
        font-size: 18px;
        line-height: 1.4;
    }

    .procedure-list.bottom li:first-child {
        width: 95%;
        margin: 10px auto 50px;
        padding: 10px;
    }

    .procedure-list.bottom li:last-child {
        width: 95%;
        margin: 0 auto 30px;
        padding: 10px;
    }

    .before-departure-title.stay,
    .procedure-list.bottom li:last-child .before-departure-title {
        width: 100%;
        writing-mode: unset;
        text-orientation: unset;
        line-height: 1;
    }

    /* ハワイ */
    .procedure-list.hawaii li:first-child:after,
    .procedure-list.hawaii li:nth-child(2):after,
    .procedure-list.hawaii li:nth-child(3):after,
    .procedure-list.hawaii li:nth-child(4):after {
        width: 0;
        height: 0;
        border-style: solid;
        border-right: 27px solid transparent;
        border-left: 27px solid transparent;
        border-top: 25px solid #5f3f39;
        border-bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        bottom: -40px;
        top: auto;
    }   
    .procedure-list.hawaii li:nth-child(2),
    .procedure-list.hawaii li:last-child {
        width: 95%;
        margin: 0 auto 50px;
        height: auto;
        padding: 10px;
    }
    .procedure-list.hawaii li:nth-child(2) h6, 
    .procedure-list.hawaii li:last-child h6 {
        width: 100%;
        writing-mode: unset;
        text-orientation: unset;
    }
}