/* Theme Name: Cocoon Child */
/* Template: cocoon */
@import url("../cocoon/style.css");

/* ハンバーガーはみ出し緊急補正 */
@media screen and (max-width: 782px) {
  #top-head #nav-toggle {
    position: static !important;
    right: auto !important;
    top: auto !important;
    margin-left: auto !important;
  }
}

/* ハンバーガーアイコン位置補正（右はみ出し解消・天地中央揃え） */
@media screen and (max-width: 782px) {
    .home #top-head .inner,
    #top-head .inner,
    .home #top-head #mobile-head,
    #top-head #mobile-head {
        position: relative !important;
        overflow: visible !important;
    }

    .home #top-head #nav-toggle,
    #top-head #nav-toggle,
    #nav-toggle {
        position: absolute !important;
        top: 50% !important;
        right: 15px !important;
        left: auto !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        z-index: 10000000 !important;
    }
}

/* ハンバーガーアイコン 位置微調整（右はみ出し解消 ＆ 上下位置固定） */
@media screen and (max-width: 782px) {
    .home #top-head #nav-toggle,
    #top-head #nav-toggle,
    #nav-toggle {
        top: 8px !important;
        right: 24px !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
    }
}

        bottom: auto !important;
        left: auto !important;
        transform: none !important;
    }
}

    }
}

/* ===================================================
   スクロール白透過時：ロゴカラー変更（#004890）
   =================================================== */
/* PC表示 */
.home #top-head.fixed .logo,
.home #top-head.fixed .logo a,
.home #top-head.fixed #logolink,
#top-head.fixed .logo,
#top-head.fixed .logo a,
#top-head.fixed #logolink {
    color: #004890 !important;
}

/* スマホ表示 */
@media screen and (max-width: 782px) {
    .home #top-head.fixed:not(.open) .logo,
    .home #top-head.fixed:not(.open) #logolink,
    .home #top-head.fixed:not(.open) .logo a,
    #top-head.fixed:not(.open) .logo,
    #top-head.fixed:not(.open) #logolink,
    #top-head.fixed:not(.open) .logo a {
        color: #004890 !important;
    }
}

/* ===================================================
   白透過時（.fixed）のロゴカラー強制上書き（#004890）
   =================================================== */
#top-head.fixed #mobile-head h1,
#top-head.fixed #mobile-head h1 a,
#top-head.fixed #mobile-head a#logolink,
#top-head.fixed #mobile-head a.logo,
.home #top-head.fixed #mobile-head h1,
.home #top-head.fixed #mobile-head h1 a,
.home #top-head.fixed #mobile-head a#logolink,
.home #top-head.fixed #mobile-head a.logo {
    color: #004890 !important;
}

/* ===================================================
   Header Fixed (新規作成・完全版)
   =================================================== */
#top-head {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

/* スクロール時の変化（PC・スマホ共通） */
#top-head.fixed {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

#top-head.fixed .logo,
#top-head.fixed .logo a {
    color: #043D78 !important;
}

#top-head.fixed #global-nav ul li a {
    color: #333333 !important;
}

#top-head.fixed #global-nav ul li a:hover {
    color: #0062B8 !important;
}

/* ===================================================

/* ===================================================
   Parallax Background & Fixed Hero Content (スマホ完全対応版)
   =================================================== */

/* 1. Cocoonデフォルトの余白・背景リセット */
.parallax-bg,
div.parallax-bg,
.entry-content > .parallax-bg,
.entry-content > div.parallax-bg {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. 最上部スライドショーを z-index: 50 で最前面化 */
.home .slideshow,
.slideshow,
.slideshow-inner,
.main-content:first-child,
.entry-content > .slideshow {
    position: relative !important;
    z-index: 50 !important;
    background-color: #000000 !important;
}

/* 3. 背景固定画像エリア（枠組みのみ透明で確保） */
div.parallax-bg,
.parallax-bg {
    position: relative !important;
    height: 100vh !important;
    min-height: 650px !important;
    background: transparent !important;
    z-index: 1 !important;
}

/* 最背面に画像を position: fixed で完全固定配置（z-index: -2） */
div.parallax-bg::after,
.parallax-bg::after {
    content: "" !important;
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-image: url('images/back05.jpg') !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    z-index: -2 !important;
    pointer-events: none !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
}

/* 白半透明オーバーレイ（z-index: -1） */
div.parallax-bg::before,
.parallax-bg::before {
    content: "" !important;
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(255, 255, 255, 0.35) !important;
    background-image: url('images/bg_trans.png') !important;
    z-index: -1 !important;
    pointer-events: none !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
}

/* 4. PC見出し固定表示（z-index: 2） */
.comment,
.parallax-bg .comment,
p.comment {
    position: fixed !important;
    top: 220px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 90% !important;
    max-width: 1100px !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-align: center !important;
    line-height: 1.5 !important;
    letter-spacing: 0.05em !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 0, 0, 0.5) !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

/* 5. PC本文固定表示（z-index: 2） */
.comsmall,
.parallax-bg .comsmall,
p.comsmall {
    position: fixed !important;
    top: 275px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 90% !important;
    max-width: 900px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    text-align: center !important;
    line-height: 1.6 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 0, 0, 0.5) !important;
    z-index: 2 !important;
}

/* 6. PCボタン固定表示（z-index: 2） */
.btn02,
.parallax-bg .btn02 {
    position: fixed !important;
    top: 335px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    display: table !important;
    text-align: center !important;
    z-index: 2 !important;
}

/* 7. スクロールで上にかぶさる下部セクション群 */
.scrollbox1,
.scrollbox2,
#service,
#news,
#company,
#recruit,
#contact {
    position: relative !important;
    z-index: 60 !important;
    background-color: #ffffff !important;
}

.scrollbox1 {
    box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.2) !important;
}

/* 8. モーダル固定配置保護 ＆ PC用オフセット */
.rec-modal-overlay,
.svc-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999999 !important;
}

/* PC：上部にゆとり（120px） */
.svc-modal-overlay {
    padding-top: 120px !important;
    padding-bottom: 60px !important;
    box-sizing: border-box !important;
}

.svc-item-box {
    scroll-margin-top: 120px !important;
}

.rec-modal-overlay:not(.is-active) {
    display: none !important;
}
.rec-modal-overlay.is-active {
    display: block !important;
}

/* 9. Serviceセクション ＆ VIEW ALL SERVICES ボタン */
#service,
#service.scrollbox2,
.service-outer-wrap,
.service-section-wrap,
#service-section-wrap {
    text-align: center !important;
    overflow: visible !important;
    padding-bottom: 20px !important;
    margin-bottom: 0 !important;
}

.service-ticker-container {
    height: auto !important;
    margin: 0 auto 0 auto !important;
    text-align: center !important;
    position: relative !important;
    display: block !important;
}

.service-ticker-track {
    height: 400px !important;
    margin-bottom: 0 !important;
}

#serviceModalOpenBtn,
div#serviceModalOpenBtn.service-thumb-trigger,
.service-thumb-trigger {
    position: relative !important;
    display: inline-flex !important;
    margin: 24px auto 10px auto !important;
    width: fit-content !important;
    min-width: 220px !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    clear: both !important;
    float: none !important;
    z-index: 999999 !important;
}

/* 10. スマホ表示時（782px以下） */
@media screen and (max-width: 782px) {
    div.parallax-bg,
    .parallax-bg {
        min-height: 520px !important;
    }

    div.parallax-bg::after,
    .parallax-bg::after {
        background-position: center top !important;
    }

    /* スマホ実機のモーダル位置を引き上げ（下がりすぎ解消） */
    .svc-modal-overlay {
        padding-top: 55px !important;
        padding-bottom: 30px !important;
    }

    .svc-item-box {
        scroll-margin-top: 55px !important;
    }

    .comment,
    .parallax-bg .comment,
    p.comment {
        font-size: 18px !important;
        font-weight: 600 !important;
        width: 72% !important;
        text-align: left !important;
        left: 14% !important;
        right: auto !important;
        margin: 0 !important;
        top: 170px !important;
    }

    .comsmall,
    .parallax-bg .comsmall,
    p.comsmall {
        font-size: 14px !important;
        font-weight: 500 !important;
        width: 72% !important;
        text-align: left !important;
        left: 14% !important;
        right: auto !important;
        margin: 0 !important;
        top: 220px !important;
    }

    .btn02,
    .parallax-bg .btn02 {
        left: 14% !important;
        right: auto !important;
        margin: 0 !important;
        top: 290px !important;
    }

    .home .slideshow .slide .slide-content,
    .slideshow .slide .slide-content,
    .slideshow .slide .caption,
    .slideshow .slide .text,
    .slideshow .slide .text p,
    .slideshow .slide .small,
    .slideshow .slide .small p,
    .slideshow .slide .caption .text p.valuemidashi,
    .slideshow .slide .caption .text p.small {
        text-align: center !important;
    }

    #service,
    #service.scrollbox2 {
        padding-bottom: 10px !important;
    }

    .service-ticker-container {
        height: auto !important;
        margin: 0 auto 0 auto !important;
    }

    .service-ticker-track {
        height: 385px !important;
        margin-bottom: 0 !important;
    }

    #serviceModalOpenBtn,
    div#serviceModalOpenBtn.service-thumb-trigger,
    .service-thumb-trigger {
        margin: 16px auto 10px auto !important;
        padding: 8px 24px !important;
    }
}
