/* ============================================
 * 明和工業株式会社 コーポレートサイト共通CSS
 * ============================================ */

:root {
  --meiwa-navy:  #0d3b66;
  --meiwa-blue:  #1d6fa5;
  --meiwa-sky:   #4aa3df;
  --meiwa-accent:#00a896;
  --meiwa-gold:  #f0a202;
  --meiwa-gray:  #f2f6fa;
  --meiwa-text:  #1f2937;
  --meiwa-muted: #6b7280;
  --meiwa-red:   #c8332b;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--meiwa-text);
  line-height: 1.7;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.en {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.05em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--meiwa-navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--meiwa-accent); }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  max-width: 1280px; margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-logo .logo-mark {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.site-logo .logo-mark img,
.footer-logo .logo-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.site-logo .logo-text h1 {
  margin: 0; font-size: 28px; color: var(--meiwa-navy); font-weight: 800;
  line-height: 1.2; letter-spacing: .03em;
}
.site-logo .logo-text p {
  margin: 4px 0 0; font-family: "Montserrat", sans-serif;
  font-size: 12px; color: var(--meiwa-muted); letter-spacing: .08em;
}

.gnav { display: flex; align-items: center; gap: 28px; }
.gnav a {
  font-size: 14px; font-weight: 500; color: var(--meiwa-text);
  position: relative; padding: 6px 0;
}
.gnav a.active, .gnav a:hover { color: var(--meiwa-navy); }
.gnav a.active::after, .gnav a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--meiwa-accent);
}
.gnav .btn-contact {
  background: var(--meiwa-gold); color: var(--meiwa-navy);
  padding: 10px 20px; border-radius: 6px; font-weight: 700;
}
.gnav .btn-contact::after { display: none; }
.gnav .btn-contact:hover { background: var(--meiwa-navy); color: #fff; }

.menu-btn {
  display: none; background: none; border: 0; font-size: 24px;
  color: var(--meiwa-navy); cursor: pointer;
}

/* ---------- Mobile Nav ---------- */
.mobile-nav {
  display: none;
  background: var(--meiwa-navy); color: #fff;
  padding: 20px;
}
.mobile-nav a {
  display: block; padding: 14px 0;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: 15px;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav .btn-contact {
  margin-top: 12px; background: var(--meiwa-gold); color: var(--meiwa-navy);
  text-align: center; border-radius: 6px; font-weight: 700; border: 0;
}

@media (max-width: 960px) {
  .gnav { display: none; }
  .menu-btn { display: block; }
  .mobile-nav.open { display: block; }
}
@media (max-width: 600px) {
  .site-logo .logo-text h1 { font-size: 20px; }
  .site-logo .logo-text p { font-size: 10px; }
  .site-logo .logo-mark { width: 48px; height: 48px; }
}
@media (max-width: 380px) {
  .site-logo .logo-text h1 { font-size: 17px; }
  .site-logo .logo-text p { display: none; }
}

/* ---------- Section Heading ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-heading { margin-bottom: 40px; }
.section-heading .en {
  color: var(--meiwa-accent);
  font-weight: 800; font-size: 13px; letter-spacing: .25em;
  display: block; margin-bottom: 6px;
}
.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: var(--meiwa-navy);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.3;
}
.section-heading .lead { color: var(--meiwa-muted); margin: 0; }
.section-heading.center { text-align: center; }

.bg-gray { background: var(--meiwa-gray); }
.bg-navy { background: var(--meiwa-navy); color: #fff; }
.bg-navy .section-heading h2 { color: #fff; }
.bg-navy .section-heading .lead { color: rgba(255,255,255,.75); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 8px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: all .2s ease; cursor: pointer; border: 0;
}
.btn-gold { background: var(--meiwa-gold); color: var(--meiwa-navy); }
.btn-gold:hover { background: var(--meiwa-navy); color: #fff; transform: translateY(-2px); }
.btn-navy { background: var(--meiwa-navy); color: #fff; }
.btn-navy:hover { background: var(--meiwa-blue); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: var(--meiwa-navy); }
.btn-accent { background: var(--meiwa-accent); color: #fff; }
.btn-accent:hover { background: var(--meiwa-navy); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 18px -8px rgba(13,59,102,.15);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(13,59,102,.35); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0b2846; color: #cbd5e1; padding: 60px 0 20px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-grid .logo-mark { width: 50px; height: 50px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-logo { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 16px; }
.footer-logo h2 { margin: 0; font-size: 18px; font-weight: 700; }
.footer-logo p { margin: 2px 0 0; font-family: "Montserrat", sans-serif; font-size: 11px; color: #94a3b8; }
.footer-info { font-size: 14px; line-height: 1.9; color: #cbd5e1; }
.footer-col h4 {
  font-family: "Montserrat", sans-serif; color: var(--meiwa-gold);
  font-size: 12px; letter-spacing: .2em; margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #cbd5e1; font-size: 14px; }
.footer-col a:hover { color: var(--meiwa-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
  text-align: center; font-size: 12px; color: #64748b;
  font-family: "Montserrat", sans-serif;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Utils ---------- */
.text-center { text-align: center; }
.text-navy { color: var(--meiwa-navy); }
.text-accent { color: var(--meiwa-accent); }
.text-gold { color: var(--meiwa-gold); }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--meiwa-gray); padding: 14px 0;
  font-size: 13px; color: var(--meiwa-muted);
}
.breadcrumb a { color: var(--meiwa-muted); }
.breadcrumb a:hover { color: var(--meiwa-navy); }
.breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }
.breadcrumb .current { color: var(--meiwa-navy); font-weight: 600; }

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, var(--meiwa-navy) 0%, var(--meiwa-blue) 60%, var(--meiwa-sky) 100%);
  color: #fff; padding: 80px 0 70px; text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .6;
}
.page-header > * { position: relative; z-index: 1; }
.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; margin: 0 0 8px;
}
.page-header p.en {
  color: var(--meiwa-gold); font-weight: 700;
  letter-spacing: .3em; font-size: 13px; margin: 0 0 10px;
}

/* ---------- FAB ---------- */
.fab-contact {
  position: fixed; bottom: 20px; right: 20px; z-index: 90;
  background: var(--meiwa-gold); color: var(--meiwa-navy);
  padding: 14px 22px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px -8px rgba(240,162,2,.6);
  display: inline-flex; align-items: center; gap: 8px;
}
.fab-contact:hover { background: var(--meiwa-navy); color: #fff; }

/* ---------- Image Fallback ---------- */
/* 画像が読み込めない場合に備えた控えめな背景色 */
img[src] { background: #f1f5f9; }

/* 業種別カラフルなプレースホルダー（SVG背景 for カード表示） */
.img-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  color: #fff; font-size: 48px;
  background-size: cover; background-position: center;
}
.ph-aircon  { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }
.ph-water   { background: linear-gradient(135deg, #0369a1 0%, #0891b2 100%); }
.ph-pipe    { background: linear-gradient(135deg, #1e40af 0%, #0369a1 100%); }
.ph-fire    { background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%); }
.ph-clean   { background: linear-gradient(135deg, #059669 0%, #10b981 100%); }
.ph-maint   { background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%); }
.ph-public  { background: linear-gradient(135deg, #0d3b66 0%, #1d6fa5 100%); }
.ph-commerce{ background: linear-gradient(135deg, #f0a202 0%, #fb923c 100%); }
.ph-factory { background: linear-gradient(135deg, #475569 0%, #64748b 100%); }
.ph-house   { background: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%); }
.ph-worker  { background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%); }

.photo-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--meiwa-navy), var(--meiwa-blue));
}
.photo-card .photo-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 90px; color: rgba(255,255,255,.25);
  z-index: 0;
}
.photo-card .photo-pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 30px 30px; opacity: .8;
  z-index: 0;
}
