/* 1. 画面全体の横揺れを強制防止 */
      html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
      }

      /* 2. 全ての要素が画面幅を超えないように設定 */
      *, ::before, ::after {
        max-width: 100vw;
        box-sizing: border-box;
      }

      /* 3. Bootstrapのrowによる突き出しを防止 */
      .row {
        margin-right: 0;
        margin-left: 0;
      }

      /* 4. Swiperコンテナの確実なクリッピング */
      .swiper {
        width: 100% !important;
        overflow: hidden !important;
      }

      .hover-shinbi:hover { color: var(--shinbi-blue) !important; text-decoration: underline !important; }
      .hover-zoom { position: relative; }
      .hover-zoom img { transition: transform 0.5s ease; }
      .hover-zoom:hover img { transform: scale(1.1); filter: brightness(0.8); }


      :root { --shinbi-blue: #005599; --mitsui-gray: #707070; }
      body { font-family: 'Noto Sans JP', sans-serif; color: #333; overflow-x: hidden; }
      h1, h2, h3, .serif { font-family: 'Noto Serif JP', serif; }

      /* Navbar */
      .navbar { transition: all 0.5s; padding: 1.5rem 0; background: transparent; }
      .navbar.scrolled { background: rgba(255, 255, 255, 0.98); padding: 0.8rem 0; box-shadow: 0 2px 20px rgba(0,0,0,0.05); }

      /* Hero Swiper (Ken Burns Effect) */
      .hero-swiper { width: 100%; height: 100vh; position: relative; }
      .swiper-slide-active .hero-bg { transform: scale(1.1); }
      .hero-bg {
          width: 100%; height: 100%; background-size: cover; background-position: center;
          transition: transform 10s linear; position: absolute; top: 0; left: 0; z-index: -1;
      }
      .hero-overlay {
          position: absolute; top: 0; left: 0; width: 100%; height: 100%;
          background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
          z-index: 1;
      }
      .hero-content { position: relative; z-index: 2; top: 35%; }

      /* Logo Ticker (Infinite Loop) */
      .logo-ticker .swiper-wrapper { transition-timing-function: linear !important; }
      .logo-item {
          height: 60px; display: flex; align-items: center; justify-content: center;
          filter: grayscale(100%); opacity: 0.5; transition: 0.3s;
      }
      .logo-item:hover { filter: grayscale(0%); opacity: 1; }
      .logo-placeholder { font-weight: bold; color: #ccc; letter-spacing: 0.1em; font-size: 0.8rem; text-align: center;}

      .logo-placeholder img {
        width: 100%;
      }

      /* Domains & Academy */
      .domain-card { border: none; border-top: 1px solid #eee; transition: 0.5s; padding-top: 2rem; }
      .domain-card:hover { border-top-color: var(--shinbi-blue); transform: translateY(-5px); }

      /* Mobile CTA */
      @media (max-width: 767.98px) {
          .cta-mobile-fixed {
              position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1060;
              display: flex; background: white; padding: 10px; box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
          }
          .cta-mobile-fixed .btn { flex: 1; margin: 0 5px; font-size: 0.8rem; border-radius: 50px; }
          body { padding-bottom: 70px; }
      }
        .domain-card { background-size: cover; background-position: center; position: relative; cursor: pointer; transition: transform 0.8s ease; }
        .card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%); z-index: 1; }
        .card-content { position: absolute; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: end; transition: opacity 0.5s ease; opacity: 1; }
        .domain-card p { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; transition-delay: 0.1s;}

        /* Hover Effects (三井物産スタイル) */
        .domain-card:hover { transform: scale(1.03); }
        .domain-card:hover p { opacity: 1; transform: translateY(0); }
        .domain-card:hover .card-content { justify-content: center; text-align: center; background: rgba(0,0,0,0.85); transition: background 0.5s ease; }
        .domain-card:hover .card-overlay { opacity: 0.2; }

        .shinbi-blue { color: #005599; }

    /* ハンバーガーボタンの外枠（視認性向上） */
      .navbar-toggler-custom {
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.9); /* 白背景で確実に浮かせる */
        border: 1px solid #eee;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1060; /* メニューより上に配置 */
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      }

      /* 3本線の基本スタイル */
      .hamburger-icon {
        width: 24px;
        height: 18px;
        position: relative;
      }

      .hamburger-icon span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: #333; /* 線の色 */
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
      }

      /* 線の初期位置 */
      .hamburger-icon span:nth-child(1) { top: 0px; }
      .hamburger-icon span:nth-child(2) { top: 8px; }
      .hamburger-icon span:nth-child(3) { top: 16px; }

      /* 展開時の「×」アニメーション */
      .navbar-toggler-custom.open .hamburger-icon span:nth-child(1) {
        top: 8px;
        transform: rotate(135deg);
      }

      .navbar-toggler-custom.open .hamburger-icon span:nth-child(2) {
        opacity: 0;
        left: -40px;
      }

      .navbar-toggler-custom.open .hamburger-icon span:nth-child(3) {
        top: 8px;
        transform: rotate(-135deg);
      }
    .message-body p { margin-bottom: 1.5rem; }
    .message-img-wrapper { border-radius: 2px; }
    .opacity-05 { opacity: 0.5; font-size: 8rem !important; }
    .leading-tight { line-height: 1.3; }
    .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15) !important; }
    .hover-grayscale:hover { filter: grayscale(100%); transition: 0.8s ease; }
    .hover-shinbi-bg:hover { background-color: #005599 !important; color: white !important; border-color: #005599 !important; }

    /* 追加：トップに戻るボタンの見た目 */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 220px; /* 資料請求ボタンの左側に配置 */
    width: 45px;
    height: 45px;
    background: white;
    color: #333;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1050;
    opacity: 0;           /* 最初は隠す */
    visibility: hidden;
    transition: all 0.4s ease;
}

/* スクロール時に表示されるクラス */
.btn-back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
}

/* モバイル時の位置調整 */
@media (max-width: 767.98px) {
    .btn-back-to-top {
        bottom: 65px; /* モバイル用CTAの上あたり */
        right: 15px;
    }
}


/* --- 修正：カードの構造を安定させる --- */
.domain-card {
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.8s ease;
    width: 100%; /* 横幅いっぱい */
}

/* 03だけ高さがズレるのを防ぐため、コンテントを絶対配置で固定 */
.card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* これで親の正方形（ratio-1x1）いっぱいに広がる */
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* 下揃え */
    padding: 2rem !important; /* 余白を統一 */
    transition: all 0.5s ease;
}

/* ホバー時のテキスト位置を中央にする場合はこれ */
.domain-card:hover .card-content {
    justify-content: center;
    text-align: center;
    background: rgba(0,0,0,0.85);
}

@media (max-width: 767.98px) {
    .hero-content h1,h2 {
        line-height: 1.8 !important; /* 行間を広くする */
        margin-top: 2rem !important;  /* 上の余白 */
        margin-bottom: 2rem !important; /* 下の余白 */
    }

    .hero-content h1,h2 span {
        display: inline-block;
        margin-top: 10px; /* 「進化し続ける〜」の前に少し隙間を作る */
    }
}




/*about.html*/
/* Aboutページ専用の追加スタイル */
.page-header {
    padding: 120px 0 80px;
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); */
}

/* タイムラインのスタイル */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid #eee;
}
.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-marker {
    position: absolute;
    left: -2.45rem;
    top: 0.2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--shinbi-blue);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #eee;
}
.timeline-date {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    color: var(--shinbi-blue);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* 会社概要テーブルのスタイル */
.company-table th {
    width: 30%;
    font-weight: 600;
    color: #555;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #eee;
}
.company-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #eee;
    color: #333;
}
@media (max-width: 767.98px) {
    .company-table th, .company-table td {
        display: block;
        width: 100%;
        padding: 1rem 0;
    }
    .company-table th {
        padding-bottom: 0;
        border-bottom: none;
        font-size: 0.85rem;
        color: var(--mitsui-gray);
    }
}





/* --- Recruit Page Styles --- */

.recruit-header {
    padding: 180px 0 100px;
    background-color: #f0f4f8;
}

.recruit-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=2000'); /* 洗練されたオフィスのイメージ */
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.recruit-img-side {
    background-image: url('img/recruit_img_side.jpg');/* チームミーティングのイメージ */
    background-size: cover;
    background-position: center;
    min-height: 500px;
}

.recruit-list dt {
    font-weight: 700;
    color: var(--shinbi-blue);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.recruit-list dd {
    margin-bottom: 2rem;
    color: #444;
    line-height: 1.8;
}

.recruit-list dd:last-child {
    margin-bottom: 0;
}

/* モバイル対応：募集要項のフォントサイズ調整 */
@media (max-width: 767.98px) {
    .recruit-header {
        padding: 140px 0 60px;
    }
    .recruit-list dt {
        border-left: 3px solid var(--shinbi-blue);
        padding-left: 10px;
    }
    .recruit-list dd {
        padding-left: 13px;
        font-size: 0.95rem;
    }
}

.bg-shinbi-blue {
    background-color: var(--shinbi-blue) !important;
}


/*お問合せ専用css*/


:root { --shinbi-blue: #005599; }
.bg-shinbi-blue { background-color: var(--shinbi-blue) !important; }

.form-control {
    padding: 0.8rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--shinbi-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 85, 153, 0.1);
}

.form-label {
    margin-bottom: 0.5rem;
    color: #444;
}

/* スクロールバーのカスタム（任意） */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

@media (max-width: 768px) {
    .page-header { padding: 120px 0 60px !important; }
    .btn-primary { width: 100%; }
}
