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