:root { 
  --background-color: #ffffff;
  --default-color: #444444;
  --heading-color: #111111;
  --accent-color: #1bbd36;
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
  --tittle-color: #01ABE1;
  --default-font: 'Arial', sans-serif; /* フォントファミリーを追加 */
  --heading-font: 'Helvetica', sans-serif; /* フォントファミリーを追加 */
}


/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
    color: var(--default-color);
    background-color: var(--background-color); /* 修正 */
    font-family: var(--default-font);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: var(--accent-color); /* color-mixを削除し、直接色を指定 */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-family: var(--heading-font);
}


/*--------------------------------------------------------------
# Navbar
--------------------------------------------------------------*/
  
  .logo {
    margin-right: 20px; /* テキストとの間にスペースを追加 */
    
  }


  @media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column; /* 縦に並べる */
        align-items: flex-start; /* 左揃え */
    }

    .nav-item {
        margin-right: 0; /* 右側のマージンをリセット */
        margin-bottom: 5px; /* 下側のマージンを追加 */
    }
}


.nav-item {
    margin-right: 20px; /* アイテム間のスペースを調整 */
}

.navbar-brand {
    margin-right: 20%; /* ブランド名の右側にスペースを追加 */
    align-items: center; /* 垂直方向の中央揃え */
    justify-content: center; /* 水平方向の中央揃え */
    font-size: 20px;
}

/*------------ Nav decoration ------------------*/

/* Homeリンクの文字色を変更 */
.navbar-nav .nav-link.active {
  color: 	#01ABE1; /* 青色 - Bootstrapのプライマリーカラー */
  font-weight: bold; /* 太字にして目立たせる */
}

/* ドロップダウンメニューの背景色を変更 */
.dropdown-menu {
  background-color: #f8f9fa; /* 薄いグレー */
  border-radius: 8px; /* 角を少し丸くする */
  border: 1px solid #dee2e6; /* 境界線を追加 */
}

/* ドロップダウンアイテムのホバー効果を強化 */
.dropdown-item:hover {
  background-color: #e9ecef; /* ホバー時は少し濃い色に */
}

/* オプション: ドロップダウンに影をつけて立体感を出す */
.dropdown-menu {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Homeリンクの文字色を変更 */
.navbar-nav .nav-link.active {
  color: #01ABE1; /* 青色 - Bootstrapのプライマリーカラー */
  font-weight: bold; /* 太字にして目立たせる */
}

/* Home以外のナビリンクにホバーで下線を表示 */
.navbar-nav .nav-link:not(.active):hover {
  text-decoration: underline;
  text-underline-offset: 8px; /* 下線とテキストの間隔を調整 */
  text-decoration-color:  var(--tittle-color);
  
}

/* ドロップダウンメニューの背景色を変更 */
.dropdown-menu {
  background-color: #f8f9fa; /* 薄いグレー */
  border-radius: 8px; /* 角を少し丸くする */
  border: 1px solid #dee2e6; /* 境界線を追加 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 影をつけて立体感を出す */
  margin-top: 0; /* マージンを0に設定して隙間をなくす */
  display: none; /* 初期状態では非表示 */
}

/* ドロップダウンアイテムのホバー効果を強化 */
.dropdown-item:hover {
  background-color: #e9ecef; /* ホバー時は少し濃い色に */
}

/* ホバーでドロップダウンメニューを表示 - CSSのみ */
.navbar-nav .nav-item.dropdown:hover .dropdown-menu {
  display: block; /* ホバー時に表示 */
}

/* オプション: ドロップダウンの移行をスムーズにする */
.dropdown-menu {
  transition: all 0.2s ease-in-out;
}

/* ドロップダウンが開いている時（ホバー時）も親リンクに下線を表示したままにする */
.navbar-nav .nav-item.dropdown:hover > .nav-link {
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-color:  var(--tittle-color);
}




/*--------------------------------------------------------------
# Carousel
--------------------------------------------------------------*/

/* Carousel全体の設定 */
.carousel {
  position: relative;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 500px; /* 固定高さ */
  overflow: hidden;
  background-color: #222; /* 暗いグレーで自然な背景 */
}

/* Carousel アイテムの基本設定 */
.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out; /* 少し長めの遷移時間 */
  background-color: transparent; /* 背景色を透明に */
}

.carousel-item.active {
  opacity: 1;
  z-index: 2; /* アクティブなアイテムを前面に */
}

/* 次/前のアイテムも表示状態にして重なりを作る */
.carousel-item-next,
.carousel-item-prev {
  opacity: 0;
  z-index: 1;
}

.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-start {
  opacity: 1;
}

/* 画像の設定 */
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* 画像読み込み時の背景 */
  background-color: #333;
}

/* フィルター効果 */
.carousel-item.filter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* 半透明の黒オーバーレイ */
  z-index: 1;
}

/* キャプションの設定 */
.carousel-caption {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 800px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  z-index: 3; /* フィルターより前面に */
}

.carousel-caption h5 {
  font-size: clamp(1.2rem, 4vw, 2.8rem);
  color: #01ABE1;
  margin-bottom: 10px;
  line-height: 1.2;
}

.carousel-caption p {
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  color: #ffffff;
  margin-bottom: 0;
  line-height: 1.4;
}

/* レスポンシブ設定 */
@media (max-width: 480px) {
  .carousel-inner {
    height: 300px;
  }
  
  .carousel-caption {
    width: 95%;
    padding: 15px;
    top: 50%;
  }
  
  .carousel-caption h5 {
    margin-bottom: 5px;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .carousel-inner {
    height: 400px;
  }
  
  .carousel-caption {
    width: 85%;
    padding: 18px;
    top: 55%;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .carousel-inner {
    height: 450px;
  }
  
  .carousel-caption {
    width: 80%;
    padding: 20px;
  }
}

@media (min-width: 992px) {
  .carousel-inner {
    height: 500px;
  }
  
  .carousel-caption {
    width: 70%;
    padding: 25px;
  }
}

/* コントロールボタン */
.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15%;
  padding: 0;
  color: #fff;
  text-align: center;
  background: 0 0;
  border: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 0.9;
}


/* 表示位置 */
.carousel-item:first-child img {
  object-position: center 20%; /* 1枚目は上寄せ */
}

.carousel-item:nth-child(2) img {
  object-position: center 90%; /* 2枚目は中央やや上 */
}

.carousel-item:nth-child(3) img {
  object-position: center 50%; /* 3枚目は上から25% */
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
  .carousel-item img {
    object-position: center 35%; /* モバイルでの調整 */
  }
}



/*--------------------------------------------------------------
# main visual
--------------------------------------------------------------*/
.hero {
    height: 400px; /* ビューポートの高さに合わせる */
  
    background-position: center;
    background-repeat: no-repeat; /* 画像の繰り返しを無効に */
    background-size: cover; /* 画像を要素全体に合わせて表示 */
    position: relative;
    z-index: 2;
}

 /* Header images */
.page-well .hero {
    background-image: url("/img/well/wellcam_bg.jpg"); 
}

.page-rscope .hero {
    background-image: url("/img/rscope/rscope_banner.png"); 
}

.page-sw2 .hero {
    background-image: url("/img/sw2/sw000_bg.jpg"); 
}

.page-mail .hero {
    background-image: url("/img/top_mail.png"); 
    background-position: center 34%; /* 上から75%の位置（下寄せ） */
    background-repeat: no-repeat;
    background-size: cover;
       background-attachment: scroll; /* スクロール時の動作 */
}


/* モバイルでの調整 */
@media (max-width: 768px) {
    .page-mail .hero {
        background-position: center 30%; /* モバイルでは上寄せ */
    }
}

/* タブレットでの調整 */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-mail .hero {
        background-position: center 45%; /* タブレットでは少し上寄せ */
    }
}



.hero h1, .hero p {
    margin: 100px; /* マージンをリセット */
}

.hero h1 {color: var(--tittle-color); }/* color-mixを削除し、直接色を指定 */

.hero p { font-size: 2rem;}

.hero::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 400px; /* ビューポートの高さに合わせる */
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7); /* オーバーレイの色 */
    opacity: .2; /*どれくらい暗くするかを設定する数値。低いほど暗い*/
    z-index: -1; /* 背景の下に配置 */
}



/*--------------------------------------------------------------
# main contents
--------------------------------------------------------------*/
.main-contents .container .row {
	padding-bottom: 0px!important;
	border-bottom: none!important;
}

.main-contents {
	margin-top: 50px;
}

.main-contents .container .row {
	border-bottom: 1px solid #eee;
	padding-bottom: 60px;
}

.main-contents img {
	width: 100%;	
    margin-bottom: 20px;
	overflow: hidden;
}


.main-contents h3 {
	font-size: 20px;
	color: #01ABE1;
	margin-top: 10px;
	margin-bottom: 20px;
}

.main-contents h4 {
	font-size: 20px;
	color: #01ABE1;
	margin-bottom: 20px;
	margin-top: 20px;
}

.main-contents h5 {
	font-size: 17px;
	color: #01ABE1;
	margin-bottom: 20px;
}
.main-contents ul.featured-list li {
	display: block;
	margin-top: 10px;
	margin-bottom: 10px;

}

.main-contents p {
	font-size: 100%;
		margin-bottom: 10px;
}

.main-contents ul.featured-list li a {
	font-size: 14px;
	color: #4a4a4a;
	font-weight: 300;
	transition: all .3s;
	position: relative;
	padding-left: 13px;
}

.main-contents ul.featured-list li a:before {
	content: '';
	width: 5px;
	height: 5px;
	display: inline-block;
	background-color: #4a4a4a;
	position: absolute;
	left: 0;
	transition: all .3s;
	top: 8px;
}

.main-contents ul.featured-list li a:hover {
	color: #f33f3f;
}

.main-contents ul.featured-list li a:hover::before {
	background-color: #f33f3f;
}

.main-contents .filled-button {
	margin-top: 20px;
}

.main-contents li {
   margin-top: 5px;
   padding-left: 15px;
}

.section-heading {
	text-align: left;
	margin-bottom: 40px;
	border-bottom: 1px solid #eee;
}

.section-heading h2 {
	font-size: 22px;
	font-weight: 400;
	color: #1e1e1e;
	margin-bottom: 15px;
}

.main-contents ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

/*--------------------------------------------------------------
# what's new
--------------------------------------------------------------*/

.new h2 {
    font-size: 2rem;
    margin: 10px 0;
    padding-left: 20px;
  }

.new i img {
  filter: invert(44%) sepia(93%) saturate(2578%) hue-rotate(165deg) brightness(99%) contrast(102%);
  padding-right: 5px;
}

.new .new-img {
    min-height: 400px;
    position: relative;
}
  
  @media (min-width: 992px) {
    .new .new-img {
      position: absolute;
      top: 0;
      right: 0;
      min-height: 500px;
    }
  }
  
  .new .new-img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
  }


  .new .whatnew {
    padding: 40px;
    background-color: color-mix(in srgb, var(--default-color), transparent 96%);
  }
  
  @media (min-width: 991px) {
    .new .whatnew {
      padding-right: 35%;
    }
  }
  
 .new ul {
    list-style: none;
    padding: 0;
    font-size: 18px;
  }
  
  .new ul li {
    padding: 10px 0;
    display: flex;
    align-items: center;
  }
  
  .new ul i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    line-height: 1.5;
    color: var(--heading-color);
  }

.new a {
    color: var(--tittle-color);
    text-decoration: none;
    transition: 0.3s;
}

.new a:hover {
    color: var(--heading-color);
    text-underline-offset: 8px;
    text-decoration: underline; /* 下線を追加 */
    text-decoration-color: var(--tittle-color);
}


/*--------------------------------------------------------------
# About Section
--------------------------------------------------------------*/
.about h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 10px 0;
  }
  
.about h3 {
    font-size: 1.6rem;
    margin: 10px 0;
    padding-left: 20px;
  }

  @media (min-width: 991px) {
    .about .inner-title {
      max-width: 65%;
      margin: 0 0 80px 0;
    }
  }
  
 
  .about .our-story h4 {
    text-transform: uppercase;
    font-size: 1.1rem;
    color: color-mix(in srgb, var(--default-color), transparent 50%);
  }
  
  .about .our-story h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
  }
  
  .about .our-story p:last-child {
    margin-bottom: 0;
  }
  
    
  .about .watch-video i {
    font-size: 2rem;
    transition: 0.3s;
    color: var(--accent-color);
  }
  
  .about .watch-video a {
    font-weight: 600;
    color: color-mix(in srgb, var(--default-color), transparent 20%);
    margin-left: 8px;
    transition: 0.3s;
  }
  
  .about .watch-video:hover a {
    color: var(--accent-color);
  }
  
/*--------------------------------------------------------------
# Section
--------------------------------------------------------------*/
.section{
    position: relative;
    overflow: hidden;
    padding-top: 50px;
    padding-bottom: 90px;
    margin-bottom: 60px;
}

.section-title {
  text-align: center;
  padding-bottom: 30px;
  position: relative;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  padding-bottom: 20px;
  position: relative;
}

.section-title h2:after {
  content: "";
  position: absolute;
  display: block;
  width: 100px;
  height: 3px;
  background: var(--tittle-color);
  left: 0;
  right: 0; 
  bottom: 0;
  margin: auto;
}



/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/

footer h5 {
    color: var(--surface-color);
    font-size: 15px;
}


footer a,
footer a:focus {
    color: var(--surface-color);
    padding: 5px 15px;
    font-size: 14px;
    font-family: var(--nav-font);
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: 0.3s;
}


footer li:hover>a,
footer .active,
footer .active:focus {
  color: var(--tittle-color);
}



/*--------------------------------------------------------------
# Card 
--------------------------------------------------------------*/
.card {
  position: relative;
  overflow: hidden; /* 画像がはみ出さないようにする */
	max-height: 600px;
  margin-bottom: 50px;
}

.card-img {
  width: 100%; /* 幅を100%に設定 */
  height: auto; /* 高さを自動調整 */
  min-height: 300px; /* 最小高さを設定（必要に応じて調整） */
  object-fit: cover; /* 画像を覆うように表示 */
}

.card-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white; /* 文字色 */
  background: rgba(0, 0, 0, 0.5); /* 背景の透明度 */
}

.card-title-custom {
  position: absolute;
	top: 50%;
	transform: translateY(-50%);
	text-align: center;
	width: 100%;
}

.card-title-custom h4 {
	color:  #f5c500;
	font-size: 22px;
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 15px;
}

.card-text-custom {
  position: absolute;
  margin-top: 200px; /* 文字を上から20px下げる */
  font-size: 40px; /* ここは問題ない */
}
