/* 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;
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html {
  overflow-x: hidden;
  font-family: 'Noto Sans JP', sans-serif;
  color: #1F2937;
  scroll-behavior: smooth;
}

body {
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Animations */
@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; }
}

.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; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* Carousel Animation */
@keyframes slide {
  0%, 25% { transform: translateX(0); }
  33.33%, 58.33% { transform: translateX(-100%); }
  66.66%, 91.66% { transform: translateX(-200%); }
  100% { transform: translateX(0); }
}
.carousel-track {
  display: flex;
  width: 300%;
  animation: slide 18s infinite cubic-bezier(0.77, 0, 0.175, 1);
}
.carousel-slide {
  width: 33.333%;
  flex-shrink: 0;
}

/* Prose Styles for HTML Content */
.prose {
  max-width: 100%;
  color: #1F2937;
  line-height: 1.8;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f5f5f5;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.prose p {
  margin-bottom: 1.5rem;
}
.prose ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.prose ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose a {
  color: #ea7620;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.prose a:hover {
  color: #c85e12;
}
.prose blockquote {
  border-left: 4px solid #E5E7EB;
  padding-left: 1rem;
  color: #4B5563;
  font-style: italic;
  margin: 1.5rem 0;
}

/* Hamburger menu open/close (js/main.js) */
#site-header > div.absolute.top-full.is-open {
  max-height: 500px;
}

/* グーテンベルクのYouTube埋め込み（URL埋め込み）をレスポンシブ対応 */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
  height: 0;
  overflow: hidden;
}
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper {
  padding-top: 56.25%;
}
.wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper {
  padding-top: 75%;
}
.wp-block-embed.wp-embed-aspect-1-1 .wp-block-embed__wrapper {
  padding-top: 100%;
}

/* ページネーション（home.php / archive.php） */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  margin: 0 0.25rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.page-numbers.current {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.page-numbers:hover:not(.current):not(.dots) {
  border-color: #2563eb;
  color: #2563eb;
}
.page-numbers.dots {
  border: none;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}
