/*
Theme Name: Sistemas Operativos Info
Theme URI: https://sistemasoperativos.info
Author: Víctor Alonso
Author URI: https://sistemasoperativos.info/sobre-mi/
Description: Tema ultraligero, de alto rendimiento y diseño Matrix Dark (PHP + CSS puro) para SistemasOperativos.info. Desarrollado sin frameworks ni librerías pesadas para garantizar 100% en Core Web Vitals, accesibilidad y velocidad extrema en móviles y escritorio.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ssoo
*/

:root {
  --bg-main: #0a0e14;
  --bg-surface: #111822;
  --bg-surface-elevated: #16202c;
  --bg-surface-highlight: #1e2b3b;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #94a3b8;
  --matrix-green: #00ff66;
  --matrix-green-hover: #38ff88;
  --matrix-green-dark: #00b347;
  --matrix-green-glow: rgba(0, 255, 102, 0.15);
  --matrix-green-bg: rgba(0, 255, 102, 0.08);
  --accent-blue: #38bdf8;
  --accent-amber: #fbbf24;
  --accent-red: #f87171;
  --max-w-content: 860px;
  --max-w-wide: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 255, 102, 0.15);
}

/* RESET Y BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* ACCESIBILIDAD */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link:focus {
  position: fixed !important;
  top: 10px;
  left: 10px;
  background: var(--matrix-green);
  color: #000;
  padding: 10px 16px;
  font-weight: 700;
  z-index: 99999;
  border-radius: var(--radius-sm);
  outline: 2px solid #fff;
}

:focus-visible {
  outline: 2px solid var(--matrix-green);
  outline-offset: 3px;
}

/* ENLACES */
a {
  color: var(--matrix-green);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--matrix-green-hover);
  text-decoration: underline;
}

/* TIPOGRAFÍA */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.1rem; line-height: 1.2; margin-top: 0; }
h2 { font-size: 1.55rem; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.3em;
  color: #e2e8f0;
}

strong, b {
  color: #ffffff;
  font-weight: 700;
}

ul, ol {
  margin-bottom: 1.3em;
  padding-left: 1.4em;
  color: #e2e8f0;
}

li {
  margin-bottom: 0.4em;
}

blockquote {
  border-left: 3px solid var(--matrix-green);
  background: var(--bg-surface);
  padding: 12px 18px;
  margin: 1.5em 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* CONTENEDOR GLOBAL */
.site-wrapper {
  max-width: var(--max-w-wide);
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* CABECERA (HEADER) */
.site-header {
  background: rgba(10, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--matrix-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--matrix-green);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 10px var(--matrix-green-glow);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--matrix-green);
}

/* NAVEGACIÓN */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.nav-menu li a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: block;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
  color: var(--text-primary);
  background: var(--bg-surface);
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.08);
}

.nav-menu li.highlight-item a,
.nav-menu a[href*="/sobre-mi/"] {
  color: var(--matrix-green);
  border: 1px solid rgba(0, 255, 102, 0.35);
  background: var(--matrix-green-bg);
  border-radius: 9999px;
  padding: 0.4rem 1.1rem;
}

.nav-menu li.highlight-item a:hover,
.nav-menu a[href*="/sobre-mi/"]:hover {
  background: var(--matrix-green);
  color: #051a0d !important;
  border-color: var(--matrix-green);
  box-shadow: 0 0 14px rgba(0, 255, 102, 0.4);
}

/* BOTÓN MENÚ MÓVIL */
.nav-toggle {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
}

.nav-toggle:hover {
  border-color: var(--matrix-green);
  color: var(--matrix-green);
}

/* CONTENIDO PRINCIPAL */
.main-content {
  flex: 1;
  padding: 32px 0 48px;
}

.content-article {
  max-width: var(--max-w-content);
  margin: 0 auto;
}

/* HERO PORTADA */
.hero-banner {
  background: linear-gradient(180deg, #111822 0%, #0a0e14 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--matrix-green), transparent);
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--matrix-green);
  background: var(--matrix-green-bg);
  border: 1px solid rgba(0, 255, 102, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #ffffff;
}

.hero-title span {
  color: var(--matrix-green);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 740px;
  margin-bottom: 22px;
}

/* BARRA DE BÚSQUEDA RÁPIDA */
.search-form-wrap {
  max-width: 600px;
  margin-bottom: 10px;
}

.search-form-wrap form {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  background: #070a0e;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--matrix-green);
  box-shadow: 0 0 12px var(--matrix-green-glow);
}

.search-button {
  background: var(--matrix-green);
  color: #05080c;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.search-button:hover {
  background: var(--matrix-green-hover);
}

/* GRID DE CATEGORÍAS / FAMILIAS DE SISTEMAS */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-heading h2 {
  font-size: 1.4rem;
  margin: 0;
  border: none;
  padding: 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--matrix-green);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

.cat-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.cat-card h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #ffffff;
}

.cat-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
}

/* ARTÍCULOS GRID / CARDS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--matrix-green);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.post-card-meta {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.post-card-title {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0 0 10px;
}

.post-card-title a {
  color: var(--text-primary);
}

.post-card-title a:hover {
  color: var(--matrix-green);
  text-decoration: none;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

.post-card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--matrix-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ENTRADA INDIVIDUAL (SINGLE POST & PAGE) */
.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--matrix-green);
}

.article-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 14px;
  color: #ffffff;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-badge {
  background: var(--matrix-green-bg);
  color: var(--matrix-green);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* TABLA DE CONTENIDOS AUTOMÁTICA */
.table-of-contents {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--matrix-green);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 24px 0 32px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.toc-list li {
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.toc-list li a {
  color: var(--text-secondary);
}

.toc-list li a:hover {
  color: var(--matrix-green);
}

/* CONTENIDO DEL ARTÍCULO (ESTILOS GUTENBERG) */
.article-body {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #e2e8f0;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.8em auto;
  display: block;
}

.article-body figure {
  margin: 2em 0;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-top: 6px;
}

/* TABLAS RESPONSIVAS PERFECTAS */
.wp-block-table, table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table thead tr {
  background: var(--bg-surface-elevated);
  border-bottom: 2px solid var(--border-strong);
}

table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

table tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* CÓDIGO Y PRE */
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: #070a0e;
  color: var(--matrix-green);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 102, 0.15);
}

pre {
  background: #070a0e;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--matrix-green);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 1.8em 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* TARJETA DE AUTOR */
.author-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 40px 0;
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--matrix-green);
  background: #070a0e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--matrix-green);
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #ffffff;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.author-links {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
}

/* PIE DE PÁGINA (FOOTER COMPLETO) */
.site-footer {
  background: #070a0e;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  margin-top: auto;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 0.95rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--matrix-green);
  text-decoration: none;
}

.footer-badge {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 12px;
}

.footer-badge strong {
  color: var(--matrix-green);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.footer-bottom a {
  color: var(--text-secondary);
}

.footer-bottom a:hover {
  color: var(--matrix-green);
}

/* RESPONSIVE DESIGN (MOBILE FIRST OVERRIDES) */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .hero-title { font-size: 1.85rem; }
  .hero-banner { padding: 24px 18px; }
  
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0d121a;
    border-bottom: 1px solid var(--border-strong);
    flex-direction: column;
    padding: 14px 16px;
    gap: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  }

  .nav-menu.is-active {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a {
    padding: 10px 14px;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* LIGHTHOUSE ACCESSIBILITY & CONTRAST FIXES */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
  background-color: var(--bg-surface-elevated) !important;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(even) {
  background-color: var(--bg-surface) !important;
}
.wp-block-table table, .wp-block-table td, .wp-block-table th {
  border-color: var(--border-subtle) !important;
  color: var(--text-primary) !important;
}
.wp-block-table td strong, .wp-block-table th strong {
  color: #ffffff !important;
}

/* Links inside text blocks must have underline to satisfy WCAG AA */
.article-body p a,
.article-body li a,
.footer-bottom a,
.footer-links a,
.author-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

.article-body p a:hover,
.article-body li a:hover,
.footer-bottom a:hover,
.footer-links a:hover,
.author-links a:hover {
  color: var(--matrix-green-hover) !important;
}

/* ==========================================================================
   SOBRE MÍ & AUTHOR PROFILE CARD
   ========================================================================== */
.author-hero-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(18, 26, 38, 0.95), rgba(10, 14, 20, 0.95));
  border: 1px solid rgba(0, 255, 102, 0.28);
  border-radius: 16px;
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.author-hero-avatar {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  height: 160px;
}

.author-hero-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--matrix-green);
  box-shadow: 0 0 24px rgba(0, 255, 102, 0.35);
  background: var(--bg-surface);
  display: block;
}

.author-hero-status {
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: var(--matrix-green);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px var(--matrix-green));
}

.author-hero-info {
  flex: 1;
}

.author-badge-uclm {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--matrix-green);
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.author-hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.author-hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
}

.author-hero-subtitle strong {
  color: #ffffff;
}

.author-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.author-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #25D366;
  color: #051a0d !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: #000000 !important;
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-btn-secondary:hover {
  background: rgba(0, 255, 102, 0.1);
  border-color: var(--matrix-green);
  color: var(--matrix-green) !important;
}

@media (max-width: 768px) {
  .author-hero-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .author-hero-avatar {
    width: 130px;
    height: 130px;
  }
  .author-hero-img {
    width: 130px;
    height: 130px;
  }
  .author-hero-tags,
  .author-hero-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   AUTHOR BOX (WITH REAL PORTRAIT)
   ========================================================================== */
.author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 2.5rem;
}

.author-avatar-img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--matrix-green);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.25);
  background: var(--bg-surface-elevated);
}

.author-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  color: #ffffff;
}

.author-info p {
  margin: 0 0 0.85rem 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.author-links {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.author-links a {
  color: var(--matrix-green);
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
  }
  .author-links {
    justify-content: center;
  }
}

/* ==========================================================================
   ADSENSE BANNER SLOTS
   ========================================================================== */
.ad-banner-slot {
  margin: 2.5rem 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem 0.5rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ad-banner-slot .ad-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  user-select: none;
}

.ad-banner-mid-content {
  margin: 2rem 0;
  min-height: 180px;
}

/* ==========================================================================
   COMMENTS SECTION STYLING (MATRIX DARK WCAG AAA)
   ========================================================================== */
.comments-area {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.comments-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.comments-title span {
  color: var(--matrix-green);
}

.comment-list,
.comment-list ol,
.comment-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 2.5rem 0;
}

.comment-list > .comment {
  margin-bottom: 1.75rem;
}

.comment-body {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-body:hover {
  border-color: rgba(0, 255, 102, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.comment-meta .avatar {
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  width: 44px;
  height: 44px;
}

.comment-author .fn {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
}

.comment-author .fn a {
  color: #ffffff;
  text-decoration: none;
}

.comment-author .fn a:hover {
  color: var(--matrix-green);
}

.comment-metadata {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.comment-metadata a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.comment-metadata a:hover {
  color: var(--matrix-green);
}

.bypostauthor > .comment-body {
  border-color: rgba(0, 255, 102, 0.35);
  background: linear-gradient(135deg, rgba(18, 26, 38, 0.9), rgba(14, 28, 22, 0.6));
}

.bypostauthor > .comment-body .comment-author::after {
  content: "Autor / Docente";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--matrix-green);
  background: rgba(0, 255, 102, 0.12);
  border: 1px solid rgba(0, 255, 102, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.comment-content {
  color: var(--text-primary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
  margin-top: 1.25rem;
  border-left: 2px solid rgba(0, 255, 102, 0.2);
}

.comment-body .reply {
  margin-top: 1rem;
  text-align: right;
}

.comment-reply-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--matrix-green) !important;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  text-decoration: none !important;
  display: inline-block;
  transition: all 0.2s ease;
}

.comment-reply-link:hover {
  background: rgba(0, 255, 102, 0.18);
  border-color: var(--matrix-green);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

/* Comment Form */
.comment-respond {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2rem;
  margin-top: 2.5rem;
}

.comment-reply-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#cancel-comment-reply-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ef4444;
  margin-left: 1rem;
  text-decoration: underline;
}

.comment-notes {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

.comment-form p {
  margin-bottom: 1.25rem;
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--matrix-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.2);
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--matrix-green);
}

.comment-form-cookies-consent label {
  display: inline;
  font-size: 0.82rem;
  font-weight: normal;
  color: var(--text-tertiary);
}

.form-submit {
  margin-bottom: 0 !important;
  margin-top: 1rem;
}

.form-submit #submit,
.comments-area .search-button {
  background: var(--matrix-green);
  color: #0a0e14;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 255, 102, 0.3);
  transition: all 0.2s ease;
}

.form-submit #submit:hover,
.comments-area .search-button:hover {
  background: var(--matrix-green-hover);
  box-shadow: 0 6px 22px rgba(0, 255, 102, 0.45);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .comment-list .children {
    padding-left: 1rem;
  }
  .comment-respond {
    padding: 1.25rem;
  }
}


/* ==========================================================================
   Affiliate & High-Conversion Recommendation Blocks
   ========================================================================== */

.recommend-box {
  background: linear-gradient(145deg, #111822 0%, #16202c 100%);
  border: 1px solid rgba(0, 255, 102, 0.35);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2.25rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 255, 102, 0.08);
  position: relative;
  overflow: hidden;
}

.recommend-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--matrix-green);
}

.recommend-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 255, 102, 0.15);
  color: var(--matrix-green);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(0, 255, 102, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recommend-title {
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.65rem 0;
  line-height: 1.3;
}

.recommend-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.recommend-coupon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px dashed #fbbf24;
  color: #fbbf24;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 1.35rem;
}

.recommend-coupon strong {
  background: #fbbf24;
  color: #0a0e14;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 1px;
}

.recommend-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem 1rem;
  margin-bottom: 1.4rem;
  list-style: none;
  padding: 0;
}

.recommend-features li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.recommend-features li span {
  color: var(--matrix-green);
  font-weight: bold;
}

.recommend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.recommend-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--matrix-green);
  color: #0a0e14 !important;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(0, 255, 102, 0.35);
  transition: all 0.2s ease;
}

.recommend-btn-primary:hover {
  background: var(--matrix-green-hover);
  box-shadow: 0 6px 20px rgba(0, 255, 102, 0.5);
  transform: translateY(-2px);
  color: #000 !important;
}

.recommend-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary) !important;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.recommend-btn-secondary:hover {
  background: rgba(0, 255, 102, 0.1);
  border-color: var(--matrix-green);
  color: var(--matrix-green) !important;
  transform: translateY(-2px);
}

/* Amazon Hardware Box */
.recommend-box.amazon-hardware {
  border-color: rgba(255, 153, 0, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 153, 0, 0.08);
}

.recommend-box.amazon-hardware::before {
  background: #ff9900;
}

.recommend-box.amazon-hardware .recommend-badge {
  background: rgba(255, 153, 0, 0.15);
  color: #ff9900;
  border-color: rgba(255, 153, 0, 0.3);
}

.recommend-btn-amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ff9900;
  color: #111 !important;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(255, 153, 0, 0.35);
  transition: all 0.2s ease;
}

.recommend-btn-amazon:hover {
  background: #ffad33;
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5);
  transform: translateY(-2px);
}

/* Nicalia comparison table */
.nicalia-table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.nicalia-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.nicalia-table th {
  background: var(--bg-surface-highlight);
  color: var(--matrix-green);
  font-family: var(--font-mono);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-strong);
}

.nicalia-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.nicalia-table tr:hover td {
  background: rgba(0, 255, 102, 0.03);
}

.nicalia-table .btn-table {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 255, 102, 0.15);
  color: var(--matrix-green) !important;
  border: 1px solid rgba(0, 255, 102, 0.3);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nicalia-table .btn-table:hover {
  background: var(--matrix-green);
  color: #000 !important;
}

