/* ========================================================
 Project Information
========================================================
 Project Name : DNCC AQI Measurement Dashboard
 Instructed By: Atiqur Rahman
 Developer    : Sayed Ahammad Sani
 Website      : https://variationbd.com
 Contact      : 01332527540
 Version      : 1.0.0
 Year         : 2026

 Description:
 This website/application is developed by Variation 
 Communications Limited. Unauthorized use or duplication 
 is strictly prohibited.
======================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1e3a8a;
  --white: #ffffff;
  --border: #e2e8f0;
  --good: #2b7e3a;
  --moderate: #e6b422;
  --caution: #e67e22;
  --unhealthy: #c0392b;
  --very-unhealthy: #8e44ad;
  --extremely-unhealthy: #7b2d26;
  --aqi-blue: #0f2b6d;
  --footer-blue: #0a2540;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --text-muted: #5a6874;
}

/* Bilingual Logic */
[data-bn] {
  display: none;
}

[data-en] {
  display: inline;
}

body[data-lang="bn"] [data-bn] {
  display: inline;
}

body[data-lang="bn"] [data-en] {
  display: none;
}

body {
  font-weight: 400;
  font-style: normal;
  margin: 0;
  padding: 0;
  background: #f0f4f8;
  color: #1f2a3e;
  background-image: url("/Image/bg_main_july.gif");
  background-attachment: scroll;
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
}

/* English */
body[data-lang="en"] {
  font-family: "Times New Roman", sans-serif;
}

/* Bangla */
body[data-lang="bn"] {
  font-family: Kalpurush, serif;
}

.dashboard-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  background-color: #fff;
}

/* Header Section */
.top-header {
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.logo-img {
  width: 120px;
  height: auto;
  margin-bottom: 14px;
}

.top-header h1 {
  color: #0c4a6e;
  margin: 6px 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.subtitle {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 500;
  color: #2c3e4e;
}

.project-info {
  font-size: 13px;
  color: #5b6e8c;
  margin: 2px 0;
}

.lang-switch {
  position: absolute;
  top: 20px;
  right: 0;
  display: flex;
  gap: 8px;
}

.lang-switch button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 6px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: 0.2s;
  color: #1e3a8a;
}

body[data-lang="en"] #btn-en,
body[data-lang="bn"] #btn-bn {
  background: #1e3a8a;
  color: white;
  border-color: #1e3a8a;
}

/* AQI Info Box */
.aqi-info-box {
  background: linear-gradient(105deg, #112f4b 0%, #1b4a6e 100%);
  margin: 28px 0;
  padding: 28px 36px;
  border-radius: 8px;
  color: white;
  box-shadow: var(--card-shadow);
}

.aqi-info-box h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.aqi-info-box p {
  line-height: 1.6;
  font-size: 14.5px;
  text-align: justify;
  opacity: 0.92;
}

/* Row 1: Map + Table (side by side) */
.row-map-table {
  display: flex;
  gap: 28px;
  margin: 28px 0 40px;
  align-items: stretch;
}

/* Map Section - fixed width 540px, height 550px */
.map-section {
  width: 540px;
  height: 550px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #d9e2ef;
  position: relative;
  box-shadow: var(--card-shadow);
}

.map-placeholder {
  background-image: url("/Image/MAP-01.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Table Column */
.table-col {
  flex: 1;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 550px;
  box-shadow: var(--card-shadow);
}

.scrollable-table-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 12px;
}

thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  text-align: left;
  color: #1e3a5f;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

td {
  border-bottom: 1px solid #f0f2f5;
  font-size: 13.5px;
  font-weight: 500;
}

.aqi-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  min-width: 48px;
}

/* Row 2: Scale + Alert (side by side as 2 columns) */
.row-scale-alert {
  display: flex;
  gap: 28px;
  margin: 0 0 40px 0;
  align-items: stretch;
}

/* Scale Container */
.scale-container {
  flex: 1;
  background: white;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.scale-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 14px;
  color: #1f2a3e;
}

.scale-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.scale-box {
  text-align: center;
  padding: 10px 4px;
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

/* Alert Card */
.alert-card {
  flex: 1;
  border-radius: 8px;
  border: 1px solid #f0d6cc;
  background: #fff9f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.alert-header {
  background: #c93a2b;
  color: white;
  padding: 14px 12px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

.alert-body {
  padding: 22px 20px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aqi-value-large {
  font-size: 30px;
  font-weight: 800;
  color: #bc5a2c;
  margin-bottom: 8px;
}

.alert-status {
  font-weight: 800;
  font-size: 18px;
  color: #b4451a;
  background: #fee7e0;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 40px;
  margin: 10px auto;
}

.alert-description {
  color: #4a5a72;
  font-size: 13px;
  line-height: 1.55;
  margin: 14px 0 10px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.mask-prompt {
  background: #eef2fc;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  color: #1a4a7a;
  width: fit-content;
  align-self: center;
}

/* Health Table Section */
.health-section {
  margin-top: 24px;
  margin-bottom: 48px;
}

.health-title {
  text-align: center;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 24px;
  color: #1f4662;
}

.health-table-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
}

.health-table-wrapper th,
.health-table-wrapper td {
  padding: 8px 14px;
  font-size: 13px;
}

/* Footer & Partners */
.footer-logos {
  text-align: center;
  padding: 32px 0 20px;
  border-top: 1px solid #eef2ff;
}

.partner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.partner-row img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.dncc-footer-bar {
  background: #0a2540;
  padding: 24px 32px;
  border-radius: 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-left img {
  width: 44px;
  /* background: white; */
  border-radius: 12px;
  padding: 4px;
}

.footer-right {
  text-align: right;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.85;
}

.table-col {
  position: relative;
}

.aqi-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  z-index: 10;
}

/* Responsive */
@media (max-width: 1000px) {
  .dashboard-wrapper {
    padding: 0 20px;
  }

  .row-map-table {
    flex-direction: column;
    align-items: center;
  }

  .map-section {
    width: 100%;
    max-width: 540px;
  }

  .table-col {
    width: 100%;
  }

  .row-scale-alert {
    flex-direction: column;
  }
}

@media (max-width: 850px) {
  .scale-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dncc-footer-bar {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }

  th,
  td {
    padding: 8px 10px;
  }
}

/* Mobile: stack buttons vertically */
@media (max-width: 480px) {
  .lang-switch {
    flex-direction: column;
    align-items: stretch;
  }

  .lang-switch button {
    width: 100%;
    text-align: center;
  }
}
