/* ==========================================================================
   Nube Ninja — Blog (sin imágenes: portadas tipográficas generadas con CSS)
   Se apoya en index.css (tokens --ando-*, .ambient, .bg-scene-*, .eyebrow…)
   ========================================================================== */

/* Tonos de acento ---------------------------------------------------------- */
.nn-tone-cyan   { --tone: #00bcd4; --tone-2: #22d3ee; --tone-rgb: 0,188,212; }
.nn-tone-orange { --tone: #ff9800; --tone-2: #fbbf24; --tone-rgb: 255,152,0; }
.nn-tone-purple { --tone: #a78bfa; --tone-2: #c084fc; --tone-rgb: 156,39,176; }
.nn-tone-rose   { --tone: #f43f5e; --tone-2: #fb7185; --tone-rgb: 244,63,94; }
.nn-tone-green  { --tone: #22c55e; --tone-2: #34d399; --tone-rgb: 34,197,94; }
.nn-tone-amber  { --tone: #fbbf24; --tone-2: #f59e0b; --tone-rgb: 251,191,36; }

.nn-theme-view a { text-decoration: none; }

/* Hero ---------------------------------------------------------------------- */
.nn-hero { padding-bottom: 4rem !important; }
.nn-hero__title {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem);
  line-height: 1.08;
  max-width: 22ch;
  margin-bottom: 1rem;
  letter-spacing: -.5px;
}
.nn-hero__lead { color: #9fb0c3; font-size: 1.15rem; max-width: 60ch; margin-bottom: 1.75rem; }
.nn-hero__glyph {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  font-size: clamp(8rem, 18vw, 16rem); line-height: 1;
  color: rgba(var(--tone-rgb), .10);
  pointer-events: none; z-index: 0 !important;
  display: none;
}
@media (min-width: 992px) { .nn-hero__glyph { display: block; } }
.nn-hero .container { position: relative; }

.nn-crumbs { font-size: .85rem; color: #6b7e95; margin-bottom: 1.25rem; }
.nn-crumbs a { color: #9fb0c3; }
.nn-crumbs a:hover { color: var(--ando-cyan); }

.nn-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; color: #9fb0c3; font-size: .92rem; }
.nn-post-meta i { color: var(--tone, var(--ando-cyan)); margin-right: .25rem; }

.nn-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .28rem .8rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase;
  color: #e6f8fb; background: rgba(var(--tone-rgb, 0,188,212), .14);
  border: 1px solid rgba(var(--tone-rgb, 0,188,212), .4);
}
a.nn-chip:hover { color: #fff; background: rgba(var(--tone-rgb, 0,188,212), .26); }

/* Filtros ------------------------------------------------------------------- */
.nn-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.nn-filter {
  padding: .45rem 1.05rem; border-radius: 999px; font-weight: 700; font-size: .85rem;
  color: #c9d1d9; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  transition: all .2s ease;
}
.nn-filter span { opacity: .55; font-weight: 500; margin-left: .2rem; }
.nn-filter:hover { color: #fff; border-color: rgba(0,188,212,.5); }
.nn-filter.is-active { color: #0d1117; background: var(--ando-cyan); border-color: var(--ando-cyan); }

/* Grid de tarjetas ---------------------------------------------------------- */
.nn-blog { position: relative; }
.nn-grid { display: grid; gap: 1.75rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .nn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .nn-grid { grid-template-columns: repeat(3, 1fr); } }
.nn-grid--3 { }

.nn-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--ando-card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 1.1rem; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.nn-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--tone-rgb), .45);
  box-shadow: 0 0 28px rgba(var(--tone-rgb), .25);
}

/* Portada generada: aura + retícula + glifo */
.nn-card__cover {
  position: relative; display: block; aspect-ratio: 16 / 7; overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(var(--tone-rgb), .45), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(156,39,176,.28), transparent 60%),
    linear-gradient(160deg, #0f1726 0%, #0b0f16 100%);
}
.nn-card__cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%);
}
.nn-card__cover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--tone), transparent 70%);
}
.nn-card__glyph {
  position: absolute; right: -.1em; bottom: -.22em;
  font-size: 7.5rem; line-height: 1;
  color: rgba(var(--tone-rgb), .55);
  filter: drop-shadow(0 0 30px rgba(var(--tone-rgb), .45));
  transition: transform .5s ease;
}
.nn-card:hover .nn-card__glyph { transform: rotate(-8deg) scale(1.06); }
.nn-card__index {
  position: absolute; left: 1.1rem; top: 1rem;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .75rem;
  letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.7);
}

.nn-card__body { display: flex; flex-direction: column; gap: .7rem; padding: 1.4rem 1.4rem 1.5rem; flex: 1; }
.nn-card__meta { display: flex; align-items: center; justify-content: flex-start; min-height: 24px; gap: .5rem; color: #8b9bb0; font-size: .8rem; }
.nn-card__title {
  font-size: 1.12rem !important; line-height: 1.3; margin: 0;
  text-transform: none !important; letter-spacing: 0;
}
.nn-card__title a { color: #fff; }
.nn-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nn-card__title a:hover { color: var(--tone-2); }
.nn-card__excerpt { color: #9fb0c3; font-size: .93rem; margin: 0; flex: 1; }
.nn-card__more { font-weight: 700; font-size: .85rem; color: var(--tone); }
.nn-card__more i { transition: transform .2s ease; display: inline-block; }
.nn-card:hover .nn-card__more i { transform: translateX(4px); }

/* Destacado: ocupa toda la fila */
.nn-card--featured { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .nn-card--featured { flex-direction: row; }
  .nn-card--featured .nn-card__cover { aspect-ratio: auto; flex: 0 0 44%; min-height: 300px; }
  .nn-card--featured .nn-card__glyph { font-size: 13rem; }
  .nn-card--featured .nn-card__body { padding: 2.25rem; justify-content: center; }
  .nn-card--featured .nn-card__title { font-size: 1.75rem !important; }
  .nn-card--featured .nn-card__excerpt { font-size: 1.02rem; flex: 0; }
}

/* Paginación ---------------------------------------------------------------- */
.nn-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 3rem 0 0; }
.nn-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 .9rem; border-radius: 12px;
  font-weight: 700; color: #c9d1d9; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
}
.nn-pagination a.page-numbers:hover { border-color: var(--ando-cyan); color: #fff; }
.nn-pagination .page-numbers.current { background: var(--ando-cyan); border-color: var(--ando-cyan); color: #0d1117; }
.nn-pagination .page-numbers.dots { background: none; border: 0; }

/* Artículo ------------------------------------------------------------------ */
.nn-single { background: var(--ando-dark); }
.nn-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1040; pointer-events: none; }
.nn-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ando-cyan), #a78bfa, var(--ando-orange)); }

.nn-prose { color: #c9d1d9; font-size: 1.075rem; line-height: 1.8; }
.nn-prose > * + * { margin-top: 1.15em; }
.nn-prose p { margin-bottom: 0; }
.nn-prose h2, .nn-prose h3, .nn-prose h4 {
  color: #fff; text-transform: none !important; line-height: 1.25; scroll-margin-top: 110px; margin-bottom: .2em;
}
.nn-prose h2 { font-size: 1.65rem; margin-top: 2.2em; padding-top: .6em; border-top: 1px solid rgba(255,255,255,.06); }
.nn-prose h2::before {
  content: ""; display: block; width: 42px; height: 3px; border-radius: 3px; margin-bottom: .8rem;
  background: linear-gradient(90deg, var(--ando-cyan), transparent);
}
.nn-prose h3 { font-size: 1.3rem; margin-top: 1.8em; color: #e6f8fb; }
.nn-prose h4 { font-size: 1.1rem; margin-top: 1.5em; }
.nn-prose a { color: var(--ando-cyan); text-decoration: underline; text-decoration-color: rgba(0,188,212,.4); text-underline-offset: 3px; }
.nn-prose a:hover { text-decoration-color: var(--ando-cyan); }
.nn-prose strong { color: #fff; }
.nn-prose ul, .nn-prose ol { padding-left: 1.3rem; }
.nn-prose li + li { margin-top: .4em; }
.nn-prose ul li::marker { color: var(--ando-cyan); }
.nn-prose ol li::marker { color: var(--ando-orange); font-weight: 700; }
.nn-prose blockquote {
  margin-left: 0; margin-right: 0; padding: 1.1rem 1.4rem; border-left: 3px solid var(--ando-orange);
  background: linear-gradient(90deg, rgba(255,152,0,.08), transparent); border-radius: 0 12px 12px 0; color: #e6edf3; font-style: italic;
}
.nn-prose code { color: #fbbf24; background: rgba(251,191,36,.08); padding: .12em .4em; border-radius: 6px; font-size: .88em; }
.nn-prose pre {
  background: #0a0e14; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 1.2rem 1.3rem;
  overflow-x: auto; font-size: .88rem; line-height: 1.6; box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.nn-prose pre code { background: none; padding: 0; color: #d1e2f3; }
.nn-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.nn-prose th, .nn-prose td { padding: .7rem .9rem; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.nn-prose th { color: #fff; background: rgba(0,188,212,.12); }
.nn-prose hr { border-color: rgba(255,255,255,.12); opacity: 1; }
.nn-prose iframe, .nn-prose video { max-width: 100%; border-radius: 14px; }
.nn-prose .wp-block-button__link { background: var(--ando-orange); color: #fff; text-decoration: none; border-radius: 999px; padding: .7rem 1.6rem; font-weight: 700; }

/* Aside --------------------------------------------------------------------- */
.nn-aside { position: sticky; top: 100px; display: grid; gap: 1.25rem; }
.nn-aside > * { background: var(--ando-card); border: 1px solid rgba(255,255,255,.06); border-radius: 1rem; padding: 1.3rem 1.4rem; }
.nn-aside__title { font-family: 'Nunito', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; font-size: .78rem; color: #8b9bb0; margin-bottom: .9rem; }
.nn-aside__title i { color: var(--ando-cyan); margin-right: .3rem; }
.nn-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; max-height: 50vh; overflow: auto; }
.nn-toc li { counter-increment: toc; }
.nn-toc li.is-h3 { padding-left: 1.1rem; }
.nn-toc li.is-h3 a { font-size: .84rem; color: #7d8ea3; }
.nn-toc a { display: flex; gap: .6rem; padding: .38rem 0; color: #9fb0c3; font-size: .9rem; line-height: 1.35; border-left: 2px solid transparent; padding-left: .7rem; margin-left: -.7rem; transition: color .2s, border-color .2s; }
.nn-toc a:hover, .nn-toc a.is-active { color: #fff; border-left-color: var(--ando-cyan); }
.nn-share { display: flex; flex-wrap: wrap; gap: .5rem; }
.nn-share a, .nn-share button {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 1.1rem; color: #c9d1d9; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  transition: all .2s ease;
}
.nn-share a:hover, .nn-share button:hover { color: #fff; border-color: var(--ando-cyan); background: rgba(0,188,212,.12); }
.nn-copy.is-done { color: #22c55e !important; border-color: #22c55e !important; }
.nn-aside__cta { position: relative; overflow: hidden; background: linear-gradient(150deg, rgba(255,152,0,.16), rgba(21,27,43,1) 55%) !important; border-color: rgba(255,152,0,.3) !important; }
.nn-aside__cta > i { position: absolute; right: -10px; top: -14px; font-size: 5.5rem; color: rgba(255,152,0,.12); }

/* Navegación entre artículos ------------------------------------------------ */
.nn-postnav { display: grid; gap: 1rem; margin-top: 3.5rem; }
@media (min-width: 768px) { .nn-postnav { grid-template-columns: 1fr 1fr; } }
.nn-postnav__item {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.4rem; border-radius: 1rem;
  background: var(--ando-card); border: 1px solid rgba(255,255,255,.06); transition: border-color .2s, transform .2s;
}
.nn-postnav__item:hover { border-color: rgba(0,188,212,.45); transform: translateY(-3px); }
.nn-postnav__item span { font-size: .75rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: var(--ando-cyan); }
.nn-postnav__item strong { color: #fff; font-family: 'Nunito', sans-serif; font-size: 1.02rem; line-height: 1.35; }
.nn-postnav__item--next { text-align: right; }

/* CTA ----------------------------------------------------------------------- */
.nn-cta__box {
  display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; justify-content: space-between;
  padding: 2.25rem; border-radius: 1.4rem;
  background: linear-gradient(145deg, rgba(21,27,43,.85), rgba(13,17,23,.95));
  border: 1px solid rgba(255,152,0,.25); box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
@media (min-width: 992px) { .nn-cta__box { flex-direction: row; align-items: center; padding: 2.75rem 3rem; } }

/* 404 ----------------------------------------------------------------------- */
.nn-404 { min-height: 100vh; display: flex; align-items: center; padding-top: 6rem; }

.nn-cta .btn { white-space: nowrap; }
.single .nn-hero__title { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.7rem); max-width: 26ch; }
.nn-card__meta > span:last-child { margin-left: auto; }
.nn-prose > h2:first-child, .nn-prose > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.nn-prose > :first-child { margin-top: 0; }
