 /* ==========================================================================
   VARIABLES GLOBALES
   ========================================================================== */
:root {
    /* AZULES INSTITUCIONALES */
    --hnz-color-primary-dark: #0a1a2f;
    --hnz-color-primary: #1e3a5f;
    --hnz-color-primary-light: #2d4a73;
    --hnz-color-primary-lighter: #3a5a8a;
    
    /* GRISES PARA CONTENIDO */
    --hnz-color-text-dark: #2a2d34;
    --hnz-color-text: #3d424d;
    --hnz-color-text-light: #6b7280;
    
    /* FONDOS */
    --hnz-color-bg-dark: #05050C;
    --hnz-color-bg-light: #f5f8fc;
    --hnz-color-bg-lighter: #ffffff;
    --hnz-color-bg-accent: #e8eef7;
    
    /* ACENTOS */
    --hnz-color-accent: #b8a26d;
    --hnz-color-accent-light: #8ab4f8;
    
    /* TIPOGRAFÍA */
    --hnz-font-primary: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --hnz-font-secondary: 'Georgia', 'Times New Roman', serif;
    
    /* ESPACIADO */
    --hnz-space-xs: 8px;
    --hnz-space-sm: 16px;
    --hnz-space-md: 24px;
    --hnz-space-lg: 32px;
    --hnz-space-xl: 40px;
    --hnz-space-2xl: 48px;
    --hnz-space-3xl: 64px;
    
    /* SOMBRAS */
    --hnz-shadow-sm: 0 2px 8px rgba(10, 26, 47, 0.06);
    --hnz-shadow-md: 0 4px 16px rgba(10, 26, 47, 0.08);
    --hnz-shadow-lg: 0 8px 32px rgba(10, 26, 47, 0.12);
    
    /* BORDES */
    --hnz-radius-sm: 4px;
    --hnz-radius-md: 8px;
    --hnz-radius-lg: 12px;
    --hnz-radius-full: 50%;
    
    /* TRANSICIONES */
    --hnz-transition-fast: 150ms ease;
    --hnz-transition-base: 250ms ease;
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
.hnz-article-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hnz-article-page {
    font-family: var(--hnz-font-primary);
    color: var(--hnz-color-text-dark);
    background: var(--hnz-color-bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* CONTAINER MÁS ANCHO */
.hnz-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hnz-space-lg);
}

@media (max-width: 768px) {
    .hnz-container {
        padding: 0 var(--hnz-space-md);
    }
}

.hnz-article-page img {
    max-width: 100%;
    height: auto;
    display: block;
}

.hnz-article-page a {
    color: var(--hnz-color-primary);
    text-decoration: none;
    transition: color var(--hnz-transition-fast);
}

.hnz-article-page a:hover {
    color: var(--hnz-color-primary-light);
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.hnz-article-page {
    padding: var(--hnz-space-xl) 0;
}

.hnz-article-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--hnz-space-xl);
    align-items: start;
}

@media (max-width: 1024px) {
    .hnz-article-wrapper {
        grid-template-columns: 1fr;
        gap: var(--hnz-space-lg);
    }
}

/* ==========================================================================
   BARRA DE COMPARTIR
   ========================================================================== */
.hnz-share-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: var(--hnz-space-xs);
    z-index: 10;
}

.hnz-share-sidebar.hnz-sticky-top {
    top: var(--hnz-space-xl);
}

.hnz-share-button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-md);
    color: var(--hnz-color-text);
    border: 1px solid var(--hnz-color-bg-accent);
    transition: all var(--hnz-transition-base);
    cursor: pointer;
    font-size: 1.1rem;
}

.hnz-share-button:hover {
    background: var(--hnz-color-primary);
    color: white;
    border-color: var(--hnz-color-primary);
    transform: translateY(-2px);
    box-shadow: var(--hnz-shadow-md);
}

.hnz-share-button.hnz-linkedin { color: #0077b5; }
.hnz-share-button.hnz-twitter { color: #1da1f2; }
.hnz-share-button.hnz-whatsapp { color: #25d366; }
.hnz-share-button.hnz-facebook { color: #1877f2; }
.hnz-share-button.hnz-email { color: var(--hnz-color-primary); }

.hnz-share-button:hover.hnz-linkedin,
.hnz-share-button:hover.hnz-twitter,
.hnz-share-button:hover.hnz-whatsapp,
.hnz-share-button:hover.hnz-facebook,
.hnz-share-button:hover.hnz-email {
    color: white;
}

@media (max-width: 1024px) {
    .hnz-share-sidebar {
        position: static;
        flex-direction: row;
        justify-content: center;
        order: 3;
        margin-top: var(--hnz-space-xl);
    }
    
    .hnz-share-button {
        width: 44px;
        height: 44px;
    }
}

/* ==========================================================================
   CONTENIDO PRINCIPAL DEL ARTÍCULO
   ========================================================================== */
.hnz-article-main {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.hnz-article-card {
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-lg);
    overflow: hidden;
    box-shadow: var(--hnz-shadow-md);
}

/* CABECERA */
.hnz-article-header {
    padding: var(--hnz-space-xl);
    border-bottom: 1px solid var(--hnz-color-bg-accent);
}

@media (max-width: 768px) {
    .hnz-article-header {
        padding: var(--hnz-space-lg);
    }
}

/* CATEGORÍAS */
.hnz-article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hnz-space-xs);
    margin-bottom: var(--hnz-space-sm);
}

.hnz-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(184, 162, 109, 0.1);
    color: var(--hnz-color-accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(184, 162, 109, 0.2);
}

.hnz-category-badge i {
    font-size: 0.8rem;
}

/* TÍTULO */
.hnz-article-title {
    font-family: var(--hnz-font-secondary);
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--hnz-color-primary-dark);
    margin-bottom: var(--hnz-space-sm);
}

@media (max-width: 768px) {
    .hnz-article-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hnz-article-title {
        font-size: 1.75rem;
    }
}

/* META INFORMACIÓN */
.hnz-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hnz-space-md);
    font-size: 0.95rem;
    color: var(--hnz-color-text-light);
    margin-top: var(--hnz-space-md);
    padding-top: var(--hnz-space-md);
    border-top: 1px solid var(--hnz-color-bg-accent);
}

.hnz-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hnz-meta-item i {
    color: var(--hnz-color-primary-light);
    width: 16px;
}

/* IMAGEN DESTACADA */
.hnz-article-featured-image {
    width: 100%;
    padding: var(--hnz-space-xl);
}

.hnz-article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--hnz-radius-lg);
    margin: 0 auto;
}

/* CONTENIDO */
.hnz-article-content {
    padding: var(--hnz-space-xl);
}

@media (max-width: 768px) {
    .hnz-article-content {
        padding: var(--hnz-space-lg);
    }
}

.hnz-article-content > * {
    margin-bottom: 1.5em;
}

.hnz-article-content h2 {
    font-family: var(--hnz-font-secondary);
    font-size: 1.8rem;
    color: var(--hnz-color-primary-dark);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

.hnz-article-content h3 {
    font-size: 1.4rem;
    color: var(--hnz-color-primary);
    margin-top: 1.2em;
}

.hnz-article-content p {
    font-size: 1.125rem;
    line-height: 1.7;
}

.hnz-article-content blockquote {
    padding: var(--hnz-space-lg);
    background: var(--hnz-color-bg-accent);
    border-left: 4px solid var(--hnz-color-primary);
    border-radius: var(--hnz-radius-md);
    margin: 1.5em 0;
    font-style: italic;
}

.hnz-article-content img {
    border-radius: var(--hnz-radius-md);
    margin: 1.5em auto;
}

/* ==========================================================================
   DOCUMENTOS ADJUNTOS
   ========================================================================== */
.hnz-article-attachments {
    margin: var(--hnz-space-xl) 0;
    padding: var(--hnz-space-xl);
    background: var(--hnz-color-bg-accent);
    border-radius: var(--hnz-radius-lg);
    max-width: calc(100% - (var(--hnz-space-xl) * 2));
    margin-left: auto;
    margin-right: auto;
}

.hnz-attachments-header {
    display: flex;
    align-items: center;
    gap: var(--hnz-space-md);
    margin-bottom: var(--hnz-space-xl);
    padding: 0 var(--hnz-space-sm);
}

.hnz-attachments-header i {
    color: var(--hnz-color-primary);
    font-size: 1.5rem;
    background: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--hnz-radius-full);
    box-shadow: var(--hnz-shadow-sm);
}

.hnz-attachments-header h3 {
    color: var(--hnz-color-primary-dark);
    font-size: 1.5rem;
    font-weight: 600;
}

.hnz-attachment-item {
    display: flex;
    align-items: center;
    gap: var(--hnz-space-lg);
    padding: var(--hnz-space-lg);
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-md);
    border: 1px solid var(--hnz-color-bg-accent);
    transition: all var(--hnz-transition-base);
    margin: 0 auto;
    max-width: 800px;
}

.hnz-attachment-item:hover {
    border-color: var(--hnz-color-primary-light);
    box-shadow: var(--hnz-shadow-md);
    transform: translateY(-2px);
}

.hnz-attachment-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hnz-color-primary) 0%, var(--hnz-color-primary-light) 100%);
    border-radius: var(--hnz-radius-md);
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.hnz-attachment-info {
    flex: 1;
    min-width: 0;
}

.hnz-attachment-info h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--hnz-color-text-dark);
    line-height: 1.4;
}

.hnz-attachment-meta {
    display: flex;
    gap: var(--hnz-space-lg);
    font-size: 0.95rem;
    color: var(--hnz-color-text-light);
    flex-wrap: wrap;
}

.hnz-attachment-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hnz-attachment-download {
    padding: 12px 24px;
    background: var(--hnz-color-primary);
    color: white;
    border-radius: var(--hnz-radius-md);
    font-weight: 600;
    transition: all var(--hnz-transition-base);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    min-width: 140px;
    justify-content: center;
}

.hnz-attachment-download:hover {
    background: var(--hnz-color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--hnz-shadow-md);
}

@media (max-width: 768px) {
    .hnz-article-attachments {
        padding: var(--hnz-space-lg);
        max-width: calc(100% - (var(--hnz-space-md) * 2));
    }
    
    .hnz-attachments-header {
        flex-direction: column;
        text-align: center;
        gap: var(--hnz-space-sm);
        margin-bottom: var(--hnz-space-lg);
    }
    
    .hnz-attachment-item {
        flex-direction: column;
        text-align: center;
        gap: var(--hnz-space-md);
        padding: var(--hnz-space-lg);
        max-width: 100%;
    }
    
    .hnz-attachment-info {
        width: 100%;
    }
    
    .hnz-attachment-meta {
        justify-content: center;
        gap: var(--hnz-space-md);
    }
    
    .hnz-attachment-download {
        width: 100%;
        max-width: 280px;
        margin-top: var(--hnz-space-md);
    }
}

@media (max-width: 480px) {
    .hnz-article-attachments {
        padding: var(--hnz-space-md);
        margin: var(--hnz-space-lg) 0;
    }
    
    .hnz-attachment-item {
        padding: var(--hnz-space-md);
    }
    
    .hnz-attachment-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .hnz-attachment-info h4 {
        font-size: 1.1rem;
    }
    
    .hnz-attachment-meta {
        flex-direction: column;
        gap: var(--hnz-space-xs);
        align-items: center;
    }
}

/* ==========================================================================
   ARTÍCULOS RELACIONADOS
   ========================================================================== */
.hnz-related-articles {
    margin-top: var(--hnz-space-2xl);
    padding: var(--hnz-space-xl);
    background: var(--hnz-color-bg-accent);
    border-radius: var(--hnz-radius-lg);
}

.hnz-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--hnz-space-lg);
}

.hnz-section-header h2 {
    font-family: var(--hnz-font-secondary);
    color: var(--hnz-color-primary-dark);
    font-size: 1.8rem;
}

.hnz-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hnz-color-primary);
    font-weight: 500;
}

.hnz-view-all-link:hover {
    gap: 12px;
}

.hnz-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--hnz-space-lg);
}

.hnz-related-card {
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-md);
    overflow: hidden;
    transition: all var(--hnz-transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hnz-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hnz-shadow-lg);
}

.hnz-related-image {
    height: 200px;
    overflow: hidden;
}

.hnz-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--hnz-transition-base);
}

.hnz-related-card:hover .hnz-related-image img {
    transform: scale(1.05);
}

.hnz-related-content {
    padding: var(--hnz-space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hnz-related-category {
    font-size: 0.8rem;
    color: var(--hnz-color-accent);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hnz-related-title {
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--hnz-color-primary-dark);
    margin-bottom: var(--hnz-space-sm);
    flex: 1;
}

.hnz-related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--hnz-color-text-light);
    margin-top: auto;
}

/* ==========================================================================
   EXPLORAR PUBLICACIONES
   ========================================================================== */
.hnz-explore-section {
    margin: var(--hnz-space-2xl) 0;
    padding: var(--hnz-space-xl);
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-lg);
    box-shadow: var(--hnz-shadow-md);
}

.hnz-explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hnz-space-xl);
}

@media (max-width: 1024px) {
    .hnz-explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--hnz-space-lg);
    }
}

@media (max-width: 768px) {
    .hnz-explore-grid {
        grid-template-columns: 1fr;
    }
}

.hnz-explore-column h3 {
    font-size: 1.3rem;
    color: var(--hnz-color-primary-dark);
    margin-bottom: var(--hnz-space-lg);
    padding-bottom: var(--hnz-space-sm);
    border-bottom: 2px solid var(--hnz-color-bg-accent);
}

/* CATEGORÍAS */
.hnz-categories-list {
    list-style: none;
}

.hnz-categories-list li {
    padding: var(--hnz-space-xs) 0;
    border-bottom: 1px solid var(--hnz-color-bg-accent);
}

.hnz-categories-list li:last-child {
    border-bottom: none;
}

.hnz-categories-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--hnz-color-text);
    padding: 8px 0;
}

.hnz-categories-list a:hover {
    color: var(--hnz-color-primary);
}

.hnz-categories-list a:hover .hnz-category-count {
    background: var(--hnz-color-primary);
    color: white;
}

.hnz-category-count {
    padding: 2px 10px;
    background: var(--hnz-color-bg-accent);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--hnz-color-text-light);
    transition: all var(--hnz-transition-fast);
}

/* TAGS */
.hnz-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hnz-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--hnz-color-bg-accent);
    color: var(--hnz-color-text);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all var(--hnz-transition-fast);
    border: 1px solid transparent;
}

.hnz-tag:hover {
    background: var(--hnz-color-primary);
    color: white;
    border-color: var(--hnz-color-primary);
    transform: translateY(-1px);
}

/* BUSCADOR */
.hnz-search-box {
    position: relative;
}

.hnz-search-input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 50px;
    border: 2px solid var(--hnz-color-bg-accent);
    border-radius: var(--hnz-radius-md);
    font-size: 1rem;
    color: var(--hnz-color-text-dark);
    background: white;
    transition: all var(--hnz-transition-base);
}

.hnz-search-input:focus {
    outline: none;
    border-color: var(--hnz-color-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.hnz-search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--hnz-color-primary);
    color: white;
    border: none;
    border-radius: var(--hnz-radius-sm);
    cursor: pointer;
    transition: all var(--hnz-transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hnz-search-button:hover {
    background: var(--hnz-color-primary-light);
    transform: translateY(-50%) scale(1.05);
}

/* ==========================================================================
   BOTONES DE NAVEGACIÓN
   ========================================================================== */
.hnz-article-back {
    margin-bottom: var(--hnz-space-lg);
}

.hnz-article-back-top {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 var(--hnz-space-lg);
}

@media (max-width: 1200px) {
    .hnz-article-back-top {
        max-width: 1000px;
    }
}

@media (max-width: 768px) {
    .hnz-article-back-top {
        padding: 0 var(--hnz-space-md);
    }
}

.hnz-article-back-bottom {
    margin-top: var(--hnz-space-2xl);
    text-align: center;
}

.hnz-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--hnz-color-primary);
    font-size: 0.95rem;
    padding: var(--hnz-space-sm) var(--hnz-space-md);
    background: var(--hnz-color-bg-lighter);
    border-radius: var(--hnz-radius-md);
    border: 1px solid var(--hnz-color-bg-accent);
    transition: all var(--hnz-transition-base);
}

.hnz-back-link i {
    font-size: 0.9rem;
    transition: transform var(--hnz-transition-fast);
}

.hnz-back-link:hover {
    background: var(--hnz-color-primary);
    color: white;
    border-color: var(--hnz-color-primary);
    transform: translateY(-1px);
    box-shadow: var(--hnz-shadow-sm);
}

.hnz-back-link:hover i {
    transform: translateX(-4px);
}

.hnz-mt-3 {
    margin-top: var(--hnz-space-md);
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.hnz-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   RESPONSIVE ADICIONAL
   ========================================================================== */
@media (max-width: 768px) {
    .hnz-article-page {
        padding: var(--hnz-space-lg) 0;
    }
    
    .hnz-related-grid {
        grid-template-columns: 1fr;
    }
    
    .hnz-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--hnz-space-sm);
    }
    
    .hnz-view-all-link {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .hnz-article-header,
    .hnz-article-content,
    .hnz-related-articles,
    .hnz-explore-section {
        padding: var(--hnz-space-md);
    }
    
    .hnz-article-title {
        font-size: 1.5rem;
    }
    
    .hnz-article-content h2 {
        font-size: 1.4rem;
    }
    
    .hnz-article-content h3 {
        font-size: 1.2rem;
    }
    
    .hnz-article-content p {
        font-size: 1rem;
    }
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes hnz-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hnz-related-card,
.hnz-attachment-item,
.hnz-article-card {
    animation: hnz-fadeInUp 0.6s ease-out;
}

/* ==========================================================================
   ESTADOS DE CARGA
   ========================================================================== */
.hnz-loading {
    opacity: 0.7;
    pointer-events: none;
}

.hnz-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--hnz-color-bg-accent);
    border-top-color: var(--hnz-color-primary);
    border-radius: 50%;
    animation: hnz-spin 1s linear infinite;
}

@keyframes hnz-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}