/*
 * Bootstrap 3 → 5 互換スタイル
 * Unify テンプレートの既存クラスを Bootstrap 5 環境で動作させるための補完スタイル
 */

/* ===== スムーズスクロール ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Bootstrap 3 互換クラス ===== */
.pull-right { float: right !important; }
.pull-left  { float: left  !important; }
.hidden     { display: none !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.text-left  { text-align: left  !important; }
.text-right { text-align: right !important; }

/* ===== img-responsive 互換 ===== */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Bootstrap 3 Carousel → Bootstrap 5 互換 ===== */
.carousel-control-prev.left,
.carousel-control-next.right {
    background-image: none;
}
.carousel-arrow a.carousel-control {
    background-image: none;
    opacity: 0.7;
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.carousel-arrow a.left  { left:  5px; }
.carousel-arrow a.right { right: 5px; }


/* =====================================================
   Header v6 / Bootstrap 5 navbar 互換
   ===================================================== */

/*
 * Bootstrap 5 の .navbar は display:flex (row方向) になる。
 * header-v6 は greenline（上部緑帯）＋ nav行の2段構成なので
 * column方向に積み替える。
 */
.header-v6 .navbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* greenline内の container をflexにしてTELを右寄せ */
.header-v6 .greenline .container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
}
.header-v6 .greenline .pull-right {
    float: none !important;
}

/* greenline直下のclear-bothは非表示 */
.header-v6 .clear-both {
    display: none;
}

/* ロゴ＋ナビ行の container をflexにする */
.header-v6 .navbar > .container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* menu-container（toggle＋brand）を横並びに */
.header-v6 .menu-container {
    display: flex;
    align-items: center;
}


/* ===== PC (992px以上) ===== */
@media (min-width: 992px) {
    .header-v6 .container {
        max-width: 1170px;
    }

    .header-v6 .navbar-brand {
        padding: 15px !important;
        margin-left: -15px;
        margin-right: 0;
    }

    /* ナビ collapse を常時表示 */
    .header-v6 .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        justify-content: flex-end;
        align-items: center;
    }

    /* ナビメニューを横並びに */
    .header-v6 .navbar-nav {
        flex-direction: row !important;
        float: none !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* ナビ各リンクのパディング＋縦中央揃え */
    .header-v6 .navbar-nav > li > a {
        padding: 15px !important;
        display: block;
        line-height: 54px;
    }

    /* ハンバーガーボタンは PC で非表示 */
    .header-v6 .navbar-toggler {
        display: none !important;
    }
}


/* ===== タブレット・スマホ (991px以下) ===== */
@media (max-width: 991px) {
    .header-v6 .navbar > .container {
        display: block !important;
        width: inherit;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .header-v6 .menu-container {
        display: block;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* ハンバーガーボタンの見た目 */
    .header-v6 .navbar-toggler {
        display: block !important;
        position: relative;
        float: right;
        padding: 9px 10px;
        margin: 31px 0 31px 15px;
        border: none !important;
        border-radius: 0;
        background: transparent;
        box-shadow: none !important;
        outline: none;
        cursor: pointer;
        line-height: 20px;
    }
    .header-v6 .navbar-toggler:hover,
    .header-v6 .navbar-toggler:focus {
        background: inherit;
        box-shadow: none !important;
        outline: none;
    }
    .header-v6 .navbar-toggler .icon-bar {
        width: 20px;
        height: 1px;
        margin: 0 0 5px;
        background: #555;
    }
    .header-v6 .navbar-toggler .icon-bar:last-child {
        margin-bottom: 0;
    }

    .header-v6 .navbar-brand {
        float: left;
        height: 93px !important;
        max-height: 93px !important;
        line-height: 65px !important;
        padding: 20px 15px 15px !important;
        margin: 0 !important;
    }
    .header-v6 .navbar-brand img {
        transform: translateY(-1px);
    }

    /* ナビ collapse の開閉 */
    .header-v6 .navbar-collapse:not(.show) {
        display: none !important;
    }
    .header-v6 .navbar-collapse.show {
        display: block !important;
        width: 100%;
        overflow-y: auto !important;
        border-color: #eee;
        border-top: none;
        border-bottom: 1px solid #eee;
    }

    /* ナビメニューを縦並び */
    .header-v6 .navbar-nav {
        display: block;
        padding: 0;
        min-height: 349px;
        margin: 0 0 5px;
        float: none !important;
        background: #fff;
    }
    .header-v6 .navbar-nav > li {
        float: none;
    }
    .header-v6 .navbar-nav > li > a {
        color: #444 !important;
        font-size: 14px;
        padding: 12px 5px !important;
        line-height: 20px !important;
        border-top: 1px solid #eee;
        border-bottom: none;
        display: block;
    }
    .header-v6 .navbar-nav > li:first-child > a {
        border-top-color: transparent;
    }
    .header-v6 .navbar-nav > .active > a,
    .header-v6 .navbar-nav > .active > a:hover,
    .header-v6 .navbar-nav > .active > a:focus {
        background: inherit;
        color: #72c02c !important;
    }

    /* ナビが開いた時に container 下に展開 */
    .header-v6 .navbar-collapse {
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .header-v6 .navbar-brand {
        margin-left: -15px !important;
    }
}

@media (max-width: 767px) {
    .header-v6 .navbar-collapse.show {
        border-top: 1px solid #eee;
    }
}


/* ===== Hero Swiper (Master Slider 代替) ===== */
.ms-layers-template {
    width: 100%;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 600px;
    position: relative;
}

.hero-swiper .swiper-slide {
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    position: relative;
}

/* hero-content: Master Sliderと同じ1024px基準で中央寄せ */
.hero-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: 1024px;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .hero-content {
        top: 140px;
        transform: translateX(-50%);
    }
    .hero-content .ms-promo-sub {
        margin-top: 25px;
    }
    .hero-content > .animate__animated:last-child {
        margin-top: 75px !important;
    }
}

/* hero テキストスタイル */
.ms-promo-info {
    display: block;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(255,255,255,0.8);
}
.ms-promo-sub p {
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.7);
}

/* Swiper ナビゲーション */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    color: #fff;
}
.hero-swiper .swiper-pagination-bullet-active {
    background: #72c02c;
}


/* ===== タブレット (768px〜991px) ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-swiper {
        height: 480px;
    }
    .hero-content {
        left: 0;
        margin-left: 0;
        transform: translateY(-50%);
        max-width: 65%;
        padding-left: 30px;
    }
    .ms-promo-info[style*="font-size:44px"] {
        font-size: 32px !important;
    }
    .ms-promo-info[style*="font-size:28px"] {
        font-size: 20px !important;
    }
}


/* ===== スマホ (767px以下) ===== */
@media (max-width: 767px) {
    .hero-swiper {
        height: auto;
        min-height: 420px;
    }
    .hero-swiper .swiper-slide {
        background-position: 70% center;
        background-size: cover;
    }
    .hero-content {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-left: 0;
        max-width: 100%;
        padding: 20px 15px;
        background: rgba(255,255,255,0.65);
    }
    .ms-promo-info {
        font-size: 18px !important;
        text-shadow: none;
    }
    .ms-promo-info[style*="font-size:44px"],
    .ms-promo-info[style*="font-size:28px"] {
        font-size: inherit !important;
    }
    .ms-promo-info[style*="font-size:44px"] {
        font-size: 26px !important;
    }
    .ms-promo-info[style*="font-size:28px"] {
        font-size: 16px !important;
    }
    .ms-promo-sub {
        font-size: 13px !important;
    }
}


/* ===== Case Swiper (Owl Carousel 代替) ===== */
.case-swiper {
    width: 100%;
    padding-bottom: 40px;
}
.case-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.case-swiper .swiper-pagination-bullet-active {
    background: #72c02c;
}


/* ===== Media ロゴ Swiper (Owl Carousel 代替) ===== */
.media-swiper {
    width: 100%;
    padding-bottom: 10px;
}
.media-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-swiper .swiper-slide img {
    max-width: 100%;
    height: auto;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.media-swiper .swiper-slide img:hover {
    opacity: 1;
}


/* ===== Navbar Toggle 互換 ===== */
.navbar-toggler .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    background-color: #888;
    margin: 4px 0;
}
