<!-- ESTILOS CSS PREMIUM -->
<style>
/* ===== RESET Y VARIABLES ===== */
:root {
    --color-primary: #e02020;
    --color-primary-dark: #b01818;
    --color-text: #1a1a1a;
    --color-text-light: #333;
    --color-bg-light: #fafafa;
    --color-bg-gray: #f5f5f5;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.25s ease;
} 
  
/* ===== BASE ===== */
.single-article-wrapper {
    background: white;
    width: 100%;
    overflow-x: hidden;
}

.single-article.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Esto evita que el contenido "escape" hacia los costados */
}
  
/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    font-size: 13px;
    margin-bottom: 30px;
    color: #777;
}

.breadcrumbs a {
    color: #555;
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumbs .current {
    color: #333;
    font-weight: 500;
}

/* ===== LAYOUT PRINCIPAL ===== */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
}

/* ===== STICKY SIDEBAR PROFESIONAL (SIN SCROLL INTERNO) ===== */

/* 1. Asegurar que ningún ancestro tenga overflow hidden */
.single-article-wrapper,
.single-article.container,
.article-layout {
    overflow: visible !important;
}

/* 2. Layout base */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
}

/* 3. SIDEBAR STICKY - COMPORTAMIENTO NATIVO */
@media (min-width: 992px) {
    .sidebar {
        position: sticky !important;
        top: 30px !important; /* Distancia desde el tope */
        align-self: start !important;
        /* NO le pongas max-height ni overflow-y */
    }
}

/* 4. El contenido interno del sidebar fluye normalmente */
.trending {
    background: var(--color-bg-light);
    border-radius: var(--border-radius-lg);
    padding: 24px;
}

.trending-title {
    font-size: 18px;
    font-weight: 800;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.trending-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    text-decoration: none;
    border-bottom: 1px solid #eaeaea;
    transition: var(--transition-base);
}

.trending-item:hover {
    padding-left: 8px;
}

.trending-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    opacity: 0.4;
    line-height: 1;
    min-width: 40px;
}

.trending-content {
    flex: 1;
}

.trending-title-small {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.trending-date {
    font-size: 11px;
    color: #999;
}

/* Publicidad dentro del sidebar - fluye normalmente */
.ad-sidebar {
    margin-top: 30px;
    text-align: center;
}

.bloque-publicidad-lateral {
    margin-bottom: 20px;
}

/* 5. Responsive: sin sticky en móvil */
@media (max-width: 991px) {
    .sidebar {
        position: static !important;
    }
}

/* ===== HEADER DEL ARTÍCULO ===== */
.article-header {
    margin-bottom: 32px;
}

.article-title {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--color-text);
}

.cat-label {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.article-lead {
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--color-text-light);
    border-left: 3px solid var(--color-primary);
    padding-left: 20px;
    margin: 20px 0;
}

.meta-data {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    color: #666;
}

.meta-details {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-separator {
    color: #ccc;
}

/* ===== IMAGEN DESTACADA ===== */
.featured-image-container {
    margin: 32px 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.featured-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.featured-image-container figcaption {
    font-size: 12px;
    color: #777;
    padding: 10px 0;
    text-align: center;
    background: var(--color-bg-gray);
}

/* ===== CONTENIDO DEL ARTÍCULO ===== */
.article-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-text);
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 1.75rem 0 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.article-content ul, 
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 1.75rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1.5rem 0;
    padding: 1rem 0 1rem 1.5rem;
    font-style: italic;
    color: var(--color-text-light);
    background: var(--color-bg-light);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* ===== CAJAS CORPORATIVAS ===== */
.intel-corporate-box,
.support-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    margin: 48px 0;
    color: white;
    box-shadow: var(--shadow-lg);
}

.intel-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.intel-content h3,
.support-text h4 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: white;
}

.intel-content p,
.support-text p {
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 20px;
}

.intel-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0;
}

.intel-features span {
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
}

.btn-intel,
.btn-mp {
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-intel:hover,
.btn-mp:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== CONTEXTO LOCAL ===== */
.local-context {
    background: #f8f8f8;
    padding: 20px;
    border-radius: var(--border-radius-md);
    margin: 32px 0;
    border-left: 3px solid var(--color-primary);
}

.local-label {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-primary);
    display: block;
    margin-bottom: 8px;
}

.local-context p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 14px;
}

.local-context a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.local-context a:hover {
    text-decoration: underline;
}

/* ===== TAGS SECTION ===== */
.tags-section {
    margin: 40px 0;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.tags-title {
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 700;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

.tag-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

/* ===== SHARE BOX MEJORADO ===== */
.share-box {
    background: var(--color-bg-light);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    margin: 48px 0;
    text-align: center;
}

.share-title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-text);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-base);
}

.share-btn.wa { background: #25D366; color: white; }
.share-btn.fb { background: #1877F2; color: white; }
.share-btn.tw { background: #1DA1F2; color: white; }
.share-btn.email { background: #666; color: white; }

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

/* ===== POSTS RELACIONADOS ===== */
.related-section {
    margin-top: 48px;
}

.section-heading {
    font-size: 20px;
    font-weight: 800;
    border-left: 4px solid var(--color-primary);
    padding-left: 16px;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.related-item {
    text-decoration: none;
    transition: var(--transition-base);
    display: block;
}

.related-item:hover {
    transform: translateY(-4px);
}

.related-thumb {
    aspect-ratio: 16/9;
    background: #eaeaea;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: 12px;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

.related-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f0f0f0 100%);
}

.related-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 8px 0 4px;
    line-height: 1.4;
}

.related-date {
    font-size: 12px;
    color: #888;
}

/* ===== SIDEBAR TRENDING ===== */
.trending {
    background: var(--color-bg-light);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-top: 30px;
}

.trending-title {
    font-size: 18px;
    font-weight: 800;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.trending-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    text-decoration: none;
    border-bottom: 1px solid #eaeaea;
    transition: var(--transition-base);
}

.trending-item:hover {
    padding-left: 8px;
}

.trending-num {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    opacity: 0.4;
    line-height: 1;
    min-width: 40px;
}

.trending-content {
    flex: 1;
}

.trending-title-small {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.trending-date {
    font-size: 11px;
    color: #999;
}

.ad-sidebar {
    margin-top: 30px;
    text-align: center;
}

/* ===== PUBLICIDAD ===== */
.ad-mid-content {
    margin: 30px 0;
    text-align: center;
}

.bloque-publicidad-lateral {
    margin-bottom: 20px;
}
  
.ensobrados-dual-live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}

.dual-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.dual-label {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-block;
}

.ensobrado {
  border-top: 4px solid #e02020;
}

.desensobrado {
  border-top: 4px solid #0073aa;
}

.dual-content p {
  font-size: 15px;
  line-height: 1.6;
}

.dual-claves {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
}
  
.ad-sidebar-secundario{
    margin-top: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    text-align:center;
    overflow:hidden;
}

.article-content,
.article-content p,
.article-title {
    color: #1a1a1a !important;
    font-weight: 450;
}

.article-lead {
    color: #2f2f2f !important;
}  
  
@media(max-width:768px){
  .ensobrados-dual-live {
    grid-template-columns: 1fr;
  }
}

/* Parche de emergencia para desborde horizontal */
html, body {
    overflow-x: hidden;
    position: relative;
}

/* Corregir el bloque dual en móvil para que no empuje la pantalla */
@media (max-width: 768px) {
    .ensobrados-dual-live {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        margin: 20px 0;
    }
    
    .dual-box {
        width: 100%;
        box-sizing: border-box;
    }
}  
  
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .article-layout {
        display: block; /* Cambiamos grid por block para evitar cálculos de columnas en móvil */
        width: 100%;
    }
    
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sidebar {
        display: block;
        width: 100%;
        margin-top: 40px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-lead {
        font-size: 1.1rem;
    }
    
    .article-content img, 
    .article-content iframe,
    .featured-image-container img {
        max-width: 100% !important;
        height: auto !important;
    }
}
    
    .intel-corporate-box,
    .support-box {
        padding: 24px;
        margin: 32px 0;
    }
    
    .intel-content h3,
    .support-text h4 {
        font-size: 1.25rem;
    }
    
    .share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .meta-data {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .intel-features {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }
    
    .trending-item:hover {
        padding-left: 0;
    }
}
</style>