/* =====================================================================
 * Neoangio — Blog public CSS
 * ===================================================================== */

/* =====================================================================
 * Compensación de header sticky/fixed (extraído del Next.js)
 * El JS detecta la altura real y la aplica con inline-style.
 * Este CSS sirve como fallback para evitar flicker en la carga inicial.
 * ===================================================================== */
body > header[class*="fixed"],
body > header[class*="sticky"],
body > nav[role="banner"][class*="fixed"] {
  background: white; /* Por si el extractor no copió el bg */
}

/* Padding-top inicial mínimo en el primer section del blog
 * (el JS lo sobreescribe con la altura exacta del shell en cuanto carga).
 * 120px cubre franja superior + header en la mayoría de casos. */
body > section:first-of-type,
body > main:first-of-type,
body > article:first-of-type {
  padding-top: 120px;
}

/* En mobile el header suele ser solo header (sin franja superior si está oculta md:flex) */
@media (max-width: 768px) {
  body > section:first-of-type,
  body > main:first-of-type,
  body > article:first-of-type {
    padding-top: 80px;
  }
}

/* Article content typography (replaces @tailwindcss/typography) */
.article-content {
  font-size: 17px;
  line-height: 1.75;
  color: #374151;
}
.article-content > * + * { margin-top: 1.25em; }

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
  margin-top: 2.5em;
  margin-bottom: 0.75em;
  line-height: 1.2;
}
.article-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #111827;
  margin-top: 2em;
  margin-bottom: 0.5em;
  line-height: 1.25;
}
.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.article-content p {
  margin-top: 0;
  margin-bottom: 1.25em;
}
.article-content a {
  color: #0369a1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s;
}
.article-content a:hover { color: #0c4a6e; }
.article-content strong { color: #111827; font-weight: 600; }
.article-content em { font-style: italic; }
.article-content ul, .article-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }
.article-content li { margin-bottom: 0.4em; }
.article-content li::marker { color: #0e72ba; }
.article-content blockquote {
  border-left: 4px solid #0e72ba;
  padding: 0.75em 1.5em;
  margin: 1.5em 0;
  background: #f0f9ff;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4b5563;
}
.article-content blockquote p { margin: 0; }
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.article-content code {
  background: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
  color: #be185d;
}
.article-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 1em 1.25em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
}
.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.article-content hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2.5em 0;
}

/* Responsive */
@media (max-width: 768px) {
  .article-content { font-size: 16px; line-height: 1.7; }
  .article-content h2 { font-size: 1.5rem; margin-top: 2em; }
  .article-content h3 { font-size: 1.25rem; }
  .article-content h4 { font-size: 1.125rem; }
  .article-content blockquote { padding: 0.5em 1em; margin: 1.25em 0; }
  .article-content img { margin: 1.5em 0; border-radius: 8px; }
}

@media (max-width: 640px) {
  /* Hero con portada más pequeño */
  .h-\[420px\] { height: 240px !important; }
  .h-\[300px\] { height: 200px !important; }

  /* Nav mobile: logo más pequeño */
  header .text-xl { font-size: 16px; }

  /* Breadcrumb compacto */
  nav[aria-label="Breadcrumb"] { font-size: 12px; }
}

/* Line clamp utility (por si Tailwind CDN no la incluye) */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
