/* Blog público — misma piel oscura que la home (#07100C + mint) */
html:has(body.blog-page) {
  overflow-x: clip;
  max-width: 100%;
  scroll-behavior: smooth;
  background: #07100C;
}

body.blog-page {
  background:
    radial-gradient(ellipse 70% 45% at 80% 0%, rgba(25, 217, 139, 0.12), transparent 55%),
    #07100C !important;
  color: rgba(255, 255, 255, 0.88) !important;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
  font-family: Figtree, system-ui, sans-serif;
}

body.blog-page *,
body.blog-page *::before,
body.blog-page *::after {
  box-sizing: border-box;
}

body.blog-page .font-display,
body.blog-page .blog-title {
  font-family: Geist, Figtree, sans-serif;
}

/* Ancho tipo home (shell ~1632) */
body.blog-page .shell.blog-shell {
  width: 100%;
  max-width: 1632px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 5rem);
}

body.blog-page nav.glass-panel {
  background: rgba(14, 15, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  max-width: calc(100% - 1.5rem);
}

body.blog-page nav a,
body.blog-page .blog-nav-link {
  color: rgba(255, 255, 255, 0.72) !important;
}

body.blog-page nav a:hover,
body.blog-page .blog-nav-link:hover {
  color: #19D98B !important;
}

body.blog-page .blog-kicker,
body.blog-page .text-mint {
  color: #19D98B !important;
}

body.blog-page .blog-title,
body.blog-page h1,
body.blog-page h2 {
  color: #fff !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.blog-page .blog-excerpt,
body.blog-page .blog-muted {
  color: rgba(255, 255, 255, 0.55) !important;
  overflow-wrap: anywhere;
}

body.blog-page .blog-register {
  background: #19D98B !important;
  color: #07100C !important;
  display: inline-flex;
  align-items: center;
  transition: filter 0.2s ease;
}

body.blog-page .blog-register:hover {
  filter: brightness(1.08);
}

body.blog-page .blog-nav-link.is-current {
  color: #19D98B !important;
}

body.blog-page .aem-register-short { display: none; }

body.blog-page .aem-mobile-menu { display: none; }

@media (max-width: 1023px) {
  body.blog-page .blog-public-nav { padding-inline: 14px; gap: 8px; }
  body.blog-page .blog-public-nav > div.hidden { display: none !important; }
  body.blog-page .aem-mobile-menu {
    display: block;
    flex-shrink: 0;
  }
  body.blog-page .aem-mobile-menu summary {
    list-style: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 22px;
    color: #fff;
  }
  body.blog-page .aem-mobile-menu summary::-webkit-details-marker { display: none; }
  body.blog-page .aem-mobile-links {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: #0e1712;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 12px;
    max-height: 70svh;
    overflow: auto;
    z-index: 60;
  }
  body.blog-page .aem-mobile-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

@media (max-width: 600px) {
  body.blog-page .aem-register-full { display: none; }
  body.blog-page .aem-register-short { display: inline; }
}

@media (max-width: 360px) {
  body.blog-page .blog-public-nav > div.flex { display: none; }
}

/* Índice /blog: mismo vídeo de escritorio que en la home */
.blog-index-stage {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
}

.blog-index-stage__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.blog-index-stage__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.04);
  filter: saturate(0.7) brightness(0.34) contrast(1.08);
}

.blog-index-stage__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 12, 0.88) 0%, rgba(7, 16, 12, 0.72) 40%, rgba(7, 16, 12, 0.94) 100%),
    radial-gradient(ellipse 70% 55% at 70% 35%, rgba(25, 217, 139, 0.12), transparent 70%);
}

.blog-index-stage__content {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .blog-index-stage__bg video { display: none; }
  .blog-index-stage__bg {
    background:
      #FBF7F2
      url('https://images.pexels.com/videos/8346903/pexels-photo-8346903.jpeg?auto=compress&cs=tinysrgb&w=1600')
      center / cover no-repeat;
  }
}

/* Progress */
.blog-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #19D98B, #0B7A58);
  box-shadow: 0 0 12px rgba(25, 217, 139, 0.45);
  transition: width 0.12s linear;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero artículo */
.blog-hero {
  position: relative;
  margin-top: 0;
  padding-top: 7.5rem;
  padding-bottom: 2.5rem;
  overflow: hidden;
}

.blog-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blog-hero__media--empty {
  background:
    radial-gradient(circle at 75% 30%, rgba(25, 217, 139, 0.28), transparent 45%),
    linear-gradient(160deg, #07100C 0%, #151D1A 55%, #0B7A58 140%);
}

.blog-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(0.85) contrast(1.05) brightness(0.72);
}

.blog-hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 12, 0.55) 0%, rgba(7, 16, 12, 0.72) 48%, rgba(7, 16, 12, 0.98) 100%),
    radial-gradient(circle at 80% 20%, rgba(25, 217, 139, 0.18), transparent 42%);
}

.blog-hero__content {
  position: relative;
  z-index: 1;
  max-width: 1632px;
  padding-bottom: 1rem;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

.blog-back:hover {
  color: #19D98B !important;
}

.blog-back:hover .blog-back__arrow {
  transform: translateY(-2px);
}

.blog-back__arrow {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.blog-back:hover .blog-back__arrow {
  border-color: rgba(25, 217, 139, 0.55);
  background: rgba(25, 217, 139, 0.1);
}

.blog-back__label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.blog-title--hero {
  margin-top: 1rem;
  font-size: clamp(2.25rem, 5.4vw, 4.1rem);
  color: #fff !important;
  max-width: min(22ch, 100%);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.blog-excerpt--hero {
  margin-top: 1.15rem;
  max-width: min(48rem, 100%);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72) !important;
}

.blog-hero .blog-kicker {
  color: #19D98B !important;
}

@media (min-width: 1024px) {
  .blog-hero {
    min-height: min(62vh, 620px);
    display: flex;
    align-items: flex-end;
    padding-bottom: 3.25rem;
  }
}

/* Layout artículo: texto primero a todo el ancho útil; índice a la derecha */
.blog-article-layout {
  display: grid;
  gap: 2rem;
  margin-top: -1.25rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 1200px) {
  .blog-article-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
    margin-top: -2rem;
  }
}

.blog-toc {
  display: none;
}

@media (min-width: 1200px) {
  .blog-toc {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 5.75rem;
    height: calc(100vh - 6.5rem);
    max-height: calc(100vh - 6.5rem);
    padding: 0.15rem 0 0.15rem 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
}

.blog-toc__label {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #19D98B;
  margin-bottom: 0.55rem;
}

.blog-toc__nav {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.35rem;
  overscroll-behavior: contain;
}

.blog-toc__link {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 0.78rem;
  line-height: 1.25;
  text-decoration: none !important;
  padding: 0.18rem 0 0.18rem 0.65rem;
  border-left: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.blog-toc__link.is-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  padding-left: 1rem;
}

.blog-toc__link:hover,
.blog-toc__link.is-active {
  color: #19D98B !important;
  border-left-color: #19D98B;
  transform: translateX(2px);
}

.blog-toc__cta {
  flex: 0 0 auto;
  display: inline-flex;
  margin-top: 0.75rem;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: #19D98B;
  color: #07100C !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none !important;
}

.blog-toc__cta:hover {
  filter: brightness(1.08);
}

/* Cuerpo abierto: sin tarjeta/caja, a lo ancho del layout */
body.blog-page .blog-body {
  color: rgba(255, 255, 255, 0.86) !important;
  font-weight: 450;
  font-size: 1.0625rem;
  line-height: 1.8;
  letter-spacing: -0.01em;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0.25rem 0 0;
  box-shadow: none;
  backdrop-filter: none;
}

@media (min-width: 1024px) {
  body.blog-page .blog-body--wide {
    font-size: 1.14rem;
    max-width: none;
    padding: 0.35rem 0 0;
  }
}

body.blog-page .blog-body p {
  margin: 0 0 1.05em;
  color: rgba(255, 255, 255, 0.78);
}

body.blog-page .blog-body h2,
body.blog-page .blog-body h3,
body.blog-page .blog-body h4 {
  color: #fff !important;
  font-family: Geist, Figtree, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 1.7em 0 0.6em;
  scroll-margin-top: 6.5rem;
}

body.blog-page .blog-body h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  padding-left: 0.85rem;
  border-left: 3px solid #19D98B;
}

body.blog-page .blog-body h3 { font-size: 1.25rem; }
body.blog-page .blog-body h4 { font-size: 1.08rem; }

body.blog-page .blog-body ul,
body.blog-page .blog-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.35rem;
  color: rgba(255, 255, 255, 0.78);
}

body.blog-page .blog-body li { margin: 0.3em 0; }

body.blog-page .blog-body a {
  color: #19D98B !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(25, 217, 139, 0.45);
}

body.blog-page .blog-body a:hover {
  color: #6af0b8 !important;
}

body.blog-page .blog-body blockquote {
  margin: 1.25em 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid #19D98B;
  background: rgba(25, 217, 139, 0.08);
  color: rgba(255, 255, 255, 0.7) !important;
  font-weight: 500;
  border-radius: 0 1rem 1rem 0;
}

body.blog-page .blog-body strong,
body.blog-page .blog-body b {
  font-weight: 700;
  color: #fff;
}

body.blog-page .blog-body img,
body.blog-page .blog-body video,
body.blog-page .blog-body iframe,
body.blog-page .blog-body svg,
body.blog-page img {
  max-width: 100%;
  height: auto;
}

body.blog-page .blog-body figure.aem-figure {
  margin: 1.35rem 0 1.75rem;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 16, 12, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  max-width: min(920px, 100%);
}

body.blog-page .blog-body figure.aem-figure img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

@media (min-width: 1024px) {
  body.blog-page .blog-body figure.aem-figure img {
    max-height: 420px;
  }
}

body.blog-page .blog-body figure.aem-figure figcaption {
  padding: 0.7rem 1rem 0.9rem;
  color: rgba(255, 255, 255, 0.5) !important;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

body.blog-page .blog-body iframe { width: 100%; }

body.blog-page .blog-body pre,
body.blog-page .blog-body code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
}

body.blog-page .blog-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* Related rail */
.blog-related-band {
  margin-top: 1rem;
  padding: 3.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 20%, rgba(25, 217, 139, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(7, 16, 12, 0) 0%, rgba(10, 18, 14, 1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-related-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1.25rem 0.15rem 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.blog-rail-card {
  flex: 0 0 min(78vw, 360px);
  scroll-snap-align: start;
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(14, 15, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-rail-card.is-featured {
  flex-basis: min(88vw, 460px);
}

.blog-rail-card img,
.blog-rail-card__fallback {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: linear-gradient(135deg, #151D1A, #0B7A58);
}

.blog-rail-card__meta { padding: 1rem 1.1rem 1.2rem; }

.blog-rail-card__title {
  margin-top: 0.4rem;
  font-family: Geist, Figtree, sans-serif;
  font-weight: 650;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #fff !important;
}

.blog-rail-card:hover {
  transform: translateY(-4px) rotate(-0.35deg);
  border-color: rgba(25, 217, 139, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Index */
.blog-index-intro {
  max-width: min(52rem, 100%);
}

.blog-feature {
  margin-top: 2.5rem;
  display: grid;
  gap: 0;
  border-radius: 2rem;
  overflow: hidden;
  background: rgba(14, 15, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F3F5F3;
  text-decoration: none !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(25, 217, 139, 0.35);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.34);
}

.blog-feature__media {
  min-height: 240px;
  position: relative;
}

.blog-feature__img,
.blog-feature__fallback {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.blog-feature__fallback {
  background:
    radial-gradient(circle at 70% 30%, rgba(25, 217, 139, 0.35), transparent 45%),
    linear-gradient(140deg, #07100C, #151D1A 60%, #0B7A58);
}

.blog-feature__copy {
  padding: clamp(1.35rem, 3vw, 2.6rem);
}

.blog-feature .blog-title {
  color: #fff !important;
  font-size: clamp(1.7rem, 3.5vw, 2.75rem);
  max-width: min(22ch, 100%);
}

.blog-feature .blog-excerpt {
  color: rgba(255, 255, 255, 0.62) !important;
}

.blog-feature .blog-kicker {
  color: #19D98B !important;
}

.blog-feature__cta {
  display: inline-flex;
  margin-top: 1.35rem;
  color: #19D98B;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (min-width: 960px) {
  .blog-feature {
    grid-template-columns: 1.2fr 1fr;
    min-height: 440px;
  }

  .blog-feature__media { min-height: 100%; }

  .blog-feature__img,
  .blog-feature__fallback {
    min-height: 100%;
    height: 100%;
  }

  .blog-feature__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.blog-stream {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.blog-stream__item {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 1.6rem;
  background: rgba(14, 15, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-stream__media {
  border-radius: 1.15rem;
  overflow: hidden;
  min-height: 160px;
}

.blog-stream__media img,
.blog-stream__fallback {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #151D1A, #0B7A58);
}

.blog-stream__title {
  margin-top: 0.35rem;
  font-size: 1.3rem;
  line-height: 1.25;
  color: #fff !important;
}

.blog-stream__item:hover {
  border-color: rgba(25, 217, 139, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

@media (min-width: 860px) {
  .blog-stream__item {
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    padding: 1rem 1.25rem 1rem 1rem;
  }

  .blog-stream__item.is-offset {
    margin-left: clamp(1rem, 4vw, 3.5rem);
  }

  .blog-stream__item.is-offset:hover {
    transform: translateY(-3px) translateX(4px);
  }

  .blog-stream__media img,
  .blog-stream__fallback {
    height: 160px;
  }
}

/* Legacy */
body.blog-page .blog-card {
  background: rgba(14, 15, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}

body.blog-page .blog-card:hover {
  border-color: rgba(25, 217, 139, 0.4) !important;
}

body.blog-page .blog-card h2,
body.blog-page .blog-card p,
body.blog-page .blog-related a,
body.blog-page .blog-related p {
  color: #fff !important;
}

body.blog-page .blog-card .blog-muted,
body.blog-page .blog-related .blog-muted {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Paginación Laravel sobre fondo oscuro */
body.blog-page nav[role="navigation"] span,
body.blog-page nav[role="navigation"] a {
  color: rgba(255, 255, 255, 0.7) !important;
}
