/* ========================
   リセット・基本設定
   ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'M PLUS 1p', 'Roboto', 'Arial', 'sans-serif';
  color: #333;
  background-color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ========================
   ヘッダー・ナビゲーション
   ======================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  position: relative;
}

/* ロゴ */
.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  height: 50px;
  transition: all 0.3s ease;
}

.header.scrolled .logo {
  /* スクロール時も元の色を維持 */
}

/* ナビゲーション */
.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: rgb(10, 10, 12);
  text-decoration: none;
  padding: 15px 20px;
  font-weight: 500;
  font-size: 0.95em;
  transition: all 0.3s ease;
  position: relative;
  display: block;
  letter-spacing: 0.5px;
}

.header.scrolled .nav-link {
  color: #2c3e50;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3498db, #1462b1);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link:hover {
  color: #3498db;
  transform: translateY(-2px);
}

/* ドロップダウンメニュー */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  min-width: 200px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(66, 78, 146, 0.904);
  padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  color: #2c3e50;
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
  border-radius: 5px;
  margin: 0 10px;
}

.dropdown-menu a:hover {
  background: linear-gradient(135deg, #3498db, #1462b1);
  color: rgb(255, 255, 255);
  transform: translateX(5px);
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background: rgb(2, 2, 2);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.header.scrolled .hamburger-line {
  background: #2c3e50;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* スマホサイズ用スタイル */
@media (max-width: 768px) {
  .header-container {
    padding: 10px 0;
  }
  
  .logo {
    height: 40px;
  }

  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    padding-top: 70px;
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 20px;
  }

  .nav-link {
    color: #2c3e50;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 1rem;
    width: 100%;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover {
    transform: none;
    background: rgba(0, 0, 0, 0.05);
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 15px;
    display: none; /* ドロップダウンはデフォルトで非表示 */
  }
  
  .dropdown.open > .dropdown-menu {
    display: block; /* クリックで表示 */
  }

  .dropdown-menu a {
    padding: 12px 0;
    color: #34495e;
  }

  .dropdown-menu a:hover {
    transform: none;
    background: transparent;
    color: #3498db;
  }
}

/* オーバーレイ（スマホ用） */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================
   mainタグのマージン
   ======================== */
main {
  margin-top: 80px;
  position: relative;
}

/* ========================
   フッター
   ======================== */
footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #fff;
  padding: 40px 0 20px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-left-section {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.footer-right-section {
  flex: 1;
  min-width: 250px;
  /* グループ企業情報用のスペース */
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-logo {
  height: 40px;
}

.footer-company-name {
  font-size: 1.2em;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.footer-address {
  color: #bdc3c7;
  line-height: 1.6;
  font-size: 0.95em;
}

.footer-address .postal-code {
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 5px;
}

.footer-address .address {
  margin-bottom: 8px;
}

.footer-contact {
  color: #bdc3c7;
  font-size: 0.95em;
  line-height: 1.6;
}

.footer-contact .phone {
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 5px;
}
.footer-contact .e-mail {
  font-weight: 600;
  color: #ecf0f1;
  margin-bottom: 5px;
}

.footer-contact .hours {
  font-size: 0.9em;
  color: #95a5a6;
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #95a5a6;
  font-size: 0.9em;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  footer {
    padding: 30px 0 15px 0;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-section {
    min-width: auto;
    width: 100%;
  }
  
  .footer-logo-section {
    justify-content: center;
  }
  
  .footer-company-name {
    font-size: 1.1em;
  }
}

/* メインビジュアルスライドショー */
.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: auto;
  overflow: hidden;
  height: 400px; /* 適宜調整 */
}

.slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

/* 角丸をシャープに */
.header, .header.scrolled, .dropdown-menu, .container, .nav-link, .dropdown-menu a, .slideshow-container, .slide, .main, .footer, .goods-gallery-card, .goods-main-visual, .goods-pr-block, .goods-gallery-img img, .equipment-card, .lab-work-card, .company-section, .company-profile-table, .company-profile-map, .company-hero-shaze img, .company-hero-shaze, .company-hero, .company-profile-map, .company-profile-map-flex, .company-profile-section, .company-profile-mainvisual {
  border-radius: 4px !important;
}

/* タイトルのフォントサイズ統一のみ */
.page-title, .lab-title, .company-hero-title, .recruit-hero-title {
  font-size: 3em;
  font-weight: 800;
  font-family: 'M PLUS 1p', 'Roboto', 'Arial', 'sans-serif';
  text-align: center;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .page-title, .lab-title, .company-hero-title, .recruit-hero-title {
    font-size: 1.5em;
  }
}

.enlargeable {
  transition: box-shadow 0.2s;
}
.enlargeable:hover {
  box-shadow: 0 0 8px #333;
}
