/* =====================================================
   RelocateMe — Destination Profile CSS (LTR/English)
   ===================================================== */

:root {
    --color-bg:           #F4EFE8;
    --color-bg-dark:      #0D1B2A;
    --color-bg-card:      #FFFFFF;
    --color-bg-section:   #EDE8E0;
    --color-bg-overlay:   rgba(13,27,42,0.96);
    --color-primary:      #2E9E5E;
    --color-primary-light:#5DC48A;
    --color-primary-hover:#1A7840;
    --color-accent:       #F5C842;
    --color-green:        #2E9E5E;
    --color-red:          #B04040;
    --color-text:         #1A1A1A;
    --color-text-muted:   #5A5A5A;
    --color-text-white:   #FFFFFF;
    --color-border:       rgba(0,0,0,0.09);
    --font-sans:          'Space Grotesk', sans-serif;
    --sp-xs:  4px;  --sp-sm:  8px;  --sp-md: 16px;
    --sp-lg: 24px;  --sp-xl: 40px;  --sp-2xl: 64px;
    --r-sm:  6px;   --r-md:  12px;  --r-lg:  20px;  --r-full: 9999px;
    --sh-sm: 0 1px 4px rgba(0,0,0,0.07);
    --sh-md: 0 4px 16px rgba(0,0,0,0.1);
    --sh-lg: 0 12px 36px rgba(0,0,0,0.14);
    --header-h: 64px;
    --tf: 0.15s ease;
    --tb: 0.25s ease;
    --ts: 0.38s cubic-bezier(.25,.46,.45,.94);
}

html[data-theme="dark"] {
    --color-bg:         #0D1B2A;
    --color-bg-card:    #112035;
    --color-bg-section: #0A1520;
    --color-text:       #E8E0D4;
    --color-text-muted: #8A9BB0;
    --color-border:     rgba(255,255,255,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    direction: ltr;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* ===== Skip link ===== */
.skip-link {
    position: absolute; top: -100%; left: 0;
    background: var(--color-primary); color: #fff;
    padding: 8px 16px; font-weight: 600; text-decoration: none;
    z-index: 10000; border-radius: 0 0 var(--r-sm) var(--r-sm);
    transition: top var(--tf);
}
.skip-link:focus { top: 0; outline: 3px solid var(--color-accent); }

/* ===== Header ===== */
#dest-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: background var(--tb), box-shadow var(--tb);
}
#dest-header.scrolled {
    background: rgba(244,239,232,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--sh-sm);
}
html[data-theme="dark"] #dest-header { background: var(--color-bg-dark); }
html[data-theme="dark"] #dest-header.scrolled { background: rgba(13,27,42,0.9); }

.dest-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-lg);
}
.dest-logo {
    display: flex; align-items: center; gap: var(--sp-sm);
    text-decoration: none; flex-shrink: 0;
}
.dest-logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.dest-logo-text {
    font-family: var(--font-sans); font-size: 1.15rem; font-weight: 700;
    color: var(--color-text); letter-spacing: -0.02em; line-height: 1;
}
.dest-logo-text span { color: var(--color-primary); }

.dest-nav ul { display: flex; align-items: center; gap: var(--sp-xl); list-style: none; }
.dest-nav a {
    font-size: 0.9375rem; font-weight: 500; color: var(--color-text-muted);
    text-decoration: none; transition: color var(--tf);
}
.dest-nav a:hover { color: var(--color-primary); }
.dest-nav a.active { color: var(--color-primary); font-weight: 600; }

.dark-mode-btn {
    width: 38px; height: 38px; border-radius: var(--r-full);
    border: 1px solid var(--color-border); background: transparent;
    color: var(--color-text-muted); cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--tf), color var(--tf);
    touch-action: manipulation;
}
.dark-mode-btn:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

@media (max-width: 768px) {
    .dest-nav { display: none; }
}

/* ===== Hero ===== */
#profile-hero {
    padding-top: var(--header-h);
    background: linear-gradient(160deg, #0A1520 0%, #112030 50%, #0D1B2A 100%);
    position: relative; overflow: hidden;
}
#profile-hero::before {
    content: ''; position: absolute; top: -120px; right: -80px;
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(192,98,47,0.12) 0%, transparent 65%);
    pointer-events: none;
}
#profile-hero::after {
    content: ''; position: absolute; bottom: -60px; left: -60px;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245,200,66,0.07) 0%, transparent 65%);
    pointer-events: none;
}

.hero-breadcrumb {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: var(--sp-sm);
    max-width: 1200px; margin: 0 auto;
    padding: var(--sp-lg) var(--sp-lg) 0;
    font-size: 0.8125rem; color: rgba(255,255,255,0.45);
}
.hero-breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color var(--tf); }
.hero-breadcrumb a:hover { color: var(--color-primary-light); }
.hero-breadcrumb .sep { margin: 0 2px; }

.hero-body {
    position: relative; z-index: 1;
    max-width: 1200px; margin: 0 auto;
    padding: var(--sp-xl) var(--sp-lg) var(--sp-2xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-2xl);
    align-items: start;
}
.hero-left { display: flex; flex-direction: column; gap: var(--sp-lg); }
.hero-top-row { display: flex; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; }
.hero-flag {
    flex-shrink: 0; width: 140px; height: 93px;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 2px rgba(255,255,255,0.22);
}
.hero-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-name-block { flex: 1; min-width: 0; }
.hero-region-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.65); font-size: 0.8125rem; font-weight: 500;
    padding: 4px 12px; border-radius: var(--r-full); margin-bottom: var(--sp-sm);
}
.hero-country-name {
    font-family: var(--font-sans);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800; color: #fff; line-height: 1.1;
}
.hero-capital {
    font-size: 0.9375rem; color: rgba(255,255,255,0.5);
    margin-top: var(--sp-sm); display: flex; align-items: center; gap: 6px;
}
.hero-right { display: flex; flex-direction: column; align-items: center; gap: var(--sp-md); }

.score-ring-wrap { position: relative; width: 110px; height: 110px; }
.score-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring-bg  { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 7; }
.score-ring-fill {
    fill: none; stroke: var(--color-accent); stroke-width: 7; stroke-linecap: round;
    stroke-dasharray: 298.45; stroke-dashoffset: 298.45;
}
.score-ring-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-big { font-family: var(--font-sans); font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.score-label { font-size: 0.65rem; color: rgba(255,255,255,0.5); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; }

.hero-stats-strip { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.hero-stat {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-md); padding: var(--sp-md) var(--sp-lg);
    min-width: 130px; flex: 1;
}
.hero-stat-icon { font-size: 1.1rem; margin-bottom: 4px; }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.hero-stat-value { font-family: var(--font-sans); font-size: 1.25rem; font-weight: 700; color: #fff; }

@media (max-width: 768px) {
    .hero-body { grid-template-columns: 1fr; gap: var(--sp-xl); }
    .hero-right { flex-direction: row; justify-content: center; }
}

/* ===== Tabs ===== */
#tabs-bar {
    position: sticky; top: var(--header-h); z-index: 900;
    background: var(--color-bg-card); border-bottom: 1px solid var(--color-border);
    box-shadow: var(--sh-sm);
}
html[data-theme="dark"] #tabs-bar { background: var(--color-bg-dark); }
.tabs-inner {
    display: flex; overflow-x: auto;
    max-width: 1200px; margin: 0 auto;
    padding: 0 var(--sp-lg);
    scrollbar-width: none;
    gap: 4px;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab-btn {
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; padding: 16px 20px;
    border: none; background: none; cursor: pointer;
    font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2.5px solid transparent;
    transition: color var(--tf), border-color var(--tf);
    touch-action: manipulation;
}
.tab-btn:hover { color: var(--color-primary); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-icon { font-size: 1rem; }
.tab-count {
    font-size: 0.7rem; font-weight: 700; line-height: 1;
    background: var(--color-bg-section); color: var(--color-text-muted);
    border-radius: var(--r-full); padding: 2px 7px; margin-left: 2px;
}
.tab-btn.active .tab-count { background: rgba(192,98,47,0.12); color: var(--color-primary); }

/* ===== Tab panels ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Section wrapper ===== */
.section-wrap { max-width: 1200px; margin: 0 auto; padding: var(--sp-2xl) var(--sp-lg); }
.section-heading {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: var(--sp-xl); flex-wrap: wrap; gap: var(--sp-md);
}
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.section-sub { font-size: 0.9375rem; color: var(--color-text-muted); }

/* ===== Cards ===== */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}
html[data-theme="dark"] .card { background: #112035; border-color: rgba(255,255,255,0.07); }
.card-pad { padding: var(--sp-xl); }
.card-title {
    font-size: 1rem; font-weight: 700; color: var(--color-text);
    margin-bottom: var(--sp-lg);
}

/* ===== Overview grid ===== */
.overview-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg); margin-bottom: var(--sp-xl);
}
@media (max-width: 768px) { .overview-grid { grid-template-columns: 1fr; } }
.radar-wrap { display: flex; flex-direction: column; }
#radar-svg { flex: 1; min-height: 280px; color: var(--color-text); }

/* ===== Score bars ===== */
.score-row {
    display: flex; align-items: center; gap: var(--sp-md);
    padding: 8px 0; border-bottom: 1px solid var(--color-border);
}
.score-row:last-child { border-bottom: none; }
.score-name { font-size: 0.875rem; font-weight: 500; color: var(--color-text); width: 130px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 8px; background: var(--color-bg-section); border-radius: var(--r-full); overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: var(--r-full); background: var(--color-green); }
.score-bar-fill.high   { background: #2E9E5E; }
.score-bar-fill.medium { background: #F5C842; }
.score-bar-fill.low    { background: #C0622F; }
.score-val { font-size: 0.875rem; font-weight: 700; width: 28px; text-align: right; }
.score-val.high   { color: #2E9E5E; }
.score-val.medium { color: #b89000; }
.score-val.low    { color: #C0622F; }

/* ===== Pros/Cons ===== */
.pros-cons-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); margin-bottom: var(--sp-xl); }
@media (max-width: 600px) { .pros-cons-row { grid-template-columns: 1fr; } }
.pc-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--r-lg); padding: var(--sp-xl); }
html[data-theme="dark"] .pc-card { background: #112035; border-color: rgba(255,255,255,0.07); }
.pc-pros { border-top: 3px solid var(--color-green); }
.pc-cons { border-top: 3px solid var(--color-primary); }
.pc-head { font-size: 0.9375rem; font-weight: 700; color: var(--color-text); margin-bottom: var(--sp-md); }
.pc-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-sm); }
.pc-list li { font-size: 0.875rem; color: var(--color-text); line-height: 1.6; padding-left: 16px; position: relative; }
.pc-pros .pc-list li::before { content: '✓'; position: absolute; left: 0; color: var(--color-green); font-weight: 700; }
.pc-cons .pc-list li::before { content: '✗'; position: absolute; left: 0; color: var(--color-primary); font-weight: 700; }

/* ===== Tip card ===== */
.tip-card {
    background: rgba(192,98,47,0.06); border: 1px solid rgba(192,98,47,0.18);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--r-md); padding: var(--sp-lg) var(--sp-xl);
}
.tip-label { font-size: 0.8125rem; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; letter-spacing: 0.04em; }
.tip-text { font-size: 0.9375rem; color: var(--color-text); line-height: 1.75; }

/* ===== Immigration ===== */
.proc-banner {
    display: flex; align-items: center; gap: var(--sp-md);
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--r-md); padding: var(--sp-lg) var(--sp-xl);
    margin-bottom: var(--sp-lg); box-shadow: var(--sh-sm);
}
html[data-theme="dark"] .proc-banner { background: #112035; border-color: rgba(255,255,255,0.07); }
.proc-icon { font-size: 2rem; flex-shrink: 0; }
.proc-label { font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 500; margin-bottom: 4px; }
.proc-value { font-size: 1.25rem; font-weight: 700; color: var(--color-text); }

.visa-card-grid { display: flex; flex-wrap: wrap; gap: var(--sp-md); }
.visa-card-item {
    display: flex; align-items: center; gap: var(--sp-sm);
    background: var(--color-bg-section); border-radius: var(--r-md);
    padding: var(--sp-sm) var(--sp-md); flex: 1; min-width: 200px;
}
.visa-card-num {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--color-primary); color: #fff;
    font-size: 0.8125rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.visa-card-text { font-size: 0.875rem; font-weight: 500; color: var(--color-text); }

.imm-mid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); margin-top: var(--sp-lg); }
@media (max-width: 768px) { .imm-mid { grid-template-columns: 1fr; } }

/* Timeline */
.timeline {
    display: flex; align-items: flex-start; gap: 0;
    padding: var(--sp-lg) 0; overflow-x: auto;
}
.tl-step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 60px; }
.tl-dot {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--color-bg-section); border: 2px solid var(--color-border);
    font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted);
    display: flex; align-items: center; justify-content: center;
}
.tl-dot.start { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tl-label { font-size: 0.7rem; color: var(--color-text-muted); text-align: center; line-height: 1.3; }
.tl-line { flex: 1; height: 2px; background: var(--color-border); align-self: center; min-width: 20px; margin: 0 4px; }

.dual-badge {
    display: block; margin-top: var(--sp-md);
    font-size: 0.875rem; font-weight: 600;
}
.dual-yes { color: var(--color-green); }
.dual-no  { color: var(--color-primary); }

.imm-detail-grid { display: flex; flex-direction: column; gap: var(--sp-md); }
.imm-detail-card {
    background: var(--color-bg-section); border-radius: var(--r-md);
    padding: var(--sp-md) var(--sp-lg);
}
.idc-label { font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 600; margin-bottom: 4px; }
.idc-text  { font-size: 0.9375rem; color: var(--color-text); font-weight: 500; }

/* ===== Finance grid ===== */
.finance-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--sp-md); margin-bottom: var(--sp-xl);
}
.fin-card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--r-md); padding: var(--sp-lg);
    box-shadow: var(--sh-sm);
}
html[data-theme="dark"] .fin-card { background: #112035; border-color: rgba(255,255,255,0.07); }
.fin-label { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 6px; font-weight: 500; }
.fin-value { font-size: 1.25rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.fin-sub   { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 3px; }

/* ===== Climate & lifestyle ===== */
.lifestyle-section { margin-bottom: var(--sp-xl); }
.lifestyle-section-title { font-size: 1rem; font-weight: 700; color: var(--color-text); margin-bottom: var(--sp-lg); }
.climate-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--sp-md);
}
.climate-card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--r-md); padding: var(--sp-lg);
    text-align: center; box-shadow: var(--sh-sm);
}
html[data-theme="dark"] .climate-card { background: #112035; border-color: rgba(255,255,255,0.07); }
.climate-icon  { font-size: 1.5rem; margin-bottom: 8px; }
.climate-label { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 4px; }
.climate-value { font-size: 1.25rem; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.climate-sub   { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 3px; }

.aqi-good { color: #2E9E5E; }
.aqi-fair { color: #b89000; }
.aqi-poor { color: #C0622F; }

.quality-list { display: flex; flex-direction: column; gap: var(--sp-sm); }
.quality-row { display: flex; align-items: center; gap: var(--sp-md); padding: 6px 0; }
.quality-name { font-size: 0.875rem; font-weight: 500; color: var(--color-text); width: 120px; flex-shrink: 0; }

/* Internet bar */
.inet-bar-track { width: 100%; height: 6px; background: var(--color-bg-section); border-radius: var(--r-full); overflow: hidden; }
.inet-bar-fill  { height: 100%; border-radius: var(--r-full); background: var(--color-green); }

/* ===== Practical grid ===== */
.practical-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-md); margin-top: var(--sp-lg); }
.prac-card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: var(--r-md); padding: var(--sp-xl);
    text-align: center; box-shadow: var(--sh-sm);
}
html[data-theme="dark"] .prac-card { background: #112035; border-color: rgba(255,255,255,0.07); }
.prac-icon  { font-size: 1.75rem; margin-bottom: var(--sp-sm); }
.prac-label { font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 600; margin-bottom: var(--sp-sm); }
.prac-value { font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.prac-unit  { font-size: 0.9rem; font-weight: 400; }
.prac-sub   { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 4px; }

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .card-pad { padding: var(--sp-lg); }
    .section-wrap { padding: var(--sp-xl) var(--sp-md); }
    .hero-body { padding: var(--sp-lg) var(--sp-md) var(--sp-xl); }
    .hero-flag { width: 100px; height: 66px; }
    .hero-country-name { font-size: 2rem; }
    .score-name { width: 100px; font-size: 0.8125rem; }
    .finance-grid { grid-template-columns: repeat(2, 1fr); }
}
