/* リセット */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.7;
  color: #2c3e50;
  background: #fff;
  font-size: 16px;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* カラー定義 */
:root {
  --primary: #1e5b8e;       /* 深い青（信頼） */
  --primary-dark: #144066;
  --accent: #ff7a00;        /* オレンジ（CTA） */
  --accent-dark: #e66a00;
  --light: #f5f9fc;
  --gray: #6b7280;
  --border: #e5e7eb;
  --emergency: #d32f2f;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ヘッダー */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: bold; }
.logo-icon { font-size: 28px; }
.logo-text { font-size: 18px; color: var(--primary); }
.nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav a:hover { color: var(--primary); }
.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
}
.nav-cta:hover { background: var(--accent-dark); color: white !important; }
.header-tel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-weight: bold;
}
.tel-label { font-size: 11px; color: var(--gray); }
.tel-number { font-size: 22px; color: var(--primary); }

/* ヒーロー（フルスクリーン背景画像スライドショー） */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 80px 20px;
  color: white;
  overflow: hidden;
  background: #144066;
}
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: heroSlideshow 21s infinite;
  will-change: opacity;
}
.hero-bg-1 { background-image: url('images/hero-1.jpg'); animation-delay: 0s; }
.hero-bg-2 { background-image: url('images/hero-3.jpg'); animation-delay: 7s; }
.hero-bg-3 { background-image: url('images/hero-2.jpg'); animation-delay: 14s; }
@keyframes heroSlideshow {
  0%   { opacity: 0; transform: scale(1.05); }
  4%   { opacity: 1; }
  29%  { opacity: 1; transform: scale(1.0); }
  33%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.05); }
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,64,102,0.7) 0%, rgba(30,91,142,0.45) 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  z-index: 3;
}
.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(255,122,0,0.4);
}
.hero h1 {
  font-size: 48px;
  line-height: 1.4;
  color: white;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  font-weight: 900;
}
.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.95);
  margin-bottom: 32px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.stat-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-num span { font-size: 14px; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--gray); margin-top: 6px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.btn-secondary-light {
  background: rgba(255,255,255,0.95);
  color: var(--primary) !important;
  border: 2px solid white;
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.2s;
}
.btn-secondary-light:hover {
  background: white;
  color: var(--primary-dark) !important;
  transform: translateY(-2px);
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: white !important; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-secondary { background: white; color: var(--primary) !important; border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: white !important; }
.btn-emergency { background: var(--emergency); color: white !important; }
.btn-block { width: 100%; font-size: 18px; padding: 16px; }
.hero-permit {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-top: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* 緊急バナー */
.emergency {
  background: linear-gradient(90deg, #ff6b35 0%, #ff8c42 100%);
  color: white;
  padding: 16px 20px;
}
.emergency-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.emergency-icon { font-size: 28px; }
.emergency p { flex: 1; font-size: 15px; min-width: 200px; }

/* セクション共通 */
.section { padding: 80px 20px; }
.section-alt { background: var(--light); }
.section-title {
  font-size: 32px;
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.section-sub {
  text-align: center;
  color: var(--gray);
  margin-bottom: 48px;
  font-size: 16px;
}

/* サービス */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30,91,142,0.15);
}
.service-icon { font-size: 48px; margin-bottom: 16px; }
.service-card h3 { color: var(--primary); margin-bottom: 12px; font-size: 18px; }
.service-card p { color: var(--gray); font-size: 14px; margin-bottom: 12px; }
.service-price {
  color: var(--accent) !important;
  font-weight: bold;
  font-size: 18px !important;
}
.service-card { color: inherit; }
.service-more {
  color: var(--primary) !important;
  font-weight: bold;
  font-size: 14px !important;
  margin-top: 8px !important;
}

/* ===== サブページ用 ===== */
.subpage-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 80px 20px 60px;
  text-align: center;
}
.breadcrumb {
  max-width: 900px;
  margin: 0 auto 24px;
  font-size: 14px;
  opacity: 0.9;
  text-align: left;
}
.breadcrumb a { color: white; text-decoration: underline; }
.subpage-hero h1 {
  font-size: 38px;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.subpage-hero p { font-size: 18px; opacity: 0.95; }
.subpage-icon { font-size: 64px; display: block; margin-bottom: 16px; }

.sub-section { padding: 60px 20px; }
.sub-section:nth-child(even) { background: var(--light); }
.sub-section h2 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.sub-container { max-width: 900px; margin: 0 auto; }

.case-list, .step-list, .feature-list {
  background: white;
  border-radius: 12px;
  padding: 24px 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.case-list li, .feature-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  position: relative;
  padding-left: 32px;
}
.case-list li:last-child, .feature-list li:last-child { border-bottom: none; }
.case-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 20px;
}
.feature-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 12px;
  top: 18px;
}

.step-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.step-item {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-left: 4px solid var(--accent);
}
.step-num {
  background: var(--primary);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
}
.step-content h4 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 8px;
}
.step-content p { color: var(--gray); margin-bottom: 4px; font-size: 15px; }
.step-meta {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-top: 8px;
  font-weight: bold;
}

.price-detail {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}
.price-detail-row {
  display: grid;
  grid-template-columns: 1fr 200px 2fr;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.price-detail-row:last-child { border-bottom: none; }
.price-detail-row.header {
  background: var(--primary);
  color: white;
  font-weight: bold;
}
.price-detail-row .price {
  color: var(--accent);
  font-weight: bold;
  font-size: 20px;
}
.price-detail-row.header .price { color: white; font-size: 16px; }

.warning-box {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  padding: 20px 24px;
  border-radius: 8px;
  margin: 20px 0;
}
.warning-box h4 { color: #f9a825; margin-bottom: 8px; }

.info-box {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  padding: 20px 24px;
  border-radius: 8px;
  margin: 20px 0;
}
.info-box h4 { color: #43a047; margin-bottom: 8px; }

.faq-item {
  background: white;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.faq-item h4 {
  color: var(--primary);
  margin-bottom: 8px;
  padding-left: 28px;
  position: relative;
}
.faq-item h4::before {
  content: 'Q.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}
.faq-item p {
  padding-left: 28px;
  position: relative;
  color: var(--gray);
}
.faq-item p::before {
  content: 'A.';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.subpage-cta {
  background: linear-gradient(135deg, var(--accent) 0%, #ff9933 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}
.subpage-cta h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: white;
  border: none;
}
.subpage-cta p { font-size: 17px; margin-bottom: 24px; opacity: 0.95; }
.subpage-cta .btn { margin: 4px; }
.subpage-cta .btn-primary {
  background: white;
  color: var(--accent) !important;
}

.related-services {
  background: var(--light);
  padding: 60px 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.related-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.related-card:hover { transform: translateY(-2px); }
.related-card span { font-size: 32px; display: block; margin-bottom: 8px; }
.related-card h4 { color: var(--primary); font-size: 15px; }
@media (max-width: 768px) {
  .price-detail-row { grid-template-columns: 1fr; gap: 8px; }
  .related-grid { grid-template-columns: 1fr; }
  .subpage-hero h1 { font-size: 26px; }
}

/* 料金テーブル */
.price-table table {
  width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border-collapse: collapse;
}
.price-table th, .price-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.price-table th { background: var(--primary); color: white; font-weight: bold; }
.price-table tr:last-child td { border-bottom: none; }
.price-table td:nth-child(2) { color: var(--accent); font-weight: bold; font-size: 18px; }
.price-note { text-align: center; margin-top: 20px; color: var(--gray); font-size: 14px; }

/* 施工事例 */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.work-images { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: white; }
.work-image {
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #ddd 0%, #bbb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.before-after-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--gray);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}
.before-after-tag.after { background: var(--accent); }
.image-placeholder { font-size: 64px; opacity: 0.5; }
.work-card h3 { padding: 16px 20px 8px; color: var(--primary); font-size: 16px; }
.work-card p { padding: 0 20px 12px; color: var(--gray); font-size: 14px; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px 20px;
}
.work-meta span {
  background: var(--light);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

/* 火災保険 */
.section-insurance {
  background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
}
.insurance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.insurance-card {
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.insurance-card h3 {
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.insurance-card ul li { padding: 8px 0; color: var(--gray); }

/* お客様の声 */
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.voice-card {
  background: var(--light);
  border-radius: 12px;
  padding: 28px;
  position: relative;
}
.voice-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 60px;
  color: var(--primary);
  opacity: 0.2;
  font-family: serif;
}
.voice-stars { color: #ffc107; font-size: 18px; margin-bottom: 12px; }
.voice-card p { color: var(--primary-dark); margin-bottom: 16px; }
.voice-meta { color: var(--gray); font-size: 13px; }

/* 会社案内 */
.company-table table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border-collapse: collapse;
}
.company-table th, .company-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.company-table th { background: var(--light); color: var(--primary); width: 30%; }

/* お問い合わせ */
.section-contact {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}
.section-contact .section-title { color: white; }
.section-contact .section-title::after { background: var(--accent); }
.section-contact .section-sub { color: rgba(255,255,255,0.85); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.contact-method {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.2s;
}
.contact-method:hover { background: rgba(255,255,255,0.2); transform: translateY(-4px); }
.contact-icon { font-size: 48px; margin-bottom: 12px; }
.contact-label { font-size: 14px; opacity: 0.8; margin-bottom: 8px; }
.contact-value { font-size: 22px; font-weight: bold; margin-bottom: 8px; }
.contact-method small { opacity: 0.7; font-size: 13px; }

/* フォーム */
.contact-form {
  background: white;
  color: var(--primary-dark);
  border-radius: 12px;
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
}
.contact-form h3 { margin-bottom: 24px; color: var(--primary); text-align: center; }
.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: bold;
  font-size: 14px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 6px;
  font-size: 15px;
  font-family: inherit;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,91,142,0.1);
}
.required {
  background: var(--emergency);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
}
.form-note { text-align: center; color: var(--gray); font-size: 13px; margin-top: 12px; }

/* フッター */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.8);
  padding: 60px 20px 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 { color: white; margin-bottom: 16px; font-size: 15px; }
.footer ul li { padding: 4px 0; font-size: 14px; }
.footer-tel { font-size: 24px; color: var(--accent); font-weight: bold; margin-bottom: 8px; }
.footer-copy {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.6;
}

/* フロート電話 */
.float-tel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 16px 24px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(255,122,0,0.4);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 90;
  animation: pulse 2s infinite;
}
.float-tel span:first-child { font-size: 24px; }
.float-text { font-size: 13px; line-height: 1.2; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* レスポンシブ */
@media (max-width: 768px) {
  .nav { display: none; }
  .header-tel { display: none; }
  .hero { min-height: 80vh; padding: 60px 16px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .hero-stats { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .stat-num { font-size: 28px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn, .hero-cta .btn-secondary-light { width: 100%; text-align: center; }
  .services, .works, .insurance-grid, .voices, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 60px 20px; }
  .section-title { font-size: 24px; }
  .float-tel { padding: 12px 16px; }
  .float-text { display: none; }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .services, .works, .insurance-grid, .voices, .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
