/* =========================================================
   SAHAR CO., LTD.  共通スタイル
   - 青、白、グレーをベースにした信頼感のあるデザイン
   - スマホ優先のレスポンシブ設計
   ========================================================= */

/* ---------- カラー変数（後から色味を調整しやすいよう一元管理） ---------- */
:root {
  --color-primary: #103a6b;       /* 濃い紺（信頼感） */
  --color-primary-dark: #0b2a4f;  /* ホバー用 */
  --color-accent: #1f6fd0;        /* アクセントブルー */
  --color-text: #1f2937;          /* 本文 */
  --color-text-muted: #6b7280;    /* 補足テキスト */
  --color-bg: #ffffff;            /* 背景白 */
  --color-bg-soft: #f4f6fa;       /* 薄いグレー背景 */
  --color-border: #d9dde4;        /* 境界線 */
  --color-yahoo: #ff0033;         /* ヤフオク用赤 */
  --max-width: 1200px;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(16, 58, 107, 0.08);
  --shadow-strong: 0 10px 30px rgba(16, 58, 107, 0.15);
}

/* ---------- リセット ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ---------- 共通コンテナ ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

section.alt {
  background: var(--color-bg-soft);
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 36px;
  font-size: 15px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
  color: var(--color-primary);
  flex-shrink: 0;
  min-width: 0;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 画面幅に余裕がないときは長いサブコピーを隠して、メニューに横幅を譲る */
@media (max-width: 1200px) {
  .brand-sub { display: none; }
}

@media (max-width: 600px) {
  .brand-logo { height: 36px; }
  /* スマホではロゴ画像のみ表示してヘッダーをスッキリ */
  .brand-text { display: none; }
}

/* ---------- ナビゲーション ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-list {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
}

.nav-list a {
  color: var(--color-text);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-list a:hover {
  background: var(--color-bg-soft);
  color: var(--color-primary);
  text-decoration: none;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 8px 16px;
  border: 1.5px solid var(--color-primary);
  border-radius: 999px;
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-switch:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* ---------- ハンバーガー（スマホ用） ---------- */
.hamburger {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  margin-left: 8px;
}

.hamburger span {
  display: block;
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.3s, opacity 0.3s, top 0.3s;
}

.hamburger span:nth-child(1) { top: 12px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 26px; }

.hamburger.is-open span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  /* 後で /assets/hero.jpg を差し替え可能。今は既存サイトのコンテナ写真を使用 */
  background:
    linear-gradient(135deg, rgba(11, 42, 79, 0.85), rgba(31, 111, 208, 0.75)),
    url("assets/hero.jpg") center / cover no-repeat,
    linear-gradient(135deg, #0b2a4f 0%, #1f6fd0 100%);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 18px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 16px;
  margin-bottom: 32px;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  min-width: 200px;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: var(--shadow-strong);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: #1857a8;
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-yahoo {
  background: var(--color-yahoo);
  color: #fff;
}

.btn-yahoo:hover {
  background: #cc0029;
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- ビジネスカード ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 24px;
}

.card h3 {
  font-size: 17px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ---------- ヤフオク強調セクション ---------- */
.yahoo-block {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5ec 100%);
  border: 1px solid #ffd4dc;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}

.yahoo-block h2 {
  color: #b00024;
  margin-bottom: 12px;
  font-size: 22px;
}

.yahoo-block p {
  color: #4a1f25;
  margin-bottom: 24px;
}

/* ---------- 輸出セクション ---------- */
.export-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

.export-block .export-text p {
  margin-bottom: 14px;
}

.export-block .export-image {
  /* 既存サイトのバナー画像をそのまま見せる。差し替え時は assets/export.jpg を入れ替えるだけ */
  background:
    url("assets/export.jpg") center / cover no-repeat,
    linear-gradient(135deg, #cfd9e6, #a7b8d1);
  border-radius: var(--radius);
  min-height: 220px;
  box-shadow: var(--shadow);
  aspect-ratio: 2.28 / 1;
}

/* 輸出対応セクションの 4枚画像ギャラリー */
.export-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.export-gallery .export-photo {
  aspect-ratio: 2.28 / 1;
  border-radius: 8px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #f4f6fa;
  box-shadow: var(--shadow);
}

/* 画像差し替えポイント。assets フォルダの画像を入れ替えるだけで反映 */
.export-gallery .export-photo.p1 { background-image: url("assets/export.jpg"); }              /* 事故車・部品取り */
.export-gallery .export-photo.p2 { background-image: url("assets/gallery-container.jpg"); }   /* コンテナ積み込み */
.export-gallery .export-photo.p3 { background-image: url("assets/gallery-parts.jpg"); }       /* 部品 half/nose/body */
.export-gallery .export-photo.p4 { background-image: url("assets/gallery-heavy.jpg"); }       /* 建設機械 */

/* スマホでは1列で大きく表示 */
@media (max-width: 600px) {
  .export-gallery { grid-template-columns: 1fr; }
}

.export-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.export-tags li {
  background: var(--color-primary);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Why Us ---------- */
.why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.why-list li {
  background: #fff;
  border-left: 4px solid var(--color-accent);
  padding: 18px 20px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-weight: 600;
  color: var(--color-primary);
  font-size: 15px;
}

/* ---------- ギャラリー（4枚構成） ---------- */
.gallery {
  display: grid;
  /* PC/タブレット：2列または4列。スマホ：1列で大きく見せる */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

.gallery-item {
  aspect-ratio: 2.28 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #f4f6fa;
  box-shadow: var(--shadow);
}

/* ギャラリー画像は assets フォルダの画像をそのまま表示。差し替え可能。 */
.gallery-item .ph {
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: block;
}

/* キャプションは画像の下にバッジで表示（画像上に重ねない） */
.gallery-item .caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(16, 58, 107, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

/* 画像差し替えポイント。assets/gallery-*.jpg を差し替えるだけで反映 */
.gallery-item.cars      .ph { background-image: url("assets/gallery-cars.jpg"); }
.gallery-item.trucks    .ph { background-image: url("assets/gallery-trucks.jpg"); }
.gallery-item.heavy     .ph { background-image: url("assets/gallery-heavy.jpg"); }
.gallery-item.parts     .ph { background-image: url("assets/gallery-parts.jpg"); }
.gallery-item.container .ph { background-image: url("assets/gallery-container.jpg"); }
.gallery-item.yard      .ph { background-image: url("assets/gallery-yard.jpg"); }

/* ---------- 会社情報 ---------- */
.company-table {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.company-table th,
.company-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  vertical-align: top;
}

.company-table th {
  background: var(--color-bg-soft);
  color: var(--color-primary);
  width: 30%;
  font-weight: 700;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}

/* ---------- お問い合わせ ---------- */
.contact-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 36px;
}

.contact-actions .btn {
  min-width: 0;
  width: 100%;
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--color-primary);
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 208, 0.15);
}

.form-row textarea {
  min-height: 130px;
  resize: vertical;
}

.form-submit {
  text-align: center;
  margin-top: 8px;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: #d6dee9;
  padding: 36px 20px 20px;
  text-align: center;
}

.site-footer .footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.site-footer .footer-tagline {
  font-size: 13px;
  color: #9eb1cb;
  margin-bottom: 20px;
}

/* フッター内の地図埋め込み */
.footer-map {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 24px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #0b2a4f;
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.footer-map-caption {
  font-size: 13px;
  color: #b6c5db;
  margin-bottom: 20px;
}

.footer-map-caption a {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .footer-copy {
  font-size: 12px;
  color: #7a8fae;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .footer-map { aspect-ratio: 4 / 3; }
}

/* =========================================================
   レスポンシブ（タブレット / PC）
   ========================================================= */
@media (min-width: 768px) {
  .hero {
    padding: 110px 20px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 18px;
  }

  .section-title {
    font-size: 30px;
  }

  .export-block {
    grid-template-columns: 1.1fr 1fr;
  }

  .export-block .export-image {
    min-height: 320px;
  }

  section {
    padding: 80px 0;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 46px;
  }
}

/* =========================================================
   スマホ/タブレット用ナビ（PC幅でも中途半端な狭さならハンバーガー化）
   ========================================================= */
@media (max-width: 1100px) {
  .hamburger {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    align-items: stretch;
  }

  .nav-list.is-open {
    transform: translateY(0);
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-bg-soft);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: 0;
  }

  /* スマホでは言語切替を常に表示し、ハンバーガー脇に置く */
  .lang-switch {
    margin-left: auto;
    padding: 6px 12px;
    font-size: 12px;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .hero-buttons .btn {
    max-width: 360px;
  }
}

/* ごく小さい画面向け微調整 */
@media (max-width: 380px) {
  .brand-name { font-size: 16px; }
  .brand-sub  { font-size: 10px; }
  .hero h1    { font-size: 24px; }
}
