/* =============================================================
   OptimoCamino Blog — Rediseño 2026
   Estilos independientes para portada y detalle de artículo
   ============================================================= */

/* --- Variables CSS --- */
:root {
  /* Colores corporativos */
  --oc-naranja: #f07a1f;
  --oc-naranja-hover: #d96a12;
  --oc-naranja-claro: #fff4e8;
  --oc-crema: #fff8f0;
  --oc-negro: #1a1a2e;
  --oc-gris-900: #2d2d3d;
  --oc-gris-700: #4a4a5a;
  --oc-gris-500: #7a7a8a;
  --oc-gris-300: #c4c4cc;
  --oc-gris-200: #e8e8ee;
  --oc-gris-100: #f5f5f8;
  --oc-blanco: #ffffff;

  /* Tipografía */
  --oc-font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --oc-font-display: 'Gotham', 'Roboto', -apple-system, sans-serif;

  /* Espaciados */
  --oc-space-xs: 4px;
  --oc-space-sm: 8px;
  --oc-space-md: 16px;
  --oc-space-lg: 24px;
  --oc-space-xl: 32px;
  --oc-space-2xl: 48px;
  --oc-space-3xl: 64px;

  /* Radios */
  --oc-radius-sm: 6px;
  --oc-radius-md: 10px;
  --oc-radius-lg: 16px;
  --oc-radius-full: 9999px;

  /* Sombras */
  --oc-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --oc-shadow-md: 0 4px 12px rgba(0,0,0,0.07);
  --oc-shadow-lg: 0 8px 24px rgba(0,0,0,0.10);

  /* Layout */
  --oc-max-width: 1180px;
  --oc-article-width: 740px;
  --oc-sidebar-width: 280px;
  --oc-header-height: 76px;

  /* Transiciones */
  --oc-transition: 0.2s ease;
}

/* --- Reset Blog-only (evita conflictos con Bootstrap del main) --- */
.blog-rediseno *,
.blog-rediseno *::before,
.blog-rediseno *::after {
  box-sizing: border-box;
}

.blog-rediseno {
  margin: 0;
  font-family: var(--oc-font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--oc-gris-900);
  background: var(--oc-blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- HEADER GLOBAL --- */
.blog-header-global {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--oc-header-height);
  background: var(--oc-blanco);
  border-bottom: 1px solid var(--oc-gris-200);
  box-shadow: var(--oc-shadow-sm);
}

.blog-header-global .header-inner {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 0 var(--oc-space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-header-global .header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.blog-header-global .header-logo img {
  height: 32px;
  max-width: 265px;
  width: auto;
  display: block;
}

/* El CTA del menú se reserva para mobile; en desktop se muestra solo el CTA derecho. */
.blog-header-global .header-cta-mobile {
  display: none;
}

.blog-header-global .header-nav {
  display: flex;
  align-items: center;
  gap: var(--oc-space-xl);
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-header-global .header-nav li {
  margin: 0;
  padding: 0;
}

.blog-header-global .header-nav a {
  display: block;
  padding: 0;
  font-family: var(--oc-font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--oc-gris-700);
  text-decoration: none;
  line-height: var(--oc-header-height);
  position: relative;
  transition: color var(--oc-transition);
}

.blog-header-global .header-nav a:hover,
.blog-header-global .header-nav a:focus-visible {
  color: var(--oc-naranja);
  outline: none;
}

.blog-header-global .header-nav a:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: 4px;
  border-radius: var(--oc-radius-sm);
}

/* Active state — naranja line */
.blog-header-global .header-nav li.active a {
  color: var(--oc-naranja);
}

.blog-header-global .header-nav li.active a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--oc-naranja);
  border-radius: 3px 3px 0 0;
}

/* CTA button */
.blog-header-global .header-cta {
  flex-shrink: 0;
}

.blog-header-global .btn-demo {
  display: inline-flex;
  align-items: center;
  gap: var(--oc-space-sm);
  background: var(--oc-naranja);
  color: var(--oc-blanco);
  font-family: var(--oc-font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--oc-radius-full);
  text-decoration: none;
  transition: background var(--oc-transition), transform var(--oc-transition);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  line-height: 1.2;
}

.blog-header-global .btn-demo:hover,
.blog-header-global .btn-demo:focus-visible {
  background: var(--oc-naranja-hover);
  transform: translateY(-1px);
  color: var(--oc-blanco);
  text-decoration: none;
}

.blog-header-global .btn-demo:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: 3px;
}

/* Hamburguesa */
.blog-header-global .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.blog-header-global .hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--oc-gris-900);
  border-radius: 2px;
  transition: transform var(--oc-transition), opacity var(--oc-transition);
}

.blog-header-global .hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.blog-header-global .hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.blog-header-global .hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* --- HERO (Portada) --- */
.blog-hero {
  margin-top: var(--oc-header-height);
  background: var(--oc-crema);
  min-height: 320px;
  max-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.blog-hero .hero-container {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 0 var(--oc-space-lg);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--oc-space-xl);
  align-items: center;
  height: 100%;
}

.blog-hero .hero-text {
  padding: var(--oc-space-xl) 0;
}

.blog-hero .hero-eyebrow {
  display: inline-block;
  font-family: var(--oc-font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--oc-naranja);
  margin-bottom: var(--oc-space-sm);
  text-transform: uppercase;
}

.blog-hero .hero-title {
  font-family: var(--oc-font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--oc-negro);
  line-height: 1.2;
  margin: 0 0 var(--oc-space-md) 0;
}

.blog-hero .hero-description {
  font-size: 17px;
  line-height: 1.6;
  color: var(--oc-gris-700);
  margin: 0 0 var(--oc-space-lg) 0;
  max-width: 480px;
}

.blog-hero .hero-cta-link {
  display: inline-flex;
  align-items: center;
  gap: var(--oc-space-sm);
  font-family: var(--oc-font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--oc-naranja);
  text-decoration: none;
  transition: gap var(--oc-transition);
}

.blog-hero .hero-cta-link:hover,
.blog-hero .hero-cta-link:focus-visible {
  gap: var(--oc-space-md);
  color: var(--oc-naranja-hover);
  text-decoration: none;
}

.blog-hero .hero-cta-link:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: 4px;
  border-radius: var(--oc-radius-sm);
}

.blog-hero .hero-cta-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.blog-hero .hero-image-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  padding: var(--oc-space-md) 0;
}

.blog-hero .hero-image-wrap img {
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (min-width: 1024px) {
  .blog-hero .hero-image-wrap img {
    max-width: 520px;
    max-height: 320px;
  }
}

/* --- SECTION: Últimos artículos (Portada) --- */
.blog-posts-section {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 60px var(--oc-space-lg) 0;
}

.blog-posts-section .section-heading {
  font-family: var(--oc-font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--oc-negro);
  margin: 0 0 var(--oc-space-xl) 0;
}

/* Featured post card */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--oc-space-xl);
  background: var(--oc-blanco);
  border-radius: var(--oc-radius-lg);
  box-shadow: var(--oc-shadow-md);
  overflow: hidden;
  margin-bottom: var(--oc-space-xl);
  transition: box-shadow var(--oc-transition);
}

.featured-post:hover {
  box-shadow: var(--oc-shadow-lg);
}

.featured-post .featured-post-text {
  padding: var(--oc-space-xl) var(--oc-space-lg) var(--oc-space-xl) var(--oc-space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post .post-category {
  display: inline-block;
  background: var(--oc-naranja-claro);
  color: var(--oc-naranja);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--oc-radius-full);
  margin-bottom: var(--oc-space-md);
  width: fit-content;
}

.featured-post .post-title {
  font-family: var(--oc-font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 var(--oc-space-sm) 0;
}

.featured-post .post-title a {
  color: var(--oc-negro);
  text-decoration: none;
  transition: color var(--oc-transition);
}

.featured-post .post-title a:hover {
  color: var(--oc-naranja);
}

.featured-post .post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--oc-gris-700);
  margin: 0 0 var(--oc-space-md) 0;
}

.featured-post .post-meta {
  display: flex;
  align-items: center;
  gap: var(--oc-space-md);
  font-size: 13px;
  color: var(--oc-gris-500);
  margin-bottom: var(--oc-space-md);
}

.featured-post .post-meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 3px;
}

.featured-post .post-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.featured-post .read-more-link {
  display: inline-flex;
  align-items: center;
  gap: var(--oc-space-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--oc-naranja);
  text-decoration: none;
  transition: gap var(--oc-transition);
}

.featured-post .read-more-link:hover {
  gap: var(--oc-space-md);
  text-decoration: none;
}

.featured-post .read-more-link svg {
  width: 16px;
  height: 16px;
}

.featured-post .featured-post-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.featured-post .featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- NEWSLETTER (Portada) --- */
.newsletter-module {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: var(--oc-space-2xl) var(--oc-space-lg) var(--oc-space-3xl);
}

.newsletter-module .newsletter-inner {
  background: var(--oc-naranja-claro);
  border-radius: var(--oc-radius-lg);
  padding: var(--oc-space-2xl);
  text-align: center;
}

.newsletter-module .newsletter-title {
  font-family: var(--oc-font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--oc-negro);
  margin: 0 0 var(--oc-space-sm) 0;
}

.newsletter-module .newsletter-desc {
  font-size: 16px;
  color: var(--oc-gris-700);
  margin: 0 auto var(--oc-space-lg);
  max-width: 460px;
  line-height: 1.5;
}

.newsletter-module .newsletter-form {
  display: flex;
  gap: var(--oc-space-sm);
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-module .newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--oc-gris-300);
  border-radius: var(--oc-radius-full);
  font-family: var(--oc-font-sans);
  font-size: 15px;
  color: var(--oc-gris-900);
  background: var(--oc-blanco);
  transition: border-color var(--oc-transition);
}

.newsletter-module .newsletter-form input[type="email"]:focus {
  border-color: var(--oc-naranja);
  outline: none;
  box-shadow: 0 0 0 3px rgba(240, 122, 31, 0.15);
}

.newsletter-module .newsletter-form input[type="email"]::placeholder {
  color: var(--oc-gris-500);
}

.newsletter-module .newsletter-form button {
  flex-shrink: 0;
  padding: 12px 28px;
  background: var(--oc-naranja);
  color: var(--oc-blanco);
  border: none;
  border-radius: var(--oc-radius-full);
  font-family: var(--oc-font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--oc-transition);
  white-space: nowrap;
}

.newsletter-module .newsletter-form button:hover,
.newsletter-module .newsletter-form button:focus-visible {
  background: var(--oc-naranja-hover);
}

.newsletter-module .newsletter-form button:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: 3px;
}

/* --- FOOTER (Blog) --- */
.blog-footer {
  background: var(--oc-naranja);
  padding: var(--oc-space-2xl) 0;
  color: var(--oc-blanco);
}

.blog-footer .footer-inner {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 0 var(--oc-space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--oc-space-lg);
}

.blog-footer .footer-logo img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.blog-footer .footer-social {
  display: flex;
  gap: var(--oc-space-md);
  align-items: center;
}

.blog-footer .footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--oc-radius-full);
  transition: background var(--oc-transition);
}

.blog-footer .footer-social a:hover,
.blog-footer .footer-social a:focus-visible {
  background: rgba(255,255,255,0.3);
}

.blog-footer .footer-social a:focus-visible {
  outline: 2px solid var(--oc-blanco);
  outline-offset: 3px;
}

.blog-footer .footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--oc-blanco);
}

.blog-footer .footer-copy {
  font-size: 13px;
  opacity: 0.85;
}

.blog-footer .footer-copy a {
  color: var(--oc-blanco);
  text-decoration: none;
}

.blog-footer .footer-copy a:hover {
  text-decoration: underline;
}

/* ===================================================================
   DETALLE DE ARTÍCULO
   =================================================================== */

/* --- Cabecera editorial (2 columnas, fondo crema) --- */
.article-header-section {
  margin-top: var(--oc-header-height);
  background: var(--oc-crema);
  min-height: 360px;
  max-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.article-header-section .header-container {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: var(--oc-space-xl) var(--oc-space-lg);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--oc-space-2xl);
  align-items: center;
}

.article-header-section .header-left {
  padding: var(--oc-space-xl) 0;
}

.article-header-section .breadcrumb {
  font-size: 13px;
  color: var(--oc-gris-500);
  margin-bottom: var(--oc-space-md);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.article-header-section .breadcrumb a {
  color: var(--oc-naranja);
  text-decoration: none;
  font-weight: 500;
}

.article-header-section .breadcrumb a:hover {
  text-decoration: underline;
}

.article-header-section .breadcrumb .sep {
  color: var(--oc-gris-300);
}

.article-header-section .article-category {
  display: inline-block;
  background: var(--oc-naranja);
  color: var(--oc-blanco);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: var(--oc-radius-full);
  margin-bottom: var(--oc-space-md);
}

.article-header-section .article-h1 {
  font-family: var(--oc-font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--oc-negro);
  line-height: 1.25;
  margin: 0 0 var(--oc-space-md) 0;
}

.article-header-section .article-excerpt {
  font-size: 17px;
  line-height: 1.6;
  color: var(--oc-gris-700);
  margin: 0 0 var(--oc-space-md) 0;
}

.article-header-section .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--oc-space-md);
  font-size: 13px;
  color: var(--oc-gris-500);
}

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

.article-header-section .article-meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.article-header-section .header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  padding: var(--oc-space-md) 0;
}

.article-header-section .header-right img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--oc-radius-md);
  display: block;
}

/* --- Layout de lectura (artículo + sidebar) --- */
.article-layout {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 0 var(--oc-space-lg);
  display: grid;
  grid-template-columns: var(--oc-article-width) var(--oc-sidebar-width);
  gap: var(--oc-space-2xl);
  justify-content: center;
}

.article-layout .article-body {
  min-width: 0;
}

.article-layout .article-sidebar {
  min-width: 0;
  padding-top: var(--oc-space-2xl);
}

/* --- Sidebar sticky --- */
.sidebar-sticky {
  position: sticky;
  top: calc(var(--oc-header-height) + var(--oc-space-lg));
}

.sidebar-card {
  background: var(--oc-gris-100);
  border-radius: var(--oc-radius-md);
  padding: var(--oc-space-lg);
  margin-bottom: var(--oc-space-lg);
}

.sidebar-card .sidebar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--oc-gris-700);
  margin: 0 0 var(--oc-space-md) 0;
  padding-bottom: var(--oc-space-sm);
  border-bottom: 2px solid var(--oc-naranja);
}

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

.sidebar-toc li {
  margin: 0;
  padding: 0;
}

.sidebar-toc a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--oc-gris-700);
  text-decoration: none;
  border-bottom: 1px solid var(--oc-gris-200);
  transition: color var(--oc-transition), padding-left var(--oc-transition);
}

.sidebar-toc a:hover,
.sidebar-toc a:focus-visible {
  color: var(--oc-naranja);
  padding-left: 4px;
}

.sidebar-toc a:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: 2px;
  border-radius: var(--oc-radius-sm);
}

.sidebar-toc li:last-child a {
  border-bottom: none;
}

/* Progress indicator */
.reading-progress {
  position: fixed;
  top: var(--oc-header-height);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999;
  background: var(--oc-gris-200);
}

.reading-progress .progress-bar {
  height: 100%;
  background: var(--oc-naranja);
  width: 0%;
  transition: width 0.1s linear;
}

/* --- Tipografía editorial --- */
.article-body {
  padding-top: var(--oc-space-2xl);
}

.article-body h2 {
  font-family: var(--oc-font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--oc-negro);
  margin: var(--oc-space-2xl) 0 var(--oc-space-md) 0;
  line-height: 1.3;
  padding-top: var(--oc-space-md);
}

.article-body h3 {
  font-family: var(--oc-font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--oc-gris-900);
  margin: var(--oc-space-xl) 0 var(--oc-space-sm) 0;
  line-height: 1.35;
}

.article-body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--oc-gris-900);
  margin: 0 0 var(--oc-space-lg) 0;
}

.article-body strong {
  font-weight: 600;
  color: var(--oc-negro);
}

.article-body a {
  color: var(--oc-naranja);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--oc-transition);
}

.article-body a:hover {
  color: var(--oc-naranja-hover);
}

/* --- "En pocas palabras" block --- */
.article-body .tl-dr {
  background: var(--oc-naranja-claro);
  border-left: 4px solid var(--oc-naranja);
  border-radius: 0 var(--oc-radius-md) var(--oc-radius-md) 0;
  padding: var(--oc-space-lg) var(--oc-space-xl);
  margin-bottom: var(--oc-space-xl);
}

.article-body .tl-dr .tldr-label {
  display: flex;
  align-items: center;
  gap: var(--oc-space-sm);
  font-weight: 700;
  font-size: 15px;
  color: var(--oc-naranja);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--oc-space-sm);
}

.article-body .tl-dr .tldr-label svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.article-body .tl-dr p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--oc-gris-700);
  margin: 0;
}

/* --- Tablas --- */
.article-body .table-wrap {
  overflow-x: auto;
  margin: var(--oc-space-lg) 0;
  border-radius: var(--oc-radius-md);
  border: 1px solid var(--oc-gris-200);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 500px;
}

.article-body th {
  background: var(--oc-naranja);
  color: var(--oc-blanco);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--oc-gris-200);
  color: var(--oc-gris-900);
  vertical-align: top;
}

.article-body tr:nth-child(even) td {
  background: var(--oc-gris-100);
}

.article-body tr:last-child td {
  border-bottom: none;
}

/* --- Listas --- */
.article-body ul,
.article-body ol {
  margin: 0 0 var(--oc-space-lg) 0;
  padding: 0;
  list-style: none;
}

.article-body ul li,
.article-body ol li {
  font-size: 17px;
  line-height: 1.65;
  color: var(--oc-gris-900);
  margin-bottom: var(--oc-space-sm);
  padding-left: var(--oc-space-xl);
  position: relative;
}

/* SVG bullet for unordered lists */
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--oc-naranja);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  flex-shrink: 0;
}

/* Ordered lists with custom numbers */
.article-body ol {
  counter-reset: oc-counter;
}

.article-body ol li {
  counter-increment: oc-counter;
}

.article-body ol li::before {
  content: counter(oc-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--oc-naranja);
  width: 20px;
  text-align: right;
}

/* --- Callouts diferenciados --- */

/* Consejo editorial */
.article-body .callout-editorial {
  background: var(--oc-crema);
  border: 1px solid var(--oc-gris-200);
  border-radius: var(--oc-radius-md);
  padding: var(--oc-space-lg) var(--oc-space-xl);
  margin: var(--oc-space-lg) 0;
  display: flex;
  gap: var(--oc-space-md);
  align-items: flex-start;
}

.article-body .callout-editorial .callout-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--oc-naranja-claro);
  border-radius: var(--oc-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-body .callout-editorial .callout-icon svg {
  width: 18px;
  height: 18px;
  color: var(--oc-naranja);
}

.article-body .callout-editorial .callout-body {
  flex: 1;
}

.article-body .callout-editorial .callout-body p {
  font-size: 15px;
  color: var(--oc-gris-700);
  margin: 0;
  line-height: 1.5;
}

.article-body .callout-editorial .callout-body strong {
  display: block;
  margin-bottom: 4px;
  color: var(--oc-negro);
}

/* CTA comercial */
.callout-cta {
  background: linear-gradient(135deg, var(--oc-naranja) 0%, #e86a0a 100%);
  border-radius: var(--oc-radius-lg);
  padding: var(--oc-space-xl);
  margin: var(--oc-space-xl) 0;
  text-align: center;
  box-shadow: var(--oc-shadow-md);
}

.callout-cta .cta-title {
  font-family: var(--oc-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--oc-blanco);
  margin: 0 0 var(--oc-space-sm) 0;
}

.callout-cta .cta-text {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin: 0 0 var(--oc-space-lg) 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.callout-cta .cta-button {
  display: inline-block;
  background: var(--oc-blanco);
  color: var(--oc-naranja);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: var(--oc-radius-full);
  text-decoration: none;
  transition: transform var(--oc-transition), box-shadow var(--oc-transition);
}

.callout-cta .cta-button:hover,
.callout-cta .cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: var(--oc-naranja-hover);
  text-decoration: none;
}

.callout-cta .cta-button:focus-visible {
  outline: 2px solid var(--oc-blanco);
  outline-offset: 3px;
}

/* --- FAQ Acordeón --- */
.article-body .faq-list {
  margin: var(--oc-space-lg) 0;
}

.article-body .faq-item {
  border: 1px solid var(--oc-gris-200);
  border-radius: var(--oc-radius-md);
  margin-bottom: var(--oc-space-sm);
  overflow: hidden;
}

.article-body .faq-item:focus-within {
  border-color: var(--oc-naranja);
  box-shadow: 0 0 0 3px rgba(240, 122, 31, 0.1);
}

.article-body .faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--oc-space-md);
  padding: var(--oc-space-md) var(--oc-space-lg);
  background: var(--oc-gris-100);
  border: none;
  cursor: pointer;
  font-family: var(--oc-font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--oc-gris-900);
  text-align: left;
  line-height: 1.4;
  transition: background var(--oc-transition);
}

.article-body .faq-question:hover {
  background: var(--oc-gris-200);
}

.article-body .faq-question:focus-visible {
  outline: 2px solid var(--oc-naranja);
  outline-offset: -2px;
}

.article-body .faq-question[aria-expanded="true"] {
  background: var(--oc-naranja-claro);
}

.article-body .faq-question .faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--oc-naranja);
  transition: transform var(--oc-transition);
}

.article-body .faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.article-body .faq-answer {
  padding: 0 var(--oc-space-lg);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.article-body .faq-answer.is-open {
  max-height: 500px;
  padding: var(--oc-space-md) var(--oc-space-lg) var(--oc-space-lg);
}

.article-body .faq-answer p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--oc-gris-700);
  margin: 0;
}

/* --- Cierre del artículo --- */
.article-closing {
  max-width: var(--oc-max-width);
  margin: 0 auto;
  padding: 0 var(--oc-space-lg);
}

.article-closing .closing-inner {
  max-width: var(--oc-article-width);
  margin: 0 auto;
}

/* Author block */
.author-block {
  background: var(--oc-gris-100);
  border-radius: var(--oc-radius-md);
  padding: var(--oc-space-lg) var(--oc-space-xl);
  margin: var(--oc-space-2xl) 0;
  display: flex;
  gap: var(--oc-space-lg);
  align-items: center;
}

.author-block .author-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--oc-radius-full);
  background: var(--oc-naranja);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-block .author-avatar svg {
  width: 32px;
  height: 32px;
  color: var(--oc-blanco);
}

.author-block .author-info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--oc-gris-700);
}

.author-block .author-info .author-name {
  font-weight: 700;
  color: var(--oc-negro);
  font-size: 15px;
  margin-bottom: 2px;
}

/* Share buttons */
.share-block {
  margin: var(--oc-space-lg) 0 var(--oc-space-2xl);
}

.share-block .share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--oc-gris-700);
  margin-bottom: var(--oc-space-sm);
}

.share-block .share-buttons {
  display: flex;
  gap: var(--oc-space-sm);
}

.share-block .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--oc-radius-full);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--oc-blanco);
  transition: opacity var(--oc-transition);
}

.share-block .share-btn:hover,
.share-block .share-btn:focus-visible {
  opacity: 0.85;
  color: var(--oc-blanco);
  text-decoration: none;
}

.share-block .share-btn svg {
  width: 16px;
  height: 16px;
}

.share-block .share-linkedin {
  background: #0a66c2;
}

.share-block .share-whatsapp {
  background: #25d366;
}

.share-block .share-copy {
  background: var(--oc-gris-500);
  border: none;
  cursor: pointer;
  font-family: var(--oc-font-sans);
}

/* Related articles */
.related-block {
  margin: var(--oc-space-2xl) 0;
}

.related-block .related-title {
  font-family: var(--oc-font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--oc-negro);
  margin: 0 0 var(--oc-space-lg) 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--oc-space-lg);
}

.related-grid.related-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.related-card {
  background: var(--oc-blanco);
  border: 1px solid var(--oc-gris-200);
  border-radius: var(--oc-radius-md);
  padding: var(--oc-space-lg);
  transition: box-shadow var(--oc-transition);
}

.related-card:hover {
  box-shadow: var(--oc-shadow-md);
}

.related-card .related-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--oc-naranja);
  margin-bottom: var(--oc-space-sm);
}

.related-card .related-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.related-card .related-card-title a {
  color: var(--oc-negro);
  text-decoration: none;
}

.related-card .related-card-title a:hover {
  color: var(--oc-naranja);
}

.related-card .related-date {
  font-size: 12px;
  color: var(--oc-gris-500);
  margin-top: var(--oc-space-sm);
}

/* Back to blog link */
.back-to-blog {
  margin: var(--oc-space-xl) 0 var(--oc-space-2xl);
  text-align: center;
}

.back-to-blog a {
  display: inline-flex;
  align-items: center;
  gap: var(--oc-space-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--oc-naranja);
  text-decoration: none;
}

.back-to-blog a:hover {
  gap: var(--oc-space-md);
  text-decoration: none;
}

.back-to-blog a svg {
  width: 16px;
  height: 16px;
}

/* --- Artículos relacionados (placeholder en portada) --- */
.related-placeholder {
  text-align: center;
  padding: var(--oc-space-md) 0;
  font-size: 15px;
  color: var(--oc-gris-500);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .blog-hero .hero-title {
    font-size: 30px;
  }

  .article-header-section .article-h1 {
    font-size: 28px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-layout .article-sidebar {
    display: none; /* Sidebar se integra al flujo en mobile */
  }

  .blog-hero .hero-image-wrap img {
    max-width: 100%;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Header mobile */
  .blog-header-global .header-nav {
    display: none;
    position: fixed;
    top: var(--oc-header-height);
    left: 0;
    right: 0;
    background: var(--oc-blanco);
    flex-direction: column;
    padding: var(--oc-space-md) 0;
    border-bottom: 1px solid var(--oc-gris-200);
    box-shadow: var(--oc-shadow-lg);
    gap: 0;
    z-index: 1000;
  }

  .blog-header-global .header-nav.is-open {
    display: flex;
  }

  .blog-header-global .header-nav a {
    line-height: 48px;
    padding: 0 var(--oc-space-lg);
  }

  .blog-header-global .header-nav li.active a::after {
    bottom: auto;
    top: 0;
    height: 100%;
    width: 3px;
    border-radius: 0 3px 3px 0;
  }

  .blog-header-global .header-cta.desktop-only {
    display: none;
  }

  .blog-header-global .header-cta-mobile {
    display: block;
    padding: var(--oc-space-md) var(--oc-space-lg);
    border-top: 1px solid var(--oc-gris-200);
    text-align: center;
  }

  .blog-header-global .header-cta-mobile .btn-demo {
    width: 100%;
    justify-content: center;
  }

  .blog-header-global .hamburger {
    display: flex;
  }

  /* Hero mobile — single column */
  .blog-hero {
    min-height: auto;
    max-height: none;
  }

  .blog-hero .hero-container {
    grid-template-columns: 1fr;
    gap: 0;
    padding: var(--oc-space-xl) var(--oc-space-lg) var(--oc-space-lg);
  }

  .blog-hero .hero-text {
    padding: 0;
  }

  .blog-hero .hero-title {
    font-size: 26px;
  }

  .blog-hero .hero-image-wrap {
    justify-content: center;
    padding: var(--oc-space-md) 0 0;
  }

  .blog-hero .hero-image-wrap img {
    max-height: 200px;
    max-width: 80%;
  }

  /* Featured post mobile */
  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post .featured-post-image {
    order: -1;
    min-height: 180px;
  }

  .featured-post .featured-post-text {
    padding: var(--oc-space-lg);
  }

  /* Newsletter mobile */
  .newsletter-module .newsletter-form {
    flex-direction: column;
  }

  .newsletter-module .newsletter-form button {
    width: 100%;
  }

  /* Article header mobile */
  .article-header-section {
    min-height: auto;
    max-height: none;
  }

  .article-header-section .header-container {
    grid-template-columns: 1fr;
    gap: var(--oc-space-md);
    padding: var(--oc-space-lg);
  }

  .article-header-section .header-left {
    padding: 0;
  }

  .article-header-section .article-h1 {
    font-size: 24px;
  }

  .article-header-section .header-right {
    justify-content: center;
    padding: 0;
  }

  .article-header-section .header-right img {
    max-height: 200px;
  }

  /* Article body mobile */
  .article-body {
    padding-top: var(--oc-space-lg);
  }

  .article-body h2 {
    font-size: 24px;
  }

  .article-body h3 {
    font-size: 19px;
  }

  .article-body p {
    font-size: 16px;
    line-height: 1.65;
  }

  .article-body ul li,
  .article-body ol li {
    font-size: 16px;
    padding-left: var(--oc-space-lg);
  }

  /* Mobile TOC accordion (sidebar → inline) */
  .article-layout .article-sidebar {
    display: block;
    margin: 0;
  }

  .article-sidebar .sidebar-card {
    margin-bottom: 0;
  }

  .article-sidebar .sidebar-sticky {
    position: static;
  }

  /* Related mobile */
  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Author mobile */
  .author-block {
    flex-direction: column;
    text-align: center;
  }

  /* Footer mobile */
  .blog-footer .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Extra small */
@media (max-width: 480px) {
  .blog-hero .hero-title {
    font-size: 22px;
  }

  .blog-posts-section .section-heading {
    font-size: 22px;
  }

  .featured-post .post-title {
    font-size: 18px;
  }

  .newsletter-module .newsletter-title {
    font-size: 20px;
  }

  .share-block .share-buttons {
    flex-wrap: wrap;
  }
}

/* ===================================================================
   ACCESIBILIDAD — prefers-reduced-motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================================================================
   SOBREESCRITURAS — anular estilos del main site donde sea necesario
   =================================================================== */

/* Forzar posicionamiento del nav fijo del main site */
.blog-rediseno .main-nav,
.blog-rediseno nav.main-nav {
  position: fixed !important;
}

/* Evitar que el blog-page-section page-section tenga padding extra del theme */
.blog-rediseno .page-section {
  padding: 0 !important;
}

/* Anular estilos de contenedor Bootstrap que puedan interferir */
.blog-rediseno .container,
.blog-rediseno .full-wrapper {
  max-width: none !important;
  width: auto !important;
  padding: 0 !important;
}
