/* common */


/* before_section */
.before_section .accordion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: inherit;
    margin: 1em 3em;
    border-radius: 6px;
    overflow: visible;
}
/* before_section｜大項目（タブ） */
.before_section .tab {
    position: relative;
    width: 23%;
    max-width: 180px;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    line-height: 2.2;
    border: 1px solid #fafafa;
    border-radius: 30px;
    box-shadow: rgb(0 0 0 / 10%) 0px 1px 5px;
    background-position: center top 18px;
    background-size: 44px auto;
    background-repeat: no-repeat;
    cursor: pointer;
    transition:.5s ease;
}
.before_section .tab.active {
    background-color: var(--jcom-red);
    color: #fff;
}
.before_section .tab::before,
.before_section .tab::after{
    content: "";
    width: 12px;
    height: 2px;
    background-color: #fff;
    border-radius: 5px;
    position: absolute;
    top: calc(50% - 1px);
    right: 14px;
    z-index: 3;
    transition:.5s ease;
}
.before_section .tab::before{
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}

.before_section .tab .circle{
    position: absolute;
    top: calc(50% - 10px);
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--jcom-red);
    z-index: 2;
}
.before_section .tab.active .circle{
    background: white;
}
.before_section .tab.active::before,
.before_section .tab.active::after{
    background: var(--jcom-red);
}
.before_section .tab.active::before{
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
}

.before_section .tab-content { 
    display: none;
    row-gap: 1.5em;
    width: 100%;
    margin: 10px 0 auto auto;
    padding: 20px;
    position: relative;
    top: 0;
    left: 0;
    border: 3px solid var(--jcom-red);
    border-radius: 25px;
    background: white;
    transition:.5s ease;
    z-index: 1;
}
.before_section .tab-content.active {
    display: grid;
}
.before_section .tab-content::before{
    content: "";
    position: absolute;
    top: -34px;
    left: 50%;
    margin-left: -15px;
    border: 22px solid transparent;
    border-bottom: 12px solid #FFF;
    z-index: 2;
}
.before_section .tab-content::after{
    content: "";
    position: absolute;
    top: -40px;
    left: 50%;
    margin-left: -17px;
    border: 24px solid transparent;
    border-bottom: 14px solid var(--jcom-red);
    z-index: 1;
}

#tv::before,#tv::after {
    left: 12%;
}
#net::before,#net::after {
    left: 30%;
}
#mobile::before,#mobile::after {
    left: 49%;
}
#denki::before,#denki::after {
    left: 68%;
}
#phone::before,#phone::after {
    left: 87%;
}

.tv-tab{
    background-image: url(../img/icon/service_tv.svg);
}
.tv-tab.active{
    background-image: url(../img/icon/service_tv_wh.svg);
}
.net-tab{
    background-image: url(../img/icon/service_net.svg);
}
.net-tab.active{
    background-image: url(../img/icon/service_net_wh.svg);
}
.mobile-tab{
    background-image: url(../img/icon/service_mobile.svg);
}
.mobile-tab.active{
    background-image: url(../img/icon/service_mobile_wh.svg);
}
.denki-tab{
    background-image: url(../img/icon/service_denki.svg);
}
.denki-tab.active{
    background-image: url(../img/icon/service_denki_wh.svg);
}
.phone-tab{
    background-image: url(../img/icon/service_phone.svg);
}
.phone-tab.active{
    background-image: url(../img/icon/service_phone_wh.svg);
}

/* before_section｜小項目（アコーディオン） */
.before_section .accordion-item{
    margin-bottom: 20px;
    background-color: #FAFAFA;
    box-shadow: rgb(0 0 0 / 10%) 0px 1px 5px;
    border-radius: 20px;
    overflow: auto;
}
.before_section .accordion-header.active {
    color: white;
    background-color: var(--jcom-red);
}
.before_section .accordion-header.active::after {
    content: 'ー';
}
.before_section .accordion-header {
    display: flex;
    align-items: center;
    padding: 23px 90px;
    font-weight: 600;
    background-repeat: no-repeat;
    background-position: 30px center;
    background-size: 40px;
    position: relative;
    cursor: pointer;
    transition: .3s ease;
}
.before_section .accordion-header::after {
    content: '＋';
    position: absolute;
    right: 2em;
}

/* tv */
#tv .item_01 .accordion-header{
    background-image: url(../img/icon/cost.png);
}
#tv .item_01 .accordion-header.active{
    background-image: url(../img/icon/cost_wh.png);
}
#tv .item_02 .accordion-header{
    background-image: url(../img/icon/time.png);
}
#tv .item_02 .accordion-header.active{
    background-image: url(../img/icon/time_wh.png);
}
#tv .item_03 .accordion-header{
    background-image: url(../img/icon/program.png);
}
#tv .item_03 .accordion-header.active{
    background-image: url(../img/icon/program_wh.png);
}
#tv .item_04 .accordion-header{
    background-image: url(../img/icon/favorite.png);
}
#tv .item_04 .accordion-header.active{
    background-image: url(../img/icon/favorite_wh.png);
}
/* net */
#net .item_01 .accordion-header{
    background-image: url(../img/icon/cost.png);
}
#net .item_01 .accordion-header.active{
    background-image: url(../img/icon/cost_wh.png);
}
#net .item_02 .accordion-header{
    background-image: url(../img/icon/speed.png);
}
#net .item_02 .accordion-header.active{
    background-image: url(../img/icon/speed_wh.png);
}
#net .item_03 .accordion-header{
    background-image: url(../img/icon/unused.png);
}
#net .item_03 .accordion-header.active{
    background-image: url(../img/icon/unused_wh.png);
}
/* mobile */
#mobile .item_01 .accordion-header{
    background-image: url(../img/icon/new.png);
}
#mobile .item_01 .accordion-header.active{
    background-image: url(../img/icon/new_wh.png);
}
#mobile .item_02 .accordion-header{
    background-image: url(../img/icon/quality.png);
}
#mobile .item_02 .accordion-header.active{
    background-image: url(../img/icon/quality_wh.png);
}
#mobile .item_03 .accordion-header{
    background-image: url(../img/icon/use.png);
}
#mobile .item_03 .accordion-header.active{
    background-image: url(../img/icon/use_wh.png);
}
#mobile .item_04 .accordion-header{
    background-image: url(../img/icon/cost.png);
}
#mobile .item_04 .accordion-header.active{
    background-image: url(../img/icon/cost_wh.png);
}
/* denki */

/* phone */
#phone .item_01 .accordion-header{
    background-image: url(../img/icon/spamcall.png);
}
#phone .item_01 .accordion-header.active{
    background-image: url(../img/icon/spamcall_wh.png);
}
#phone .item_02 .accordion-header{
    background-image: url(../img/icon/time.png);
}
#phone .item_02 .accordion-header.active{
    background-image: url(../img/icon/time_wh.png);
}


.before_section .accordion-content {
    display: none;
    row-gap: 1.5em;
    padding: 1.5em 3em;
    background: #fff;
}
.before_section .accordion-content > p {
    text-align: center;
}

.before_section .accordion-content .close-accordion {
    display: block;
    margin: 1em auto;
    padding: 10px 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

/* caution_section */
.caution_section .accordion {
    display: grid;
    row-gap: 20px;
    max-width: 1120px;
    margin: auto;
}
.caution_section .accordion-header {
    display: block;
    padding: 1em 3em 1em .5em;
    padding-left: 20px;
    background: #eee;
    border: 2px solid #dedede;
    cursor: pointer;
    position: relative;
}
.caution_section .accordion-header::after {
    content: '＋';
    position: absolute;
    right: 1em;
    font-size: 1.2em;
}
.caution_section .accordion-header.active::after {
    content: 'ー';
}
.caution_section .accordion-content {
    display: none;
    width: 100%;
    padding: 0 1em;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

/* query_section */
.query_section {
    display: grid;
    row-gap: 30px;
}
.query_section .accordion {
    display: grid;
    row-gap: 10px;
    width: 100%;
    max-width: 1120px;
    margin: auto;
}
.query_section .accordion-item{
    background: #fff;
    border-radius: 10px;
    border-bottom: 0;
    overflow: hidden;
}
.query_section .accordion-header{
    padding: 1.5em 3em 1.5em 60px;
    font-weight: bold;
    background: url(../img/common/icn-q.png);
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 30px;
    position: relative;
}
.query_section .accordion-header::after {
    content: '＋';
    position: absolute;
    top: 50%;
    right: 1em;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
}
.query_section .accordion-header.active::after {
    content: 'ー';
}
.query_section .accordion-content {
    display: none;
    width: 100%;
    padding: 1.5em 3em;
    background: #fff;
    border-top: dotted 2px #dedede;
    transition: ease 0.5s;
}
.query_section p:first-of-type {
    margin-bottom: 1em;
}
.query_section .text_link_self {
    display: inline-grid;
    margin: 0 auto;
}



@media screen and (max-width: 767px) {
    /* before_section｜大項目（タブ） */
    .before_section .accordion{
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin: 0 auto;
    }
    .before_section .tab {
        width: calc(45% - 5px);
        margin: 0;
        font-size: 14px;
        padding: 10px;
        padding-top: 36px;
        line-height: 1.8;
        background-position: center top 16px;
    }
    .before_section .tab:nth-of-type(3),
    .before_section .tab:nth-of-type(4),
    .before_section .tab:nth-of-type(5) {
        width: calc(32% - 5px);
    }
    #tv::before,#tv::after,
    #net::before,#net::after,
    #mobile::before,#mobile::after,
    #denki::before,#denki::after,
    #phone::before,#phone::after {
        left: 47%;
    }

    /* before_section｜小項目（アコーディオン） */
    .before_section .accordion-header {
        padding: 25px 30px 25px 65px;
        background-position: 20px center;
        background-size: 35px;
    }
    .before_section .accordion-header::after {
        right: 15px;
    }
    .before_section h4 {
        font-size: 15px;
    }

    .before_section .accordion-content {
        padding: 10px 8px;
    }
    .before_section .accordion-content p,
    .before_section .accordion-content li {
        font-size: 15px;
    }

    .before_section .accordion-content .close-accordion {
        margin: 1em auto;
        padding: 0;
    }

    /* caution_section */
    .caution_section .accordion{
        margin: auto;
    }
    .caution_section .accordion-content {
        display: none;
        padding: 0 10px;
    }

    /* query_section */
    .query_section .accordion-content {
        padding: 1em 0.5em;
    }
    .query_section .text_link_self {
        font-size: 15px;
    }
}