/* ========================================
   マリッジピア - Hugo Theme Styles
   ======================================== */

/* CSS Variables */
:root {
  --color-primary: #2a9d8f;
  --color-primary-dark: #238b7e;
  --color-primary-light: #e8f5f3;
  --color-accent: #e76f51;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-background: #ffffff;
  --color-background-alt: #f8fafa;
  --color-border: #e0e0e0;
  --font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "メイリオ", Meiryo, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 14px;
  --font-size-large: 18px;
  --line-height: 1.8;
  --max-width: 800px;
  --max-width-wide: 1000px;
  --spacing-unit: 8px;
  --header-height: 72px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

h2 {
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--color-primary);
}

h3 {
  padding-left: 0.75em;
  border-left: 4px solid var(--color-primary);
}

p {
  margin: 0 0 1.5em;
}

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

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

ul, ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.5em;
}

li ul, li ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

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

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3em 0;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
}

.site-nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: calc(var(--spacing-unit) * 3);
}

.site-nav__link {
  font-size: var(--font-size-small);
  color: var(--color-text);
  text-decoration: none;
  padding: calc(var(--spacing-unit) * 1) 0;
  position: relative;
}

.site-nav__link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.2s ease;
}

.site-nav__link:hover::after {
  width: 100%;
}

.site-nav__link--external::after {
  content: none;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-unit);
}

.nav-toggle__icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
}

.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after { bottom: -7px; }

/* Main Content */
.site-main {
  padding: calc(var(--spacing-unit) * 6) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* Page Header */
.page-header {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  color: var(--color-text);
}

.page-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin-top: calc(var(--spacing-unit) * 2);
}

/* Home Page Hero */
.hero {
  background-color: var(--color-primary-light);
  padding: calc(var(--spacing-unit) * 6) 0;
  margin-bottom: calc(var(--spacing-unit) * 6);
  border-radius: 8px;
}

.hero__lead {
  font-size: var(--font-size-large);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1em;
}

.hero__highlight {
  background: linear-gradient(transparent 60%, #b8e6df 60%);
  padding: 0 0.25em;
}

/* Content Styles */
.content {
  font-size: 1rem;
  line-height: var(--line-height);
}

.content > *:first-child {
  margin-top: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: var(--font-size-small);
}

th, td {
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
  text-align: left;
  border: 1px solid var(--color-border);
}

th {
  background-color: var(--color-background-alt);
  font-weight: 600;
}

tr:nth-child(even) td {
  background-color: var(--color-background-alt);
}

/* CTA Button */
.cta-button {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
  background-color: var(--color-primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: var(--color-primary-dark);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
}

.cta-button--accent {
  background-color: var(--color-accent);
}

.cta-button--accent:hover {
  background-color: #d35d42;
}

.cta-section {
  background-color: var(--color-background-alt);
  padding: calc(var(--spacing-unit) * 5);
  border-radius: 8px;
  margin: calc(var(--spacing-unit) * 5) 0;
  text-align: center;
}

.cta-section h2 {
  border-bottom: none;
  text-align: center;
}

.cta-buttons {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: calc(var(--spacing-unit) * 3);
}

/* Feature List */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 2em 0;
}

.feature-list > li {
  position: relative;
  padding-left: 2em;
  margin-bottom: 1em;
}

.feature-list > li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Card */
.card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: calc(var(--spacing-unit) * 3);
  margin: calc(var(--spacing-unit) * 3) 0;
}

.card--highlight {
  border-left: 4px solid var(--color-primary);
}

/* Quote/Callout */
blockquote {
  margin: 1.5em 0;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
  background-color: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background-color: var(--color-background-alt);
  border-top: 1px solid var(--color-border);
  padding: calc(var(--spacing-unit) * 5) 0;
  margin-top: calc(var(--spacing-unit) * 8);
}

.site-footer__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 4);
  flex-wrap: wrap;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.footer-nav__link {
  font-size: var(--font-size-small);
  color: var(--color-text-light);
}

.footer-nav__link:hover {
  color: var(--color-primary);
}

.site-footer__copyright {
  text-align: center;
  font-size: var(--font-size-small);
  color: var(--color-text-light);
}

/* Step Flow */
.flow-step {
  position: relative;
  padding-left: calc(var(--spacing-unit) * 6);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.flow-step__number {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-small);
}

.flow-step__title {
  font-weight: 600;
  margin-bottom: 0.5em;
}

.flow-step__content {
  color: var(--color-text-light);
}

/* Comparison highlight */
.highlight-cell {
  background-color: var(--color-primary-light) !important;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .site-nav__list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-background);
    flex-direction: column;
    padding: calc(var(--spacing-unit) * 2);
    border-bottom: 1px solid var(--color-border);
    gap: 0;
  }

  .site-nav__list.is-active {
    display: flex;
  }

  .site-nav__link {
    display: block;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
  }

  .nav-toggle {
    display: block;
  }

  .container {
    padding: 0 calc(var(--spacing-unit) * 2);
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-button {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
  }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .cta-section {
    display: none;
  }

  .site-main {
    padding: 0;
  }

  a {
    color: var(--color-text);
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: var(--font-size-small);
    color: var(--color-text-light);
  }
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.hero__picture {
  display: block;
  width: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.hero__link {
  position: absolute;
  display: block;
  /* デスクトップ用のボタン位置 */
  bottom: 12%;
  left: 32%;
  width: 22%;
  height: 12%;
  /* デバッグ用（本番では削除）
  background: rgba(255, 0, 0, 0.3);
  */
}

.hero__link:hover {
  opacity: 0.8;
}

/* モバイル用のボタン位置調整 */
@media (max-width: 768px) {
  .hero__link {
    bottom: 4%;
    left: 10%;
    width: 80%;
    height: 8%;
  }
}
