/* ================================================================
   OKINAWA LIFE Design — Works detail (page-works-moshimo.php)
   Format: Before/After リニューアル比較レポート
   Loaded only when the Works—もしも防災 template is active.
================================================================ */

/* Suppress the global background video / overlay that header.php injects.
   Detail page uses a clean white report-style background. */
body.page-template-page-works-moshimo .global-bg-video { display: none; }
body.page-template-page-works-moshimo::before { display: none; }

body.page-template-page-works-moshimo {
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'Noto Serif JP', 'Shippori Mincho', serif;
  margin: 0;
  overflow-x: hidden;
}

body.page-template-page-works-moshimo *,
body.page-template-page-works-moshimo *::before,
body.page-template-page-works-moshimo *::after {
  box-sizing: border-box;
}

.works-detail h1,
.works-detail h2,
.works-detail h3,
.works-detail p,
.works-detail ul,
.works-detail ol {
  margin: 0;
}

/* ================================================================
   SECTION 1 — Hero (report style)
   White bg.  Two-column on desktop:
     - Left  : Works 01 badge / title / lead / ✓ keywords
     - Right : faint vertical "Before ↓ After" decoration
   Stacks single-column on mobile.
================================================================ */
.works-hero {
  position: relative;
  background: #ffffff;
  color: #1a1a1a;
  padding: calc(var(--site-header-height, 72px) + 96px) 48px 120px;
  overflow: hidden;
  isolation: isolate;
}

.works-hero__inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.works-hero__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

/* Allow long Japanese strings to break anywhere instead of pushing
   beyond the column. Applies at every breakpoint. */
.works-hero__title,
.works-hero__sub,
.works-hero__keywords li {
  overflow-wrap: anywhere;
}

.works-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: #00A878;
  text-transform: uppercase;
}
.works-hero__badge::before {
  content: "";
  width: 36px;
  height: 1px;
  background: #00A878;
  display: inline-block;
}

.works-hero__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.6;
  letter-spacing: 0;
  color: #1a1a1a;
  word-break: break-word;
}

.works-hero__sub {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  line-height: 2;
  color: #4a6875;
  max-width: 620px;
}

.works-hero__keywords {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-top: 4px;
}
.works-hero__keywords li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: 'Noto Serif JP', serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: #1a1a1a;
}
.works-hero__keywords li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #00A878;
  color: #ffffff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}

/* Decorative Before ↓ After (right column on desktop) */
.works-hero__deco {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(48px, 7.2vw, 108px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(0, 168, 120, 0.10);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}
.works-hero__deco-row {
  display: block;
}
.works-hero__deco-arrow {
  font-size: 0.5em;
  color: rgba(0, 168, 120, 0.22);
  font-weight: 600;
  margin: 4px 0;
}

@media (max-width: 1024px) {
  .works-hero {
    padding: calc(var(--site-header-height, 72px) + 80px) 40px 96px;
  }
  .works-hero__inner {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 48px;
  }
  .works-hero__deco {
    font-size: clamp(40px, 8vw, 72px);
  }
}

@media (max-width: 768px) {
  .works-hero {
    padding: calc(var(--site-header-height, 72px) + 48px) 24px 72px;
  }
  .works-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .works-hero__body {
    gap: 22px;
  }
  .works-hero__deco {
    font-size: clamp(36px, 11vw, 56px);
    align-items: flex-start;
  }
}

/* ================================================================
   SECTION 2 — Main Before / After (report style)
   White bg.  Three-column compare on desktop:
     [ Before card ] [ → arrow ] [ After card ]
   Stacks single-column on mobile (arrow becomes ↓).
================================================================ */
.works-main {
  background: #ffffff;
  color: #1a1a1a;
  padding: 96px 48px 120px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.works-main__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.works-main__header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 64px;
  max-width: 720px;
}

.works-main__eyebrow {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: #00A878;
  text-transform: uppercase;
}

.works-main__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: clamp(24px, 3.0vw, 36px);
  line-height: 1.5;
  color: #1a1a1a;
}

.works-main__lead {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  line-height: 2;
  color: #4a6875;
  overflow-wrap: anywhere;
}

/* Compare grid: Before / arrow / After */
.works-main__compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 32px;
}
/* Spacing between consecutive comparison sets */
.works-main__compare + .works-main__compare {
  margin-top: 96px;
}

.works-main__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.works-main__label {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
}
.works-main__label--before {
  color: #6b7280;
  background: #f1f3f5;
}
.works-main__label--after {
  color: #ffffff;
  background: #00A878;
}

.works-main__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f5f6f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 32px -20px rgba(15, 30, 50, 0.25);
}
.works-main__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.works-main__caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 4px 0;
  min-width: 0;
}
.works-main__caption-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
}
.works-main__caption-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  line-height: 1.9;
  color: #4a6875;
  overflow-wrap: anywhere;
}

/* Center arrow */
.works-main__arrow {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  color: #00A878;
  margin-top: 36px; /* visually align with image center vs label */
  user-select: none;
}
.works-main__arrow-h {
  font-size: 44px;
  line-height: 1;
  display: inline-block;
}
.works-main__arrow-v {
  display: none;
  font-size: 36px;
  line-height: 1;
}

@media (max-width: 1024px) {
  .works-main {
    padding: 80px 40px 96px;
  }
  .works-main__compare {
    gap: 24px;
  }
  .works-main__arrow-h {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .works-main {
    padding: 64px 24px 80px;
  }
  .works-main__header {
    margin-bottom: 40px;
    gap: 14px;
  }
  .works-main__compare {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .works-main__compare + .works-main__compare {
    margin-top: 64px;
  }
  .works-main__arrow {
    margin-top: 0;
    margin-bottom: 4px;
  }
  .works-main__arrow-h {
    display: none;
  }
  .works-main__arrow-v {
    display: inline-block;
  }
  .works-main__card {
    gap: 16px;
  }
  .works-main__caption-title {
    font-size: 16px;
  }
}

/* Sections 3-7 will be added in next steps. */
