/* ═══════════════════════════════════════════════════════════════════
   APAXI INNER PAGES — Shared styles for single, archive, page, 404
   Uses same CSS variables as apaxi-theme.css
═══════════════════════════════════════════════════════════════════ */

:root {
  --navy-deep:    #050d1a;
  --navy-surface: #0d1f3c;
  --navy-card:    #0f2441;
  --navy-mid:     #091628;
  --navy-light:   #0d2040;
  --tech:         #4a9eff;
  --tech-dim-bg:  rgba(74,158,255,0.12);
  --tech-dim:     #2d6eb5;
  --tech-glow:    rgba(74,158,255,0.35);
  --gold:         #c9a84c;
  --gold-light:   #e0c06a;
  --silver:       #a8b8cc;
  --steel:        #7a8fa6;
  --steel-light:  #b0bfd0;
  --silver-light: #cdd8e8;
  --white:        #f0f4fa;
  --card-bg:      #0a1a2f;
  --border:       rgba(74,158,255,0.15);
  --radius:       8px;
  --shadow:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-tech:  0 0 24px rgba(74,158,255,0.28);
  --tr:           280ms ease;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }

.apaxi-body.is-inner {
  background: var(--navy-deep);
  color:      var(--silver-light);
  font-family: 'Inter', sans-serif;
  font-size:  16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Base resets — specificity kept low (element only) so component classes win */
h1, h2, h3, h4, h5, h6 {
  color:       var(--white);
  font-family: 'Inter', sans-serif;
  margin-top:  0;
}
p   { color: var(--silver-light); }
a   { color: var(--tech); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--gold-light); }
ul, ol { list-style: none; padding: 0; margin: 0; }

::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--tech); }
::selection { background: rgba(74,158,255,0.25); color: var(--white); }

.apaxi-main {
  min-height: 60vh;
  padding:    60px 0 80px;
}

/* ── Page title bar (bradcam) ── */
.page-title-bar {
  background:    var(--navy-mid);
  border-bottom: 1px solid var(--border);
  padding:       60px 0 50px;
  position:      relative;
  overflow:      hidden;
}

.page-title-bar::before {
  content: '';
  position: absolute;
  inset:    0;
  background: linear-gradient(135deg, rgba(74,158,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.page-title-bar--post {
  background-size:     cover;
  background-position: center;
  padding:             100px 0 80px;
}

.page-title-bar__overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(to bottom, rgba(5,13,26,0.75) 0%, rgba(5,13,26,0.92) 100%);
}

/* Encabezado con imagen: sin blur. Un overlay en viñeta oscurece los extremos
   superior e inferior para FUNDIR el encabezado con las zonas sólidas (nav y
   contenido), evitando el borde visible; el edificio queda visible en el centro.
   Se elimina también el border-bottom, que reforzaba esa línea. */
.page-title-bar--post::before { content: none; }
.page-title-bar--post { border-bottom: none; }
.page-title-bar--post .page-title-bar__overlay {
  background: linear-gradient(180deg,
    rgba(5,13,26,0.97) 0%,
    rgba(5,13,26,0.80) 34%,
    rgba(5,13,26,0.80) 64%,
    rgba(5,13,26,0.98) 100%);
}

.page-title-bar--post .container,
.page-title-bar--post .page-title-content {
  position: relative;
  z-index:  2;
}

/* Icono marca de agua del blog: rellena el espacio del encabezado, blanco y
   muy tenue. El overflow:hidden de la barra recorta el sangrado del borde. */
.page-title-bar--blog .container { position: relative; z-index: 2; }
.page-title-bar__watermark {
  position:       absolute;
  right:          -18px;
  top:            50%;
  transform:      translateY(-50%) rotate(-8deg);
  font-size:      clamp(120px, 20vw, 200px);
  line-height:    1;
  color:          #fff;
  opacity:        0.055;
  pointer-events: none;
  z-index:        1;
}
@media (max-width: 767px) {
  .page-title-bar__watermark { font-size: 130px; right: -28px; opacity: 0.045; }
}

.page-pretitle {
  display:        inline-flex;
  align-items:    center;
  gap:            6px;
  font-family:    'JetBrains Mono', monospace;
  font-size:      12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color:          var(--tech);
  margin-bottom:  12px;
}

.page-pretitle--link {
  text-decoration: none;
  transition:      color .2s;
}
.page-pretitle--link:hover { color: var(--gold); }

.page-title {
  font-size:   clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color:       var(--white);
  line-height: 1.2;
  margin:      0 0 12px;
}

.page-title-desc {
  color:   var(--silver);
  margin:  0;
  max-width: 560px;
}

.post-header-meta {
  display:    flex;
  flex-wrap:  wrap;
  gap:        18px;
  margin-top: 16px;
  font-size:  13px;
  color:      var(--silver);
}
.post-header-meta span { display: flex; align-items: center; gap: 6px; }
.post-header-meta i    { color: var(--tech); }

/* ── Breadcrumb ── */
.apaxi-breadcrumb {
  display:     flex;
  align-items: center;
  gap:         8px;
  font-size:   13px;
  color:       var(--silver);
}
.apaxi-breadcrumb a { color: var(--tech); text-decoration: none; }
.apaxi-breadcrumb a:hover { color: var(--gold); }
.apaxi-breadcrumb span:last-child { color: var(--white); }

/* ── Post card (archive / index) ── */
.posts-grid {
  display:               grid;
  grid-template-columns: 1fr;
  gap:                   28px;
}

.post-card {
  background:    var(--card-bg);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
  transition:    border-color .25s, transform .25s, box-shadow .25s;
}
.post-card:hover {
  border-color: var(--tech);
  transform:    translateY(-3px);
  box-shadow:   var(--shadow);
}

.post-card__thumb {
  display:  block;
  height:   220px;
  overflow: hidden;                    /* SOLO recorta; nunca escala */
  position: relative;
  transform: translateZ(0);            /* capa de recorte estable */
}
/* La imagen y el overlay escalan JUNTOS como una sola unidad. Chrome promueve
   este wrapper (no la imagen suelta) a capa durante la animación, así que el
   overlay siempre cubre la imagen y el recorte exterior solo corta contenido
   ya oscurecido: es imposible que asome una línea brillante en el borde. */
.post-card__thumb-zoom {
  display:    block;
  position:   absolute;
  inset:      0;
  transform:  scale(1.02);             /* reposa desbordando un pelín el recorte */
  transform-origin: center;
  transition: transform .5s ease;
}
.post-card:hover .post-card__thumb-zoom { transform: scale(1.08); }
.post-card__thumb img {
  display:    block;                   /* sin hueco de línea base */
  width:      100%;
  height:     100%;
  object-fit: cover;
}
.post-card__thumb-overlay {
  position:   absolute;
  inset:      0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 40%, rgba(5,13,26,0.7) 100%);
}

.post-card__body   { padding: 24px 28px 28px; }

.post-card__meta   { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; font-size: 12px; }

.post-card__cat {
  background:     rgba(74,158,255,0.15);
  border:         1px solid rgba(74,158,255,0.3);
  color:          var(--tech);
  padding:        3px 10px;
  border-radius:  20px;
  font-weight:    600;
  text-transform: uppercase;
  font-size:      10px;
  letter-spacing: 1px;
  text-decoration: none;
  transition:     background .2s;
}
.post-card__cat:hover { background: rgba(74,158,255,0.3); color: var(--white); }

.post-card__date,
.post-card__read { color: var(--silver); display: flex; align-items: center; gap: 5px; }
.post-card__date i,
.post-card__read i { color: var(--tech); }

.post-card__title {
  font-size:   1.25rem;
  font-weight: 700;
  margin:      0 0 10px;
  line-height: 1.4;
}
.post-card__title a { color: var(--white); text-decoration: none; transition: color .2s; }
.post-card__title a:hover { color: var(--tech); }

.post-card__excerpt { color: var(--silver); font-size: 14px; margin: 0 0 18px; }

.post-card__link {
  color:          var(--tech);
  font-size:      13px;
  font-weight:    600;
  text-decoration: none;
  display:        inline-flex;
  align-items:    center;
  gap:            6px;
  transition:     gap .2s, color .2s;
}
.post-card__link:hover { color: var(--gold); gap: 10px; }

/* ── Single post ── */
.single-post-card {
  background:    var(--card-bg);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       36px 40px 40px;
}

.entry-content {
  color: var(--silver-light);
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  color:       var(--white);
  font-weight: 700;
  margin:      1.8em 0 .6em;
  line-height: 1.3;
}
.entry-content h2 { font-size: 1.6rem; border-left: 3px solid var(--tech); padding-left: 14px; }
.entry-content h3 { font-size: 1.3rem; color: var(--tech); }

.entry-content p   { margin: 0 0 1.4em; }
.entry-content a   { color: var(--tech); text-decoration: underline; text-decoration-color: rgba(74,158,255,0.4); transition: color .2s; }
.entry-content a:hover { color: var(--gold); text-decoration-color: var(--gold); }

.entry-content ul,
.entry-content ol  { padding-left: 1.5em; margin: 0 0 1.4em; }
.entry-content li  { margin-bottom: .5em; }

.entry-content blockquote {
  border-left:   3px solid var(--gold);
  margin:        2em 0;
  padding:       18px 24px;
  background:    rgba(201,168,76,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style:    italic;
  color:         var(--silver-light);
}
.entry-content blockquote p:last-child { margin: 0; }

.entry-content pre,
.entry-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size:   13px;
}
.entry-content code {
  background:    rgba(74,158,255,0.12);
  padding:       2px 6px;
  border-radius: 4px;
  color:         var(--tech);
}
.entry-content pre {
  background:    #060f1e;
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       20px 24px;
  overflow-x:    auto;
  margin:        1.5em 0;
}
.entry-content pre code { background: none; padding: 0; color: var(--silver-light); }

.entry-content img {
  max-width:     100%;
  height:        auto;
  border-radius: var(--radius);
  border:        1px solid var(--border);
  margin:        1em 0;
}

.entry-content table {
  width:         100%;
  border-collapse: collapse;
  margin:        1.5em 0;
}
.entry-content th, .entry-content td {
  border:  1px solid var(--border);
  padding: 10px 14px;
  font-size: 14px;
}
.entry-content th { background: var(--navy-light); color: var(--white); font-weight: 600; }
.entry-content td { background: rgba(13,32,64,0.4); }

.entry-content hr {
  border:     none;
  border-top: 1px solid var(--border);
  margin:     2em 0;
}

/* page-featured-image */
.page-featured-image { margin: -36px -40px 30px; overflow: hidden; max-height: 400px; }
.page-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Post tags & share ── */
.post-tags {
  display:    flex;
  flex-wrap:  wrap;
  align-items: center;
  gap:        8px;
  margin:     32px 0 20px;
  padding-top: 24px;
  border-top:  1px solid var(--border);
  font-size:  13px;
  color:      var(--silver);
}
.post-tags i { color: var(--tech); }

.post-tag {
  background:    rgba(74,158,255,0.1);
  border:        1px solid rgba(74,158,255,0.25);
  color:         var(--tech);
  padding:       4px 12px;
  border-radius: 20px;
  font-size:     12px;
  text-decoration: none;
  transition:    background .2s;
}
.post-tag:hover { background: rgba(74,158,255,0.25); color: var(--white); }

.post-share {
  display:    flex;
  align-items: center;
  gap:        12px;
  margin:     16px 0 28px;
  font-size:  13px;
  color:      var(--silver);
}
.post-share a {
  display:       flex;
  align-items:   center;
  justify-content: center;
  width:         34px;
  height:        34px;
  border-radius: 50%;
  background:    var(--navy-light);
  border:        1px solid var(--border);
  color:         var(--silver);
  text-decoration: none;
  transition:    background .2s, color .2s, border-color .2s;
}
.post-share a:hover { background: var(--tech); border-color: var(--tech); color: var(--white); }

/* ── Author card ── */
.post-author-card {
  display:       flex;
  gap:           20px;
  padding:       24px;
  background:    var(--navy-light);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  margin:        28px 0;
}
.post-author-card__avatar img {
  width:         72px;
  height:        72px;
  border-radius: 50%;
  object-fit:    cover;
  border:        2px solid var(--tech);
  margin:        0;
}
.post-author-card__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--tech); display: block; margin-bottom: 4px; }
.post-author-card__info h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin: 0 0 2px; }
.post-author-card__role {
  display: inline-block; margin: 0 0 8px;
  font-size: 12px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.post-author-card__info p  { font-size: 13px; color: var(--silver); margin: 0; }

/* ── Post navigation ── */
.post-navigation {
  display:    flex;
  gap:        16px;
  margin:     28px 0;
}
.post-nav-item {
  flex:          1;
  padding:       18px 20px;
  background:    var(--card-bg);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition:    border-color .2s, transform .2s;
  display:       flex;
  flex-direction: column;
  gap:           4px;
}
.post-nav-item:hover { border-color: var(--tech); transform: translateY(-2px); }
.post-nav-item--next { text-align: right; }

.post-nav-item__label {
  font-size:      11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color:          var(--tech);
  font-family:    'JetBrains Mono', monospace;
  display:        flex;
  align-items:    center;
  gap:            5px;
}
.post-nav-item--next .post-nav-item__label { justify-content: flex-end; }
.post-nav-item__title { font-size: 14px; font-weight: 600; color: var(--white); }

/* ── Comments ── */
.post-comments { margin-top: 40px; }
.post-comments .comments-title, .post-comments .comment-reply-title {
  font-size:   1.3rem;
  font-weight: 700;
  color:       var(--white);
  border-left: 3px solid var(--tech);
  padding-left: 12px;
  margin:      0 0 24px;
}
.comment-list        { list-style: none; padding: 0; }
.comment-body        { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; }
.comment-author .fn  { font-weight: 700; color: var(--white); }
.comment-metadata    { font-size: 12px; color: var(--silver); }
.comment-metadata a  { color: var(--silver); }
.comment-content p   { margin: 10px 0 0; color: var(--silver-light); }
.reply a             { font-size: 12px; color: var(--tech); text-decoration: none; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width:         100%;
  background:    var(--navy-light);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       12px 16px;
  color:         var(--white);
  font-family:   'Inter', sans-serif;
  font-size:     14px;
  transition:    border-color .2s;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline:      none;
  border-color: var(--tech);
}
.comment-form label { color: var(--silver); font-size: 13px; display: block; margin-bottom: 6px; }
.comment-form .submit {
  background:    linear-gradient(135deg, var(--tech), var(--tech-dim));
  color:         var(--white);
  border:        none;
  border-radius: var(--radius);
  padding:       12px 28px;
  font-weight:   700;
  cursor:        pointer;
  transition:    opacity .2s;
}
.comment-form .submit:hover { opacity: .85; }

/* ── Pagination ── */
.apaxi-pagination { margin-top: 40px; }
.apaxi-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.apaxi-pagination .page-numbers {
  display:        flex;
  align-items:    center;
  justify-content: center;
  min-width:      40px;
  height:         40px;
  padding:        0 14px;
  background:     var(--card-bg);
  border:         1px solid var(--border);
  border-radius:  var(--radius);
  color:          var(--silver);
  text-decoration: none;
  font-size:      14px;
  font-weight:    600;
  transition:     background .2s, border-color .2s, color .2s;
}
.apaxi-pagination .page-numbers:hover,
.apaxi-pagination .page-numbers.current {
  background:   var(--tech);
  border-color: var(--tech);
  color:        var(--white);
}
.apaxi-pagination .page-numbers.dots { background: none; border: none; color: var(--silver); }

/* ── No posts / empty state ── */
.no-posts {
  text-align: center;
  padding:    60px 20px;
  color:      var(--silver);
}
.no-posts i   { font-size: 3rem; color: var(--tech); opacity: .5; display: block; margin-bottom: 20px; }
.no-posts h3  { color: var(--white); font-size: 1.4rem; margin-bottom: 12px; }
.no-posts p   { font-size: 14px; margin-bottom: 24px; }

/* ── Sidebar ── */
.apaxi-sidebar    { position: sticky; top: 100px; }
.sidebar-widget   { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }

/* Tarjeta de autor (parte superior del sidebar) — compacta y horizontal */
.sidebar-author {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(160deg, rgba(74,158,255,0.10), var(--card-bg) 62%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 18px; margin-bottom: 24px;
}
.sidebar-author__photo {
  flex: 0 0 auto; width: 54px; height: 54px; padding: 2.5px;
  border-radius: 50%; background: linear-gradient(135deg, var(--tech), var(--gold));
}
.sidebar-author__photo img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--card-bg); display: block;
}
.sidebar-author__info { min-width: 0; }
.sidebar-author__label {
  display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--tech); margin-bottom: 3px;
}
.sidebar-author__name {
  font-size: 1rem; font-weight: 700; color: var(--white); line-height: 1.2;
  margin: 0 0 6px; font-family: 'Space Grotesk', 'Inter', sans-serif;
}
.sidebar-author__role {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid rgba(201,168,76,0.38); border-radius: 20px; padding: 3px 11px;
}

.sidebar-widget__title {
  font-size:      13px;
  font-weight:    600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color:          var(--tech);
  font-family:    'Space Grotesk', 'Inter', sans-serif;
  margin:         0 0 18px;
  padding-bottom: 12px;
  border-bottom:  1px solid var(--border);
}

.sidebar-widget--cta { border-color: rgba(74,158,255,0.3); background: linear-gradient(135deg, rgba(74,158,255,0.08), rgba(5,13,26,0.95)); }
.sidebar-widget--cta h4 { color: var(--white); font-size: 1rem; font-weight: 700; margin: 0 0 8px; }
.sidebar-widget--cta p  { font-size: 13px; color: var(--silver); margin: 0 0 16px; }

/* search */
.apaxi-search { display: flex; }
.apaxi-search__input {
  flex:          1;
  background:    var(--navy-light);
  border:        1px solid var(--border);
  border-right:  none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding:       10px 14px;
  color:         var(--white);
  font-size:     14px;
}
.apaxi-search__input:focus { outline: none; border-color: var(--tech); }
.apaxi-search__btn {
  background:    var(--tech);
  border:        none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding:       0 16px;
  color:         var(--white);
  cursor:        pointer;
  transition:    background .2s;
}
.apaxi-search__btn:hover { background: var(--tech-dim); }

/* categories list */
.sidebar-cats { list-style: none; padding: 0; margin: 0; }
.sidebar-cats li { border-bottom: 1px solid var(--border); }
.sidebar-cats li:last-child { border: none; }
.sidebar-cats a { display: flex; justify-content: space-between; padding: 9px 0; color: var(--silver-light); text-decoration: none; font-size: 14px; transition: color .2s; }
.sidebar-cats a:hover { color: var(--tech); }
.sidebar-cats .children { padding-left: 14px; }

/* recent posts */
.sidebar-recent { list-style: none; padding: 0; margin: 0; }
.sidebar-recent li { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-recent li:last-child { border: none; padding-bottom: 0; }
.sidebar-recent a { color: var(--silver-light); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; line-height: 1.4; }
.sidebar-recent a:hover { color: var(--tech); }
.sidebar-recent span { font-size: 11px; color: var(--silver); font-family: 'JetBrains Mono', monospace; }

/* tag cloud */
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tags a {
  background:    rgba(74,158,255,0.08);
  border:        1px solid rgba(74,158,255,0.2);
  color:         var(--silver);
  padding:       4px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size:     11px;
  transition:    background .2s, color .2s;
}
.sidebar-tags a:hover { background: rgba(74,158,255,0.2); color: var(--white); }

/* ── 404 error page ── */
.error-area { padding: 80px 0; min-height: 80vh; display: flex; align-items: center; }
.error-content { padding: 40px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; }

.error-code {
  display:     flex;
  align-items: center;
  justify-content: center;
  gap:         8px;
  margin-bottom: 24px;
}
.error-code__num {
  font-size:   5rem;
  font-weight: 900;
  color:       var(--white);
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.error-code__icon i {
  font-size:  3rem;
  color:      var(--tech);
  animation:  pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.error-title { font-size: 1.8rem; font-weight: 800; color: var(--white); margin: 0 0 12px; }
.error-desc  { color: var(--silver); font-size: 15px; margin: 0 0 28px; }

.error-terminal {
  background:    #060f1e;
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       14px 18px;
  font-family:   'JetBrains Mono', monospace;
  font-size:     12px;
  margin:        0 0 28px;
  text-align:    left;
}
.error-terminal__prompt { color: var(--tech); }
.error-terminal__cmd    { color: var(--silver-light); }
.error-terminal__result { color: #e05c5c; }

.error-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons — animación: sheen + lift + glow ── */
.btn, .btn3 {
  position: relative;
  overflow: hidden;
}

/* Sheen sweep — reflexo metálico diagonal */
.btn::before, .btn3::before {
  content: '';
  position: absolute;
  top: -60%; left: -80%;
  width: 55%; height: 220%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.14) 50%,
    rgba(255,255,255,0)    100%
  );
  transform: skewX(-18deg);
  transition: left .55s ease;
  pointer-events: none;
  z-index: 1;
}
.btn:hover::before, .btn3:hover::before { left: 120%; }

/* Filled gradient button */
.btn {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      linear-gradient(135deg, var(--tech), var(--tech-dim));
  color:           #fff !important;
  padding:         12px 28px;
  border-radius:   var(--radius);
  font-weight:     700;
  font-size:       14px;
  text-decoration: none;
  transition:      box-shadow .3s ease, transform .25s ease;
}
.btn:hover {
  box-shadow: 0 8px 28px rgba(74,158,255,0.45), 0 0 0 3px rgba(74,158,255,0.15);
  transform:  translateY(-3px);
  color:      #fff !important;
}
.btn:active  { transform: translateY(-1px); }

/* Gold outline secondary button */
.btn3 {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      transparent;
  border:          2px solid var(--gold);
  color:           var(--gold) !important;
  padding:         10px 26px;
  border-radius:   var(--radius);
  font-weight:     700;
  font-size:       14px;
  text-decoration: none;
  transition:      background .3s ease, color .3s ease, box-shadow .3s ease, transform .25s ease;
}
.btn3:hover {
  background: var(--gold);
  color:      var(--navy-deep) !important;
  box-shadow: 0 6px 22px rgba(201,168,76,0.4);
  transform:  translateY(-2px);
}
.btn3:active { transform: translateY(0); }

.radius-btn { border-radius: 50px !important; }

/* page-links (multi-page posts) */
.page-links {
  margin:     24px 0;
  font-size:  14px;
  color:      var(--silver);
}
.page-links a {
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  width:          32px;
  height:         32px;
  background:     var(--navy-light);
  border:         1px solid var(--border);
  border-radius:  4px;
  color:          var(--tech);
  text-decoration: none;
  margin-left:    6px;
}

/* ── Page children nav ── */
.page-children        { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-children h3     { font-size: 1rem; color: var(--white); font-weight: 700; margin: 0 0 12px; }
.page-children ul     { list-style: none; padding: 0; }
.page-children li     { border-bottom: 1px solid var(--border); }
.page-children a      { display: block; padding: 9px 0; color: var(--silver); text-decoration: none; font-size: 14px; transition: color .2s; }
.page-children a:hover { color: var(--tech); }

/* ════════════════════════════════════════════════════════════════════
   HEADER — inner pages (solid, always sticky)
════════════════════════════════════════════════════════════════════ */
.apaxi-header {
  position:   relative;
  z-index:    200;
}

.header-area { position: relative; }

.header-solid .header-sticky {
  background: rgba(5,13,26,0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.header-bottom { padding: 0 60px; }
@media (max-width: 1199px) { .header-bottom { padding: 0 20px; } }
@media (max-width: 991px)  { .header-bottom { padding: 14px 20px; } }

/* Sticky bar (JS agrega esta clase al hacer scroll en inner pages) */
.header-sticky.sticky-bar {
  position:   fixed;
  top: 0; left: 0; right: 0;
  background: rgba(5,13,26,0.97) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  animation: slideDown 0.3s ease;
  z-index: 200;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.header-sticky.sticky-bar .main-menu ul li a        { padding: 20px 2px; }
.header-sticky.sticky-bar .main-menu ul li a::after { bottom: 14px; }

/* Logo — idéntico a la portada (apariencia + efectos) */
.apaxi-logo-text {
  font-size: 2.3rem; font-weight: 800;
  letter-spacing: -0.05em; text-decoration: none;
  display: inline-block;
  position: relative;
  background: linear-gradient(90deg,
    #e8edf2  0%,  #e8edf2  25%,
    #90b4d4  36%,
    #3a5878  44%,  #2e4870  50%,  #3a5878  56%,
    #90b4d4  64%,
    #e8edf2  75%,  #e8edf2 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #e8edf2;
  animation: logoSheen 7s ease-in-out infinite, logoGlow 7s ease-in-out infinite;
}
.apaxi-logo-text:hover { text-decoration: none; }
/* Línea animada bajo el logo en hover */
.apaxi-logo-text::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--tech) 30%, var(--gold) 60%, var(--tech) 85%, transparent 100%);
  box-shadow: 0 0 8px rgba(74,158,255,0.7), 0 0 18px rgba(74,158,255,0.3);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.apaxi-logo-text:hover::after { transform: scaleX(1); }
.apaxi-logo-text span {
  color: var(--tech);
  -webkit-text-fill-color: var(--tech);
}
@keyframes logoSheen {
  0%   { background-position: 100% center; }
  28%  { background-position:   0% center; }
  100% { background-position:   0% center; }
}
@keyframes logoGlow {
  0%   { text-shadow: 0 0 12px rgba(74,158,255,0),    0 0 28px rgba(46,72,112,0);    }
  14%  { text-shadow: 0 0 12px rgba(74,158,255,0.65), 0 0 28px rgba(46,72,112,0.45); }
  28%  { text-shadow: 0 0 12px rgba(74,158,255,0),    0 0 28px rgba(46,72,112,0);    }
  100% { text-shadow: 0 0 12px rgba(74,158,255,0),    0 0 28px rgba(46,72,112,0);    }
}
@media (max-width: 1650px) { .apaxi-logo-text { font-size: 2rem; } }
@media (max-width: 1380px) { .apaxi-logo-text { font-size: 1.75rem; } }
@media (max-width: 1150px) { .apaxi-logo-text { font-size: 1.5rem; } }

/* Desktop nav links */
.main-menu ul { list-style: none; padding: 0; margin: 0; }
.main-menu ul li {
  display:        inline-block;
  margin:         0 14px;
  position:       relative;
  vertical-align: middle;
}
.main-menu ul li.button-header {
  display:     inline-flex;
  align-items: center;
}
.main-menu ul li a {
  color:           var(--steel-light);
  font-weight:     500;
  font-size:       0.8rem;
  text-transform:  uppercase;
  letter-spacing:  0.08em;
  padding:         32px 2px;
  display:         block;
  text-decoration: none;
  transition:      color var(--tr);
  position:        relative;
}
/* Línea deslizante */
.main-menu ul li a::after {
  content:          '';
  position:         absolute;
  bottom:           26px; left: 0; right: 0;
  height:           1px;
  background:       var(--tech);
  transform:        scaleX(0);
  transform-origin: left;
  transition:       transform var(--tr);
}
.main-menu ul li a:hover,
.main-menu ul li a:focus,
.main-menu ul li.current-menu-item > a { color: var(--tech); text-decoration: none; }
.main-menu ul li a:hover::after,
.main-menu ul li.current-menu-item > a::after { transform: scaleX(1); }
/* Los botones del nav no llevan la línea ni el destello */
.main-menu ul li.button-header a::after  { display: none; }
.main-menu ul li.button-header a::before { display: none; }

/* Nav buttons — override filled style with ghost outline */
.main-menu ul li.button-header a.btn {
  background:      transparent !important;
  border:          1px solid var(--tech) !important;
  color:           #fff !important;
  padding:         8px 20px !important;
  font-size:       0.78rem;
  font-weight:     600;
  line-height:     1.2 !important;
  border-radius:   4px;
  letter-spacing:  0.08em;
  text-transform:  uppercase;
}
.main-menu ul li.button-header a.btn:hover {
  background:   var(--tech) !important;
  border-color: var(--tech) !important;
  box-shadow:   0 6px 22px rgba(74,158,255,0.4) !important;
  transform:    translateY(-2px) !important;
  color:        #fff !important;
}
.main-menu ul li.button-header a.btn:active { transform: translateY(0) !important; }

.main-menu ul li.button-header a.btn3 {
  background:    none !important;
  border:        none !important;
  overflow:      visible !important;
  color:         var(--steel-light) !important;
  padding:       8px 14px !important;
  font-size:     0.78rem;
  text-transform: uppercase;
}
.main-menu ul li.button-header a.btn3:hover {
  color:      var(--tech) !important;
  background: none !important;
  box-shadow: none !important;
  transform:  none !important;
}

/* EnerPhys button */
.btn-enerphys {
  display: inline-flex; align-items: center;
  position: relative; overflow: hidden;
  background: transparent;
  border: 1px solid #00e676;
  color: #00e676 !important;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.btn-enerphys:hover {
  background: rgba(0,230,118,0.1) !important;
  box-shadow: 0 0 14px rgba(0,230,118,0.45), 0 0 0 2px rgba(0,230,118,0.18);
  color: #00e676 !important;
  transform: none !important;
}
.main-menu ul li.button-header a.btn-enerphys::after { display: none; }
/* Igualar altura con el botón Recursos: sin este override, .btn-enerphys hereda
   el padding vertical (32px) de `.main-menu ul li a` y queda más alto. */
.main-menu ul li.button-header a.btn-enerphys {
  padding: 8px 18px !important;
  line-height: 1.2 !important;
}

.margin-left { margin-left: 16px !important; }

/* Mobile menu (slicknav) */
.mobile_menu { position: absolute; right: 0; width: 100%; z-index: 99; }
.slicknav_menu { background: transparent !important; }
.slicknav_btn .slicknav_icon-bar { background: var(--white) !important; }
.slicknav_nav {
  background: var(--navy-surface) !important;
  border:     1px solid var(--border) !important;
  margin-top: 10px !important;
}
.slicknav_nav a { color: var(--steel-light) !important; padding: 10px 16px !important; }
.slicknav_nav a:hover { color: var(--tech) !important; background: transparent !important; }

/* ════════════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════════════ */
footer {
  margin-top: auto;
}

.footer-wrappr {
  background: var(--navy-surface) !important;
  border-top: 1px solid var(--border);
  background-size: cover;
}

.footer-area { padding: 70px 0 40px; }

.footer-logo-text {
  font-size:      1.8rem;
  font-weight:    800;
  color:          var(--white);
  letter-spacing: -0.04em;
  text-decoration: none;
  display:        inline-block;
}
.footer-logo-text span { color: var(--tech); }

.footer-tittle p   { color: var(--steel-light); font-size: 0.875rem; line-height: 1.7; }
.footer-tittle h4  {
  font-family:    'JetBrains Mono', monospace;
  font-size:      0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--silver);
  margin-bottom:  16px;
  padding-bottom: 10px;
  border-bottom:  1px solid var(--border);
}
.footer-tittle ul          { list-style: none; padding: 0; }
.footer-tittle ul li       { margin-bottom: 8px; color: var(--steel-light); font-size: 0.875rem; }
.footer-tittle ul li a     { color: var(--steel-light); font-size: 0.875rem; text-decoration: none; transition: color var(--tr), padding-left var(--tr); }
.footer-tittle ul li a:hover { color: var(--tech); padding-left: 4px; }

.footer-social a {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:  36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color:  var(--steel);
  margin-right: 8px;
  text-decoration: none;
  transition: all var(--tr);
}
.footer-social a:hover { border-color: var(--tech); color: var(--tech); box-shadow: var(--shadow-tech); }

.footer-bottom-area  { padding: 20px 0; border-top: 1px solid var(--border); }
.footer-copy-right p { color: var(--silver); font-size: 0.78rem; margin: 0; }
.footer-copy-right a { color: var(--silver); text-decoration: none; transition: color var(--tr); }
.footer-copy-right a:hover { color: var(--tech); }
.footer-sep { margin: 0 8px; opacity: 0.45; }
.footer-mono         { font-family: 'JetBrains Mono', monospace; color: var(--silver); font-size: 0.75rem; margin: 0; }
.footer-cursor       { color: var(--tech); animation: cursorBlink 1.2s step-end infinite; }
@keyframes cursorBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Scroll to top ── */
#back-top         { position: fixed; bottom: 28px; right: 28px; z-index: 500; display: none; }
#back-top.visible { display: block; }
#back-top a {
  display:         flex;
  align-items:     center;
  justify-content: center;
  width: 44px; height: 44px;
  background:    var(--navy-card, #0f2441);
  border:        1px solid var(--tech);
  border-radius: 50%;
  color:         var(--tech) !important;
  font-size:     0.9rem;
  text-decoration: none;
  transition:    all var(--tr);
  box-shadow:    var(--shadow-tech);
}
#back-top a:hover { background: var(--tech-dim-bg); transform: translateY(-3px); }

/* ── Preloader (si aparece en inner pages por JS) ── */
#preloader-active {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
}
.preloader-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--tech);
  border-right-color: var(--gold);
  animation: spinLoader 1s linear infinite;
  position: absolute;
}
.preloader-logo { font-size: 1.4rem; font-weight: 800; color: var(--white); letter-spacing: -0.04em; }
.preloader-logo span { color: var(--tech); }
@keyframes spinLoader { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 991px) {
  .single-post-card   { padding: 24px 20px; }
  .page-featured-image { margin: -24px -20px 24px; }
  .post-navigation    { flex-direction: column; }
  .apaxi-sidebar      { position: static; margin-top: 40px; }
  .apaxi-breadcrumb   { display: none; }
}

@media (max-width: 576px) {
  .page-title-bar     { padding: 40px 0 32px; }
  .error-code__num    { font-size: 3.5rem; }
  .error-code__icon i { font-size: 2rem; }
  .post-author-card   { flex-direction: column; }
}

/* ── Recursos mega-menu (compartido con front page) ── */
.recursos-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.recursos-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.recursos-trigger[aria-expanded="true"] .recursos-chevron { transform: rotate(180deg); }

.recursos-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  z-index: 198;
}
.recursos-backdrop.is-open { display: block; }

.recursos-panel {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: rgba(5,13,26,0.98);
  border-bottom: 1px solid rgba(74,158,255,0.18);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  padding: 36px 40px 40px;
  z-index: 199;
}
.recursos-panel.is-open { display: block; }

.recursos-panel__label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tech);
  margin-bottom: 20px;
}
.recursos-close {
  position: absolute;
  top: 20px; right: 28px;
  background: rgba(74,158,255,0.08);
  border: 1px solid rgba(74,158,255,0.18);
  color: var(--steel-light);
  border-radius: 6px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.recursos-close:hover { background: rgba(74,158,255,0.18); color: #fff; }
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
}
.rc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  background: rgba(74,158,255,0.04);
  border: 1px solid rgba(74,158,255,0.12);
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, transform 0.22s;
}
a.rc-card:hover {
  background: rgba(74,158,255,0.10);
  border-color: rgba(74,158,255,0.38);
  transform: translateY(-3px);
}
.rc-card--wip { opacity: 0.55; cursor: default; }
.rc-card__icon { color: var(--tech); width: 24px; height: 24px; }
.rc-card__title { font-size: 0.95rem; font-weight: 600; color: var(--white); }
.rc-card__desc  { font-size: 0.78rem; color: var(--steel); line-height: 1.4; }
.rc-card__badge {
  display: inline-block;
  font-size: 0.62rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(74,158,255,0.12);
  color: var(--tech);
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 4px;
  width: fit-content;
}
@media (max-width: 767px) {
  .recursos-grid { grid-template-columns: repeat(2, 1fr); }
  .recursos-panel { padding: 28px 20px 32px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG HUB — Directorio de secciones (índice del blog)
═══════════════════════════════════════════════════════════════════════════ */
.blog-hub { margin: 0 0 44px; }

.blog-hub__head { margin-bottom: 22px; }
.blog-hub__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--tech); margin-bottom: 8px;
}
.blog-hub__title {
  font-size: 1.5rem; font-weight: 800; color: var(--white);
  margin: 0; letter-spacing: -0.01em;
}

.blog-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.hub-card {
  --accent: var(--tech);
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.hub-card__head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.hub-card__icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px; color: var(--accent);
  background: var(--tech-dim-bg); border: 1px solid var(--border);
  transition: background .25s, color .25s;
}
.hub-card:hover .hub-card__icon { background: var(--accent); color: var(--card-bg); }

.hub-card__titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.hub-card__name  { color: var(--white); font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.hub-card__count { color: var(--silver); font-size: 12px; margin-top: 2px; }

.hub-card__go {
  flex: 0 0 auto; color: var(--steel); font-size: 13px;
  transition: transform .25s, color .25s;
}
.hub-card:hover .hub-card__go { color: var(--accent); transform: translateX(3px); }

.hub-card__subs {
  list-style: none; margin: 0; padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.hub-card__subs a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  color: var(--silver-light); font-size: 13.5px; text-decoration: none;
  transition: background .2s, color .2s;
}
.hub-card__subs a i {
  color: var(--steel); font-size: 12px; width: 16px; text-align: center;
  transition: color .2s;
}
.hub-card__subs a:hover   { background: var(--tech-dim-bg); color: var(--white); }
.hub-card__subs a:hover i { color: var(--accent); }

@media (max-width: 767px) {
  .blog-hub__grid { grid-template-columns: 1fr; }
  .blog-hub__title { font-size: 1.35rem; }
}

/* Sidebar — Entradas recientes */
.sidebar-recent { list-style: none; padding: 0; margin: 0; }
.sidebar-recent li { border-bottom: 1px solid var(--border); }
.sidebar-recent li:last-child { border: none; }
.sidebar-recent a { display: block; padding: 11px 0; text-decoration: none; }
.sidebar-recent__title {
  display: block; color: var(--silver-light);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 14.5px; font-weight: 500; letter-spacing: -0.1px; line-height: 1.45;
  transition: color .2s;
}
.sidebar-recent a:hover .sidebar-recent__title { color: var(--tech); }
.sidebar-recent__date { display: block; margin-top: 4px; color: var(--steel); font-size: 11px; }
.sidebar-recent__date i { color: var(--tech); margin-right: 4px; }

/* ═══════════════════════════════════════════════════════════════════════════
   MODO LECTURA — cuerpo del artículo sobre "papel" claro azulado
   Aplica solo a .single-post-card .entry-content (entradas y páginas). El resto
   del artículo (meta, tags, autor, navegación) sigue en el tema oscuro. Los
   bloques de código se mantienen oscuros: contrastan bien sobre el papel claro.
═══════════════════════════════════════════════════════════════════════════ */
.single-post-card .entry-content {
  --ink:        #223449;   /* texto del cuerpo */
  --ink-strong: #0d223f;   /* títulos y negritas */
  --line:       #d9e4f4;   /* bordes suaves */
  --link:       #175fc0;   /* enlaces */
  --link-hover: #0c3f8c;
  --code-ink:   #124a86;   /* código en línea */

  margin:        -36px -40px 34px;                     /* sangra a los bordes de la tarjeta */
  padding:       42px 46px 34px;
  background:    linear-gradient(180deg, #f8fafe 0%, #eef4fc 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--line);
  color:         var(--ink);
  font-size:     1.06rem;
  line-height:   1.8;
}
.single-post-card .entry-content > *:first-child { margin-top: 0; }

/* Existe una regla global `p { color: var(--silver-light) }`. Una regla directa
   sobre <p> gana a la herencia del contenedor, así que hay que fijar el color
   del texto aquí explícitamente o los párrafos quedan claros sobre el papel. */
.single-post-card .entry-content p,
.single-post-card .entry-content li,
.single-post-card .entry-content ul,
.single-post-card .entry-content ol { color: var(--ink); }

.single-post-card .entry-content h1, .single-post-card .entry-content h2,
.single-post-card .entry-content h3, .single-post-card .entry-content h4,
.single-post-card .entry-content h5, .single-post-card .entry-content h6 { color: var(--ink-strong); }
.single-post-card .entry-content h3 { color: var(--link); }

.single-post-card .entry-content strong,
.single-post-card .entry-content b { color: var(--ink-strong); }

.single-post-card .entry-content a {
  color: var(--link);
  text-decoration-color: rgba(23,95,192,0.35);
  text-underline-offset: 2px;
}
.single-post-card .entry-content a:hover { color: var(--link-hover); text-decoration-color: var(--link-hover); }

.single-post-card .entry-content li::marker { color: var(--tech); }

.single-post-card .entry-content blockquote {
  background:   #eef3fb;
  border-left-color: var(--gold);
  color:        var(--ink-strong);
}

.single-post-card .entry-content code {
  background: #e6eefb;
  color:      var(--code-ink);
  border:     1px solid var(--line);
}
/* Reset del código dentro de bloques oscuros (pre) */
.single-post-card .entry-content pre code {
  background: none; border: none; padding: 0; color: #c7d6ec;
}

.single-post-card .entry-content th {
  background: #e3ecf8; color: var(--ink-strong); border-color: var(--line);
}
.single-post-card .entry-content td { background: #ffffff; color: var(--ink); border-color: var(--line); }

.single-post-card .entry-content hr  { border-top-color: var(--line); }
.single-post-card .entry-content img { border-color: var(--line); }

@media (max-width: 767px) {
  .single-post-card .entry-content {
    margin:  -24px -20px 26px;
    padding: 28px 22px 26px;
    font-size: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ESQUEMAS DIDÁCTICOS — sistema reutilizable para el contenido de entradas
   Construido con div/span (no p/ul/li) para no heredar la tipografía del cuerpo.
═══════════════════════════════════════════════════════════════════════════ */
.ep-scheme {
  position: relative;
  margin: 2.4em 0;
  padding: 24px 20px 18px;
  border: 1px solid #cfdff2;
  border-radius: 10px;
  background-color: #fbfdff;
  background-image: radial-gradient(rgba(74,158,255,0.13) 1px, transparent 1.5px);
  background-size: 18px 18px;
  background-position: -9px -9px;
}
.ep-scheme::before {
  content: ""; position: absolute; top: -1px; left: 22px; width: 34px; height: 3px;
  background: var(--tech); border-radius: 0 0 3px 3px;
}
.ep-scheme__cap {
  margin-top: 16px; text-align: center;
  font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: #64789a;
}

/* ── Estructura bifásica (díptico editorial: índice serif + bisagra) ── */
.ep-phases {
  display: flex; flex-wrap: wrap; align-items: stretch;
  background: #0b1f3b; border: 1px solid rgba(74,158,255,0.26);
  border-radius: 6px; overflow: hidden;
}
.ep-phase { flex: 1 1 220px; min-width: 200px; padding: 24px 22px 22px; position: relative; overflow: hidden; }
.ep-phase__no {
  position: absolute; top: 4px; right: 16px; pointer-events: none;
  font-family: 'STIX Two Text', Georgia, serif; font-style: italic; font-weight: 700;
  font-size: 52px; line-height: 1; color: rgba(74,158,255,0.16);
}
.ep-phase--decide .ep-phase__no { color: rgba(201,168,76,0.18); }
.ep-phase__name {
  display: inline-block; position: relative; z-index: 1;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tech); padding-bottom: 8px; margin-bottom: 11px;
  border-bottom: 1px solid rgba(74,158,255,0.25);
}
.ep-phase--decide .ep-phase__name { color: var(--gold-light); border-bottom-color: rgba(201,168,76,0.35); }
.ep-phase__role { position: relative; z-index: 1; color: #f0f5fc; font-weight: 700; font-size: 16.5px; line-height: 1.2; }
.ep-phase__desc { position: relative; z-index: 1; color: var(--silver); font-size: 12.5px; line-height: 1.55; margin-top: 8px; }
.ep-phase__hinge {
  flex: 0 0 auto; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 0 8px;
  border-left: 1px dashed rgba(74,158,255,0.28); border-right: 1px dashed rgba(74,158,255,0.28);
}
.ep-phase__hinge-badge {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(74,158,255,0.12); border: 1px solid var(--tech);
  display: grid; place-items: center;
}
.ep-phase__hinge-badge::after {
  content: ""; width: 7px; height: 7px; margin-left: -2px;
  border-top: 2px solid var(--tech); border-right: 2px solid var(--tech); transform: rotate(45deg);
}
.ep-phase__hinge-lbl {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: #8fa3bd;
  text-align: center; max-width: 68px; line-height: 1.35;
}

/* ── Esquema serpenteante por fases (bloques con giro en S) ── */
.ep-snake {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 46px 44px; margin: 26px 0;
}
.ep-snake__block {
  position: relative; min-width: 0;
  background: #0f2441; border: 1px solid rgba(74,158,255,0.28); border-radius: 12px;
  padding: 20px 18px 18px;
}
.ep-snake__block:nth-child(1) { grid-area: 1 / 1; }
.ep-snake__block:nth-child(2) { grid-area: 1 / 2; }
.ep-snake__block:nth-child(3) { grid-area: 1 / 3; }
.ep-snake__block:nth-child(4) { grid-area: 2 / 3; }
.ep-snake__block:nth-child(5) { grid-area: 2 / 2; }
.ep-snake__no {
  position: absolute; top: -14px; left: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #0a1424; border: 1.5px solid var(--tech); color: var(--tech);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  font-family: 'JetBrains Mono','Fira Code',monospace;
}
.ep-snake__title { color: #f0f5fc; font-weight: 700; font-size: 15.5px; line-height: 1.25; margin: 8px 0 7px; }
.ep-snake__desc { color: var(--silver); font-size: 12.5px; line-height: 1.55; overflow-wrap: break-word; }
.ep-snake__block::after {
  content: ""; position: absolute; z-index: 2; width: 12px; height: 12px;
  border-top: 2px solid var(--tech); border-right: 2px solid var(--tech);
}
.ep-snake__block:nth-child(1)::after,
.ep-snake__block:nth-child(2)::after { right: -30px; top: 50%; transform: translateY(-50%) rotate(45deg); }
.ep-snake__block:nth-child(3)::after { bottom: -30px; left: 50%; transform: translateX(-50%) rotate(135deg); }
.ep-snake__block:nth-child(4)::after { left: -30px; top: 50%; transform: translateY(-50%) rotate(225deg); }
@media (max-width: 600px) {
  .ep-snake { grid-template-columns: 1fr; gap: 32px; }
  .ep-snake__block { grid-area: auto !important; }
  .ep-snake__block::after {
    right: auto !important; left: 50% !important; top: auto !important; bottom: -22px !important;
    transform: translateX(-50%) rotate(135deg) !important;
  }
  .ep-snake__block:nth-child(5)::after { display: none; }
}

/* ── Cadena horizontal de nodos con conectores (fases, instancias) ── */
.ep-chain { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 4px; }
.ep-node {
  position: relative; overflow: hidden;
  flex: 1 1 158px; min-width: 140px; max-width: 240px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 15px 15px 14px;
  background: #0b1f3b;
  border: 1px solid rgba(74,158,255,0.28);
  border-top: 2px solid var(--tech);
  border-radius: 3px;
}
.ep-node__icon {
  position: absolute; top: 4px; right: 10px; z-index: 0; pointer-events: none;
  color: rgba(74,158,255,0.15); font-size: 50px; line-height: 1;
}
.ep-node__title { position: relative; z-index: 1; color: #eaf2fd; font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.ep-node__sub   { position: relative; z-index: 1; color: var(--steel-light); font-size: 11.5px; line-height: 1.35; }
.ep-node--gold  { border-top-color: var(--gold); }
.ep-node--gold .ep-node__icon { color: rgba(201,168,76,0.17); }

/* Conector con flecha dibujada en CSS (no depende de fuentes de iconos) */
.ep-chain__conn {
  flex: 0 0 auto; align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 50px; padding: 0 3px;
}
.ep-chain__lbl {
  font-family: 'JetBrains Mono',monospace; font-size: 8.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: #8298b4; white-space: nowrap; text-align: center; line-height: 1.3;
}
.ep-chain__arrow { position: relative; width: 46px; height: 3px; background: var(--tech); border-radius: 1px; }
.ep-chain__arrow::after {
  content: ""; position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  border-left: 12px solid var(--tech); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.ep-chain__conn--gold .ep-chain__arrow,
.ep-chain__conn--gold .ep-chain__arrow::after { background: var(--gold); border-left-color: var(--gold); }

/* ── Línea de tiempo vertical numerada (etapas) ── */
.ep-timeline { display: flex; flex-direction: column; }
.ep-tl-step { display: flex; gap: 16px; position: relative; padding-bottom: 18px; }
.ep-tl-step:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: -2px; width: 0;
  border-left: 2px dashed rgba(74,158,255,0.32);
}
.ep-tl-step__num {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; z-index: 1;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono',monospace; font-weight: 700; font-size: 14px;
  color: var(--tech); background: #0b1f3b; border: 1px solid rgba(74,158,255,0.5);
}
.ep-tl-step__body  { padding-top: 5px; }
.ep-tl-step__title { color: #0d223f; font-weight: 700; font-size: 15px; line-height: 1.3; }
.ep-tl-step__desc  { color: #4a5c73; font-size: 13.5px; line-height: 1.5; margin-top: 2px; }
.ep-tl-step__tag {
  display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700;
  color: #175fc0; background: rgba(74,158,255,0.10);
  border: 1px solid rgba(74,158,255,0.28); padding: 2px 9px; border-radius: 20px;
}

/* ── Fórmula matemática destacada (MathJax dentro) ── */
.ep-formula {
  margin: 1.8em auto; max-width: 460px; text-align: center;
  padding: 22px 24px; border-radius: 3px;
  background: #0b1f3b; border: 1px solid rgba(74,158,255,0.28); border-top: 2px solid var(--tech);
  overflow-x: auto;
}
.ep-formula__math { color: #ffffff; font-size: 1.25rem; }
.ep-formula__legend { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ep-formula__var {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(74,158,255,0.16); border: 1px solid rgba(74,158,255,0.34);
  border-radius: 20px; padding: 5px 13px; font-size: 12.5px; color: #e4eefb;
}
.ep-formula__var b {
  display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px;
  background: var(--tech); color: #07162b !important; border-radius: 5px;
  font-family: 'JetBrains Mono',monospace; font-weight: 700; font-size: 12px;
}

/* ── Criterios / ítems con distintivo (reemplaza listas ol) ── */
.ep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 10px; margin: 1.5em 0; }
.ep-card { display: flex; gap: 12px; align-items: flex-start; background: #ffffff; border: 1px solid #d9e4f4; border-left: 3px solid var(--tech); border-radius: 6px; padding: 13px 15px; }
.ep-card__badge {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(74,158,255,0.08); border: 1px solid rgba(74,158,255,0.3);
  color: #175fc0; font-family: 'JetBrains Mono',monospace; font-weight: 700; font-size: 13px;
}
.ep-card__text { color: #223449; font-size: 13.5px; line-height: 1.45; }

/* ── Segmentos temporales (prescripción / caducidad) ── */
.ep-track { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.5em 0; }
.ep-track__seg { flex: 1 1 240px; background: #ffffff; border: 1px solid #d9e4f4; border-left: 4px solid var(--tech); border-radius: 8px; padding: 14px 16px; }
.ep-track__seg--gold { border-left-color: var(--gold); }
.ep-track__label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #175fc0; font-weight: 700; }
.ep-track__seg--gold .ep-track__label { color: #9a7b22; }
.ep-track__val  { color: #0d223f; font-weight: 800; font-size: 16px; margin-top: 3px; }
.ep-track__desc { color: #4a5c73; font-size: 12.5px; line-height: 1.45; margin-top: 4px; }

/* ── Aviso / nota destacada (doctrina, advertencias) ── */
.ep-callout {
  display: flex; gap: 14px; align-items: flex-start; margin: 1.8em 0;
  background: linear-gradient(135deg, rgba(74,158,255,0.07), rgba(255,255,255,0));
  border: 1px solid #cfe0f5; border-left: 4px solid var(--tech);
  border-radius: 10px; padding: 16px 18px;
}
.ep-callout__icon { flex: 0 0 auto; color: #175fc0; font-size: 20px; margin-top: 2px; }
.ep-callout__body { color: #2a3d55; font-size: 13.8px; line-height: 1.6; }
.ep-callout__body strong { color: #0d223f; }

/* ── Figura ilustrativa con pie de foto (capturas / infografías) ── */
.ep-figure { margin: 1.8em auto; max-width: 440px; text-align: center; }
.ep-figure--wide { max-width: 640px; }
.ep-figure img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid #d9e4f4; }
.ep-figure figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: #4a5c73; }

/* ── Diagrama SVG autocontenido (esquemas de organización) ── */
.ep-diagram { margin: 1.8em auto; max-width: 720px; }
.ep-diagram svg { width: 100%; height: auto; display: block; }
.ep-diagram figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: #4a5c73; text-align: center; }

/* ── Figura dúo: dos imágenes fusionadas en una banda ── */
.ep-figure-duo { margin: 1.8em auto; max-width: 660px; }
.ep-figure-duo__imgs { display: flex; gap: 3px; border-radius: 10px; overflow: hidden; border: 1px solid #d9e4f4; }
.ep-figure-duo__imgs img { width: 50%; height: 210px; object-fit: cover; display: block; }
.ep-figure-duo figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: #4a5c73; text-align: center; }
@media (max-width: 480px) { .ep-figure-duo__imgs img { height: 148px; } }

/* ── Caja "Cómo citar este artículo" ── */
.cite-box { margin: 0 0 30px; border: 1px solid #d9e4f4; border-radius: 12px; background: #f7fafe; overflow: hidden; }
.cite-box__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; background: #eef4fc; border-bottom: 1px solid #e0e9f5; }
.cite-box__title { font-weight: 700; color: #0d223f; font-size: 14.5px; }
.cite-box__title i { color: var(--tech); margin-right: 6px; }
.cite-box__copy { display: inline-flex; align-items: center; gap: 6px; background: var(--tech); color: #fff; border: 0; border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s; }
.cite-box__copy:hover { background: #2f7fe0; }
.cite-box__copy.is-copied { background: #2e9e5b; }
.cite-box__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.cite-box__tab { background: #fff; border: 1px solid #d9e4f4; color: #35506f; border-radius: 20px; padding: 5px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.cite-box__tab:hover { border-color: var(--tech); color: #175fc0; }
.cite-box__tab.is-active { background: var(--tech); border-color: var(--tech); color: #fff; }
.cite-box__ref { display: none; padding: 12px 15px 14px; color: #223449; font-size: 11.8px; line-height: 1.5; word-break: break-word; }
.cite-box__ref.is-active { display: block; }
.cite-box__ref pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono, monospace); font-size: 11px; color: #0d223f; }

@media (max-width: 600px) {
  .ep-chain { flex-direction: column; align-items: stretch; }
  .ep-node  { max-width: none; }
  .ep-chain__arrow { transform: rotate(90deg); }
  .ep-phase__hinge {
    border-left: none; border-right: none;
    border-top: 1px dashed rgba(74,158,255,0.28); border-bottom: 1px dashed rgba(74,158,255,0.28);
    padding: 12px 0;
  }
  .ep-phase__hinge-badge { transform: rotate(90deg); }
}

/* ── CTA de consultoría (reutilizable en artículos) ── */
.ep-cta {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  margin: 2.6em 0 1.4em;
  background: linear-gradient(135deg, rgba(201,168,76,0.11), rgba(74,158,255,0.06));
  border: 1px solid #e4d7ad; border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 22px 24px;
}
.ep-cta__body  { flex: 1 1 300px; }
.ep-cta__title { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; color: #0d223f; line-height: 1.35; }
.ep-cta__text  { margin: 0; font-size: 13.8px; line-height: 1.6; color: #2a3d55; }
.ep-cta__btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: #1a1205; font-weight: 700; text-decoration: none;
  font-size: 14px; padding: 12px 22px; border-radius: 40px;
  box-shadow: 0 4px 14px rgba(201,168,76,0.28);
  transition: background var(--tr), transform var(--tr), box-shadow var(--tr);
}
.ep-cta__btn:hover {
  background: var(--gold-light); color: #1a1205; transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.38);
}
.ep-cta__btn i { font-size: 13px; }
@media (max-width: 600px) {
  .ep-cta { padding: 18px; }
  .ep-cta__btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ESQUEMAS DIDÁCTICOS II — familia para ciberseguridad industrial / OT
   Formas nuevas: pila estratificada, panal de requisitos, medidores de nivel,
   mapa documental, tríptico de roles y matriz zona × requisito.
═══════════════════════════════════════════════════════════════════════════ */

/* ── Pila estratificada: descenso por niveles de una planta ───────────────── */
.ep-strata { display: flex; flex-direction: column; gap: 7px; margin: 1.6em 0 0.4em; }
.ep-strata__band {
  --stair: calc(var(--i, 0) * 16px);
  position: relative;
  margin-left: var(--stair);
  margin-right: calc(var(--stair) / 2);
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, #0b1f3b, #102a4e);
  border: 1px solid rgba(74,158,255,0.24);
  border-left: 4px solid var(--tech);
  border-radius: 4px 8px 8px 4px;
  padding: 12px 16px;
}
.ep-strata__band--ot { border-left-color: var(--gold); }
.ep-strata__band--dmz {
  background: repeating-linear-gradient(135deg, #0c2143, #0c2143 9px, #102b52 9px, #102b52 18px);
  border-left-color: var(--gold); border-style: dashed;
}
.ep-strata__lvl {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-weight: 700; font-size: 16px;
  color: var(--tech); background: rgba(74,158,255,0.10);
  border: 1px solid rgba(74,158,255,0.35);
}
.ep-strata__band--ot .ep-strata__lvl,
.ep-strata__band--dmz .ep-strata__lvl {
  color: var(--gold-light); background: rgba(201,168,76,0.10); border-color: rgba(201,168,76,0.38);
}
.ep-strata__body { flex: 1 1 auto; min-width: 0; }
.ep-strata__name { display: block; color: #f0f5fc; font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.ep-strata__desc { display: block; color: var(--silver); font-size: 12.3px; line-height: 1.5; margin-top: 3px; }
.ep-strata__tag {
  flex: 0 0 auto; align-self: flex-start;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--steel-light);
  border: 1px solid rgba(122,143,166,0.4); border-radius: 20px; padding: 3px 10px;
}
.ep-strata__band--ot .ep-strata__tag, .ep-strata__band--dmz .ep-strata__tag {
  color: var(--gold-light); border-color: rgba(201,168,76,0.4);
}
.ep-strata__axis {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding: 0 4px;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: #64789a;
}
.ep-strata__axis::before {
  content: ""; flex: 1 1 auto; height: 1px; order: 2; margin: 0 12px;
  background: linear-gradient(90deg, rgba(74,158,255,0.45), rgba(201,168,76,0.45));
}
.ep-strata__axis span:first-child { order: 1; }
.ep-strata__axis span:last-child  { order: 3; }

/* ── Panal: los requisitos fundamentales como celdas hexagonales ─────────── */
.ep-comb {
  display: grid; grid-template-columns: repeat(8, 1fr);
  column-gap: 8px; row-gap: 0; margin: 1.6em 0 0.6em;
}
.ep-comb__cell {
  grid-column: span 2; aspect-ratio: 1 / 1.06;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(160deg, #123059, #0b1f3b);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8px 12%;
  box-shadow: inset 0 0 0 1px rgba(74,158,255,0.30);
}
.ep-comb__cell:nth-child(n+5) { margin-top: -16px; }
.ep-comb__cell:nth-child(5) { grid-column: 2 / span 2; }
.ep-comb__cell:nth-child(6) { grid-column: 4 / span 2; }
.ep-comb__cell:nth-child(7) { grid-column: 6 / span 2; }
.ep-comb__cell--key { background: linear-gradient(160deg, #2a2413, #1a1508); box-shadow: inset 0 0 0 1px rgba(201,168,76,0.45); }
.ep-comb__ico { color: var(--tech); font-size: 17px; margin-bottom: 5px; }
.ep-comb__cell--key .ep-comb__ico { color: var(--gold); }
.ep-comb__no {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--tech); text-transform: uppercase;
}
.ep-comb__cell--key .ep-comb__no { color: var(--gold-light); }
.ep-comb__name { color: #eef4fc; font-size: 12px; font-weight: 600; line-height: 1.28; margin-top: 4px; }

/* ── Medidores: nivel de seguridad 0–4 en semicírculo ────────────────────── */
.ep-dials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 1.6em 0 0.4em; }
.ep-dial {
  flex: 1 1 170px; max-width: 220px; background: #ffffff;
  border: 1px solid #d9e4f4; border-radius: 10px; padding: 16px 14px 14px; text-align: center;
}
.ep-dial__meter { position: relative; width: 132px; height: 66px; margin: 0 auto 6px; overflow: hidden; }
.ep-dial__meter::before {
  content: ""; position: absolute; top: 0; left: 0; width: 132px; height: 132px; border-radius: 50%;
  background: conic-gradient(from 270deg,
    var(--dial, #4a9eff) 0deg calc(var(--sl, 0) * 45deg),
    #e3ecf8 calc(var(--sl, 0) * 45deg) 180deg,
    transparent 180deg);
}
.ep-dial__meter::after {
  content: ""; position: absolute; left: 21px; top: 21px; width: 90px; height: 90px;
  border-radius: 50%; background: #ffffff;
}
.ep-dial__val {
  position: absolute; left: 0; right: 0; bottom: 2px; z-index: 1;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 26px; font-weight: 700; color: #0d223f;
}
.ep-dial__val small { font-size: 12px; color: #7f93ad; font-weight: 500; }
.ep-dial__code {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; color: #175fc0; text-transform: uppercase;
}
.ep-dial--gold .ep-dial__code { color: #9a7b22; }
.ep-dial--warn .ep-dial__code { color: #b45309; }
.ep-dial__name { color: #0d223f; font-weight: 700; font-size: 13.5px; margin-top: 3px; }
.ep-dial__desc { color: #4a5c73; font-size: 12.2px; line-height: 1.45; margin-top: 5px; }
.ep-dial__scale {
  display: flex; justify-content: space-between; margin: 8px 6px 0;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 9.5px; color: #93a6bd;
}

/* ── Mapa documental: la serie como plano de cuatro columnas ─────────────── */
.ep-blueprint {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 1.6em 0 0.5em;
}
.ep-bp__col { display: flex; flex-direction: column; gap: 7px; }
.ep-bp__head {
  display: flex; align-items: center; gap: 7px; padding: 9px 11px;
  background: #0d223f; border-radius: 6px 6px 2px 2px; color: #ffffff;
  font-size: 12px; font-weight: 700; line-height: 1.2;
}
.ep-bp__head i { color: var(--tech); font-size: 13px; }
.ep-bp__col--gold .ep-bp__head i { color: var(--gold-light); }
.ep-bp__part {
  position: relative; background: #ffffff; border: 1px solid #d9e4f4;
  border-radius: 6px; padding: 9px 11px 10px;
}
.ep-bp__part--soon { background: #f4f8fd; border-style: dashed; }
.ep-bp__code {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 11.5px; font-weight: 700; color: #175fc0;
}
.ep-bp__part--soon .ep-bp__code { color: #7f93ad; }
.ep-bp__ttl  { display: block; color: #223449; font-size: 12.2px; line-height: 1.38; margin-top: 3px; }
.ep-bp__year {
  display: inline-block; margin-top: 6px; font-family: 'JetBrains Mono','Fira Code',monospace;
  font-size: 10px; letter-spacing: 0.06em; color: #56698a;
  background: #eef4fc; border-radius: 4px; padding: 2px 7px;
}

/* ── Tríptico de roles: quién responde por qué parte ─────────────────────── */
.ep-triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.6em 0 0.5em; }
.ep-triad__card {
  background: #ffffff; border: 1px solid #d9e4f4; border-radius: 10px;
  padding: 0 0 14px; overflow: hidden; display: flex; flex-direction: column;
}
.ep-triad__ribbon {
  background: linear-gradient(90deg, #175fc0, #4a9eff); color: #fff;
  padding: 9px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.ep-triad__card--gold .ep-triad__ribbon { background: linear-gradient(90deg, #9a7b22, #c9a84c); }
.ep-triad__card--steel .ep-triad__ribbon { background: linear-gradient(90deg, #43586f, #7a8fa6); }
.ep-triad__who  { padding: 12px 14px 0; color: #0d223f; font-weight: 700; font-size: 13.5px; }
.ep-triad__what { padding: 4px 14px 0; color: #4a5c73; font-size: 12.5px; line-height: 1.5; flex: 1 1 auto; }
.ep-triad__parts { display: flex; flex-wrap: wrap; gap: 5px; padding: 11px 14px 0; }
.ep-triad__chip {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10.5px; font-weight: 600;
  color: #175fc0; background: #eef4fc; border: 1px solid #d5e4f7; border-radius: 4px; padding: 3px 7px;
}
.ep-triad__card--gold .ep-triad__chip { color: #8a6d18; background: #faf5e6; border-color: #eadfbd; }
.ep-triad__card--steel .ep-triad__chip { color: #46596e; background: #eff3f8; border-color: #dbe3ec; }

/* ── Matriz zona × requisito: nivel objetivo por celda ───────────────────── */
.ep-matrix-wrap { margin: 1.6em 0 0.5em; overflow-x: auto; }
.ep-matrix {
  display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(7, minmax(46px, 1fr));
  gap: 3px; min-width: 520px;
}
.ep-matrix__h {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #0d223f; color: #ffffff; border-radius: 4px; padding: 7px 4px;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
}
.ep-matrix__h--corner { background: transparent; }
.ep-matrix__z {
  display: flex; flex-direction: column; justify-content: center;
  background: #f4f8fd; border: 1px solid #dfe9f6; border-left: 3px solid var(--tech);
  border-radius: 4px; padding: 7px 10px;
}
.ep-matrix__z b { color: #0d223f; font-size: 12.3px; line-height: 1.2; }
.ep-matrix__z span { color: #64789a; font-size: 10.5px; line-height: 1.3; margin-top: 2px; }
.ep-matrix__z--gold { border-left-color: var(--gold); }
.ep-matrix__c {
  display: flex; align-items: center; justify-content: center; border-radius: 4px;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 13px; font-weight: 700;
  color: #0d223f; background: #eef3f9; border: 1px solid #e2e9f2; min-height: 40px;
}
.ep-matrix__c.is-1 { background: rgba(74,158,255,0.16); border-color: rgba(74,158,255,0.28); }
.ep-matrix__c.is-2 { background: rgba(74,158,255,0.34); border-color: rgba(74,158,255,0.42); }
.ep-matrix__c.is-3 { background: rgba(23,95,192,0.62); border-color: rgba(23,95,192,0.70); color: #ffffff; }
.ep-matrix__c.is-4 { background: #0d223f; border-color: #0d223f; color: #ffffff; }
.ep-matrix__legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px;
  font-size: 11.5px; color: #4a5c73;
}
.ep-matrix__legend em { font-style: normal; display: inline-flex; align-items: center; }
.ep-matrix__legend i { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 5px; border: 1px solid #e2e9f2; }

@media (max-width: 700px) {
  .ep-blueprint { grid-template-columns: repeat(2, 1fr); }
  .ep-triad     { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ep-strata__band { margin-left: 0; margin-right: 0; flex-wrap: wrap; gap: 10px; }
  .ep-strata__tag  { order: 3; }
  .ep-comb { display: flex; flex-direction: column; gap: 7px; }
  .ep-comb__cell {
    aspect-ratio: auto; clip-path: none; border-radius: 8px; flex-direction: row;
    justify-content: flex-start; text-align: left; gap: 10px; padding: 11px 14px;
  }
  .ep-comb__cell:nth-child(n+5) { margin-top: 0; }
  .ep-comb__ico { margin-bottom: 0; }
  .ep-comb__name { margin-top: 0; }
}
@media (max-width: 460px) {
  .ep-blueprint { grid-template-columns: 1fr; }
}

/* ── Modificadores de estado (evitan el atributo style en el contenido) ── */
.ep-strata__band.is-i0 { --i: 0; }
.ep-strata__band.is-i1 { --i: 1; }
.ep-strata__band.is-i2 { --i: 2; }
.ep-strata__band.is-i3 { --i: 3; }
.ep-strata__band.is-i4 { --i: 4; }
.ep-strata__band.is-i5 { --i: 5; }
.ep-dial.is-sl0 { --sl: 0; }
.ep-dial.is-sl1 { --sl: 1; }
.ep-dial.is-sl2 { --sl: 2; }
.ep-dial.is-sl3 { --sl: 3; }
.ep-dial.is-sl4 { --sl: 4; }
.ep-dial--gold { --dial: #c9a84c; }
.ep-dial--warn { --dial: #d97706; }

/* ── Planos técnicos: SVG grande servido como imagen, con arrastre lateral ── */
.ep-diagram img { width: 100%; height: auto; display: block; }
.ep-diagram--wide { max-width: 960px; }
.ep-diagram--scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ep-diagram--scroll img { min-width: 620px; }
/* Los planos de planta son muy anchos: se muestran a mayor tamaño (legibles) y
   se recorren en horizontal, en vez de encogerse hasta perder la tipografía. */
.ep-diagram--wide.ep-diagram--scroll img { min-width: 940px; }
.ep-diagram__hint { display: none; }
/* Aviso de arrastre: siempre visible en planos anchos (el diagrama supera la
   columna aunque la ventana sea grande) y bajo 760px para el resto. */
.ep-diagram--wide.ep-diagram--scroll .ep-diagram__hint,
.ep-diagram__hint.is-shown { display: block; }
.ep-diagram__hint {
  margin-bottom: 7px; font-size: 11.5px; color: #7f93ad;
  font-family: 'JetBrains Mono','Fira Code',monospace; letter-spacing: 0.04em;
}
@media (max-width: 760px) {
  .ep-diagram--scroll .ep-diagram__hint { display: block; }
}

.ep-strata__band.is-i6 { --i: 6; }
.ep-matrix__legend i.lg-1 { background: rgba(74,158,255,0.16); border-color: rgba(74,158,255,0.28); }
.ep-matrix__legend i.lg-2 { background: rgba(74,158,255,0.34); border-color: rgba(74,158,255,0.42); }
.ep-matrix__legend i.lg-3 { background: rgba(23,95,192,0.62); border-color: rgba(23,95,192,0.70); }
.ep-matrix__legend i.lg-4 { background: #0d223f; border-color: #0d223f; }

/* ═════════════════════════════════════════════════════════════════════════
   Componentes .ep-* III — telecomunicaciones y política sectorial
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Regla de espectro: bloques de una banda y a quién se adjudicaron ────── */
.ep-spectrum { margin: 1.7em 0 0.6em; }
.ep-spectrum__scale {
  display: grid; grid-template-columns: repeat(5, 1fr);
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10px;
  letter-spacing: 0.04em; color: #7f93ad; margin-bottom: 5px;
}
.ep-spectrum__scale span { position: relative; padding-left: 3px; border-left: 1px solid #dbe4f2; }
.ep-spectrum__scale span:last-child { text-align: right; padding-right: 3px; }
.ep-spectrum__band {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  border: 1px solid #d9e4f4; border-radius: 9px; padding: 5px; background: #f6f9fd;
}
.ep-spectrum__blk {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 76px; padding: 9px 6px; border-radius: 6px; text-align: center;
  background: linear-gradient(160deg, #0d223f, #175fc0); color: #ffffff;
}
.ep-spectrum__blk:nth-child(2) { background: linear-gradient(160deg, #123056, #1c6bd0); }
.ep-spectrum__blk:nth-child(3) { background: linear-gradient(160deg, #17406e, #2f7ddb); }
.ep-spectrum__blk:nth-child(4) { background: linear-gradient(160deg, #1c5089, #4a9eff); }
.ep-spectrum__blk.is-free {
  background: #ffffff; border: 1.5px dashed #b9c9de; color: #64789a;
}
.ep-spectrum__op   { font-size: 13px; font-weight: 700; line-height: 1.2; }
.ep-spectrum__rng  {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10px;
  opacity: 0.82; margin-top: 4px; letter-spacing: 0.03em;
}
.ep-spectrum__tag  {
  margin-top: 7px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
  background: rgba(255,255,255,0.18);
}
.ep-spectrum__blk.is-free .ep-spectrum__tag { background: #eef3fa; color: #7f93ad; }
.ep-spectrum__cap {
  margin: 9px 0 0; font-size: 11.5px; line-height: 1.5; color: #64789a;
}

/* ── Barras de brecha: comparar penetración entre territorios ───────────── */
.ep-gapbar { margin: 1.7em 0 0.6em; display: flex; flex-direction: column; gap: 9px; }
.ep-gapbar__row {
  display: grid; grid-template-columns: minmax(112px, 0.9fr) 1fr 62px;
  align-items: center; gap: 11px;
}
.ep-gapbar__lbl  { font-size: 12.5px; font-weight: 600; color: #223449; line-height: 1.3; }
.ep-gapbar__lbl small { display: block; font-weight: 400; font-size: 10.5px; color: #7f93ad; }
.ep-gapbar__track {
  height: 15px; border-radius: 8px; background: #eef3fa;
  border: 1px solid #e0e8f3; overflow: hidden;
}
.ep-gapbar__fill {
  height: 100%; border-radius: 8px 0 0 8px;
  background: linear-gradient(90deg, #0d223f, #4a9eff);
}
.ep-gapbar__fill--gold { background: linear-gradient(90deg, #8a6d18, #c9a84c); }
.ep-gapbar__fill--warn { background: linear-gradient(90deg, #7a4a12, #d38b2c); }
.ep-gapbar__val {
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 12px;
  font-weight: 700; color: #175fc0; text-align: right;
}
.ep-gapbar__fill--gold + .ep-gapbar__val { color: #8a6d18; }
.ep-gapbar__note { margin: 4px 0 0; font-size: 11.5px; line-height: 1.5; color: #64789a; }

.ep-gapbar__fill.is-p05  { width: 5%; }   .ep-gapbar__fill.is-p10  { width: 10%; }
.ep-gapbar__fill.is-p15  { width: 15%; }  .ep-gapbar__fill.is-p20  { width: 20%; }
.ep-gapbar__fill.is-p25  { width: 25%; }  .ep-gapbar__fill.is-p30  { width: 30%; }
.ep-gapbar__fill.is-p34  { width: 34%; }  .ep-gapbar__fill.is-p35  { width: 35%; }
.ep-gapbar__fill.is-p40  { width: 40%; }  .ep-gapbar__fill.is-p42  { width: 42%; }
.ep-gapbar__fill.is-p45  { width: 45%; }  .ep-gapbar__fill.is-p50  { width: 50%; }
.ep-gapbar__fill.is-p55  { width: 55%; }  .ep-gapbar__fill.is-p60  { width: 60%; }
.ep-gapbar__fill.is-p64  { width: 64%; }  .ep-gapbar__fill.is-p65  { width: 65%; }
.ep-gapbar__fill.is-p70  { width: 70%; }  .ep-gapbar__fill.is-p75  { width: 75%; }
.ep-gapbar__fill.is-p80  { width: 80%; }  .ep-gapbar__fill.is-p85  { width: 85%; }
.ep-gapbar__fill.is-p86  { width: 86%; }  .ep-gapbar__fill.is-p90  { width: 90%; }
.ep-gapbar__fill.is-p95  { width: 95%; }  .ep-gapbar__fill.is-p96  { width: 96%; }
.ep-gapbar__fill.is-p99  { width: 99%; }  .ep-gapbar__fill.is-p100 { width: 100%; }

/* ── Libro mayor: lo cerrado frente a lo que queda en el tintero ─────────── */
.ep-ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.7em 0 0.6em; }
.ep-ledger__col {
  background: #ffffff; border: 1px solid #d9e4f4; border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
}
.ep-ledger__head {
  display: flex; align-items: center; gap: 8px; padding: 10px 13px;
  font-size: 12.5px; font-weight: 700; color: #ffffff;
  background: linear-gradient(90deg, #175fc0, #4a9eff);
}
.ep-ledger__col--open .ep-ledger__head { background: linear-gradient(90deg, #8a6d18, #c9a84c); }
.ep-ledger__item {
  padding: 10px 13px; border-top: 1px solid #edf2f9;
}
.ep-ledger__item:first-of-type { border-top: 0; }
.ep-ledger__ttl {
  display: flex; align-items: baseline; gap: 6px;
  color: #0d223f; font-weight: 700; font-size: 12.6px; line-height: 1.3;
}
.ep-ledger__ttl i { color: var(--tech); font-size: 11px; }
.ep-ledger__col--open .ep-ledger__ttl i { color: #b8952f; }
.ep-ledger__desc { display: block; margin-top: 3px; color: #4a5c73; font-size: 12px; line-height: 1.5; }
.ep-ledger__meta {
  display: inline-block; margin-top: 6px;
  font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 10px;
  letter-spacing: 0.04em; color: #56698a; background: #eef4fc;
  border-radius: 4px; padding: 2px 7px;
}
.ep-ledger__col--open .ep-ledger__meta { color: #8a6d18; background: #faf5e6; }

@media (max-width: 780px) {
  .ep-ledger   { grid-template-columns: 1fr; }
  .ep-spectrum__band, .ep-spectrum__scale { grid-template-columns: repeat(2, 1fr); }
  .ep-spectrum__scale { display: none; }
  .ep-gapbar__row { grid-template-columns: 1fr 52px; grid-template-areas: "lbl val" "trk trk"; row-gap: 4px; }
  .ep-gapbar__lbl   { grid-area: lbl; }
  .ep-gapbar__val   { grid-area: val; }
  .ep-gapbar__track { grid-area: trk; }
}
