/* ===== Reset & Base Styles ===== */
/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ===== Rich text (prose) styles for CMS content ===== */
.prose {
  color: #374151;
  line-height: 1.7;
}
.prose h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #374151;
}
.prose p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.prose blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-style: italic;
}
.prose blockquote p { margin-bottom: 0; }
.prose code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
  color: #e11d48;
}
.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}
.prose a { color: #3b82f6; text-decoration: underline; }
.prose a:hover { color: #2563eb; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}
.prose hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}
.prose strong { font-weight: 600; color: #111827; }
.prose em { font-style: italic; }
.prose u { text-decoration: underline; }
.prose s { text-decoration: line-through; }

/* Tiptap text alignment support */
.prose [style*="text-align: center"],
.prose [style*="text-align:center"] {
  text-align: center !important;
}
.prose [style*="text-align: right"],
.prose [style*="text-align:right"] {
  text-align: right !important;
}
.prose [style*="text-align: justify"],
.prose [style*="text-align:justify"] {
  text-align: justify !important;
}

/* ===== Animations ===== */
html {
      overflow-x: hidden;
      scroll-behavior: smooth;
    }
    body {
      font-family: 'Noto Sans JP', sans-serif;
      color: #1F2937;
      background-color: #FFFFFF;
      -webkit-font-smoothing: antialiased;
    }
    .font-heading {
      font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
    }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes slideInUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    @keyframes slideInLeft { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    @keyframes slideInRight { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

    .animate-fadeIn { animation: fadeIn 0.8s ease-out forwards; }
    .animate-slideInUp { animation: slideInUp 0.8s ease-out forwards; }
    .animate-slideInLeft { animation: slideInLeft 0.8s ease-out forwards; }
    .animate-slideInRight { animation: slideInRight 0.8s ease-out forwards; }

    .stagger-1 { animation-delay: 0.1s; }
    .stagger-2 { animation-delay: 0.2s; }
    .stagger-3 { animation-delay: 0.3s; }
    .stagger-4 { animation-delay: 0.4s; }

/* ===== Mobile Navigation ===== */
#site-nav.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 40;
    gap: 1rem;
}
#site-nav.is-open ul {
    flex-direction: column;
    gap: 0;
}
#site-nav.is-open ul li a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #1F2937 !important;
}
#hamburger-btn.is-active svg {
    transform: rotate(90deg);
    transition: transform 0.2s;
}

/* ===== WordPress Pagination ===== */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    margin: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1F2937;
    text-decoration: none;
    transition: all 0.2s;
}
.page-numbers:hover {
    border-color: #00A3FF;
    color: #00A3FF;
}
.page-numbers.current {
    background-color: #00A3FF;
    border-color: #00A3FF;
    color: #ffffff;
}
.page-numbers.dots {
    border: none;
    background: transparent;
}
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}
