/* --- Layout Wrappers --- */
.dummy-paragraph-wrapper {
  margin-bottom: 1.5rem;
}
.board-widget-wrapper {
  margin-bottom: 2rem;
}
.stats-section {
  margin-top: 2rem;
}
.chart-section {
  margin-top: 3rem;
}

/* --- Stats Grid --- */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px auto;
}
.stat-item {
  border-radius: 4px;
  display: flex;
  align-items: center;
  width: 25%;
  padding: 10px;
}
@media (max-width: 576px) {
  .stat-item {
    width: 100%;
  }
}
@media (min-width: 576px) and (max-width: 768px) {
  .stat-item {
    width: 50%;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .stat-item {
    width: 33.33%;
  }
}

.icon-box {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  max-width: 50px;
  max-height: 50px;
  background-color: #00b798;
  color: #fff;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 10px;
  flex-shrink: 0;
}

.icon-box i {
  font-size: 24px;
}
.stat-text {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.stat-title {
  font-size: 12px;
  color: #333;
  margin-bottom: 2px;
}
.stat-value {
  font-size: 16px;
  font-weight: bold;
  color: #014751;
}

/* --- Chart Section --- */
#chart-container svg {
  width: 100%;
  z-index: 0;
}
@media only screen and (max-width: 768px) {
  #chart-container {
    overflow: scroll;
    max-width: 32rem;
  }
}
@media only screen and (min-width: 1200px) {
  #chart-container svg {
    padding: 0 1rem;
  }
}

/* --- Skeleton & Animation --- */
.skeleton {
  background: #e0e0e0;
  border-radius: 5px;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* --- Iran Map Styling --- */
.IranMap {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.IranMap .map svg {
  width: 100%;
  z-index: 0;
  height: auto;
  display: block;
}
.prov-path-wrapper {
  fill: #dcdcdc;
  transition: all 0.3s;
}
.prov-path-wrapper.active,
.prov-path-wrapper:hover,
.prov-path-wrapper:focus {
  fill: #014751;
}
/* ==== CHART FIXES ==== */
.chart-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 2rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-wrapper svg {
  width: 100%;
  height: auto;
  min-height: 350px;
  max-width: 1000px;
}

.chart-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #014751;
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-wrapper {
    padding: 0.5rem;
  }
  .chart-wrapper svg {
    min-height: 280px;
  }
}

/* ==== FIX ABSOLUTE SVG POSITION ==== */
#chart-container {
  position: relative; /* keep as layout reference */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

#chart-container svg {
  position: static !important; /* overrides absolute from JS */
  width: 100% !important;
  height: auto !important;
  display: block;
}

@media (max-width: 768px) {
  #chart-container {
    padding: 0.5rem;
  }
  #chart-container svg {
    min-height: 280px;
  }
}

/* === Skeleton Bar Chart === */
.skeleton-bar-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: 1000px;
  height: 300px;
  padding: 1rem;
  margin: 0 auto;
}

.skeleton-bar {
  width: 10%;
  background-color: #e0e0e0;
  border-radius: 4px;
  animation: pulse 1.5s infinite ease-in-out;
}
