:root {
  --bg-body: #f9f5ef;
  --text-main: #1e2b45;
  --text-dim: #495670;
  --accent: #ff7a00;
  --accent-soft: rgba(255,122,0,0.15);
  --bg-card: #ffffff;
  --radius-lg: 1rem;
  --shadow-card: 0 8px 20px rgba(0,0,0,0.08);
  --font-ja: "Noto Sans JP", "Hiragino Sans", sans-serif;
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-ja);
  margin: 0;
  line-height: 1.7;
}

/* コンテナ共通 */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 1px solid rgba(30,43,69,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.logo-img {
  display: block;
  height: 52px;
  width: auto;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

/* ナビゲーション */
.nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 70px;
  right: 5%;
  background: #fff;
  border: 1px solid rgba(30,43,69,0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1rem 1.5rem;
}
.nav a {
  text-decoration: none;
  color: var(--text-main);
  padding: 0.6rem 0;
  font-weight: 500;
}
.nav a:hover {
  color: var(--accent);
}
.nav.nav-open {
  display: flex;
}

/* ハンバーガー */
.nav-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* PC表示 */
@media (min-width: 768px) {
  .nav {
    all: unset;
    display: flex;
    gap: 2rem;
  }
  .nav a {
    color: var(--text-main);
    font-weight: 500;
  }
  .nav-toggle {
    display: none;
  }
}

/* ===== ヒーロー（背景画像付き） ===== */
.hero {
  position: relative;
  background: url("top2.png") no-repeat center center / cover;
  color: #fff;
  padding: 6rem 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.hero-copy h1 {
  font-size: 2rem;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
.hero-lead {
  color: #f0f0f0;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
.btn-cta-lg {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 0.6rem;
  font-weight: 600;
  box-shadow: 0 6px 15px rgba(255,122,0,0.3);
}
.cta-note {
  font-size: 0.85rem;
  color: #f0f0f0;
  display: block;
  margin-top: 0.5rem;
}

/* ===== 制作実績 ===== */
.works-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin: 4rem 0;
}
.work-item {
  text-align: center;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.work-item img {
  width: 250px;
  height: auto;
  border-radius: 0.7rem;
  object-fit: cover;
}
.work-item p {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ===== フッター ===== */
.site-footer {
  background: #fff;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(30,43,69,0.1);
}

/* ===== スマホサイズ調整 ===== */
@media (max-width: 767px) {
  .container {
    width: 94%;
    padding: 0 3%;
  }
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.5rem 0;
  }
  .logo-img {
    height: 44px;
  }
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    padding: 1rem 1.5rem;
    box-sizing: border-box;
    font-size: 0.95rem;
    z-index: 9999;
  }
  .nav a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(30,43,69,0.05);
  }
  .nav a:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 4rem 0;
  }
  .hero-copy h1 {
    font-size: 1.6rem;
    line-height: 1.4;
  }
  .hero-lead {
    font-size: 0.95rem;
  }

  .works-gallery {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
  }
  .work-item {
    width: 90%;
    padding: 1.5rem;
  }
  .work-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
  }

  .site-footer {
    font-size: 0.8rem;
    padding: 1.5rem 0;
  }
}

/* ===== フォーム ===== */
html, body {
  overflow-x: hidden;
}
.contact-form {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
/* ===== お問い合わせフォーム ===== */
.contact-form {
  width: 100%;
  max-width: 600px;
  margin: 3rem auto;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form label {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(30,43,69,0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: var(--font-ja);
}

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

.contact-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.9rem;
  font-size: 1.1rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background: #e86a00;
}

/* ===== Googleマップ ===== */
.map-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}
/* ===== スマホ表示時にフォームが切れないように修正 ===== */
@media (max-width: 767px) {
  .contact-form {
    width: 94%;
    padding: 1.5rem;
    margin: 2rem auto;
    box-sizing: border-box;
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  body, html {
    overflow-x: hidden;
  }
}
/* ===== 会社概要ページの写真 ===== */
.about-photo {
  margin: 2rem 0;
  text-align: center;
}

.about-photo img {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
/* ===== 会社概要レイアウト（左右並び） ===== */
.about-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.about-text {
  flex: 1 1 45%;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.company-table th,
.company-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(30,43,69,0.1);
  text-align: left;
}

.company-table th {
  width: 30%;
  background: var(--accent-soft);
  color: var(--text-main);
  font-weight: 600;
}

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

.about-photo {
  flex: 1 1 45%;
  text-align: right;
}

.about-photo img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* スマホでは縦並びに */
@media (max-width: 767px) {
  .about-flex {
    flex-direction: column;
    gap: 2rem;
  }

  .about-photo {
    text-align: center;
  }

  .about-photo img {
    max-width: 100%;
  }
}

/* ===== 会社概要：表を中央、写真を下 ===== */
.about-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2rem;
}

.about-text {
  width: 100%;
  max-width: 600px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: 1rem;
  text-align: center;
}

.company-table th,
.company-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(30,43,69,0.1);
}

.company-table th {
  background: var(--accent-soft);
  color: var(--text-main);
  font-weight: 600;
  width: 35%;
}

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

.about-photo {
  text-align: center;
}

.about-photo img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* スマホ対応 */
@media (max-width: 767px) {
  .about-text {
    max-width: 100%;
  }
  .company-table {
    font-size: 0.95rem;
  }
}

/* ===== PC＆スマホ画像の並び（サイズ調整） ===== */
.device-images {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.device-images img {
  border-radius: 0.7rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

/* 1枚目（PC画像）を大きく、2枚目（スマホ画像）を小さく */
.device-images img:first-child {
  width: 380px;
  max-width: 45%;
}

.device-images img:last-child {
  width: 220px;
  max-width: 25%;
}

.device-images img:hover {
  transform: scale(1.05);
}

/* スマホでは縦並び */
@media (max-width: 767px) {
  .device-images {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .device-images img:first-child,
  .device-images img:last-child {
    width: 90%;
    max-width: 320px;
  }
}
/* ===== 制作実績ページだけ幅を広く ===== */
body.works-page .container {
  max-width: 1400px; /* 通常1100px → 広めに */
}

/* PC版とスマホ画像の並びをよりワイドに */
body.works-page .device-images {
  justify-content: space-around;
  gap: 2rem;
}

body.works-page .device-images img:first-child {
  width: 480px; /* PC画像をさらに大きく */
}

body.works-page .device-images img:last-child {
  width: 240px;
}

/* スマホでは通常幅に戻す */
@media (max-width: 767px) {
  body.works-page .container {
    width: 94%;
    max-width: 100%;
  }
}
/* ===== 実績ページでPC画像をより大きく ===== */
body.works-page .device-images img:first-child {
  width: 600px;     /* 以前より大きく（例：480px → 600px） */
  max-width: 60%;   /* 全体幅の6割まで */
}

body.works-page .device-images img:last-child {
  width: 220px;     /* スマホはそのまま小さめ */
  max-width: 20%;
}

/* ワイド表示に対応するため、ギャラリー部分も広げる */
body.works-page .works-gallery {
  justify-content: center;
  max-width: 1500px;
  margin: 0 auto;
}
