/* ========================================================== */
/* === FINAL, CLEANED, AND STABLE DASHBOARD STYLESHEET (v3) === */
/* ========================================================== */

:root {
    --accent-color: #3498DB; /* A nice, modern blue */
    --timeline-color: #a8c0ff; /* Color for timeline dots and text */
}

/* --- 1. General Body and Page Setup --- */
body { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body.summary-page {
    background-image: url('../images/bg1.jpeg');
    background-color: #000; /* Fallback color */
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #fff;
}

/* --- 2. Main Header --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
}
.product-logo-header {
    height: 80px;
}

.header-right-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav {
    display: flex;
    gap: 10px;
}

.nav-button {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.nav-button:hover, .nav-button.active {
    background-color: var(--accent-color);
    color: #fff;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.header-icon {
    animation: spin 8s linear infinite;
}
.header-icon svg path {
    stroke: var(--accent-color);
}

/* --- 3. Main Content Sections --- */
.summary-container {
    padding: 40px 60px 50px 60px; 
    position: relative;
}

.title-section {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}
.main-title { font-size: 3.5rem; font-weight: 700; letter-spacing: 5px; margin-bottom: 15px; color: blueviolet;}
.main-title span { font-weight: bold; }
.c-blue { color: #4285F4; } .c-red { color: #EA4335; } .c-yellow { color: #FBBC05; } .c-green { color: #34A853; }
.title-divider { width: 100px; height: 2px; background-color: #fff; margin: 20px auto; }
.question { font-size: 1.5rem; margin-bottom: 15px; }
.description { max-width: 800px; margin: 0 auto 10px auto; font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.8); }

@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-section { background-color: transparent; color: #e2e2e2; padding: 15px 0; margin: 40px 0;  }
.ticker-wrap { width: 100%; overflow: hidden; white-space: nowrap; }
.ticker { display: inline-block; animation: ticker-scroll 20s linear infinite; }
.ticker span { font-size: 1rem; font-weight: 500; margin: 0 40px; }
.ticker .highlight-country { color: #4ed460; font-weight: 700; }
.ticker .highlight-country-1 { color: #bb0505; font-weight: 700; }

.sidenote1 {
    font-size: 0.8rem;
    color: #777;
    padding-bottom: 10px;
    padding-top: 20px;
    padding-left: 5%; 
}

/* --- 4. The Timeline --- */
.timeline-section {
    padding: 20px 0;
    margin-top: 40px;
    width: 100%;
}

.date-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-left: 5%; 
    width: 10%;
}

.date-inputs input {
    background: rgba(30, 30, 45, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    font-family: inherit;
    text-align: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.timeline-bar {
    position: relative;
    width: 90%; /* Center the bar with margin auto */
    margin: 80px auto;
    height: 3px;
    background: linear-gradient(90deg, #a8c0ff, #8a78ff, #be78ff);
    border-radius: 2px;
}

.timeline-event {
    position: absolute;
    transform: translateX(-50%);
    width: 220px;
    text-align: center;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.4;
}

.timeline-event.event-top {
    bottom: 25px; 
}

.timeline-event:not(.event-top) {
    top: 25px;
}

.timeline-event .date {
    font-weight: 700;
    margin-top: 8px;
    color: var(--timeline-color);
    text-shadow: 0 0 8px rgba(168, 192, 255, 0.7);
}

.timeline-event::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--timeline-color);
    border: 3px solid #14142B;
    box-shadow: 0 0 15px var(--timeline-color);
    z-index: 5;
}

.timeline-event.event-top::after {
    bottom: -32px;
}

.timeline-event:not(.event-top)::after {
    top: -32px;
}

/* --- 5. The amCharts Container and Layout --- */
.amcharts-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 5%;
}

.small-charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    height: 250px;
    /* padding-top: 10px; */
}

.chart-wrapper {
    background: rgba(30, 30, 45, 0.5);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    /* padding: 25px; */
    transition: background 0.3s ease;
}

.chart-wrapper:hover {
    background: rgba(44, 44, 84, 0.6);
}

#piediv { flex: 1; height: 100%; }
#gaugediv { flex: 1; height: 100%; }
#linediv { flex: 2; height: 100%; }

#mapdiv { width: 100%; height: 450px; }
#columndiv { width: 100%; height: 330px; }

.nav-button.premium-feature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-color: #F1C40F; /* Gold color for premium */
    color: #F1C40F;
}
.nav-button.premium-feature:hover {
    background-color: #f3e5ae;
    color: #000;
}
.crown-icon {
    width: 16px;
    height: 16px;

    vertical-align: middle; 
    margin-bottom: 2px;
}


/* --- Modal Styling --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    
    /* Initially hidden */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.modal-box {
    background: #1E1E2F; /* Dark blue-ish background */
    color: #EAEAEA;
    padding: 30px 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-box p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #b0b0b0;
}

.modal-box .small-text {
    font-size: 0.9rem;
    margin-top: 20px;
    opacity: 0.7;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #fff;
}