/* Styles for rich text content rendered from TipTap editor */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.3;
}

.entry-content h1 { font-size: 2em; }
.entry-content h2 { font-size: 1.6em; }
.entry-content h3 { font-size: 1.3em; }
.entry-content h4 { font-size: 1.1em; }

.entry-content p {
  margin-bottom: 1em;
}

/* Images */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1em 0;
}

.entry-content img.editor-image {
  display: block;
}

/* Tables */
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  overflow-x: auto;
  display: block;
}

@media (min-width: 768px) {
  .entry-content table {
    display: table;
  }
}

.entry-content table td,
.entry-content table th {
  border: 1px solid #ddd;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

.entry-content table th {
  background: #f5f5f5;
  font-weight: 600;
}

.entry-content table tr:nth-child(even) td {
  background: #fafafa;
}

/* Blockquotes */
.entry-content blockquote {
  border-left: 4px solid #2563eb;
  padding: 12px 20px;
  margin: 1.5em 0;
  background: #f0f4ff;
  color: #444;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

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

/* Lists */
.entry-content ul,
.entry-content ol {
  padding-left: 1.8em;
  margin: 0.8em 0;
}

.entry-content ul { list-style-type: disc; }
.entry-content ol { list-style-type: decimal; }
.entry-content li { margin: 0.3em 0; }

/* Code */
.entry-content code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  color: #d63384;
}

.entry-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
  line-height: 1.5;
}

.entry-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.9em;
}

/* Horizontal rule */
.entry-content hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 2em 0;
}

/* Links */
.entry-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: #1d4ed8;
}

/* YouTube embeds */
.entry-content div[data-youtube-video],
.entry-content .youtube-embed {
  position: relative;
  width: 100%;
  margin: 1.5em 0;
}

.entry-content iframe[src*="youtube"] {
  max-width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Highlight/mark */
.entry-content mark {
  background: #fff3cd;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Underline */
.entry-content u {
  text-underline-offset: 3px;
}
