/* ==========================================================================
   Regional Economic Index — page-specific styles
   ========================================================================== */

/* Intro / Hero Banner */
.rei-intro h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ink);
}

.rei-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: #4721c4;
  border-color: #4721c4;
  box-shadow: 0 4px 12px rgba(91, 43, 224, 0.2);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: var(--bg-lavender);
  color: var(--primary);
}

/* Composite performances card */
.composite-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.composite-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

.composite-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.composite-card .card-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.composite-card .card-head span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.composite-card .trend-up {
  font-size: 1.5rem;
}

.composite-progress {
  margin-bottom: 1.5rem;
}

.composite-progress .pct {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.composite-progress .track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-lavender);
  overflow: hidden;
}

.composite-progress .fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.composite-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.composite-split .mini {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  background: #fbfbfd;
}

.composite-split .mini .k {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.composite-split .mini .v {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 0.4rem;
}

/* Index Components list style inside Intro column */
.index-components-block {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(91, 43, 224, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.index-components-block .comp-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.comp-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.comp-item {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.comp-item i {
  color: var(--primary);
  font-size: 0.95rem;
}

/* Feature image container & overlay */
.rei-photo-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
}

.rei-photo-container:hover {
  transform: translateY(-4px);
}

.rei-photo {
  position: relative;
  width: 100%;
}

.rei-photo img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.rei-photo .overlay-stat {
  position: absolute;
  inset-inline-end: 1rem;
  bottom: 1rem;
  background: #4c9a2a;
  color: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 80%;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.rei-photo .overlay-stat .k {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  font-weight: 600;
}

.rei-photo .overlay-stat .v {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.25rem 0;
}

.rei-photo .overlay-stat p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  margin: 0;
  line-height: 1.4;
}

/* Chart card */
.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.chart-card .chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.chart-card .chart-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.chart-card .legend {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.chart-card .legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-card .legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.chart-card .legend .dot.hi {
  background: var(--primary);
}

.chart-card .legend .dot.lo {
  background: #c4b5fd;
}

/* Dynamic CSS Bar Chart (4 vertical bars for Regional Trade Distribution) */
.css-bar-chart {
  width: 100%;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
  position: relative;
}

.chart-bars-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 100%;
  width: 100%;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 15%;
  justify-content: flex-end;
  position: relative;
}

.bar-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.chart-bar {
  width: 100%;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  transition: height 0.5s ease, opacity 0.3s;
}

.chart-bar.current {
  background: var(--primary);
  opacity: 0.95;
}

.chart-bar:hover {
  opacity: 1;
  transform: scaleY(1.02);
}

.chart-bar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  position: absolute;
  bottom: -20px;
  white-space: nowrap;
}

/* SVG Line Chart for Growth Matrix Trend */
.svg-line-chart-container {
  width: 100%;
  padding: 1rem 0 2rem;
}

.svg-line-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* SME Section Metric Items */
.section-side h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  margin-bottom: 1rem;
}

.growth-metric {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  border-inline-start: 4px solid var(--primary);
  padding: 0.5rem 0 0.5rem 1rem;
  margin-bottom: 1.25rem;
  background: #fbfbfd;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.growth-metric i {
  color: var(--primary);
  font-size: 1.3rem;
  margin-top: 0.15rem;
}

.growth-metric strong {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.growth-metric span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* KPI mini cards */
.kpi-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
}

.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-lavender);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.kpi-card .kpi-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.kpi-card .kpi-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0.5rem 0;
}

.kpi-card .kpi-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.donut-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: 100%;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.donut-card:hover {
  transform: translateY(-4px);
}

.donut-card .donut-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.donut-card .donut-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.donut-card .donut-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-inline-end: 0.25rem;
}

/* Investment table block */
.invest-table-block {
  background: #fbfbfd;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.invest-table-block .tb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.invest-table-block .tb-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.invest-table-block table {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.invest-table-block th {
  background: #f9fafb;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 1rem;
  border-bottom: 2px solid var(--border);
}

.invest-table-block td,
.invest-table-block tbody th {
  padding: 1.25rem 1rem;
  font-size: 0.88rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.invest-table-block tbody tr:last-child td,
.invest-table-block tbody tr:last-child th {
  border-bottom: none;
}

.invest-table-block .growth-pos {
  color: #10b981;
  font-weight: 700;
}

.btn-dark {
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.2rem;
  transition: all 0.3s;
}

.btn-dark:hover {
  background: #000;
  transform: translateY(-2px);
}

/* Active Sectors progress bars */
.sector-bars .bar-row {
  margin-bottom: 1.25rem;
}

.sector-bars .bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.sector-bars .bar-label .pct {
  color: var(--primary);
  font-weight: 700;
}

.sector-bars .track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-lavender);
  overflow: hidden;
}

.sector-bars .fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.sector-donut-card {
  padding: 2rem;
}

/* SVG Donut Chart */
.svg-donut-container {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  position: relative;
}

.svg-donut-container.scale-medium {
  width: 120px;
  height: 120px;
}

.svg-donut-container.scale-large {
  width: 160px;
  height: 160px;
}

.svg-donut {
  width: 100%;
  height: 100%;
}

.donut-ring {
  stroke: #f3f4f6;
}

.donut-segment {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.donut-percent {
  font-size: 7.5px;
  font-family: inherit;
  fill: var(--ink);
  dominant-baseline: middle;
}

.donut-percent.font-large {
  font-size: 8.5px;
}

/* Dark Band for Events */
.dark-events-band {
  background: #0a0118 !important;
  color: #fff;
  padding: 5rem 0;
}

.dark-events-band h2 .grad {
  color: #5b2be0 !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  font-weight: 800;
  font-size: 2.2rem;
}

/* Timeline Cards */
.timeline-event-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: 100%;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-event-card .event-indicator {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.timeline-event-card .indicator-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(91, 43, 224, 0.2);
  border: 1px solid var(--primary);
  position: relative;
  display: inline-block;
}

.timeline-event-card .indicator-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.timeline-event-card .indicator-dot.green {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.timeline-event-card .indicator-dot.green::after {
  background: #10b981;
}

.timeline-event-card .event-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-event-card .quarter {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  text-transform: uppercase;
}

.timeline-event-card .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.timeline-event-card .num.text-green {
  color: #10b981 !important;
}

.timeline-event-card .label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.4;
}

.timeline-event-card:hover,
.timeline-event-card.active {
  background: rgba(91, 43, 224, 0.08);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(91, 43, 224, 0.2);
  transform: translateY(-4px);
}

.timeline-event-card.active {
  border-color: #10b981;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

/* Tourism Activity Tiles */
.tourism-tile {
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.tourism-tile:hover {
  transform: translateY(-4px);
}

.tourism-tile.green {
  background: #114a31; /* Premium deep green */
}

.tourism-tile.green,
.tourism-tile.green .tile-title,
.tourism-tile.green .tile-value,
.tourism-tile.green .tile-desc {
  color: #ffffff !important;
}

.tourism-tile.purple {
  background: #5b2be0; /* Premium deep violet */
}

.tourism-tile.purple,
.tourism-tile.purple .tile-title,
.tourism-tile.purple .tile-value,
.tourism-tile.purple .tile-desc {
  color: #ffffff !important;
}

.tourism-tile.yellow {
  background: #fef08a; /* Premium soft yellow */
  color: #1e1b4b;
}

.tourism-tile .tile-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

.tourism-tile .tile-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.tourism-tile .tile-desc {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.4;
  margin: 0;
  margin-top: auto;
}

.tourism-tile.yellow .tile-title {
  color: #1e1b4b;
  opacity: 0.85;
}

.tourism-tile.yellow .tile-value {
  color: #1e1b4b;
}

.tourism-tile.yellow .spend-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  width: 100%;
}

.tourism-tile.yellow .spend-row {
  width: 100%;
}

.tourism-tile.yellow .spend-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1e1b4b;
}

.tourism-tile.yellow .track {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(30, 27, 75, 0.1);
  overflow: hidden;
}

.tourism-tile.yellow .fill {
  height: 100%;
  background: #1e1b4b;
  border-radius: var(--radius-pill);
}

/* Job Opportunities Cards */
.job-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.job-card .job-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.job-card .job-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 0.25rem 0;
}

.job-card .job-trend {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
}

.job-card .job-trend.green {
  color: #16a34a;
}
