/* =============================================================
 * Skeng Theme - カスタムスタイル
 * 現行サイトのSCSS(style.css)で拾いきれない箇所を補完
 * ============================================================= */


/* -----------------------------------------------------------
 * トップページ：お知らせセクション
 *
 * 元サイトは .base_btn_border を position: absolute で配置するが、
 * 中間画面幅で重なりが発生しやすいため、通常フローに戻す。
 * 高い詳細度でstyle.cssの絶対配置を上書き。
 * ----------------------------------------------------------- */

/* 全画面幅共通：ボタンを通常フローに戻す */
#Frame.page_top .main .top_news .base_btn_border,
.page_top .main .top_news .base_btn_border {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 15px !important;
    display: inline-block !important;
    width: auto !important;
}

/* ::before 疑似要素も非表示（位置ずれの原因） */
#Frame.page_top .main .top_news .base_btn_border::before,
.page_top .main .top_news .base_btn_border::before {
    display: none !important;
}

/* -----------------------------------------------------------
 * 800px〜959px の中間幅でも txt_box / news_box を横並びに
 * ----------------------------------------------------------- */
@media screen and (min-width: 800px) and (max-width: 959.98px) {
    #Frame.page_top .main .top_news,
    .page_top .main .top_news {
        position: relative;
    }
    #Frame.page_top .main .top_news .txt_box,
    .page_top .main .top_news .txt_box {
        float: left;
        width: 200px;
    }
    #Frame.page_top .main .top_news .news_box,
    .page_top .main .top_news .news_box {
        float: left;
        width: calc(100% - 220px);
        min-height: 120px;
        margin-top: 0;
    }
    #Frame.page_top .main .top_news .news_box .txt_date,
    .page_top .main .top_news .news_box .txt_date,
    #Frame.page_top .main .top_news .news_box .ico_category,
    .page_top .main .top_news .news_box .ico_category {
        margin-right: 15px;
    }
    #Frame.page_top .main .top_news .news_box .txt_tl,
    .page_top .main .top_news .news_box .txt_tl {
        display: inline-block;
    }
    #Frame.page_top .main .top_news::after,
    .page_top .main .top_news::after {
        content: "";
        display: block;
        clear: both;
    }
}

/* -----------------------------------------------------------
 * 800px未満（モバイル）：縦積み
 * ----------------------------------------------------------- */
@media screen and (max-width: 799.98px) {
    #Frame.page_top .main .top_news .txt_box,
    .page_top .main .top_news .txt_box {
        margin-bottom: 15px;
    }
    #Frame.page_top .main .top_news .news_box,
    .page_top .main .top_news .news_box {
        clear: both;
    }
}


/* -----------------------------------------------------------
 * お問い合わせフォーム：エラー表示と完了画面
 * ----------------------------------------------------------- */
.cont_liaise .form_error {
    color: #d33;
    font-size: 1.3rem;
    margin-top: 5px;
    margin-bottom: 0;
}
.cont_liaise .form_error_global {
    color: #d33;
    background: #fef0f0;
    border: 1px solid #d33;
    padding: 12px 18px;
    border-radius: 4px;
    margin: 20px 0;
}
.cont_liaise .confirm_btn.btn_disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.cont_liaise .complete_screen {
    text-align: center;
    padding: 40px 20px;
}
.cont_liaise .complete_screen .thanks_message {
    font-size: 1.6rem;
    line-height: 2;
    margin-bottom: 30px;
}
.cont_liaise .complete_screen .thanks_message_sub {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #666;
    background: #f7f7f7;
    padding: 20px;
    border-radius: 4px;
    margin: 20px auto 30px;
    max-width: 600px;
    text-align: left;
}
.cont_liaise .complete_screen .base_btn {
    margin-top: 30px;
    display: inline-block;
}
.cont_liaise .confirm_screen .submit_btn {
    background: #22AC38;
    color: #fff;
    border: 2px solid #22AC38;
    margin-left: 15px;
}
.cont_liaise .confirm_screen .btn_box {
    text-align: center;
    margin-top: 30px;
}


/* -----------------------------------------------------------
 * スクロール時の固定ヘッダー (gNav_min_wrap) の表示制御
 * 本番style.cssにグローバルな display:none !important があり、
 * JSのfadeInでは上書きできないため、is-showクラス + !important で制御。
 * 本番同様、PC幅(960px以上)でのみ表示する。
 * ----------------------------------------------------------- */
@media screen and (min-width: 960px) {
    .gNav_min_wrap {
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    .gNav_min_wrap.is-show {
        display: block !important;
        opacity: 1 !important;
    }
}


/* -----------------------------------------------------------
 * エスケイの技術スライダー(bxSlider)の両端を薄グレー表示
 * 本番サイトと同じ: 中央スライドは鮮明、左右の隣スライドは
 * 画面外まではみ出して見え、薄いグレー(#F5F6F8)のベールがかかる。
 *
 * - bx-viewport を overflow:visible にして隣スライドを表示
 * - fluid_box_inner の ::before/::after を半透明グレーに拡張して隣を覆う
 * - PC幅(960px以上)のみ。横スクロールバーは body で抑止。
 * ----------------------------------------------------------- */
@media screen and (min-width: 960px) {
    /* 隣スライドを画面外まで表示 */
    .page_top .main .top_sk_technology .product_box .bx-viewport {
        overflow: visible !important;
    }
    /* 中央スライド以外（左右の隣）を薄グレーのベールで覆う */
    .page_top .main .top_sk_technology .fluid_box_inner::before,
    .page_top .main .top_sk_technology .fluid_box_inner::after {
        content: "";
        display: block;
        position: absolute;
        top: 50%;
        height: 340px;
        margin-top: -170px;
        width: calc((100vw - 940px) / 2 + 10px);
        background-color: rgba(245, 246, 248, 0.72);
        z-index: 100;
        pointer-events: none;
    }
    .page_top .main .top_sk_technology .fluid_box_inner::before {
        left: calc((100vw - 940px) / -2 - 10px);
    }
    .page_top .main .top_sk_technology .fluid_box_inner::after {
        right: calc((100vw - 940px) / -2 - 10px);
    }
    /* スライダーはみ出しによる横スクロールバーを抑止
     * ※ body に overflow-x:hidden を設定すると overflow-y が
     *   暗黙的に auto になりスクロール不可になるため #Frame に設定 */
    #Frame {
        overflow-x: hidden;
    }
}
