/* ===== CSS変数 ===== */
:root {
  --color-primary: #2E7D32;
  --color-primary-light: #4CAF50;
  --color-primary-dark: #1B5E20;
  --color-accent: #FFC107;
  --color-accent-dark: #FF9800;
  --color-bg: #FAFAFA;
  --color-bg-alt: #F1F8E9;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-white: #FFFFFF;
  --color-border: #E0E0E0;

  --font-main: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  --font-heading: 'Montserrat', 'Noto Sans JP', sans-serif;

  --header-height: 70px;
  --container-width: 1100px;
  --section-padding: 80px 0;
  --border-radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

/* ===== リセット・ベース ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--color-primary-light);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

ul {
  list-style: none;
}

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

/* ===== ヘッダー ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

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

.header-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 0.05em;
}

/* ===== ハンバーガーメニュー ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
  margin: 3px 0;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== ナビゲーション ===== */
.nav-list {
  display: flex;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 4px;
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-bg-alt);
}

/* ===== ファーストビュー ===== */
.section-hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  margin-top: var(--header-height);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 50%, #81C784 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  text-align: center;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  padding: 0 20px;
}

.hero-title {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-catchphrase {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ===== 共通セクション ===== */
.section {
  padding: var(--section-padding);
}

.section:nth-child(even) {
  background-color: var(--color-white);
}

.section-title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* ===== 経営理念 ===== */
.philosophy-content {
  max-width: 780px;
  margin: 0 auto;
}

.philosophy-text {
  font-size: 1.1rem;
  line-height: 2;
  text-align: center;
  border: none;
  padding: 32px;
  background-color: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--border-radius);
  color: var(--color-text);
}

/* ===== 事業内容 ===== */
.business-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.business-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.business-card-image {
  height: 200px;
  overflow: hidden;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.image-placeholder p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.business-card-body {
  padding: 24px;
}

.business-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
}

.business-card-text {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ===== 会社概要 ===== */
.company-table-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  font-size: 0.95rem;
}

.company-table th {
  width: 140px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background-color: var(--color-bg-alt);
  white-space: nowrap;
}

.company-table td a {
  color: var(--color-primary);
}

/* ===== 沿革 ===== */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--color-primary-light);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 14px;
  height: 14px;
  background-color: var(--color-primary);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.timeline-year {
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* ===== 代表挨拶 ===== */
.message-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 800px;
  margin: 0 auto;
}

.message-photo {
  flex-shrink: 0;
}

.president-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  border: 4px solid var(--color-primary-light);
}

.message-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 16px;
}

.message-text p {
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 16px;
  color: var(--color-text-light);
}

/* ===== アクセス ===== */
.access-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.access-info {
  text-align: center;
}

.access-address {
  font-size: 1rem;
  margin-bottom: 8px;
}

.access-tel {
  font-size: 1rem;
  margin-bottom: 24px;
}

.access-directions {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  padding: 20px;
  background-color: var(--color-bg-alt);
  border-radius: var(--border-radius);
}

.access-directions h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.access-directions p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.access-map {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.access-map iframe {
  display: block;
}

/* ===== お問い合わせ ===== */
.section-contact {
  background-color: var(--color-bg-alt) !important;
}

.contact-lead {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 24px;
  color: var(--color-text-light);
}

.contact-tel {
  text-align: center;
  margin-bottom: 40px;
}

.contact-tel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  transition: color var(--transition);
}

.contact-tel-link:hover {
  color: var(--color-primary);
}

.contact-tel-icon {
  font-size: 1.4rem;
}

.contact-tel-note {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

.contact-form-wrapper {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.contact-form-wrapper iframe {
  display: block;
  border-radius: var(--border-radius);
}

.contact-form-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 12px;
}

/* ===== フッター ===== */
.footer {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 0 24px;
  text-align: center;
}

.footer-inner {
  margin-bottom: 20px;
}

.footer-company {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.footer-address,
.footer-tel {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.footer-tel a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-tel a:hover {
  color: var(--color-white);
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== レスポンシブ: タブレット (768px以下) ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
    --header-height: 60px;
  }

  /* ハンバーガー表示 */
  .hamburger {
    display: flex;
  }

  /* モバイルナビ */
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    transition: right var(--transition);
    z-index: 1050;
    padding-top: calc(var(--header-height) + 20px);
  }

  .nav.open {
    right: 0;
  }

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

  .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  /* モバイルナビ背景オーバーレイ */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1040;
  }

  .nav-overlay.active {
    display: block;
  }

  /* ファーストビュー */
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-catchphrase {
    font-size: 1rem;
  }

  /* 事業内容カード */
  .business-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* セクションタイトル */
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 36px;
  }

  /* 会社概要テーブル */
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 10px 16px;
  }

  .company-table th {
    padding-bottom: 4px;
    border-bottom: none;
  }

  .company-table td {
    padding-top: 0;
  }

  /* 代表挨拶 */
  .message-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .president-placeholder {
    width: 150px;
    height: 150px;
  }

  /* 電話番号 */
  .contact-tel-link {
    font-size: 1.5rem;
  }
}

/* ===== レスポンシブ: スマホ (480px以下) ===== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-catchphrase {
    font-size: 0.9rem;
  }

  .section-hero {
    height: 60vh;
    min-height: 320px;
  }

  .philosophy-text {
    padding: 20px;
    font-size: 1rem;
    text-align: left;
  }

  .president-placeholder {
    width: 120px;
    height: 120px;
  }

  .contact-form-wrapper {
    padding: 12px;
  }
}
