/* ====== CSS EXCLUSIVO PARA PÁGINA DE ARTÍCULO ====== */

/* ====== ENCABEZADO ARTÍCULO ====== */
.article-header {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 180px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e6f0ff 100%);
}

.article-header-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.article-header h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    line-height: 1.1;
}

.article-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    color: var(--gray-color);
    font-size: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta-item i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.article-category {
    display: inline-block;
    background: rgba(0, 160, 233, 0.1);
    color: var(--secondary-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(0, 160, 233, 0.2);
    transition: var(--transition);
}

.article-category:hover {
    background: rgba(0, 160, 233, 0.2);
    transform: translateY(-3px);
}

/* ====== CONTENIDO ARTÍCULO ====== */
.article-content-section {
    position: relative;
    padding: 80px 0;
    background: white;
}

.article-content-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Estilos específicos para el contenido del artículo */
.article-content {
    max-width: 100%;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Estilos para los encabezados dentro del artículo */
.article-content h2 {
    font-size: 2.2rem;
    margin-top: 60px;
    margin-bottom: 30px;
    color: var(--dark-color);
    line-height: 1.3;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h2:after {
    width: 80px;
    height: 4px;
    bottom: -12px;
    left: 0 !important;
    transform: none !important;
}

.article-content h3 {
    font-size: 1.8rem;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--dark-color);
    line-height: 1.3;
}

.article-content h4 {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.3;
    font-weight: 600;
}

.article-content h5 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.3;
    font-weight: 600;
}

/* Estilos para párrafos dentro del artículo */
.article-content p {
    margin-bottom: 25px;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--dark-color);
    text-align: justify;
}

/* Estilos para imágenes dentro del artículo */
.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 40px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.article-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.2);
}

.image-caption {
    text-align: center;
    font-style: italic;
    color: var(--gray-color);
    margin-top: -30px;
    margin-bottom: 40px;
    font-size: 0.95rem;
    padding: 0 20px;
}

/* Listas dentro del artículo */
.article-content ul, .article-content ol {
    margin-bottom: 25px;
    padding-left: 30px;
    color: var(--dark-color);
}

.article-content li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* Citas dentro del artículo */
.article-content blockquote {
    border-left: 5px solid var(--secondary-color);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--gray-color);
    font-size: 1.2rem;
    line-height: 1.6;
    background: rgba(0, 160, 233, 0.05);
    padding: 30px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Tablas dentro del artículo */
.article-content table {
    width: 100%;
    margin: 40px 0;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.article-content th {
    background: var(--gradient-primary);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
}

.article-content td {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    color: var(--dark-color);
}

.article-content tr:nth-child(even) {
    background-color: rgba(0, 102, 204, 0.03);
}

.article-content tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Código dentro del artículo */
.article-content pre {
    background: #1a2b4d;
    color: #d1d9e8;
    padding: 25px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 40px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: var(--box-shadow);
}

.article-content code {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Estilos para elementos especiales */
.article-note {
    background: rgba(255, 107, 53, 0.1);
    border-left: 5px solid var(--accent-color);
    padding: 25px;
    margin: 40px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.article-note h4 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-note h4 i {
    font-size: 1.3rem;
}

.article-tip {
    background: rgba(0, 160, 233, 0.1);
    border-left: 5px solid var(--secondary-color);
    padding: 25px;
    margin: 40px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.article-tip h4 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-tip h4 i {
    font-size: 1.3rem;
}

/* ====== NAVEGACIÓN ENTRE ARTÍCULOS ====== */
.article-navigation {
    position: relative;
    padding: 60px 0;
    background: white;
    border-top: 1px solid rgba(0, 102, 204, 0.1);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.article-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.article-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border-radius: var(--border-radius);
    background: var(--light-bg);
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
    position: relative;
    overflow: hidden;
}

.article-nav-link:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.article-nav-link:hover:before {
    transform: scaleY(1);
}

.article-nav-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.2);
}

.article-nav-prev {
    text-align: left;
}

.article-nav-next {
    text-align: right;
    flex-direction: row-reverse;
}

.article-nav-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    min-width: 60px;
    height: 60px;
    background: rgba(0, 160, 233, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.article-nav-link:hover .article-nav-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

.article-nav-text {
    flex: 1;
}

.article-nav-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.article-nav-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.4;
}

/* ====== ARTÍCULOS RELACIONADOS ====== */
.related-articles {
    position: relative;
    padding: 100px 0;
    background: var(--light-bg);
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 50px;
}

.related-articles h2:after {
    left: 50%;
    transform: translateX(-50%);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 30px;
}

.related-article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.related-article-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 102, 204, 0.12);
    border-color: rgba(0, 102, 204, 0.2);
}

.related-article-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.related-article-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    mix-blend-mode: overlay;
}

.related-article-card:hover .related-article-image:before {
    opacity: 0.2;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.related-article-card:hover .related-article-image img {
    transform: scale(1.1);
}

.related-article-content {
    padding: 30px;
}

.related-article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.related-article-content a {
    color: var(--dark-color);
    display: block;
    transition: var(--transition);
}

.related-article-content a:hover {
    color: var(--secondary-color);
}

.related-article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 102, 204, 0.05);
}

/* ====== COMPARTIR ARTÍCULO ====== */
.article-share {
    position: relative;
    padding: 40px 0;
    background: white;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.share-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.share-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--gray-color);
    font-size: 1.3rem;
    transition: var(--transition);
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.share-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 102, 204, 0.1);
}

.share-facebook:hover {
    background: #3b5998;
    color: white;
    border-color: #3b5998;
}

.share-twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-whatsapp:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

/* ====== RESPONSIVE ESPECÍFICO PARA ARTÍCULO ====== */
@media (max-width: 1200px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-content h2 {
        font-size: 2rem;
    }
    
    .article-content h3 {
        font-size: 1.7rem;
    }
}

@media (max-width: 992px) {
    .article-header h1 {
        font-size: 2.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .article-nav-container {
        flex-direction: column;
    }
    
    .article-nav-link {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 2.3rem;
    }
    
    .article-content h2 {
        font-size: 1.8rem;
    }
    
    .article-content h3 {
        font-size: 1.5rem;
    }
    
    .article-content h4 {
        font-size: 1.3rem;
    }
    
    .article-content p {
        font-size: 1.05rem;
        text-align: left;
    }
    
    .share-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .share-button {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-meta-item {
        font-size: 0.9rem;
    }
    
    .article-header {
        padding-top: 150px;
        min-height: 60vh;
    }
    
    .article-nav-link {
        padding: 20px;
    }
    
    .article-nav-icon {
        min-width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .article-nav-title {
        font-size: 1.1rem;
    }
}