/* ===== UN-Style Global Design ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
img { max-width: 100%; height: auto; }

:root {
    --un-blue: #009edb;
    --dark-blue: #005a87;
    --light-blue: #4db8e8;
    --text-dark: #1a1a1a;
    --text-gray: #555;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --border-gray: #e0e0e0;
    --score-high: #006d2c;
    --score-above: #31a354;
    --score-avg: #74c476;
    --score-below: #bae4b3;
    --score-low: #edf8e9;
}

body {
    font-family: 'Segoe UI', 'Open Sans', 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

/* Header */
.header {
    background: var(--un-blue);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* Language Switcher */
.lang-select {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    min-height: 44px;
}

.lang-select option {
    background: var(--white);
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--un-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Breaking News Banner */
.breaking-news-banner {
    background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}
.breaking-news-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.breaking-news-tag {
    background: #fff;
    color: #B71C1C;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    animation: pulse-tag 2s ease-in-out infinite;
}
@keyframes pulse-tag {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.breaking-news-text {
    flex: 1;
}
.breaking-news-link {
    color: #FFCDD2;
    text-decoration: underline;
    font-weight: 600;
}
.breaking-news-link:hover {
    color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Section */
.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.section-subtitle {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* Fixed 4-column grids */
.grid-4x2,
.grid-4x3 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    display: flex;
    overflow-x: auto;
    gap: 1.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
}

.grid-5 > div {
    flex: 0 0 200px;
    scroll-snap-align: start;
}

.grid-5 .overview-card {
    min-height: 220px;
    height: auto;
}

/* Scroll indicator wrapper for horizontal-scroll containers */
.scroll-wrapper {
    position: relative;
}
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--un-blue);
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.scroll-arrow.visible {
    opacity: 0.85;
    visibility: visible;
}
.scroll-arrow:hover {
    opacity: 1;
}
.scroll-arrow-left {
    left: -4px;
}
.scroll-arrow-right {
    right: -4px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-left: 3px solid var(--un-blue);
    padding: 1.25rem;
    border-radius: 6px;
    transition: box-shadow 0.3s, transform 0.2s, background 0.3s;
    display: block;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,94,135,0.12);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--white) 0%, #f0f8ff 100%);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--dark-blue);
    display: inline;
    vertical-align: middle;
}

.card-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--un-blue);
    margin: 0.6rem 0;
}

.card-description {
    color: var(--text-gray);
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-podium {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--dark-blue);
    margin: 0.4rem 0;
    flex: 1;
}
.overview-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
/* Global Governance & Peace Sections */
.global-section-box {
    margin-top: 2rem;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 1.5rem 2rem;
}
.global-section-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark-blue);
    margin-bottom: 1.25rem;
}
/* Governance */
.governance-content { display: flex; flex-direction: column; gap: 1rem; }
.regime-bar-wrap { width: 100%; }
.regime-bar { display: flex; height: 28px; border-radius: 14px; overflow: hidden; }
.regime-seg { transition: width 0.3s; }
.regime-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; margin-top: 0.75rem; font-size: 0.85rem; }
.regime-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.regime-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.governance-stats { display: flex; justify-content: center; gap: 2.5rem; }
.gov-stat { display: flex; flex-direction: column; align-items: center; }
.gov-stat-value { font-size: 1.35rem; font-weight: 700; color: var(--dark-blue); }
.gov-stat-label { font-size: 0.75rem; color: var(--text-gray); text-align: center; }
.system-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.system-tag { background: var(--bg-light); padding: 0.35rem 0.85rem; border-radius: 16px; font-size: 0.82rem; color: var(--text-gray); }
.system-tag strong { color: var(--dark-blue); margin-left: 0.3rem; }
/* Peace */
.peace-content { display: flex; flex-direction: column; gap: 1rem; }
.peace-headline { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.peace-big-stat { display: flex; flex-direction: column; align-items: center; padding: 0.75rem 1.25rem; border-radius: 8px; background: var(--bg-light); min-width: 100px; }
.peace-big-stat.peace-good { background: #e8f5e9; }
.peace-big-stat.peace-bad { background: #ffebee; }
.peace-big-num { font-size: 1.6rem; font-weight: 700; color: var(--dark-blue); }
.peace-good .peace-big-num { color: #2E7D32; }
.peace-bad .peace-big-num { color: #C62828; }
.peace-big-label { font-size: 0.72rem; color: var(--text-gray); text-transform: uppercase; text-align: center; }
.peace-stacked-bar { display: flex; height: 28px; border-radius: 14px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.peace-bar-seg { transition: width 0.6s ease; position: relative; }
.peace-bar-seg:first-child { border-radius: 14px 0 0 14px; }
.peace-bar-seg:last-child { border-radius: 0 14px 14px 0; }
.peace-breakdown { display: flex; flex-direction: column; gap: 0.5rem; }
.peace-status-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.85rem; }
.peace-status-row:nth-child(odd) { background: var(--bg-light); }
.peace-icon { font-size: 1rem; flex-shrink: 0; }
.peace-label { font-weight: 600; min-width: 110px; }
.peace-count { min-width: 28px; text-align: center; font-size: 0.95rem; }
.peace-row-bar { flex: 0 0 140px; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; }
.peace-row-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease; }
.peace-countries { color: var(--text-gray); font-size: 0.82rem; flex: 1; overflow: hidden; text-overflow: clip; white-space: nowrap; min-width: 0; }
.peace-dots { color: var(--text-gray); font-size: 0.82rem; flex-shrink: 0; margin-left: -2px; }
.peace-status-row .info-btn { flex-shrink: 0; margin-left: 0.3rem; }

/* What's New */
.updates-section { margin-bottom: 2rem; }
.updates-list { display: flex; flex-direction: column; gap: 1rem; }
.update-item {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--white); border-left: 4px solid var(--un-blue);
    border-radius: 8px; padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.update-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.update-body { flex: 1; }
.update-body strong { color: var(--text-dark); }
.update-date { display: inline-block; margin-left: 0.5rem; font-size: 0.8rem; color: var(--text-gray); }
.update-body p { margin: 0.3rem 0 0; color: var(--text-gray); font-size: 0.9rem; }

@media (max-width: 768px) {
    .governance-stats { gap: 1rem; }
    .peace-headline { gap: 0.75rem; }
    .peace-big-stat { min-width: 80px; padding: 0.5rem 0.75rem; }
    .peace-label { min-width: 80px; }
    .peace-row-bar { flex: 0 0 80px; }
}

@media (max-width: 480px) {
    .peace-row-bar { flex: 0 0 60px; }
}

/* Global Economic Pulse */
.econ-content { display: flex; flex-direction: column; gap: 1rem; }
.econ-headline { display: flex; justify-content: center; gap: 1rem; flex-wrap: nowrap; }
.econ-big-stat { display: flex; flex-direction: column; align-items: center; padding: 0.75rem 1rem; border-radius: 8px; background: var(--bg-light); flex: 1; min-width: 0; }
.econ-icon { font-size: 1.3rem; }
.econ-big-num { font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 700; color: var(--dark-blue); white-space: nowrap; }
.econ-big-label { font-size: clamp(0.55rem, 1vw, 0.72rem); color: var(--text-gray); text-transform: uppercase; text-align: center; }

/* Top Countries Table (prosperity page) */
.top-countries-table .top-gdp-cell {
    font-weight: 600;
    color: var(--dark-blue);
    white-space: nowrap;
}

.card-link {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--un-blue);
}

.pillar-card {
    display: flex;
    flex-direction: column;
}
.pillar-card .card-description {
    flex: 1;
}
.card-avg {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-gray);
    font-size: 0.85rem;
    color: var(--text-gray);
}

.card-avg strong {
    color: var(--un-blue);
    font-size: 1rem;
}

.avg-label {
    font-size: 0.8rem;
}

/* Map Container */
.map-container {
    background: var(--bg-light);
    padding: 3rem 2rem;
    margin: 3rem 0;
}

.map-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    overflow: hidden;
}

.map-wrapper iframe {
    width: 100%;
    height: 600px;
    border: none;
}

/* ===== Page Content (country, pillar, about, etc.) ===== */
.page-content {
    min-height: 60vh;
}

.page-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.page-intro {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    max-width: 800px;
}

.back-link {
    display: inline-block;
    color: var(--un-blue);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.back-bar {
    position: sticky;
    top: var(--header-h, 56px);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 0.5rem 2rem;
    z-index: 999;
    border-bottom: 1px solid var(--border-gray);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.back-bar a {
    color: var(--un-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.back-bar a:hover {
    text-decoration: underline;
}

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--un-blue);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 999;
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover {
    transform: scale(1.1);
    background: var(--dark-blue);
}

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

.content-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-gray);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    color: var(--dark-blue);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.content-section h3 {
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.content-section p {
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}

.content-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.content-section ul li {
    margin-bottom: 0.4rem;
}

.sources-list a {
    color: var(--un-blue);
    text-decoration: none;
}

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

/* Privacy highlight box */
.privacy-highlight {
    background: #e8f5e9;
    padding: 1.25rem;
    border-left: 4px solid #4caf50;
    margin-bottom: 2rem;
    border-radius: 0 4px 4px 0;
}

.updated-date {
    margin-top: 2rem;
    color: #999;
    font-size: 0.9rem;
}

/* ===== Country Page ===== */
.country-name {
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
}
.country-map-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-gray);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.country-mini-world {
    width: 120px;
    height: 84px;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.country-shape-svg {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.country-map-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-blue);
}
@media (max-width: 600px) {
    .country-map-bar {
        gap: 0.6rem;
        padding: 0.5rem 0.75rem;
    }
    .country-mini-world {
        width: 90px;
        height: 63px;
    }
    .country-shape-svg {
        width: 40px;
        height: 40px;
    }
}

/* Country Governance Bar */
.country-gov-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.gov-tag {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.35rem 0.85rem;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-gray);
    border: 1px solid var(--border-gray);
}

/* Satisfaction Meter */
.satisfaction-meter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-gray);
}

.sat-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.sat-bar-wrap {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    min-width: 80px;
}

.sat-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.sat-label {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.sat-score {
    font-size: 0.85rem;
    color: var(--text-gray);
    white-space: nowrap;
}

/* Indicator Meters (Corruption, Justice, Press Freedom) */
.indicator-meters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.indicator-meter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-gray);
}

.ind-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.ind-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    min-width: 100px;
}

.ind-bar-wrap {
    flex: 1;
    height: 7px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.ind-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ind-label {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.ind-rank {
    font-size: 0.8rem;
    color: var(--text-gray);
    white-space: nowrap;
}

.country-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.country-meta-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.meta-card {
    background: var(--bg-light);
    padding: 1.5rem 2rem;
    border-radius: 4px;
    min-width: 0;
    text-align: center;
}

.meta-sub {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 0.3rem;
}

.meta-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-blue);
}

/* ===== Country Page Section Containers ===== */
.country-section {
    border: 1px solid var(--border-gray, #ddd);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.country-section .scores-heading {
    margin-top: 0;
}

.country-section .econ-metrics {
    margin-bottom: 1.5rem;
}

.country-section .econ-charts {
    margin-bottom: 0;
}

.country-section .trade-tags-section {
    margin-bottom: 0;
}

.scores-heading {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--un-blue);
    display: inline-block;
}

.score-bars {
    max-width: 800px;
}

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

.score-label {
    min-width: 200px;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-decoration: none;
}

.score-label:hover {
    color: var(--un-blue);
}

.score-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.score-value {
    min-width: 36px;
    text-align: right;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Score colors */
.score-high { background: var(--score-high); }
.score-above_avg { background: var(--score-above); }
.score-average { background: var(--score-avg); }
.score-below_avg { background: var(--score-below); }
.score-low { background: var(--score-low); }

.score-high-text { color: var(--score-high); }
.score-above_avg-text { color: var(--score-above); }
.score-average-text { color: var(--score-avg); }
.score-below_avg-text { color: #8B6914; }
.score-low-text { color: #cc3333; }

/* ===== Pillar / Rankings Page ===== */
.pillar-desc {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.country-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f6ff 100%);
    border-left: 4px solid var(--un-blue);
    border-radius: 0 10px 10px 0;
}

.country-description p {
    margin-bottom: 0.75rem;
}

.country-description p:last-child {
    margin-bottom: 0;
}

.pillar-long-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.pillar-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.pillar-tab {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.85rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.pillar-tab:hover {
    background: var(--bg-light);
}

.pillar-tab.active {
    background: var(--un-blue);
    color: var(--white);
    border-color: var(--un-blue);
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.ranking-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--dark-blue);
    color: var(--dark-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.ranking-table tr:hover {
    background: var(--bg-light);
}

.ranking-table a {
    color: var(--text-dark);
    text-decoration: none;
}

.ranking-table a:hover {
    color: var(--un-blue);
}

.rank-num {
    font-weight: 600;
    color: var(--text-gray);
    width: 50px;
}

.rank-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rank-bar {
    height: 20px;
    border-radius: 3px;
    min-width: 4px;
    transition: width 0.4s ease;
}

.rank-score {
    font-weight: 600;
    min-width: 30px;
    font-size: 0.9rem;
}

.sources {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
}

.sources h3 {
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
}

.sources ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--text-gray);
}

.sources li {
    margin-bottom: 0.3rem;
}

.not-found {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-gray);
    padding: 4rem 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--light-blue);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.visitor-counter {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}

.bmc-link {
    margin-top: 0.75rem;
}

.bmc-link a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.bmc-link a:hover {
    color: #ffdd57;
}

/* ===== Share Bar ===== */
.share-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin: 0.5rem 0;
}

.share-bar-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-bar-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-whatsapp { background: #25D366; }
.share-x { background: #000; }
.share-facebook { background: #1877F2; }
.share-linkedin { background: #0A66C2; }
.share-telegram { background: #26A5E4; }
.share-copy { background: var(--dark-blue); }
.share-copy.copied { background: #2E7D32; }

/* ===== Currency Box ===== */
.currency-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #f5f7fa 100%);
    border: 1px solid rgba(0, 158, 219, 0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.currency-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.currency-symbol-big {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-blue);
    min-width: 40px;
    text-align: center;
}
.currency-info strong {
    font-size: 1rem;
    color: var(--text-dark);
}
.currency-code {
    color: var(--text-gray);
    font-size: 0.85rem;
}
.currency-rate {
    background: var(--white);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-blue);
    border: 1px solid var(--border-gray);
}
.currency-local-gdp {
    font-size: 0.85rem;
    color: var(--text-gray);
    width: 100%;
}

/* ===== Economic Dashboard ===== */
.econ-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.econ-metrics-4 {
    grid-template-columns: repeat(4, 1fr);
}

.econ-metrics-4 .econ-metric-label {
    white-space: nowrap;
}

.econ-metric {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-gray, #eee);
    transition: box-shadow 0.2s;
}

.econ-metric:hover {
    box-shadow: 0 2px 8px rgba(0, 90, 135, 0.08);
}

.econ-metric-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.econ-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.econ-metric-value .info-btn {
    flex-shrink: 0;
}

.econ-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.econ-chart-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-gray, #eee);
}

.econ-chart-box h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.econ-chart-box canvas {
    max-height: 280px;
    margin: 0 auto;
    display: block;
}

.econ-legend {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: center;
}

.econ-legend-item {
    font-size: 0.82rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.econ-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ===== Trade Stats (used on trade detail page) ===== */
.trade-tile-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trade-tile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 100px;
}

.trade-tile-icon {
    font-size: 1.3rem;
}

.trade-tile-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.trade-tile-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-align: center;
}

.trade-top-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
}

.trade-top-table .trade-val {
    font-weight: 600;
    color: var(--dark-blue);
    white-space: nowrap;
}

.trade-top-table .trade-products {
    font-size: 0.95rem;
    color: var(--dark-blue);
    font-weight: 500;
}

/* Trade tags on country page */
.trade-tags-section {
    margin-top: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.trade-tags-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-blue);
}

.trade-tag {
    background: linear-gradient(135deg, #e8f4fd 0%, #d0ecfb 100%);
    color: var(--dark-blue);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(0, 158, 219, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    cursor: default;
}

.trade-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 90, 135, 0.15);
    background: linear-gradient(135deg, #d0ecfb 0%, #b8e2f8 100%);
}

/* ===== Country Selector Dropdown ===== */
.country-selector-wrap {
    position: relative;
}

.country-selector-btn {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.country-selector-btn:hover {
    background: rgba(255,255,255,0.3);
}

.country-selector-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 280px;
    max-height: 380px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
}

.country-selector-panel.open {
    display: flex;
}

.country-selector-search {
    padding: 0.6rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--border-gray);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

.country-selector-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.country-selector-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.88rem;
    transition: background 0.15s;
}

.country-selector-list a:hover {
    background: var(--bg-light);
}

.country-score-badge {
    background: var(--bg-light);
    color: var(--dark-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}

/* ===== Compare Page ===== */
.compare-picker {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.compare-picker select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 180px;
    background: var(--white);
}

.compare-picker .compare-btn {
    background: var(--un-blue);
    color: var(--white);
    border: none;
    padding: 0.55rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.compare-picker .compare-btn:hover {
    background: var(--dark-blue);
}

.compare-hint {
    background: var(--bg-light);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    color: var(--text-gray);
    font-size: 1rem;
}

.compare-section {
    margin-bottom: 2.5rem;
}

.compare-section h2 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.compare-radar-wrap {
    max-width: 550px;
    margin: 0 auto 2rem;
}

.compare-bars {
    max-width: 800px;
}

.compare-bar-row {
    margin-bottom: 0.75rem;
}

.compare-bar-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.compare-bar-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.compare-bar-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-bar-name {
    font-size: 0.75rem;
    color: var(--text-gray);
    min-width: 80px;
    text-align: right;
}

.compare-bar-track {
    flex: 1;
    height: 18px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
}

.compare-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.compare-bar-value {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 28px;
}

.compare-econ-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-econ-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 2px solid var(--dark-blue);
    color: var(--dark-blue);
    font-weight: 600;
    font-size: 0.85rem;
}

.compare-econ-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-gray);
    font-size: 0.9rem;
}

.compare-econ-table tr:hover {
    background: var(--bg-light);
}

/* ===== Quiz Page ===== */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-start {
    text-align: center;
    padding: 3rem 1rem;
}

.quiz-start-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.quiz-start h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
}

.quiz-start p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.quiz-start-btn {
    background: var(--un-blue);
    color: var(--white);
    border: none;
    padding: 0.85rem 2.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}

.quiz-start-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

.quiz-difficulty {
    margin: 1.5rem 0;
}

.quiz-diff-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-diff-btn {
    padding: 0.6rem 1.4rem;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    background: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quiz-diff-btn:hover {
    border-color: var(--un-blue);
    background: var(--bg-light);
}

.quiz-diff-btn.active {
    border-color: var(--un-blue);
    background: var(--un-blue);
    color: var(--white);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quiz-progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.quiz-score-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--un-blue);
}

.quiz-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--un-blue);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.quiz-question {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quiz-option {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    color: var(--text-dark);
    line-height: 1.3;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--un-blue);
    background: #f0f8ff;
    transform: translateY(-1px);
}

.quiz-option.correct {
    border-color: #2E7D32;
    background: #e8f5e9;
    color: #1B5E20;
    font-weight: 600;
}

.quiz-option.wrong {
    border-color: #C62828;
    background: #ffebee;
    color: #B71C1C;
}

.quiz-option.disabled {
    cursor: default;
    opacity: 0.85;
}

.quiz-option.disabled:not(.correct):not(.wrong) {
    opacity: 0.5;
}

.quiz-feedback {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.quiz-feedback.correct {
    background: #e8f5e9;
    color: #1B5E20;
    border-left: 4px solid #2E7D32;
}

.quiz-feedback.wrong {
    background: #ffebee;
    color: #B71C1C;
    border-left: 4px solid #C62828;
}

.quiz-next-btn {
    display: block;
    margin: 1.5rem auto 0;
    background: var(--un-blue);
    color: var(--white);
    border: none;
    padding: 0.65rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.quiz-next-btn:hover {
    background: var(--dark-blue);
}

.quiz-results {
    text-align: center;
    padding: 2rem 1rem;
}

.quiz-score-big {
    font-size: 4rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 1rem 0 0.5rem;
}

.quiz-score-label {
    font-size: 1rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.quiz-rating {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.quiz-rating-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.quiz-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quiz-actions button {
    padding: 0.7rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: background 0.2s, transform 0.15s;
}

.quiz-actions button:hover {
    transform: translateY(-1px);
}

.quiz-play-again {
    background: var(--un-blue);
    color: var(--white);
}

.quiz-play-again:hover {
    background: var(--dark-blue);
}

.quiz-share-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
}

.quiz-share-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.quiz-share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.quiz-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.2s;
    color: var(--white);
}

.quiz-social-btn:hover {
    transform: scale(1.1);
}

.quiz-social-whatsapp { background: #25D366; }
.quiz-social-x { background: #000; }
.quiz-social-facebook { background: #1877F2; }
.quiz-social-linkedin { background: #0A66C2; }
.quiz-social-telegram { background: #26A5E4; }
.quiz-social-copy {
    background: var(--bg-light);
    color: var(--text-gray);
    border: 1px solid var(--border-gray);
}
.quiz-social-copy.copied {
    background: #e8f5e9;
    color: #2E7D32;
    border-color: #2E7D32;
}

/* ===== RTL Support ===== */
[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .hamburger {
    right: auto;
    left: 1.5rem;
}

[dir="rtl"] .score-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .score-label {
    text-align: right;
}

[dir="rtl"] .score-value {
    text-align: left;
}

[dir="rtl"] .rank-bar-wrap {
    flex-direction: row-reverse;
}

[dir="rtl"] .ranking-table th,
[dir="rtl"] .ranking-table td {
    text-align: right;
}

[dir="rtl"] .back-link {
    direction: rtl;
}

[dir="rtl"] .content-section ul {
    margin-left: 0;
    margin-right: 1.5rem;
}

[dir="rtl"] .privacy-highlight {
    border-left: none;
    border-right: 4px solid #4caf50;
}

[dir="rtl"] .country-selector-panel {
    right: auto;
    left: 0;
}

[dir="rtl"] .compare-bar-name {
    text-align: left;
}

[dir="rtl"] .compare-econ-table th,
[dir="rtl"] .compare-econ-table td {
    text-align: right;
}

[dir="rtl"] .quiz-option {
    text-align: right;
}

[dir="rtl"] .quiz-feedback {
    border-left: none;
}

[dir="rtl"] .quiz-feedback.correct {
    border-right: 4px solid #2E7D32;
}

[dir="rtl"] .quiz-feedback.wrong {
    border-right: 4px solid #C62828;
}

[dir="rtl"] .card {
    border-left: 1px solid var(--border-gray);
    border-right: 3px solid var(--un-blue);
}

/* ===== Responsive ===== */
/* 1024px breakpoint removed — unused */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 0.5rem;
        position: relative;
    }

    .hamburger {
        display: inline-flex;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav {
        display: none;
        width: 100%;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .nav.open a,
    .nav.open > div {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem 0;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .grid-4x2,
    .grid-4x3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 2rem 1rem;
    }

    .country-section {
        padding: 1rem 1rem;
        margin-bottom: 1.5rem;
    }

    .country-name {
        font-size: 1.5rem;
    }

    .back-bar {
        padding: 0.5rem 1rem;
    }

    .meta-card {
        padding: 1rem 1rem;
    }

    .meta-value {
        font-size: 1.4rem;
    }

    .indicator-meter {
        flex-wrap: wrap;
        gap: 0.35rem 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .ind-title {
        min-width: 0;
        white-space: normal;
    }

    .ind-bar-wrap {
        flex: 1 1 100%;
        order: 3;
        min-width: 0;
    }

    .ind-label {
        font-size: 0.75rem;
        white-space: normal;
    }

    .ind-rank {
        font-size: 0.75rem;
    }

    .satisfaction-meter {
        flex-wrap: wrap;
        padding: 0.5rem 0.75rem;
    }

    .sat-bar-wrap {
        flex: 1 1 60px;
    }

    .sat-label {
        font-size: 0.78rem;
    }

    .country-map-label {
        font-size: 0.9rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .share-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .econ-chart-box {
        padding: 1rem;
    }

    .country-meta {
        flex-direction: column;
    }

    .country-meta-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .score-row {
        flex-wrap: wrap;
    }

    .score-label {
        min-width: 100%;
        margin-bottom: 0.25rem;
    }

    .score-bar-track {
        min-width: 0;
    }

    .pillar-tabs {
        gap: 0.3rem;
    }

    .pillar-tab {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .ranking-table {
        font-size: 0.85rem;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 0.5rem;
    }

    .econ-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .econ-metrics-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .econ-metrics-4 .econ-metric-label {
        white-space: normal;
    }

    .econ-metric-value {
        font-size: 1.2rem;
    }

    .econ-metric {
        padding: 0.85rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
    }

    .econ-charts {
        grid-template-columns: 1fr;
    }

    .map-wrapper iframe {
        height: 400px;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    /* hamburger handles nav on mobile */

    .country-name {
        font-size: 1.3rem;
    }

    .country-section {
        padding: 0.75rem 0.75rem;
    }

    .meta-card {
        padding: 0.75rem;
    }

    .meta-value {
        font-size: 1.2rem;
    }

    .econ-metric-value {
        font-size: 1rem;
    }

    .econ-metric {
        padding: 0.65rem;
    }

    .trade-tag {
        font-size: 0.85rem;
        padding: 0.35rem 0.75rem;
    }

    .currency-box {
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .currency-symbol-big {
        font-size: 1.5rem;
    }

    .scores-heading {
        font-size: 1.2rem;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .meta-card {
        min-width: auto;
        width: 100%;
    }

    .country-selector-panel {
        position: fixed;
        top: 50%;
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
        width: auto;
        max-height: 70vh;
        border-radius: 12px;
        z-index: 3000;
    }


    .compare-picker {
        flex-direction: column;
        align-items: stretch;
    }

    .compare-picker select {
        min-width: auto;
        width: 100%;
    }

    .compare-bar-name {
        min-width: 60px;
        font-size: 0.7rem;
    }

    .econ-metrics-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Info Button & Tooltip ===== */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--un-blue);
    background: transparent;
    color: var(--un-blue);
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    cursor: pointer;
    margin-left: 0.35rem;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.info-btn:hover,
.info-btn.active {
    background: var(--un-blue);
    color: var(--white);
}

#gpb-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 300px;
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-gray, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    display: none;
    pointer-events: none;
}

#gpb-tooltip.visible {
    display: block;
}

[dir="rtl"] .info-btn {
    margin-left: 0;
    margin-right: 0.35rem;
}

@media (max-width: 768px) {
    #gpb-tooltip {
        max-width: calc(100vw - 2rem);
    }
}

/* ===== Summary Box ===== */
/* --- Country summary (icon-per-line) --- */
.summary-box {
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f7fa 100%);
    border: 1px solid rgba(0, 158, 219, 0.15);
    border-left: 4px solid var(--un-blue);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.summary-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.35rem 0;
}

.summary-line + .summary-line {
    border-top: 1px solid rgba(0, 158, 219, 0.08);
}

.summary-icon {
    flex-shrink: 0;
    font-size: 1rem;
    width: 1.4rem;
    text-align: center;
}

.summary-line strong {
    color: var(--dark-blue);
}

/* --- World summary (editorial column) --- */
.summary-box--editorial {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f4f8 100%);
    border: none;
    border-left: 4px solid var(--un-blue);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-dark);
    box-shadow: 0 2px 12px rgba(0, 83, 159, 0.06);
}

.summary-box--editorial p {
    margin: 0 0 0.9rem 0;
    text-align: justify;
}

.summary-box--editorial p:last-child {
    margin-bottom: 0;
}

.summary-box--editorial p:first-child::first-letter {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--un-blue);
    float: left;
    line-height: 1;
    margin-right: 0.12em;
    margin-top: 0.05em;
}

.summary-box--editorial strong {
    color: var(--dark-blue);
    font-weight: 700;
}

.summary-cta {
    font-style: italic;
    color: var(--un-blue);
    font-weight: 600;
    text-align: center !important;
    border-top: 1px solid rgba(0, 158, 219, 0.12);
    padding-top: 0.9rem;
    margin-top: 0.4rem;
}

[dir="rtl"] .summary-box,
[dir="rtl"] .summary-box--editorial {
    border-left: none;
    border-right: 4px solid var(--un-blue);
}

[dir="rtl"] .summary-box--editorial p {
    text-align: right;
}

[dir="rtl"] .summary-box--editorial p:first-child::first-letter {
    float: right;
    margin-right: 0;
    margin-left: 0.12em;
}

@media (max-width: 768px) {
    .summary-box {
        padding: 1rem 1.25rem;
        font-size: 0.88rem;
    }
    .summary-line {
        gap: 0.5rem;
    }
    .summary-box--editorial {
        padding: 1.25rem 1.35rem;
        font-size: 0.92rem;
        line-height: 1.75;
    }
    .summary-box--editorial p:first-child::first-letter {
        font-size: 1.8em;
    }
}

/* ===== Country Images ===== */

/* Hero image on country detail page */
.country-hero-img-wrap {
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 94, 135, 0.10);
    background: var(--bg-light);
}
.country-hero-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

/* Thumbnail in ranking tables */
.rank-thumb {
    width: 28px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    background: #f0f0f0;
}
.rank-country-link {
    display: inline-flex;
    align-items: center;
}

/* RTL support for images */
[dir="rtl"] .rank-thumb {
    margin-right: 0;
    margin-left: 0.5rem;
}

@media (max-width: 600px) {
    .country-hero-img-wrap {
        max-height: 160px;
        border-radius: 8px;
    }
    .country-hero-img {
        height: 160px;
        border-radius: 8px;
    }
    .rank-thumb {
        width: 24px;
        height: 17px;
    }
}
