/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --article-bg: #ffffff;
    --border-color: #a7b7c9;
    --accent-blue: #1e3a5f;
    --accent-gold: #c9a87b;
    --accent-gold-light: #e2c8a3;
    --text-dark: #1a2a3a;
    --text-gray: #4a5b6e;
    --link-blue: #0645ad;
    --infobox-bg: #f9f9f9;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
    padding: 2rem 1rem;
}

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--article-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-content {
    padding: 2rem 2.5rem;
}

/* Título principal */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 400;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

/* Infobox (estilo Wikipedia) */
.infobox {
    float: right;
    width: 300px;
    background: var(--infobox-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.infobox-title {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    background-color: var(--accent-blue);
    color: white;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
}

.infobox-subtitle {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.infobox-image {
    text-align: center;
    margin-bottom: 1rem;
}

.infobox-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
}

.image-caption {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.infobox-section {
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.infobox-row {
    padding: 0.3rem 0;
    border-bottom: 1px dotted #eee;
    display: flex;
}

.infobox-label {
    font-weight: bold;
    width: 35%;
}

.infobox-value {
    width: 65%;
}

/* Introducción */
.intro {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.intro p {
    margin-bottom: 0.8rem;
}

/* Índice (TOC) */
.toc {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    width: 280px;
    padding: 0.8rem;
    margin: 1rem 0 1.5rem 0;
    display: inline-block;
}

.toc-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.toc-list {
    list-style: none;
    padding-left: 0.5rem;
}

.toc-list li {
    margin-bottom: 0.2rem;
}

.toc-list ul {
    padding-left: 1.5rem;
    list-style: none;
}

.toc-list a {
    color: var(--link-blue);
    text-decoration: none;
    font-size: 0.85rem;
}

.toc-list a:hover {
    text-decoration: underline;
}

/* Títulos de sección */
h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--accent-blue);
    clear: both;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0 0.8rem 0;
    color: var(--text-dark);
    clear: both;
}

/* Imágenes flotantes */
.image-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
    width: 220px;
    text-align: center;
}

.image-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
    width: 220px;
    text-align: center;
}

.image-right img, .image-left img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    padding: 0.2rem;
    background: white;
}

/* Listas */
.article-content ul, .article-content ol {
    margin: 0.5rem 0 1rem 2rem;
}

.article-content li {
    margin-bottom: 0.3rem;
}

/* Bloque de cita */
.quote-block {
    background: #f8f9fa;
    border-left: 4px solid var(--accent-gold);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    clear: both;
}

.quote-icon {
    font-size: 3rem;
    font-family: serif;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: -1rem;
}

.quote-block p {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.quote-author {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-gray);
    font-style: normal;
}

/* Referencias */
.references {
    margin-top: 2rem;
    clear: both;
}

.references h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.references hr {
    margin: 0.5rem 0 1rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.references ol {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Aviso de ficción */
.fiction-notice {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: #b33;
    text-align: center;
}

.fiction-notice hr {
    margin-bottom: 1rem;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .article-content {
        padding: 1rem;
    }
    
    .infobox {
        float: none;
        margin: 0 auto 1.5rem auto;
        width: 100%;
        max-width: 280px;
    }
    
    .image-right, .image-left {
        float: none;
        margin: 1rem auto;
        display: block;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .toc {
        width: 100%;
    }
}

/* ============================================ */
/* NUEVAS SECCIONES AÑADIDAS (para que no se vea artificial) */
/* ============================================ */

/* Breadcrumbs (migas de pan) */
.breadcrumbs {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumbs a {
    color: var(--link-blue);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs i {
    margin-right: 0.3rem;
}

/* Last edited (fecha de última edición) */
.last-edited {
    font-size: 0.7rem;
    color: #6c757d;
    padding: 0.5rem 1.5rem;
    background: #fffbe6;
    border-bottom: 1px solid #f0e6c8;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.last-edited i {
    margin-right: 0.3rem;
}

.separator {
    margin: 0 0.5rem;
    color: #dee2e6;
}

/* Page tags (etiquetas/categorías) */
.page-tags {
    padding: 0.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    padding: 0.2rem 0.7rem;
    border-radius: 15px;
    font-size: 0.7rem;
    color: #495057;
    transition: background 0.2s;
}

.tag:hover {
    background: var(--accent-gold-light);
}

.tag i {
    margin-right: 0.3rem;
}

/* Coat of arms small (escudo pequeño en infobox) */
.coat-of-arms-small {
    text-align: center;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: var(--accent-gold);
}

/* Social icons in infobox (redes sociales) */
.infobox-social {
    text-align: center;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
}

.infobox-social a {
    color: var(--accent-blue);
    font-size: 1.2rem;
    margin: 0 0.5rem;
    text-decoration: none;
    transition: color 0.2s;
}

.infobox-social a:hover {
    color: var(--accent-gold);
}

/* Read also banner (banner "leer también") */
.read-also {
    background: #e8f4f8;
    border-left: 4px solid var(--accent-blue);
    padding: 0.8rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    border-radius: 0 8px 8px 0;
}

.read-also a {
    color: var(--accent-blue);
    font-weight: bold;
    text-decoration: none;
}

.read-also a:hover {
    text-decoration: underline;
}

.read-also i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

/* Edit link (enlace editar junto a títulos) */
.edit-link {
    font-size: 0.7rem;
    font-weight: normal;
    color: var(--link-blue);
    text-decoration: none;
    margin-left: 0.5rem;
}

.edit-link:hover {
    text-decoration: underline;
}

/* Notice box (caja de datos curiosos) */
.notice-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 0.8rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-size: 0.9rem;
    clear: both;
}

.notice-box i {
    margin-right: 0.5rem;
    color: #d4a017;
}

/* Asset table (tabla de distribución de patrimonio) */
.asset-table {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    clear: both;
}

.asset-table h4 {
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.asset-table h4 i {
    margin-right: 0.5rem;
}

.asset-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.asset-name {
    width: 120px;
    font-size: 0.85rem;
}

.asset-bar {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.asset-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 5px;
}

.asset-percent {
    width: 45px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Achievement grid (tarjetas de logros) */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    clear: both;
}

.achievement-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.achievement-card i {
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.achievement-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0;
}

.achievement-card p {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Blog promo (promoción del blog de viajes) */
.blog-promo {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0d2137 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    clear: both;
}

.blog-promo i {
    font-size: 2rem;
}

.blog-promo a {
    color: var(--accent-gold-light);
    text-decoration: none;
}

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

/* Back to top button (botón volver arriba) */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--accent-gold);
    transform: translateY(-3px);
}

/* Responsive para las nuevas secciones */
@media (max-width: 768px) {
    .breadcrumbs, .last-edited {
        padding: 0.5rem 1rem;
    }
    
    .page-tags {
        padding: 0.5rem 1rem;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
    }
    
    .asset-row {
        flex-wrap: wrap;
    }
    
    .asset-name {
        width: 100%;
    }
    
    .last-edited {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .separator {
        display: none;
    }
    
    .blog-promo {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .infobox {
        max-width: 100%;
    }
    
    .quote-block p {
        font-size: 0.95rem;
    }
}