/* ===================================
   CSS変数定義
   =================================== */
:root {
  /* カラーパレット */
  --color-white: #fff;
  --color-black: #000;
  --color-dark: #333;
  --color-dark-bg: #1a1a1a;
  --color-dark-alt: #262626;
  --color-gray-light: #f8f8f8;
  --color-gray: #666;
  --color-gray-muted: #777;
  --color-gray-border: #e0e0e0;
  --color-gray-border-light: #eee;
  --color-gray-text: #ccc;
  --color-gray-dark: #999;
  --color-gray-darker: #aaa;
  --color-accent: #ffcc00;
  --color-primary: #007bff;
  
  /* トランジション */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.4s ease;
  
  /* ボーダー */
  --border-light: 1px solid var(--color-gray-border-light);
  --border-medium: 1px solid var(--color-gray-border);
  --border-dark: 1px solid #333;
  
  /* シャドウ */
  --shadow-card: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ===================================
   基本設定
   =================================== */
*, *::before, *::after { box-sizing: border-box; }
body, html { margin: 0; padding: 0; font-family: sans-serif; }

/* ===================================
   共通コンポーネント
   =================================== */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin: 0 0 60px;
  font-weight: bold;
  color: var(--color-dark);
}

.btn {
  display: inline-block;
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 12px 25px;
  margin-bottom: 30px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color var(--transition-fast);
}
.btn:hover { background-color: #555; }

.btn-outline {
  display: inline-block;
  border: 2px solid var(--color-white);
  color: var(--color-white);
  padding: 12px 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all var(--transition-fast);
}
.btn-outline:hover { background-color: var(--color-white); color: var(--color-black); }

/* ===================================
   ヘッダー
   =================================== */
header {
  position: relative;
  width: 100%;
  background-color: var(--color-white);
  border-bottom: var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
}

.logo { display: block; width: 20%; min-width: 250px; }
.logo img { width: 100%; height: auto; display: block; }

.hamburger-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 21;
  display: block;
  padding: 10px;
  margin: 0;
}
.hamburger-icon span {
  background-color: var(--color-dark);
  display: block;
  width: 30px;
  height: 3px;
  margin: 6px 0;
}

.navigation-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  z-index: 20;
}
.navigation-menu.active { display: block; }
.navigation-menu ul { list-style: none; padding: 80px 0 0; margin: 0; }
.navigation-menu li a {
  display: block;
  padding: 15px 40px;
  text-decoration: none;
  color: var(--color-white);
  font-size: 18px;
}
.navigation-menu li a:hover { background-color: rgba(255, 255, 255, 0.1); }

/* ===================================
   ヒーロースライダー
   =================================== */
.hero-slider {
  width: 100%;
  background-color: var(--color-black);
  position: relative;
  --swiper-navigation-color: var(--color-white);
  border-top: 5px solid var(--color-primary);
}
.hero-slider .swiper-slide {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  color: var(--color-white);
  padding: 0 20px 20px;
}

.hero-text { z-index: 2; }
.hero-slider .hero-text h1 {
  font-family: 'Michroma', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  color: var(--color-white);
  line-height: 1.1;
}
.hero-slider .hero-text p {
  font-size: 1.1rem;
  color: var(--color-gray-text);
  margin-bottom: 30px;
}

.hero-product-image {
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.pagination-container {
  background-color: var(--color-white);
  padding: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pagination-container .swiper-pagination { position: relative; }
.pagination-container .swiper-pagination-bullet {
  background-color: var(--color-black);
  width: 10.5px;
  height: 10.5px;
  opacity: 0.5;
}
.pagination-container .swiper-pagination-bullet-active { opacity: 1; transform: scale(1.4); }

/* ===================================
   News & Events セクション
   =================================== */
.news-section { padding: 80px 40px; background-color: var(--color-white); }

.news-container {
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  padding: 10px;
}

.news-card {
  width: 270px;
  border: var(--border-medium);
  transition: box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.news-card:hover { box-shadow: var(--shadow-hover); }
.news-card a { text-decoration: none; color: inherit; display: block; }
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background-color: var(--color-white);
  display: block;
  padding: 10px;
}

.news-card-image-wrapper { background-color: #f0f0f0; overflow: hidden; }
.news-card-content {
  padding: 20px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  transform: translateY(100%);
  transition: transform var(--transition-fast);
}
.news-card-always-visible { padding: 20px; text-align: left; }
.news-card:hover .news-card-content { transform: translateY(0); }

.news-date { font-size: 14px; color: var(--color-gray-muted); }
.news-title { font-size: 16px; font-weight: bold; margin: 10px 0 0; line-height: 1.5; }

/* ===================================
   製品紹介セクション
   =================================== */
.products { padding: 80px 40px; background-color: var(--color-gray-light); }
.product-container { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }

.product-card {
  width: 340px;
  background-color: var(--color-white);
  border-radius: 15px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.product-card:hover { transform: translateY(-10px); }
.product-card img { width: 100%; height: 240px; object-fit: cover; }
.product-card h3 { font-size: 1.5rem; margin: 25px 0 15px; }
.product-card p { font-size: 1rem; color: var(--color-gray); padding: 0 25px; margin-bottom: 25px; }

/* ===================================
   フッター
   =================================== */
footer { background-color: var(--color-dark-bg); color: var(--color-white); border-top: var(--border-dark); }
.footer-accordion-container { max-width: 100%; margin: 0 auto; }

.accordion-item { border-bottom: var(--border-dark); }
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  margin: 0 !important;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

.toggle-icon { font-size: 20px; transition: transform var(--transition-fast); }
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  background-color: #111;
  padding: 0 40px;
  list-style: none;
  margin: 0;
}
.accordion-item.active .accordion-content { max-height: 600px; padding: 20px 40px 40px; }
.accordion-item.active .toggle-icon { transform: rotate(45deg); }
.accordion-content li { margin-bottom: 20px; }
.accordion-content a { color: var(--color-gray-text); text-decoration: none; font-size: 15px; }

.footer-social { display: flex; gap: 30px; padding-top: 10px; }
.footer-social a:hover .fa-facebook-f { color: #1877f2; }
.footer-social a:hover .fa-x-twitter { color: var(--color-black); }
.footer-social a:hover .fa-instagram { color: #e1306c; }
.footer-social a:hover .fa-youtube { color: #f00; }

.footer-copyright-container {
  text-align: center;
  padding: 50px 20px;
  font-size: 12px;
  color: var(--color-gray);
  line-height: 2;
}

/* ===================================
   ニュースページ（グリッド）
   =================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 450px));
  gap: 30px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1400px;
}

.news-grid-item { border: var(--border-medium); position: relative; overflow: hidden; }
.news-grid-item a { text-decoration: none; color: inherit; display: block; }

.news-image-container { width: 100%; padding-top: 66.66%; position: relative; }
.news-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}
.news-grid-item:hover .news-image-container img { transform: scale(1.1); }
.news-grid-item:hover .news-grid-content { transform: translateY(0); opacity: 1; }

.news-grid-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 40px 25px 20px;
}
.news-grid-content .news-date { color: var(--color-white); }
.news-title-small {
  font-size: 18px;
  font-weight: bold;
  margin: 5px 0 0;
  line-height: 1.5;
  color: var(--color-white);
}

/* ===================================
   ニュース記事詳細ページ
   =================================== */
.article-container { max-width: 800px; margin: 0 auto; }
.article-header {
  margin-bottom: 30px;
  text-align: left !important;
  border-bottom: var(--border-medium);
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.article-date {
  display: block;
  color: var(--color-gray-muted);
  font-size: 1rem;
  margin-bottom: 10px;
  text-align: left;
  white-space: nowrap;
  width: 100%;
}
.article-title {
  display: block;
  font-size: 2.2rem;
  margin: 0;
  line-height: 1.3;
  text-align: left !important;
  width: 100%;
}
.article-image {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 0 40px;
  object-fit: contain;
}

/* ===================================
   Contact Us
   =================================== */
.form-group { margin-bottom: 25px; }
.form-label { display: block; font-size: 16px; font-weight: 600; color: var(--color-dark); margin-bottom: 8px; }
.form-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  color: #555;
  background-color: var(--color-white);
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* ===================================
   下層ページ
   =================================== */
.page-container { margin: 0 auto; max-width: 80%; padding: 100px 0; }

/* ===================================
   車種ページ：カタログ風ダークレイアウト
   =================================== */
.product-page-dark { background-color: var(--color-dark-bg); color: var(--color-white); min-height: 100vh; }
.product-hero-section { padding: 40px 0; }

.product-layout-wrapper.reverse {
  display: flex;
  flex-direction: row-reverse;
  gap: 60px;
  align-items: center;
}
.product-image-column { flex: 0 0 60%; }
.product-image-column img { width: 100%; height: auto; object-fit: contain; }
.product-info-column { flex: 1; text-align: left; }

.product-hero-title {
  font-size: 5rem !important;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1;
  color: var(--color-white) !important;
  -webkit-text-fill-color: initial !important;
  background: none !important;
  text-shadow: none !important;
}

.price-container {
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 10px;
  margin-bottom: 25px;
  display: inline-block;
}
.price-amount { font-size: 1.8rem; font-weight: bold; }
.product-description-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-gray-text);
  margin-bottom: 30px;
}

/* ===================================
   テクニカルスペック
   =================================== */
.technical-specs { background-color: var(--color-dark-alt); padding: 30px 0 10px; }
.specs-heading {
  font-size: 1.8rem;
  letter-spacing: 3px;
  border-bottom: 1px solid #444;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.specs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px 60px; }
.spec-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #3d3d3d;
  padding: 12px 0;
}
.spec-item span { color: var(--color-gray-dark); font-size: 0.9rem; }
.spec-item strong { color: var(--color-white); font-weight: 600; }

/* ===================================
   Key Features & Media Gallery
   =================================== */
.key-features { background-color: var(--color-dark-bg); padding: 10px 0; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.feature-item i { font-size: 2.5rem; color: var(--color-accent); margin-bottom: 15px; display: block; }
.feature-item span { display: block; font-weight: bold; font-size: 1rem; margin-bottom: 10px; text-transform: uppercase; }
.feature-item p { font-size: 0.8rem; color: var(--color-gray-darker); line-height: 1.5; }

.media-gallery { background-color: var(--color-dark-alt); padding: 10px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { overflow: hidden; border-radius: 4px; }
.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-fast);
}
.gallery-item img:hover { transform: scale(1.05); }

/* ===================================
   車種別テーマカラー
   =================================== */
.theme-ibis .product-page-dark,
.theme-ibis .key-features { background-color: #1a0f0f !important; }
.theme-ibis .technical-specs,
.theme-ibis .media-gallery { background-color: #261616 !important; }

.theme-raven .product-page-dark,
.theme-raven .key-features { background-color: #0f1a16 !important; }
.theme-raven .technical-specs,
.theme-raven .media-gallery { background-color: #162620 !important; }

/* ===================================
   会社概要テーブル
   =================================== */
.company-profile { width: 100%; border-collapse: collapse; margin-top: 20px; }
.company-profile th,
.company-profile td {
  padding: 15px 10px;
  border-bottom: var(--border-light);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.6;
}
.company-profile th {
  width: 30%;
  color: var(--color-dark);
  font-weight: bold;
  white-space: nowrap;
  background-color: #fcfcfc;
}

/* ===================================
   レスポンシブ対応
   =================================== */
@media (min-width: 769px) {
  .hero-slider .swiper-slide {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 8%;
  }
  .hero-text { width: 45%; text-align: left; order: 1; align-self: center; }
  .hero-product-image { width: 50%; height: 70%; object-fit: contain; order: 2; }
}

@media (max-width: 992px) {
  .product-layout-wrapper.reverse { flex-direction: column; }
  .product-hero-title { font-size: 3.5rem !important; }
  .specs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  header { padding: 0; }
  .hero-product-image { max-width: 60%; max-height: 40%; margin-bottom: 30px; order: 1; }
  .hero-text { width: 90%; text-align: center; order: 2; }
  .hero-slider .hero-text h1, .article-title { font-size: 2rem; }
  .hero-slider .hero-text p { font-size: 1rem; }
  .news-card { width: 170px; }
  .news-card .news-title { font-size: 14px; }
  .footer-main { flex-direction: row; flex-wrap: wrap; justify-content: space-around; gap: 20px; }
  .footer-column { flex-basis: 28%; margin-bottom: 20px; text-align: left; }
  .footer-column h4, .footer-column ul { text-align: center; }
  .footer-bottom { flex-direction: column; gap: 15px; }
  .footer-legal { margin-bottom: 15px; }
  .page-main-image { width: 100%; height: auto; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .technical-specs { padding: 30px 0 8px; }
  .media-gallery { padding: 8px 0; }
}

@media (max-width: 600px) {
  .company-profile th, .company-profile td { display: block; width: 100%; border-bottom: none; }
  .company-profile th { padding-bottom: 5px; color: #888; font-size: 13px; }
  .company-profile td { padding-top: 0; padding-bottom: 20px; border-bottom: var(--border-light); }
}
/* ===================================
   スマホ表示時のスペック表調整
   =================================== */
@media (max-width: 400px) {
  /* 左側（項目名）：改行させない＆文字小さく */
  .spec-item span {
    white-space: nowrap; /* 改行禁止 */
    flex-shrink: 0;      /* 幅を縮ませない */
    margin-right: 15px;  /* 右側との隙間 */
    font-size: 0.8rem;   /* 文字サイズを小さく */
  }

  /* 右側（数値）：文字を小さく */
  .spec-item strong {
    font-size: 0.8rem;   /* 左側と同じサイズに縮小 */
    text-align: right;   /* 右寄せを維持 */
  }
}