/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  padding: 20px;
  background-color: #fafafa;
}
header, nav, main, section, footer {
  max-width: 1200px;
  margin: 0 auto;
}
header {
  background: #004080;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}
nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 15px;
  padding: 5px;
  font-weight: 500;
}
nav a:hover {
  text-decoration: underline;
}

/* セクションタイトル (h2) アンダーライン */
.section-title {
  position: relative;
  font-size: 2em;
  margin: 1.5em 0 0.5em;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 4em;
  height: 4px;
  background: linear-gradient(90deg, #004080, #1a3a66);
  border-radius: 2px;
}

/* ヒーローセクション */
.hero {
  position: relative;
  width: 100%;
  padding-top: 50%; /* 高さ=幅の50% */
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('img/top.jpg') center/cover no-repeat;
  z-index: 0;
}
.hero h2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  color: #fff;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.9);
  text-align: center;
  padding: 0 20px;
}

/* 2カラムレイアウト */
.business {
  display: flex;
  gap: 40px;
  margin: 40px 0;
}
.business .feature {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
}
.business .feature-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 0.5em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 見出し H3 */
h3 {
  background-color: #1a3a66;
  color: #fff;
  display: inline-block;
  padding: 0.5em 1em;
  border-radius: 0.5em;
  margin-bottom: 0.5em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 段落スタイル */
p.about-text,
.business .feature-text p {
  background-color: #fff;
  padding: 1em;
  margin: 1em 0;
  border-left: 4px solid #1a3a66;
  border-radius: 0.5em;
  line-height: 1.6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* リストインデント（会社概要沿革用） */
.about ul,
.about ul li,
.main.about ul,
.main.about ul li {
  margin: 0.5em 0;
}
.about ul {
  padding-left: 1.5em;
  list-style-position: outside;
}

/* グリッド */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* フォーム */
.contact-form {
  background: #fff;
  padding: 2em;
  border-radius: 0.5em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 0.25em;
}
.contact-form button {
  align-self: flex-start;
  padding: 0.75em 1.5em;
  background: #004080;
  color: #fff;
  border: none;
  border-radius: 0.25em;
  cursor: pointer;
}
.contact-form button:hover {
  background: #1a3a66;
}

/* ギャラリー */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}
/* 既存の .gallery-item img を正方形に */
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;      /* ← 正方形 */
  object-fit: cover;
  cursor: pointer;
  border-radius: 0.5em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 設備事業ページのみ 3:4 に切り替え */
body.equipment .gallery-item img {
  aspect-ratio: 3 / 4;      /* ← 縦:横 = 3:4 */
}


/* ライトボックス */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 0.5em;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }
  .business {
    flex-direction: column;
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

footer {
  text-align: center;
  padding: 20px 0;
  background: #f4f4f4;
  margin-top: 40px;
}

.orange {
  color: orange;
}