
:root {
  --secondary: #1d1c1f;
  --primary_font-family: "Poppins", sans-serif;
  --secondary_font-family: "Nunito Sans", sans-serif;
  --surface: #1d1c1f;
  --bg: #131214;
  --title: #eae6f2;
  --surface_text: #7b7980;
  --hightlight_surface: hsla(0, 0%, 0%, 0.1);
  --white: hsl(0, 0%, 100%);
   --input-bg: #1d1c1f;
}
* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  margin: 0px;
  background: #131214;
  font-size: 0.8rem;
  font-family: var(--secondary_font-family);
}

body.light {
  --bg: #f1f3f5;
  --surface: #ffffff;
  --title: #212529;
  --surface_text: #495057;
  --hightlight_surface: rgba(0, 0, 0, 0.06);
  --white: #000000;
  --input-bg: #e2e6ea; /* NEW: light, soft input bg */
  background-color: var(--bg);
  color: var(--title);
}




#toggleTheme {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--title);
  padding: 0 1em;
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container, .topbar, input, .card_highlights, .weather_now {
  transition: background-color 0.3s ease, color 0.3s ease;
}


.container {
  width: 100%;
  height: 90vh;
  margin: 1.5em;
  border-radius: 50px;
  background-color: var(--bg);
  max-width: 1600px;
  margin-inline: auto;
  padding: 16px;
}

.topbar {
  max-width: 1600px;
  justify-content: space-between;
  display: flex;
  align-items: center;
  flex-direction: row;
  padding: 20px 100px 40px 10px;
  font-family: var(--primary_font-family);
}

.topbar .logo {
  padding-left: 50px;
  margin-top: 5px;
}

.searchbar_cont {
  align-items: center;
  justify-content: center;
  padding-right: 250px;
}

.topbar .searchbar {
  box-shadow: 5px 5px 10px #131214;
  border-radius: 50px;
  font-family: var(--primary_font-family);
}

.searchbar_cont input {
  outline: none;
  border: none;
  padding: 1.5em;
  background: var(--input-bg);
  color: var(--title);
  font-family: var(--primary_font-family);
  width: 400px;
  height: 40px;
  border-radius: 50px;
  /* box-shadow: 0 0 4px rgba(0, 0, 0, 0.1); */
}


.upper_container {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 0px 30px 0px 30px;
}

.weather_now {
  width: 30%;
  height: 320px;
  align-items: center;
  color: var(--title);        /* for prominent titles and headings */
  padding: 30px;
  border-radius: 28px;
  background-color: var(--surface);
}

.today_title {
  font-size: 2rem;
  margin-block-end: 15px;
  font-weight: bold;

}

.title-3 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--title);
  margin-block-end: 2px;
  margin-block-start: 0.83em;
  margin-top: -6px;
  display: block;
}

.title-wind {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--title);
  margin-block-end: 2px;
  margin-block-start: 1rem;
  margin-top: px;
  display: block;
}

.title_air {
  font-size: 1rem;
  margin-block-end: 2px;
  margin-block-start: 0.83em;
  font-weight: bold;
  margin-top: -6px;
  display: block;
}

.temperature {
  display: block;
  color: var(--white);
  font-size: 3rem;
  line-height: 1.1;
}

.weather_now .weather_icon {
  margin-inline: auto;
  display: block;
}

.weather_status {
  font-size: 1rem;
}

.item_list {
  margin-block-start: 16px;
  padding-block-start: 16px;
  border-block-start: 1px solid #3e3d40;
  display: block;
}

.item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card_highlights {
  width: 100%;
  height: 420px;
  padding: 36px;
  border-radius: 28px;
  display: grid;
  color: var(--title);        /* for prominent titles and headings */
  background-color: var(--surface);
}

ul {
  list-style-type: none;
  padding-bottom: 10px;
  display: flex;
  flex-direction: row;
}

.grid_card {
  grid-template-columns: repeat(4, 1fr);
  display: grid;
}

.highlight_cards {
  display: grid;
  grid-template-rows: min-content 1fr;
  border-radius: 16px;
  padding: 24px;
  background-color: var(--hightlight_surface);
  position: relative;
  height: 150px;
}

.card_one {
  height: 200px;
  grid-column: span 2;
  display: grid;
}

.cardone_wrapper {
  display: flex;
  justify-items: center;
  align-items: center;
  width: 100%;
  height: 100px;
}

.c1_card_one {
  width: 25%;
  flex-direction: column-reverse;
  gap: 8px;
}
.card_two {
  height: 200px;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 0px 24px 24px 0px;
}

.highlight_cards {
  display: grid;
  grid-template-rows: min-content 1fr;
  border-radius: 24px 24px 24px 0px;
}

.wrapper {
  display: flex;
  gap: 28px;
  height: 80px;
  align-items: center;
}

.card1_list {
  display: flex;
  flex-wrap: wrap;
  width: 70%;
  justify-content: space-between;
  padding: 0px 0px 0px 25px;
}

.card2_list {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 75px;

}

.card1_item {
  width: 50%;
  justify-content: flex-end;
  gap: 4px;
}

.card2_item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 16px;
  column-gap: 24px;
}

.fa wind {
  padding: 0px 0px 0px 30px;
}

.highlight_cards {
  padding: 24px;
  justify-content: space-between;
  gap: 16px;
  display: grid;
  grid-template-rows: min-content 1fr;
  align-items: center;
  height: 150px;
}

.title1 {
  font-size: 25px;
}

footer {
  margin-top: auto;
  color: var(--title);        /* for prominent titles and headings */
  align-items: center;
  position: fixed;
  bottom: 0;
}

#weatheroLogo {
  transition: filter 0.3s ease;
}

/* Invert the logo when in light mode */
body.light #weatheroLogo {
  filter: invert(1) hue-rotate(180deg);
}


@media only screen and (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }
  .wrapper {
    justify-content: center;
    width: 350px;
    gap: 30px;
    padding: 0px 0px 0px 30px;
  }

  .searchbar_cont {
    padding-right: 0;
    margin-top: 20px;
  }

  .searchbar_cont input {
    width: 100%;
    padding: 0.5em;
    width: 300px;
  }

  .upper_container {
    flex-direction: column;
    gap: 20px;
  }

  .weather_now,
  .card_highlights {
    width: 100%;
    padding: 20px;
    text-align: center;
    height: max-content;
  }

  .temperature {
    font-size: 2rem;
  }

  .weather_now .weather_icon {
    margin: 10px auto;
  }

  .weather_status {
    font-size: 0.9rem;
  }

  .item_list {
    margin-block-start: 10px;
  }

  .grid_card {
    grid-template-columns: repeat(1, 1fr);
  }

  /* .card_one,
  .card_two {
    grid-column: span 1;
  } */

  .cardone_wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .c1_card_one {
    width: 100%;
  }

  .card1_list,
  .card2_list {
    width: 100%;
    padding: 0;
  }

  .card1_item {
    width: 100%;
  }

  .card2_item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
  }
}

@media only screen and (max-width: 1100px) {
  .topbar {
    padding: 20px;
  }

  .searchbar_cont {
    padding-right: 0;
    margin-top: 20px;
  }

  .searchbar_cont input {
    width: 100%;
    padding: 0.5em;
    width: 300px;
  }

  .upper_container {
    flex-direction: column;
    gap: 20px;
  }

  .weather_now,
  .card_highlights {
    width: 100%;
    padding: 20px;
    text-align: center;
    height: max-content;
  }

  .temperature {
    font-size: 2rem;
  }

  .weather_now .weather_icon {
    margin: 10px auto;
  }

  .weather_status {
    font-size: 0.9rem;
  }

  .item_list {
    margin-block-start: 10px;
  }

  .grid_card {
    grid-template-columns: repeat(1, 1fr);
  }


  .cardone_wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .c1_card_one {
    width: 100%;
  }

  .card1_list,
  .card2_list {
    width: 100%;
    padding: 0;
  }

  .card1_item {
    width: 100%;
  }

  .card2_item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
  }
}
