/**
 * Blog — Diseño Latino
 * Tipografía, espacio en blanco e imágenes servidas desde el propio servidor.
 */

html,
body {
  font-family: "Inter", sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
}

.lead,
.dl-blog-article-prose .lead,
.dl-blog-card-excerpt {
  font-weight: 300 !important;
}

p,
li,
td,
th {
  font-family: "Inter", sans-serif !important;
  font-weight: 400;
}

/* —— Archivo blog (rejilla tipo artículos) —— */
.dl-blog-archive-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.dl-blog-archive-intro {
  max-width: 38rem;
  margin-bottom: 3.25rem;
  padding-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .dl-blog-archive-intro {
    margin-bottom: 3.75rem;
  }
}

.dl-blog-archive-title {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #1a1a1a;
}

.dl-blog-archive-sub {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.dl-blog-hero-eyebrow {
  font-family: "Inter", sans-serif !important;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  opacity: 0.85;
}

.dl-blog-hero-lead {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  opacity: 0.92;
}

.dl-blog-feed-panel {
  min-height: 14rem;
}

.dl-blog-loading-state {
  padding: 3rem 1rem;
  font-size: 1.0625rem;
  transition: opacity 0.45s ease;
}

.dl-blog-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .dl-blog-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 1.75rem;
  }
}

@media (min-width: 1200px) {
  .dl-blog-articles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

.dl-blog-grid-message {
  grid-column: 1 / -1;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 0.5rem;
}

.dl-blog-grid-message--tall {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.dl-blog-empty-copy {
  line-height: 1.55;
}

.dl-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.dl-blog-card:hover {
  border-color: rgba(92, 14, 39, 0.12);
  box-shadow: 0 20px 48px rgba(92, 14, 39, 0.1);
  transform: translateY(-3px);
}

.dl-blog-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(92, 14, 39, 0.04);
  flex-shrink: 0;
}

.dl-blog-thumb-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.dl-blog-thumb-link:hover {
  text-decoration: none;
  color: inherit;
}

.dl-blog-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.dl-blog-thumb-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(
    155deg,
    rgba(92, 14, 39, 0.08) 0%,
    #fafafa 48%,
    rgba(92, 14, 39, 0.05) 100%
  );
}

.dl-blog-thumb-initial {
  font-family: "Inter", sans-serif !important;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1;
  font-weight: 700;
  color: #5c0e27;
  opacity: 0.28;
}

.dl-blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.5rem 1.5rem 1.35rem;
}

@media (min-width: 768px) {
  .dl-blog-card-body {
    padding: 1.65rem 1.65rem 1.5rem;
  }
}

@media (min-width: 1200px) {
  .dl-blog-card-body {
    padding: 1.75rem 1.75rem 1.6rem;
  }
}

.dl-blog-card-category {
  font-family: "Inter", sans-serif !important;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 0.65rem;
  line-height: 1.3;
}

.dl-blog-card-category:first-child {
  margin-top: 0;
}

.dl-blog-card-title {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  color: #1a1a1a;
}

@media (min-width: 768px) {
  .dl-blog-card-title {
    font-size: 1.125rem;
  }
}

.dl-blog-card-title a {
  color: #5c0e27;
  text-decoration: none;
}

.dl-blog-card-title a:hover {
  color: #3d0919;
  text-decoration: none;
}

.dl-blog-card-excerpt {
  font-family: "Inter", sans-serif !important;
  font-weight: 300 !important;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #555;
  margin: 0 0 1.25rem;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.dl-blog-card-excerpt--empty {
  color: #b0b0b0;
}

.dl-blog-card-footer {
  margin-top: auto;
  padding-top: 0.15rem;
}

.dl-blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Inter", sans-serif !important;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5c0e27 !important;
  text-decoration: none !important;
  transition: color 0.2s ease, gap 0.25s ease;
}

.dl-blog-card-cta-arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.dl-blog-card-cta:hover {
  color: #3d0919 !important;
  text-decoration: none !important;
}

.dl-blog-card:hover .dl-blog-card-cta {
  color: #3d0919 !important;
}

.dl-blog-card:hover .dl-blog-card-cta-arrow {
  transform: translateX(4px);
}

.dl-blog-post-cover {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  flex-shrink: 0;
  max-height: 480px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(92, 14, 39, 0.04);
}

.dl-blog-post-cover img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Artículo (post/articulo): mismo patrón que #producción; ancho vía Bootstrap col-lg-10 */
#blog-content-area {
  overflow-x: hidden;
}

#blog-content-area #post-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

/* Contenido Quill / HTML inyectado: sin float ni anchos heredados del framework */
#post-body,
#articulo-body {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  min-width: 0;
  flex: 0 1 auto;
}

#post-body *:not(img):not(video):not(iframe):not(svg),
#articulo-body *:not(img):not(video):not(iframe):not(svg) {
  max-width: 100% !important;
  float: none !important;
}

#post-body img,
#post-body video,
#articulo-body img,
#articulo-body video {
  max-width: 100% !important;
  height: auto !important;
  float: none !important;
}

#post-content .ql-editor,
#post-body .ql-editor,
#articulo-body .ql-editor {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

#post-content .ql-editor *,
#post-body .ql-editor *,
#articulo-body .ql-editor * {
  float: none !important;
  max-width: 100% !important;
}

#post-body .ql-editor *,
#articulo-body .ql-editor * {
  width: 100% !important;
}

#blog-content-area .dl-blog-article-end {
  border-color: rgba(92, 14, 39, 0.1) !important;
}

.dl-blog-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif !important;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 14, 39, 0.22);
  color: #5c0e27 !important;
  background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}

.dl-blog-back-btn:hover {
  border-color: rgba(92, 14, 39, 0.45);
  background: rgba(92, 14, 39, 0.04);
  box-shadow: 0 8px 24px rgba(92, 14, 39, 0.06);
  color: #5c0e27 !important;
}

.dl-blog-back-btn--on-dark {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.92) !important;
}

.dl-blog-back-btn--on-dark:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #fff !important;
}

/* —— Cuerpo del artículo (HTML desde Firestore / Quill) —— */
.dl-blog-article-prose {
  font-family: "Inter", sans-serif !important;
  font-weight: 400;
  font-size: 1.0625rem;
  color: #333;
  line-height: 1.8;
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .dl-blog-article-prose {
    font-size: 1rem;
  }

  .dl-blog-article-prose h2 {
    margin-top: 2.25rem;
  }
}

.dl-blog-article-prose > *:first-child {
  margin-top: 0;
}

.dl-blog-article-prose h1 {
  font-family: "Inter", sans-serif !important;
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.dl-blog-article-prose h2 {
  font-family: "Inter", sans-serif !important;
  font-size: clamp(1.85rem, 4.2vw, 2.45rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #5c0e27;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(92, 14, 39, 0.12);
}

.dl-blog-article-prose h3 {
  font-family: "Inter", sans-serif !important;
  font-size: clamp(1.25rem, 2.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #2a2a2a;
  margin: 2rem 0 0.75rem;
}

.dl-blog-article-prose p,
.dl-blog-article-prose li {
  line-height: 1.8;
  color: #333;
}

.dl-blog-article-prose p {
  margin-bottom: 1.5rem;
}

.dl-blog-article-prose p.lead {
  color: #333;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.dl-blog-article-prose strong,
.dl-blog-article-prose b {
  font-weight: 600;
  color: #1a1a1a;
}

.dl-blog-article-prose ul,
.dl-blog-article-prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.35rem;
}

@media (min-width: 768px) {
  .dl-blog-article-prose ul,
  .dl-blog-article-prose ol {
    padding-left: 1.6rem;
  }
}

.dl-blog-article-prose ul {
  list-style-type: disc;
}

.dl-blog-article-prose ol {
  list-style-type: decimal;
}

.dl-blog-article-prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.dl-blog-article-prose li::marker {
  color: rgba(92, 14, 39, 0.55);
}

.dl-blog-article-prose blockquote {
  margin: 1.75rem 0;
  padding: 1.1rem 1.25rem 1.1rem 1.35rem;
  border-left: 4px solid #5c0e27;
  background: rgba(92, 14, 39, 0.04);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #444;
  line-height: 1.8;
}

.dl-blog-article-prose blockquote p {
  margin-bottom: 1.5rem;
}

.dl-blog-article-prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Imágenes del cuerpo: coexistentes con .img-fluid + .rounded de Bootstrap */
.dl-blog-article-prose img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1.5rem auto 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.dl-blog-article-prose img.rounded {
  border-radius: 0.25rem;
}

.dl-blog-article-prose a {
  color: #5c0e27;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.dl-blog-article-prose a:hover {
  color: #3d0919;
}

/* Compatibilidad: clases heredadas en listados u otros contextos */
.blog-article-body:not(.dl-blog-article-prose) h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.blog-article-body:not(.dl-blog-article-prose) h2 {
  font-size: 1.65rem;
  line-height: 1.3;
  margin: 2rem 0 0.85rem;
}

.blog-article-body:not(.dl-blog-article-prose) h3 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 1.5rem 0 0.65rem;
}

.blog-article-body:not(.dl-blog-article-prose) p {
  margin-bottom: 1.1rem;
}

.blog-article-body:not(.dl-blog-article-prose) ul,
.blog-article-body:not(.dl-blog-article-prose) ol {
  margin-bottom: 1.1rem;
  padding-left: 1.25rem;
}

.blog-article-body:not(.dl-blog-article-prose) img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.blog-article-body:not(.dl-blog-article-prose) blockquote {
  border-left: 3px solid rgba(92, 14, 39, 0.25);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: rgba(92, 14, 39, 0.85);
}

body.blog-page #blog-hero h1 {
  text-align: center;
}

#post-cover::after,
#articulo-cover::after {
  content: "";
  display: table;
  clear: both;
}
