@import url('https://fonts.googleapis.com/css2?family=Encode+Sans:wght@300;400;500;600;700;800;900&display=swap');

/* Bloomberg / Reuters Inspired Premium CSS Design System - Ocean Blue Theme */
:root {
  --bg-main: #081a33;           /* Deep Ocean Blue */
  --bg-card: #0f2b52;           /* Royal Blue Card */
  --bg-card-hover: #153869;     /* Highlight Ocean Blue */
  --border-color: rgba(59, 130, 246, 0.25);
  --border-color-hover: rgba(59, 130, 246, 0.6);
  
  /* Color Palette */
  --color-primary: #00f2fe;     /* Neon Cyan */
  --color-secondary: #3b82f6;   /* Ocean Blue */
  --color-accent: #ff7b00;      /* Bloomberg Orange */
  --color-success: #10b981;     /* Emerald Green */
  --color-warning: #facc15;     /* Yellow */
  --color-water-glow: rgba(0, 242, 254, 0.15);
  
  /* Text Colors */
  --text-primary: #f0f7ff;      /* Bright Ice Blue Text */
  --text-secondary: #b8d4f0;    /* Muted Ice Blue Text */
  --text-muted: #7ea7cf;        /* Muted Blue-gray */
  
  /* Fonts */
  --font-sans: 'Encode Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Encode Sans', sans-serif;
  
  /* Glow Effects */
  --cyan-glow: 0 0 15px rgba(0, 242, 254, 0.4);
  --orange-glow: 0 0 15px rgba(255, 123, 0, 0.4);
  --blue-glow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Base resets & Scrollbar */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 18px; /* Tăng cỡ chữ thêm 2px (từ 16px lên 18px) */
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #153869;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1e4f94;
}

/* Layout Utilities - Tăng kích thước lề 2 bên */
.container {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 4rem; /* Tăng lề 2 bên lên 4rem */
}

@media (max-width: 1024px) {
  .container {
    padding: 0 2rem; /* Giảm lề trên tablet */
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.2rem; /* Giảm lề trên mobile */
  }
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 0 3.5rem 0;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.2) 0%, rgba(8, 26, 51, 0) 75%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-meta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: 50%;
  box-shadow: var(--orange-glow);
}

.hero-title {
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 40%, #bfdbfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 850px;
  margin-bottom: 3rem;
  font-weight: 400;
  border-left: 3px solid var(--color-primary);
  padding-left: 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* KPI Dashboard Grid */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3.5rem;
}

@media (max-width: 768px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.kpi-card {
  background: linear-gradient(145deg, rgba(15, 43, 82, 0.9) 0%, rgba(9, 27, 51, 0.9) 100%);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 6px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 25px -10px rgba(0, 242, 254, 0.2);
}

.kpi-card:hover::before {
  transform: scaleX(1);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 0 10px rgba(255, 123, 0, 0.2);
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Sections General - Loại bỏ nhãn số SECTION 01... */
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.2rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 650px;
}

@media (max-width: 900px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* SECTION 2: MAP INTERACTION - Bản đồ GIS thiết kế theo trục dọc */
.map-layout {
  display: flex;
  flex-direction: column; /* Chuyển sang bố cục dọc */
  gap: 2.5rem;
  align-items: stretch;
}

.map-container {
  background: #061529;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  position: relative;
  width: 100%;
  height: 650px; /* Kéo dài chiều cao cố định để không bị trống quá lớn */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.map-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 25px 25px;
  pointer-events: none;
}

.map-svg {
  width: 100%;
  height: 100%;
  max-height: 650px;
}

/* Sidebar GIS dàn hàng ngang 3 cột bên dưới */
.gis-sidebar {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cụm xếp ngang */
  gap: 1.5rem;
}

@media (max-width: 950px) {
  .gis-sidebar {
    grid-template-columns: 1fr; /* Mobile trở lại dọc */
  }
}

.gis-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.gis-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gis-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gis-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  border: 1px solid transparent;
}

.gis-item:hover, .gis-item.active {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  padding-left: 0.65rem;
  color: #fff;
}

.gis-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

.gis-item[data-id="kimnguu-yenso"] .gis-bullet {
  background-color: var(--color-accent);
}

.gis-item[data-id*="thuyphuong"] .gis-bullet {
  background-color: var(--color-warning);
}

/* SECTION 3: VISUALIZATIONS */
.vis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 950px) {
  .vis-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.vis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2rem;
}

.vis-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-left: 3px solid var(--color-accent);
  padding-left: 0.75rem;
}

/* Timeline CSS */
.timeline-svg {
  width: 100%;
  height: auto;
}

/* Donut Chart CSS */
.donut-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
}

@media (max-width: 640px) {
  .donut-container {
    flex-direction: column;
    gap: 1.5rem;
  }
}

.donut-svg-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
}

.donut-chart {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-segment {
  fill: none;
  stroke-width: 22;
  cursor: pointer;
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.donut-segment:hover, .donut-segment.active {
  stroke-width: 26;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.1));
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 150px;
}

.donut-center-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
}

.donut-center-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05rem;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.legend-item:hover, .legend-item.active {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.08);
}

.legend-label-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* SECTION 4: CHI TIẾT 7 CÔNG TRÌNH (TRỤC DỌC - MỖI CÔNG TRÌNH 1 HÀNG) */
.cards-grid-vertical {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; /* Khoảng cách giữa các hàng card */
}

.card-project {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex; /* Bố cục hàng ngang */
  flex-direction: row;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.card-project::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--color-primary);
  z-index: 2;
}

.card-project.active {
  border-color: var(--color-primary);
  box-shadow: 0 10px 35px rgba(0, 242, 254, 0.15);
  transform: translateY(-4px);
}

.card-project.active::after {
  background-color: var(--color-accent);
}

.card-project:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Cột trái: Hình minh họa SVG to đẹp mắt hơn */
.card-svg-container {
  flex: 0 0 42%; /* Chiếm 42% chiều rộng card */
  background: #051326;
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

/* Cột phải: Nội dung chi tiết */
.card-content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 1.8rem 2rem 1.2rem 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: rgba(255, 123, 0, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(255, 123, 0, 0.3);
}

.card-body {
  padding: 1.8rem 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 cột trên card ngang rộng rãi */
  gap: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 600px) {
  .card-stats {
    grid-template-columns: repeat(2, 1fr); /* 2 cột trên màn hình nhỏ */
  }
}

.card-stat-item {
  display: flex;
  flex-direction: column;
}

.card-stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.card-stat-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
}

.card-stat-val.accent {
  color: var(--color-accent);
}

.card-roles {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-role-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.card-role-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-role-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.card-role-item::before {
  content: '✓';
  color: var(--color-success);
  font-weight: bold;
}

.card-callout {
  font-size: 0.85rem;
  background: rgba(0, 242, 254, 0.05);
  border-left: 3px solid var(--color-primary);
  padding: 0.6rem 1rem;
  border-radius: 0 4px 4px 0;
  color: var(--color-primary);
  font-weight: 500;
}

/* Responsive cho layout Card hàng ngang */
@media (max-width: 900px) {
  .card-project {
    flex-direction: column; /* Chuyển thành hàng dọc trên thiết bị nhỏ */
  }
  .card-svg-container {
    flex: 0 0 200px; /* Chiều cao cố định cho SVG */
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

/* SECTION 6: EXPECTED EFFECTS */
.effects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 950px) {
  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .effects-grid {
    grid-template-columns: 1fr;
  }
}

.effect-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.effect-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.15);
}

.effect-icon-wrapper {
  width: 50px;
  height: 50px;
  background: rgba(0, 242, 254, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.effect-icon-wrapper svg {
  width: 28px;
  height: 28px;
}

.effect-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.effect-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer styles */
.footer {
  background: #051326;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-source span {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right {
    align-items: flex-start;
  }
}

/* INTERACTION CLASSES & SVG ANIMATIONS */
.water-flow-line {
  stroke-dasharray: 8, 8;
  animation: flow 30s linear infinite;
}

.water-flow-line-fast {
  stroke-dasharray: 6, 6;
  animation: flow 15s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -1000;
  }
}

.pulse-node {
  animation: pulse 2s infinite alternate;
}

@keyframes pulse {
  0% {
    r: 5px;
    fill-opacity: 0.8;
  }
  100% {
    r: 12px;
    fill-opacity: 0.2;
  }
}

/* Map SVG GIS Points */
.gis-point {
  cursor: pointer;
  transition: all 0.3s ease;
}

.gis-point:hover .gis-center {
  fill: #fff;
  filter: drop-shadow(0 0 5px var(--color-primary));
}

.gis-point.active .gis-center {
  fill: var(--color-accent);
  filter: drop-shadow(0 0 8px var(--color-accent));
}

.gis-point.active .gis-halo {
  stroke: var(--color-accent);
  animation: mapPulse 1.5s infinite;
}

@keyframes mapPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Simple Tooltip */
.gis-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(10px);
}

.gis-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.gis-tooltip-title {
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.gis-tooltip-stat {
  color: var(--color-accent);
  font-weight: 700;
}
