/* Estilos mejorados para artículos y experiencia de usuario */

/* Estilos base para artículos */
article {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Mejoras en tipografía */
article h3 {
    font-size: 28px;
    color: #1a5276;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaecee;
}

article h4 {
    font-size: 22px;
    color: #2874a6;
    margin-top: 30px;
    margin-bottom: 15px;
}

article p {
    margin-bottom: 20px;
}

article strong {
    color: #1a5276;
    font-weight: 600;
}

/* Listas más atractivas */
article ul, article ol {
    margin-bottom: 25px;
    padding-left: 25px;
}

article li {
    margin-bottom: 10px;
    position: relative;
}

article ul li::before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

article ol {
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
}

article ol li {
    counter-increment: item;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

article ol li::before {
    content: counter(item);
    background: #3498db;
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    position: absolute;
    left: 0;
    top: 2px;
}

/* Ejemplos destacados */
.example-box {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.example-box h5 {
    color: #2874a6;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Migas de pan mejoradas */
.breadcrumbs {
    font-size: 14px;
    margin-bottom: 30px;
    color: #7f8c8d;
    padding: 10px 0;
    border-bottom: 1px solid #eaecee;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #2874a6;
    text-decoration: underline;
}

/* Artículos relacionados */
.related-articles {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eaecee;
}

.related-articles h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a5276;
    border-bottom: none;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.related-article-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eaecee;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.related-article-card h4 {
    margin-top: 0;
    font-size: 18px;
}

.related-article-card h4 a {
    color: #2874a6;
    text-decoration: none;
    transition: color 0.3s;
}

.related-article-card h4 a:hover {
    color: #3498db;
    text-decoration: underline;
}

.related-article-card p {
    font-size: 14px;
    color: #555;
    margin-bottom: 0;
}

/* Mejoras para imágenes */
article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

article img:hover {
    transform: scale(1.01);
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    article {
        font-size: 16px;
        padding: 15px;
    }
    
    article h3 {
        font-size: 24px;
    }
    
    article h4 {
        font-size: 20px;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .example-box {
        padding: 12px 15px;
    }
}

/* Botones de acción */
.action-button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    margin: 20px 0;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.action-button:hover {
    background-color: #2874a6;
    transform: translateY(-2px);
}

/* Tabla de contenidos */
.table-of-contents {
    background-color: #f8f9fa;
    border: 1px solid #eaecee;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    position: sticky;
    top: 20px;
}

.table-of-contents h4 {
    margin-top: 0;
    font-size: 18px;
    color: #1a5276;
    margin-bottom: 15px;
}

.table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
}

.table-of-contents ul li {
    margin-bottom: 8px;
}

.table-of-contents ul li::before {
    content: none;
}

.table-of-contents a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 16px;
}

.table-of-contents a:hover {
    color: #2874a6;
    text-decoration: underline;
}

/* Destacados y notas */
.note-box {
    background-color: #e8f4fc;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.warning-box {
    background-color: #fef5e7;
    border-left: 4px solid #f39c12;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.tip-box {
    background-color: #e9f7ef;
    border-left: 4px solid #27ae60;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

/* Mejoras en la navegación */
.section-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eaecee;
}

.nav-previous, .nav-next {
    max-width: 45%;
}

.nav-previous a, .nav-next a {
    display: flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-previous a:hover, .nav-next a:hover {
    color: #2874a6;
}

.nav-previous a::before {
    content: "←";
    margin-right: 10px;
}

.nav-next a::after {
    content: "→";
    margin-left: 10px;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.nav-title {
    font-weight: 600;
}

/* Mejoras en la accesibilidad */
:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Animaciones suaves */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

article {
    animation: fadeIn 0.5s ease-out;
}

/* Mejoras en el encabezado de página */
.section-page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 0;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.section-page-header h2 {
    font-size: 32px;
    color: #1a5276;
    margin-bottom: 15px;
}

/* Mejoras en el pie de página */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0;
    margin-top: 60px;
}

footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #2874a6;
    text-decoration: underline;
}
