/* ---------------- Base Styles ---------------- */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body {
  background-color: #f2f2f2;
}

main {
  flex: 1;
}

/* ---------------- Header ---------------- */
header {
  background-color: #004080;
  color: white;
  padding: 1em 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
}

.nav-menu {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5em;
}

.nav-menu a:hover {
  text-decoration: underline;
}

.nav-menu a.active {
  font-weight: bold;
  border-bottom: 2px solid #ffcc00;
  color: #ffcc00;
}

/* ---------------- Banner ---------------- */
.banner {
  width: 100%;
  min-height: 100vh; 
  display: grid;     
  place-items: center;
  background-image: url('./images/mels.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------------- Service Box ---------------- */
.service-box {
  background-color: white;
  padding: 5em 2em;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 100%;
  width: 90%;
  margin: -5px auto 2em;
  
}

.intro-text {
  font-size: 1.2em;
  margin-bottom: 0.5em;
  color: #333;
}

.service-box hr {
  border: none;
  height: 1px;
  background-color: #ccc;
  margin-bottom: 1.5em;
}

.service-box h2 {
  margin-bottom: 1.5em;
  font-size: 1.4em;
  color: #004080;
}

.service-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
}

.service-button {
  flex: 1 1 200px;
  background-color: #0080ff;
  color: white;
  padding: 0.8em;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  text-align: center;
  transition: background-color 0.3s;
}

.service-button:hover {
  background-color: #005bb5;
}

/* ---------------- Content Layout ---------------- */
.content-container {
  position: relative;
  height: calc(100vh - 120px); 
}

/* Map stretches edge-to-edge */
#map {
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  width: 100%;
  height: 100%;
}

/* Filters float over the map */
#filters {
  position: absolute;
  top: 40px;
  right: 20px;
  width: 320px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  background: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #e6e6e6;
  z-index: 1000; 
}

/* Nicer labels & checkboxes */
#filters label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.75em;
  font-size: 1rem;
}

#filters input[type="checkbox"] {
  transform: scale(1.15);
  cursor: pointer;
}

/* ---------------- Mobile Friendly Adjustments ---------------- */
@media (max-width: 768px) {
  .content-container {
    height: auto;
    padding-bottom: 1rem;
  }
.service-box {
  background-color: white;
  padding: 5em 2em;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 90%;
  width: 90%;
  margin: 10vh auto 2em;

}


  #map {
    position: relative;
    height: 50vh;
    width: 100%;
  }

  #filters {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-height: none;
    margin-top: 1rem;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 1rem 0.5rem;
    background: transparent;
    overflow-y: visible;
    z-index: auto;
  }

  #filters label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}

/* ---------------- Footer ---------------- */
footer {
  background-color: #004080;
  color: white;
  text-align: center;
  padding: 0.4em 0; /* slimmer padding */
  font-size: 0.8rem; /* smaller text */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* ---------------- Responsive ---------------- */

/* Tablets */
@media (max-width: 1024px) {
  .content-container {
    flex-direction: column;
    height: auto;
  }

  #map {
    height: 60vh;
    flex: none;
  }

  #filters {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid #ccc;
    padding: 1em;
  }
}

/* Phones */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    font-size: 1.2em;
    margin-bottom: 0.5em;
  }

  .nav-menu {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8em;
  }

  .nav-menu a {
    font-size: 0.9em;
    padding: 0.4em 0.6em;
  }

  .service-box {
    padding: 2em 1em;
    margin-top: -100px;
  }

  .service-buttons {
    flex-direction: column;
    gap: 0.8em;
  }

  .service-button {
    flex: 1 1 100%;
    font-size: 1em;
    padding: 0.8em 1em;
  }

  #filters label {
    font-size: 1em;
  }
}

/* ---------------- About Us Page ---------------- */
.about-box {
  background: white;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 2em auto;
}

.about-box h1 {
  color: #004080;
  text-align: center;
  margin-bottom: 1em;
}

.about-intro {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 2em;
  color: #333;
}

.section {
  margin-top: 2em;
}

.section h2 {
  color: #004080;
  border-left: 4px solid #ffcc00;
  padding-left: 0.5em;
  margin-bottom: 0.5em;
}

.section p {
  line-height: 1.6;
}

.about-box ul {
  list-style: none;
  padding-left: 0;
}

.about-box ul li {
  margin-bottom: 0.8em;
  background: #f0f4ff;
  padding: 0.8em;
  border-radius: 8px;
}

.about-box a {
  color: #004080;
  text-decoration: none;
  font-weight: bold;
}

.about-box a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .about-box {
    padding: 1.5em;
  }

  .about-intro {
    font-size: 1em;
  }
}

/* Contact section image styling */
.contact-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em auto 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== City Trend (scoped) ===== */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #0b4b7a;
  --brand-100: #e6f0f7;
  --ring: rgba(11, 75, 122, 0.35);
}

/* base layout just for the data page */
.data-page {
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}



.data-page .page {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px;
}

/* toolbar */
.data-page .toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid #e8eef5;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(2, 8, 23, 0.06);
  margin-bottom: 16px;
}

.data-page .toolbar select {
  appearance: none;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  background: #fff;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: 0.2s border-color, 0.2s box-shadow;
}

.data-page .toolbar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

/* grid of cards */
.data-page .grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .data-page .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* cards */
.data-page .card {
  background: var(--card);
  border: 1px solid #e8eef5;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(2, 8, 23, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.data-page .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.data-page .card h2 {
  font-size: 1rem;
  margin: 0;
}

.data-page .chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-100);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

/* chart area fills card */
.data-page .chart-wrap {
  position: relative;
  height: 42vh;
}

@media (min-width: 960px) {
  .data-page .chart-wrap {
    height: 48vh;
  }
}

/* ===== City Trend Dashboard Styles ===== */

body.data-page {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg, #f5f7fb);
  color: var(--ink, #0f172a);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--brand, #0b4b7a);
  text-align: center;
}

.category-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.category-selector label {
  font-weight: 600;
  font-size: 1.1rem;
}

.category-selector select {
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: white;
  cursor: pointer;
  min-width: 200px;
}

/* Chart sections layout */
.chart-section {
  background-color: var(--card, #ffffff);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(2,8,23,0.06);
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.chart-box {
  flex: 1 1 450px;
  min-width: 300px;
  max-width: 600px;
}

.chart-box canvas {
  width: 100% !important;
  height: 300px !important;
  display: block;
}

.chart-explanation {
  flex: 1 1 300px;
  min-width: 280px;
  color: var(--muted, #64748b);
  font-size: 1rem;
}

.chart-explanation h2 {
  color: var(--brand, #0b4b7a);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.chart-explanation p {
  line-height: 1.5;
}



/* Responsive adjustments */

/* Tablets & small laptops */
@media (max-width: 900px) {
  main {
    margin: 1.5rem 1rem;
    padding: 0 0.5rem;
  }
  
  .chart-section {
    flex-direction: column;
    padding: 1rem 1rem;
  }

  .chart-box, 
  .chart-explanation {
    max-width: 100%;
    flex: 1 1 auto;
  }

  .chart-box canvas {
    height: 250px !important;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  h1 {
    font-size: 1.6rem;
  }

  .category-selector {
    flex-direction: column;
    gap: 1rem;
  }

  .category-selector label {
    font-size: 1rem;
  }

  .category-selector select {
    min-width: 100%;
    font-size: 1rem;
    padding: 0.5rem;
  }

  .chart-box canvas {
    height: 200px !important;
  }

  .chart-explanation {
    font-size: 0.9rem;
  }


    /* Basic layout for category selector */
    .category-selector {
      margin: 1em 0;
    }
    /* Parking time filter styles */
    .parking-filter {
      margin: 1em 0;
      display: flex;
      align-items: center;
      gap: 0.5em;
    }
    .parking-filter label {
      font-weight: bold;
    }
    .parking-filter input[type="time"] {
      padding: 0.2em;
    }
 
    .parking-filter button {
      padding: 0.3em 0.6em;
      cursor: pointer;
    }
}  /* Simple hidden class */
    .hidden {
      display: none !important;
    }
/* ---------------- End of City Trend Styles ---------------- */
