/* Modern Historical Maps Timeline CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary-color: #1a1a2e;
    --accent-color: #3498db;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #666;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    --timeline-line: #e0e6ed;
}

.mapa-historico-container {
    padding: 60px 20px;
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section */
.hero-timeline {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 0.8s ease-out;
}

.hero-timeline h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

.hero-timeline .subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Timeline Structure */
.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--timeline-line);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 70px;
    animation: fadeInUp 0.8s ease-out backwards;
}

.timeline-marker {
    position: absolute;
    left: -48px;
    top: 5px;
    width: 30px;
    height: 30px;
    background: var(--accent-color);
    border: 5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--timeline-line);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.timeline-year {
    position: absolute;
    left: -120px;
    top: 5px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 60px;
    text-align: right;
}

/* Map Card */
.map-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.map-card:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    border-left: 6px solid var(--accent-color);
}

.map-image-wrapper {
    flex: 0 0 420px;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: #2c3e50; /* Dark Gallery Frame */
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: zoom-in;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Show the entire historical map */
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.map-card:hover .map-image-wrapper img {
    transform: scale(1.15);
}

.map-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

.map-caption {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.map-actions {
    display: flex;
    gap: 15px;
}

.btn-museum {
    padding: 8px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background: #2266ffde;
}

.btn-museum:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .map-card { flex-direction: column; }
    .map-image-wrapper { flex: 0 0 auto; width: 100%; height: 250px; }
    .timeline { padding-left: 30px; }
    .timeline::before { left: 4px; }
    .timeline-marker { left: -58px; }
}

/* Fox Assistant Button Integration */
.fox-assistant-btn {
    bottom: 30px !important;
}

/* Karaoke styles */
.word-read {
    color: #999;
    transition: color 0.3s ease;
}

.word-reading-highlight {
    color: #e74c3c !important;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(231, 76, 60, 0.4);
    border-bottom: 2px solid #e74c3c;
    transform: scale(1.05);
    display: inline-block;
    transition: all 0.2s ease;
}
