@charset "utf-8";

.header-section {
    width: 100%;
    height: 34vw;
    background: url(../img/header.jpg) no-repeat center center;
    background-size: cover;
}

.header-section-sp {
    display: none;
}

/*診断スタートなどのタイトル部分*/
h3.start-title,
h3.contens-area {
    padding: 15px 0;
}

h3.start-title{
    background: #1F6AD2;
}

h3.contens-area {
    background: #FF304F;
}

.answer-title-box h3 {
    background: #1F6AD2;
    padding: 15px 0;
    margin-bottom: 100px;
}

h3.start-title p,
.answer-title-box p,
h3.contens-area p {
    width: 950px;
    margin: 0 auto 61px;
    position: relative;
    text-align: center;
}

h3.start-title p:before,
.answer-title-box p:before,
h3.contens-area p:before {
    content: "";
    position: absolute;
    bottom: -56px;
    right: 47%;
    border: 21px solid transparent;
}

h3.start-title p:before,
.answer-title-box p:before {
    border-top: 21px solid #1F6AD2;
}

h3.contens-area p:before {
    border-top: 21px solid #ff304f;
}

h3.start-title img{
    width: 40%;
}

.answer-title-box img {
    width: 80%;
}

h3.contens-area img {
    width: 70%;
}


/*質問のエリア全体と、結果のエリア全体のwrapperを親要素の100％に。*/
.diagnostic-area,
.answer-area {
	width: 100%;
	margin: 0 auto;
}

/*質問セクションの背景に色を指定*/
.diagnostic-area {
    background-color: aliceblue;
    padding-bottom: 100px;
}

.start-img,
.result-img {
	width: 100%;
}

/*質問ひとつづつのセクション*/
.question-field {
    position: relative;
    margin: 100px auto;
    padding: 30px 50px 50px;
    height: 350px;
    max-width: 900px;
    /* box-sizing: border-box; */
    /* border: solid 3px #f00; */
    /* border-radius: 10px; */
    background-color: #fff;
    background: url(../img/question-back.jpg) no-repeat center;
}

/*質問セクションタイトル*/
.question-title {
    color: #1F6AD2;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

/*質問番号のアイコン部分（元々の枠線に重なるデザインに合わせて作ってしまってます）*/
.question-number {
    display: block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FF304F;
    margin: 20px auto;
    text-align: center;
    line-height: 60px;
    color: #fff;
}

.q-number-icon {
	width: 100%;
}

.q-icon {
	display: block;
    width: 70%;
    margin: 10px auto;
}

/*回答選択肢を囲うボックス　flexで横並び*/
.question-field__question-box {
    display: flex;
    justify-content: space-evenly;
    margin-top: 20px;
}

/*質問の一つ一つです。　aタグを使っていないので
ホバーエフェクトや、カーソルの指定はこのliに対してつける感じです
*/
.question-field__question-box li {
    border: solid 2px #C9C9C9;
    width: 140px;
    color: #1F6AD2;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    box-shadow: 2px 2px 4px 0 #d8d8d8;
    position: relative;
    padding: 5px;
    cursor: pointer;
}

.question-field__question-box li:before {
    content: "";
    top: -1px;
    left: -1px;
    border-bottom: 3.5em solid transparent;
    border-left: 3.5em solid #1F6AD2; /* ラベルの色はここで変更 */
    position: absolute;
    z-index: 100;
}

.question-field__question-box li:after {
    display: block;
    top: 5px;
    transform: rotate(-45deg);
    color: #fff; /* 文字色はここで変更 */
    left: 0;
    position: absolute;
    z-index: 101;
}

.question-field__question-box li:hover {
    border: solid 2px #1F6AD2;
}

/*選択された質問にはactiveクラスが付きます。*/
.question-field__question-box li.active {
	border: solid 2px #1F6AD2;
}

/*選択されなかった質問には.grayoutクラスが付きます*/
.question-field__question-box li.grayout {
	background-color: #ddd;
	color: #ccc;
	outline: solid 1px #ccc;
}


/*ロード画像のスタイル*/
.loading-img {
	display: block;
	margin: 0 auto;
    padding: 30px 0;
	width: 100px;
	height: auto;
}

/*//////////////////////////////*/
/*結果エリア*/
/*//////////////////////////////*/

.answer-area {
	background-image: url(../img/main-sp-back.jpg);
}

.answer-area-active {
	padding-bottom: 100px;
}

h4.answer-item-title {
    font-size: 30px;
    border-bottom: none !important;
    margin-top: 40px;
    padding: 0 20px;
}

h4.answer-item-title a {
    color: #000;
}

/*結果エリアの囲い*/
.answer-field {
    display: grid;
    width: 1000px;
    margin: 0 auto;
    position: relative;
    background: url(../img/answer-back-top.jpg) center top no-repeat, url(../img/answer-back-bottom.jpg) center bottom no-repeat;
}

.answer-field:before {
    content: "";
    position: absolute;
    background: url(../img/answer-back-side.jpg) center top repeat-y;
    width: 100%;
    left: 0;
    top: 0;
    bottom: 0;
    margin: 13.787% auto 15.146%;
}

/*結果商品の一個一個*/
.answer-item {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-content: space-around;
	flex-direction: column;
	box-sizing: border-box;
    z-index: 1;
}

/*結果商品の最初の一個　つまり一位の商品の外枠*/
.answer-field section:first-of-type {
    grid-row: 1 / 2;
    grid-column: 1 / 3;
}

.answer-field section:first-of-type h4 {
    padding-left: 5rem;
    margin-bottom: 0 !important;
    margin-top: 5rem;
}

.answer-field section:first-of-type .description-box {
    padding: 50px 35px 50px 70px;
}

/*2位の商品の外枠*/
.answer-field section:nth-of-type(2) {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
    text-align: center;
    border-right: 2px solid #1f6ad2;
    margin-left: 50px;
}

/*3位の商品の外枠*/
.answer-field section:nth-of-type(3) {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    text-align: center;
    margin-right: 50px;
}

/*2位3位共通スタイル*/
.answer-field section:nth-of-type(2) .item-catch-copy,
.answer-field section:nth-of-type(3) .item-catch-copy {
    font-size: 17px;
}

.answer-field section:nth-of-type(2),
.answer-field section:nth-of-type(3) {
    margin-bottom: 30px;
    border-top: 2px solid #1f6ad2;
}

.answer-field section:nth-of-type(2) .item-catch-copy, 
.answer-field section:nth-of-type(3) .item-catch-copy {
    padding: 0 50px;
}


/*商品のキャッチコピーにかけるスタイル*/
.item-catch-copy {
	color: #299736;
    font-size: 20px;
    font-weight: bold;
}

/*一位の商品の中身だけに適用するスタイル　商品画像を右にするため*/
.answer-field section:first-of-type .item-inner-flex {
	display: flex;
	flex-direction: row-reverse;
}

.image-box {
    flex-basis: 40%;
	height: 300px;
	align-items: center;
}

.answer-field section:first-of-type .image-box {
	height: auto;
}

.description-box {
    flex-basis: 60%;
}

/*商品img要素に適用するスタイル*/
.item-image {
	max-width: 100%;
}

/*ボタンに共通するスタイル*/
.button-box {
    box-sizing: border-box;
    justify-content: space-around;
    margin: 20px 0;
}

.button-box a:hover {
    box-shadow: 0 0 0 transparent !important;
    top: 3px;
}

.button-a,
.button-b,
.button-c {
	display: inline-block;
    margin: 5px;
}

.button-a a, .button-b a, .button-c a {
    padding: 12px 15px;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    border-radius: 7px !important;
}

/*各ボタンのスタイル*/
span.button-a a {
    border: 3px solid #299736;
    box-shadow: 0 3px 0 #779a46;
    color: #299736;
}

span.button-b a {
    background: linear-gradient(45deg, #f32815 50%, #f64638 51%);
    box-shadow: 0 3px 0 #a72e2d;
    text-align: center;
    color: #fff;
}

span.button-c a {
    background: #1f6ad2;
    box-shadow: 0 3px 0 #002963;
    color: #fff;
}

/*一位以外の商品のディスクリプションを非表示に*/
.answer-field section:not(:first-of-type) .item-description {
	display: none;
}

.recommended-image {
	width: 100%;
}

/*販売価格のスタイル*/
span.item-price-label {
    background: #EAF5EB;
    padding: 5px 10px;
    margin-right: 10px;
    font-size: 13px;
}

span.item-price {
    color: red;
    font-weight: bold;
    font-size: 16px;
}

p.item-price {
    margin: 5px !important;
}

/*もう一度診断する*/
a.rediagnosis:before {
    font-family: 'FontAwesome';
    content: '\f0e2';
    padding: 10px;
}

.rediagnosis-box {
    grid-row: 3 / 4;
    grid-column: 1 / 3;
    text-align: center;
    padding: 10px 0 50px;
}

a.rediagnosis {
    cursor: pointer;
}

/*おすすめコンテンツ部分*/
section.useful-area {
    background-color: #eee;
    padding-bottom: 5rem;

}

.link-box a {
    display: block;
    max-width: 740px;
    margin: 2rem auto 1rem;
}

.useful-box {
    background: url(../img/useful-back.png) no-repeat center;
    height: 1400px;
}

.recommended-box img {
    margin-top: 3rem;
}

.recommended-box-sp {
    display: none;
}

/*//////////////////////////////*/
/*比較表ポップアップエリアのCSSめんどくさいのでそのまま*/
/*//////////////////////////////*/
#comparison {
    background: #FFF;
    border: 1px solid #DDD;
    border-bottom: none;
    bottom: -101px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 40%);
    box-sizing: border-box;
    padding: 30px;
    position: fixed;
    text-align: center;
    width: 1000px;
    z-index: 999;
    right: 0;
    left: 0;
    margin: auto;
}

#comparison span {
    color: #0069D9;
    display: inline-block;
    margin-right: 40px;
}

#comparison a {
    background: #0069D9;
    border-radius: 8px;
    color: #FFF;
    display: inline-block;
    height: 40px;
    line-height: 40px;
    text-align: center;
    width: 165px;
}

#comparison img {
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 10px;
}



@media screen and (max-width: 770px){
    
    .header-section-sp {
        display: block;
        height: auto;
        background-size: cover;
        padding: 5rem 0;
        text-align: center;
        background: url(../img/main-sp-back.jpg)center ;
    }

    .header-section {
        display: none;
    }

    h3.start-title p, 
    .answer-title-box p, 
     h3.contens-area p,
    .answer-field {
        width: 100% !important;
    }

    .question-field,
    .answer-field {
        max-width: 320px;
    }

    /*//////////////////////////////*/
    /*質問エリア*/
    /*//////////////////////////////*/

    .question-title {
        font-size: 16px;
    }

    .question-field {
        height: auto !important;
        background-color: #fff;
        background: url(../img/naviques-top-sp.jpg) center top no-repeat,url(../img/navians-bottom-sp.jpg)center bottom no-repeat,url(../img/navi-line-side-sp.jpg)repeat-y;
        margin: 50px auto;
        background-size: contain;
    }

    .question-number {
        width: 30px;
        height: 30px;
        line-height: 30px;
        margin: 5px auto 10px;
    }

    ul.question-field__question-box {
        flex-wrap: wrap;
    }

    .question-field__question-box li {
        width: 200px;
        font-size: 9px;
        margin: 5px;
    }

    .q-icon {
        width: 50%;
        margin: 5px auto;
    }

    /*//////////////////////////////*/
    /*結果エリア*/
    /*//////////////////////////////*/

    /*結果エリア背景*/
    .answer-field {
        background: none;
    }

    .answer-field:before {
        background: url(../img/navians-top-sp.jpg) center top no-repeat,url(../img/navians-bottom-sp.jpg)center bottom no-repeat,url(../img/navi-line-side-sp.jpg)repeat-y;
    }

    .item-inner-flex {
        display: block !important;
    }

    section.answer-item {
        text-align: center;
    }

    .answer-field section:nth-of-type(2), .answer-field section:nth-of-type(3){
        padding: 0 20px;
    }

    .answer-field section:first-of-type h4, 
    h4.answer-item-title {
        padding-left: 0;
        padding-right: 0;
        font-size: 25px;
    }

    .answer-field section:nth-of-type(2) {
        grid-column: 1/3;
        margin-left: 0;
        border-right: none;
    }

    .answer-field section:nth-of-type(3) {
        grid-row: 3/4;
        grid-column: 1/3;
        margin-right: 0;
    }

    .answer-field section:first-of-type .description-box {
        padding: 10px 15px;
    }

    .answer-title-box h3{
        margin-bottom:  50px;
    }

    /*結果各要素調整*/
    p.item-catch-copy {
        font-size: 16px;
        padding: 0 !important;
    }

    p.item-description {
        font-size: 12px;
    }

    .item-image {
        width: 70%;
    }

    .image-box {
        height: auto;
    }

    /*ボタン各種スタイル*/
    .button-a, .button-b, .button-c {
        margin: 2px;
    }

    .button-a a, .button-b a, .button-c a {
        font-size: 11px;
        padding: 10px 5px;
    }

    .button-box {
        font-size: 13px;
    }

    /*もう一度診断する*/ 
    .rediagnosis-box {
        grid-row: 4 / 5;
        grid-column: 1 / 3;
        margin-bottom: 30px;
        z-index: 1;
    }

    /*おすすめコンテンツ*/ 
    .useful-box {
        max-width: 350px;
        margin: 0 auto;
        height: 1100px;
        background: url(../img/useful-back-sp.png) no-repeat center;
    }

    .recommended-box-sp {
        display: block;
        padding: 0 10px;
    }

    .recommended-box {
        display: none;
    }

    .recommended-box-sp img {
        margin-top: 1rem;
    }

    .link-box {
        padding: 0 30px;
    }

    .link-box img {
        width: 100%;
    }
    
    #comparison {
        width: 100%;
    }
    
    #comparison span {
        display: block;
        margin-right: 0;
    }
    
}