/**
 * Blog — premium readability (inspirado en BlitSales).
 */

body.blog-modern,
body.blog-modern #main {
  background: #f5f6f8;
  color: #1a1a1f;
}

body.blog-modern .site-header {
  background: rgba(17, 17, 20, 0.92);
}

/* Hero */
body.blog-modern .page-hero {
  background: linear-gradient(135deg, #0d0d10 0%, #151820 55%, #0f1419 100%);
  border-bottom: 1px solid rgba(60, 183, 255, 0.18);
}

body.blog-modern .page-hero .eyebrow {
  border-color: rgba(60, 183, 255, 0.35);
  background: rgba(60, 183, 255, 0.1);
  color: var(--accent);
}

body.blog-modern .page-hero__title {
  color: #fff;
  max-width: 28ch;
}

body.blog-modern .page-hero__meta {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.blog-modern .page-hero--blog .page-hero__meta,
body.blog-modern .page-hero--blog .page-hero__meta time {
  color: rgba(255, 255, 255, 0.92) !important;
}

body.blog-modern .page-hero--blog .page-hero__meta.reveal {
  opacity: 1;
  transform: none;
}

/* Content section */
body.blog-modern .section--content {
  background: #f5f6f8;
}

body.blog-modern .content-area {
  max-width: none;
}

body.blog-modern .post-article {
  max-width: 900px;
  margin: -3rem auto 0;
  padding: 2.25rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.08);
}

/* Desktop layout (article + sticky index) */
body.blog-modern .blog-layout {
  max-width: 1200px;
  margin: -3rem auto 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

body.blog-modern .blog-layout__content .post-article {
  max-width: none;
  margin: 0;
}

body.blog-modern .blog-layout__sidebar {
  position: sticky;
  top: 92px; /* below header */
  align-self: start;
}

body.blog-modern .blog-layout__sidebar .blog-toc {
  padding: 1.1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(60, 183, 255, 0.1), rgba(15, 95, 168, 0.06));
  border: 1px solid rgba(60, 183, 255, 0.22);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.08);
}

body.blog-modern .blog-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body.blog-modern .blog-toc__kicker {
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #0b2b46;
}

body.blog-modern .blog-toc__toggle {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
  color: #111114;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-weight: 800;
  font-size: 0.9rem;
}

body.blog-modern .blog-toc__toggle:hover {
  border-color: rgba(60, 183, 255, 0.35);
}

body.blog-modern .blog-toc__list {
  margin: 0;
  padding-left: 1.15rem;
}

body.blog-modern .blog-toc__item {
  margin: 0.35rem 0;
  line-height: 1.35;
}

body.blog-modern .blog-toc__item--h3 {
  margin-left: 0.75rem;
  opacity: 0.92;
}

body.blog-modern .blog-toc a {
  color: #0f5fa8;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
}

body.blog-modern .blog-toc a.is-active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.blog-modern .post-article h2,
body.blog-modern .post-article h3,
body.blog-modern .post-article h4 {
  color: #111114;
  letter-spacing: -0.02em;
}

body.blog-modern .post-article p,
body.blog-modern .post-article li {
  color: #2a2a32;
  font-size: 1.05rem;
  line-height: 1.75;
}

body.blog-modern .post-article a:not(.btn) {
  color: #0f5fa8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.blog-modern .post-article a:not(.btn):hover {
  color: var(--accent);
}

body.blog-modern .post-article strong {
  color: #111114;
}

body.blog-modern .post-article img {
  display: block;
  max-width: min(100%, 680px);
  height: auto;
  margin-inline: auto;
  border-radius: 14px;
}

body.blog-modern .post-article figure {
  margin: 1.4rem auto;
  max-width: min(100%, 680px);
  text-align: center;
}

body.blog-modern .post-article figure img {
  margin-inline: auto;
}

body.blog-modern .post-article .wp-block-image,
body.blog-modern .post-article .aligncenter,
body.blog-modern .post-article img.aligncenter {
  display: block;
  margin-inline: auto;
  text-align: center;
}

body.blog-modern .post-article img.alignleft {
  margin-inline: 0 auto 1rem 0;
}

body.blog-modern .post-article img.alignright {
  margin-inline: 1rem 0 0 auto;
}

body.blog-modern .post-featured {
  display: block;
  margin: 0 auto 1.75rem;
  max-width: min(100%, 760px);
}

/* Quick summary panel */
body.blog-modern .post-article .blog-quick-summary {
  margin: 0 0 1.4rem;
}

body.blog-modern .post-article .blog-quick-summary__inner {
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(60, 183, 255, 0.12), rgba(15, 95, 168, 0.06));
  border: 1px solid rgba(60, 183, 255, 0.22);
}

body.blog-modern .post-article .blog-quick-summary__title {
  font-weight: 950;
  letter-spacing: -0.01em;
  color: #0b2b46;
  margin: 0 0 0.6rem;
}

body.blog-modern .post-article .blog-quick-summary__list {
  margin: 0;
  padding-left: 1.15rem;
}

body.blog-modern .post-article .blog-quick-summary__list li {
  margin: 0.45rem 0;
  color: #0b2b46;
  font-weight: 700;
}

/* Tables */
body.blog-modern .post-article table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.blog-modern .post-article th,
body.blog-modern .post-article td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
  color: #1a1a1f;
}

body.blog-modern .post-article th {
  background: #f3f6fb;
  font-weight: 800;
}

/* EZ-TOC (índice) — sidebar on desktop, inline on mobile */
body.blog-modern .blog-layout .post-article #ez-toc-container {
  display: none !important;
}

body.blog-modern .post-article #ez-toc-container.blog-toc--inline {
  display: block !important;
}

body.blog-modern .blog-layout__sidebar #ez-toc-container {
  display: block !important;
}

body.blog-modern .blog-toc--ez .ez-toc-title-container {
  margin-bottom: 0.75rem;
}

body.blog-modern .blog-toc--ez .ez-toc-title {
  margin: 0;
  font-weight: 900;
  color: #0b2b46 !important;
  cursor: default !important;
}

body.blog-modern .blog-toc--ez .ez-toc-title-toggle {
  display: none;
}

body.blog-modern .blog-toc--ez .ez-toc-list {
  margin: 0;
  padding-left: 1.15rem;
}

body.blog-modern .blog-toc--ez .ez-toc-link {
  color: #0f5fa8 !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

body.blog-modern .blog-toc--ez .ez-toc-link:hover {
  color: var(--accent) !important;
  text-decoration: underline;
}

body.blog-modern .blog-toc--ez .ez-toc-heading-level-3 {
  margin-left: 0.75rem;
}

body.blog-modern .post-article #ez-toc-container {
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(60, 183, 255, 0.1), rgba(15, 95, 168, 0.06));
  border: 1px solid rgba(60, 183, 255, 0.22);
}

body.blog-modern .post-article #ez-toc-container a {
  text-decoration: none;
}

body.blog-modern .post-article #ez-toc-container a:hover {
  text-decoration: underline;
}

/* Callouts / tips (no copy changes, styling only) */
body.blog-modern .post-article blockquote,
body.blog-modern .post-article .wp-block-quote {
  margin: 1.4rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: rgba(60, 183, 255, 0.08);
  border: 1px solid rgba(60, 183, 255, 0.22);
  border-left: 6px solid rgba(60, 183, 255, 0.65);
  color: #0b2b46;
}

body.blog-modern .post-article blockquote p,
body.blog-modern .post-article .wp-block-quote p {
  margin: 0;
  color: #0b2b46;
  font-weight: 700;
}

body.blog-modern .post-article .blog-callout {
  margin: 1.25rem 0;
  padding: 1.05rem 1.1rem;
  border-radius: 16px;
  background: #0f1419;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(60, 183, 255, 0.22);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.1);
}

body.blog-modern .post-article .blog-callout strong {
  color: #fff;
}

body.blog-modern .post-article .blog-callout a {
  color: #d7f1ff;
}

/* Newsletter panel inside posts */
body.blog-modern .newsletter-panel {
  background: #0f1419;
  border: 1px solid rgba(60, 183, 255, 0.18);
}

body.blog-modern .newsletter-panel h2 {
  color: #fff;
}

body.blog-modern .newsletter-panel > p,
body.blog-modern .newsletter-notes li {
  color: rgba(255, 255, 255, 0.78);
}

/* Related + pagination should stay dark theme outside article */
body.blog-modern .section--lead-cta {
  background: linear-gradient(180deg, #0f1419 0%, #111114 100%);
  border-top: 1px solid rgba(60, 183, 255, 0.15);
}

body.blog-modern .lead-cta {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(60, 183, 255, 0.28);
}

body.blog-modern .lead-cta__title {
  color: #fff;
}

body.blog-modern .lead-cta__text,
body.blog-modern .lead-cta__field span,
body.blog-modern .lead-cta__legal {
  color: rgba(255, 255, 255, 0.78);
}

body.blog-modern .lead-cta__copy .eyebrow {
  color: var(--accent);
}

/* Blog CTAs */
body.blog-modern .blog-cta--banner {
  margin: 2rem 0 0;
}

body.blog-modern .blog-cta__banner-inner {
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f5fa8 0%, #3cb7ff 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(60, 183, 255, 0.28);
}

body.blog-modern .blog-cta__eyebrow {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.92;
}

body.blog-modern .blog-cta__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

body.blog-modern .blog-cta__text {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

body.blog-modern .blog-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

body.blog-modern .blog-cta__outline-light {
  border-color: rgba(255, 255, 255, 0.65) !important;
  color: #fff !important;
  background: transparent !important;
}

body.blog-modern .blog-cta__outline-light:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

body.blog-modern .blog-cta--strip {
  margin: 1.75rem 0;
}

body.blog-modern .blog-cta__strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f5fa8 0%, #1a7ec8 100%);
  border: 1px solid rgba(60, 183, 255, 0.35);
  text-align: center;
}

body.blog-modern .blog-cta__strip-text {
  margin: 0;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.4;
}

body.blog-modern .blog-cta__strip-text strong {
  color: #fff;
}

body.blog-modern .blog-cta--card {
  margin-top: 1rem;
  padding: 1.15rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #0d3d66 0%, #0f1419 100%);
  border: 1px solid rgba(60, 183, 255, 0.28);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
}

body.blog-modern .blog-cta--card .blog-cta__eyebrow {
  color: var(--accent);
}

body.blog-modern .blog-cta--card .blog-cta__title {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

body.blog-modern .blog-cta--card .blog-cta__text {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.85rem;
}

body.blog-modern .blog-cta--card .blog-cta__actions {
  display: grid;
  gap: 0.55rem;
}

/* Botones CTA — forzar contraste (no heredar estilos de enlaces del artículo) */
body.blog-modern .blog-cta .btn {
  text-decoration: none !important;
}

body.blog-modern .blog-cta .btn--primary {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 24px rgba(60, 183, 255, 0.35);
}

body.blog-modern .blog-cta .btn--primary:hover {
  color: #fff !important;
  background: var(--accent-hover) !important;
}

body.blog-modern .blog-cta .btn--outline,
body.blog-modern .blog-cta .blog-cta__outline {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

body.blog-modern .blog-cta .btn--outline:hover,
body.blog-modern .blog-cta .blog-cta__outline:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
}

body.blog-modern .blog-cta__outline {
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
}

/* Sticky CTA (mobile) */
body.blog-modern .blog-sticky-cta {
  display: none;
}

/* WPForms inside posts → hide broken embed, we inject CTAs via JS */
body.blog-modern .post-article .wpforms-container {
  display: none !important;
}

body.blog-modern .post-article h2:has(+ .wpforms-container),
body.blog-modern .post-article h3:has(+ .wpforms-container) {
  display: none;
}

/* Trustindex / related below article */
body.blog-modern .interlink-block {
  background: #eef1f6;
  padding: 2rem 0;
}

body.blog-modern .interlink-block--related {
  padding-top: 1.5rem;
}

body.blog-modern .interlink-block .interlink {
  margin-top: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

body.blog-modern .interlink-block .interlink__title {
  color: #1a1a1f !important;
}

body.blog-modern .interlink-block .interlink__link {
  color: #1a1a1f !important;
  background: #f4f6f9 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

body.blog-modern .interlink-block .interlink__link:hover {
  color: #0f5fa8 !important;
  background: #fff !important;
  border-color: rgba(60, 183, 255, 0.35) !important;
}

body.blog-modern .section--content .section--trustindex {
  background: #f5f6f8;
  padding: 2rem 0;
}

body.blog-modern .section--content .blog-cta--banner {
  margin-top: 2rem;
}

/* Blog archive / category index */
body.blog-modern .section--blog-index {
  background: #f5f6f8;
}

body.blog-modern .section--blog-index .blog-grid {
  margin-top: 1.5rem;
}

body.blog-modern .blog-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
}

body.blog-modern .blog-card h2,
body.blog-modern .blog-card p,
body.blog-modern .blog-card time {
  color: #1a1a1f;
}

body.blog-modern .blog-card p {
  color: #5c5c66;
}

body.blog-modern .blog-cats__link {
  color: #1a1a1f;
  border-color: rgba(0, 0, 0, 0.1);
  background: #fff;
}

body.blog-modern .blog-cats__link.is-active,
body.blog-modern .blog-cats__link:hover {
  color: #0f5fa8;
  border-color: rgba(60, 183, 255, 0.45);
}

@media (max-width: 1024px) {
  body.blog-modern .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -2.25rem;
  }

  body.blog-modern .blog-layout__sidebar {
    position: static;
  }

  body.blog-modern .blog-layout__sidebar .blog-toc:not(#ez-toc-container) {
    display: none;
  }

  body.blog-modern .blog-layout__sidebar #ez-toc-container {
    display: none !important;
  }

  body.blog-modern .blog-layout__sidebar .blog-cta--card {
    display: none;
  }

  body.blog-modern .post-article {
    margin-top: 0;
    padding: 1.75rem;
  }
}

@media (max-width: 768px) {
  body.blog-modern .post-article {
    margin-top: -2rem;
    padding: 1.35rem;
  }

  body.blog-modern .page-hero {
    padding: 3rem 0 2rem;
  }

  body.blog-modern .blog-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
    background: rgba(17, 17, 20, 0.96);
    border-top: 1px solid rgba(60, 183, 255, 0.2);
    backdrop-filter: blur(12px);
  }

  body.blog-modern .blog-sticky-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
  }

  body.blog-modern .blog-sticky-cta__btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(60, 183, 255, 0.35);
  }

  body.blog-modern .blog-sticky-cta__btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  body.blog-modern .section--lead-cta {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}
