/* =============================================
   Nepal Economic Survey 2082/83 - Main Styles
   Domain: economicsurvey83.msa.edu.np
   ============================================= */

:root {
  --primary: #003893;
  --secondary: #DC143C;
  --accent: #f59e0b;
  --accent2: #10b981;
  --bg-dark: #0a1628;
  --bg-card: #0f2040;
  --bg-card2: #162952;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(255,255,255,0.08);
  --gradient1: linear-gradient(135deg, #003893 0%, #1a5276 100%);
  --gradient2: linear-gradient(135deg, #DC143C 0%, #8b0000 100%);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-title {
  display: flex;
  flex-direction: column;
}

.nav-title span:first-child {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.nav-title span:last-child {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-download-btn {
  background: var(--gradient2) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.2rem !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  background: var(--bg-dark);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0,56,147,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(220,20,60,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(245,158,11,0.1) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0,56,147,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,56,147,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  animation: float 8s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(180deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220,20,60,0.15);
  border: 1px solid rgba(220,20,60,0.3);
  color: #ff6b6b;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s ease;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.9s ease;
}

.btn-primary {
  background: var(--gradient1);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,56,147,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,56,147,0.5);
}

.btn-secondary {
  background: rgba(220,20,60,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(220,20,60,0.4);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(220,20,60,0.25);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  animation: fadeInUp 1s ease;
}

.hero-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient1);
}

.hero-stat-card:nth-child(2)::before { background: var(--gradient2); }
.hero-stat-card:nth-child(3)::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
.hero-stat-card:nth-child(4)::before { background: linear-gradient(135deg, #10b981, #059669); }

.hero-stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.stat-change {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.3rem;
  display: block;
}

.stat-change.up { color: #10b981; }
.stat-change.down { color: #ef4444; }

/* ---- SECTION COMMONS ---- */
.section {
  padding: 5rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,56,147,0.2);
  border: 1px solid rgba(0,56,147,0.3);
  color: #60a5fa;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- CARDS ---- */
.cards-grid {
  display: grid;
  gap: 1.25rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-accent-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.card-value {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.6rem;
}

.badge-green { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-red { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-yellow { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-blue { background: rgba(96,165,250,0.15); color: #60a5fa; }

/* ---- CHART CONTAINERS ---- */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.chart-card:hover {
  border-color: rgba(255,255,255,0.1);
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.chart-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
}

.chart-container {
  position: relative;
  height: 280px;
}

.chart-container-lg {
  position: relative;
  height: 380px;
}

/* ---- TABS ---- */
.tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  padding: 0.4rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
}

/* ---- PROGRESS BARS ---- */
.progress-item {
  margin-bottom: 1.25rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.progress-value {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- TABLE ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead tr {
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-light);
}

.data-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- INFO DISCLAIMER ---- */
.disclaimer-banner {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.disclaimer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 0.82rem;
  color: #fcd34d;
  line-height: 1.6;
}

/* ---- FOOTER ---- */
.footer {
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-disclaimer {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  display: inline-block;
  font-size: 0.78rem;
  color: #fcd34d;
  margin-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- PAGE HERO ---- */
.page-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at center top, rgba(0,56,147,0.3) 0%, transparent 70%);
}

.page-hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.page-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ---- INSIGHT BOXES ---- */
.insight-box {
  background: rgba(96,165,250,0.07);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.insight-box.green {
  background: rgba(16,185,129,0.07);
  border-color: rgba(16,185,129,0.2);
}

.insight-box.yellow {
  background: rgba(245,158,11,0.07);
  border-color: rgba(245,158,11,0.2);
}

.insight-box.red {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.2);
}

.insight-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.insight-box .insight-title { color: #60a5fa; }
.insight-box.green .insight-title { color: #10b981; }
.insight-box.yellow .insight-title { color: #f59e0b; }
.insight-box.red .insight-title { color: #ef4444; }

.insight-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NEPAL FLAG COLORS ---- */
.flag-blue { color: var(--primary); }
.flag-red { color: var(--secondary); }
.flag-accent { color: var(--accent); }

/* ---- DONUT LEGEND ---- */
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: center;
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-val {
  font-weight: 700;
  color: var(--text-light);
  margin-left: auto;
}

/* ---- MOBILE NAV ---- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: rgba(10, 22, 40, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu a:hover { color: #fff; background: rgba(255,255,255,0.05); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-title { font-size: 2.4rem; }
  .hero-stats { max-width: 500px; }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
  .page-hero-title { font-size: 2rem; }
  .cards-grid-2, .cards-grid-3 { grid-template-columns: 1fr; }
  .chart-container, .chart-container-lg { height: 220px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .cards-grid-4 { grid-template-columns: 1fr; }
}

/* ---- SECTOR ICONS ---- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sector-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.sector-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: var(--shadow);
}

.sector-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.sector-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.sector-share {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.sector-growth {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- TIMELINE ---- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-dark);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}

.timeline-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- CALLOUT ---- */
.callout {
  background: var(--bg-card2);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.callout strong { color: var(--text-light); }

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,56,147,0.5);
  transition: all 0.3s ease;
  z-index: 900;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,56,147,0.6);
}

.back-to-top.visible { display: flex; }
