body {
  font-family: "Helvetica Neue", sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 40px;
}

.navbar .favorites {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;

}

.navbar .fav-city {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navbar .fav-city:hover {
  background-color: #f0f0f0;
  color: #000;
  border-color: #999;
}

.navbar .fav-city.active {
  background-color: #336b32;
  color: #805656;
  border-color: #336b32;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Wrapper för sökfältet */
.search-container {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  width: 100%;
}

/* Input får växa i container */
.search-container input {
  flex: 1;
}

.weather-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding: 0;
}

/* Kortens grundlayout */
.weather-card {
  max-width: 300px;
  width: 100%;
  font-size: 14px;
  padding: 20px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  word-wrap: break-word;
}

/* Weather-header-left */
.weather-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-header-left p {
  margin: 0;
}

.weather-header-left .top-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2px;
}

.weather-header-left p.sunrise,
.weather-header-left p.sunset {
  margin: 0;
  font-size: 14px;
}

.weather-detail {
  font-size: 24px;
}

.weather-icon {
  font-size: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Weather-main */
.weather-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Prognoslista */
.forecast {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Varje dag i prognosen */
.forecast li {
  display: grid;
  grid-template-columns: 80px 40px 1fr 50px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dotted;
  padding: 4px 0;
  font-size: 14px;
}

/* Ikoner */
.forecast li img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* Datum, beskrivning och temperatur centrerat i respektive kolumn */
.forecast li span {
  text-align: center;
}

/* Tema-färger */
.weather-card.sunny {
  background: #f3e6ab;
  color: #336b32;
}

.weather-card.rain {
  background: #cce6ff;
  color: #1a1a1a;
}

.weather-card.cloudy {
  background: #fff;
  color: #ff6666;

}

/* Forecast och header följer kortets färg */
.weather-card.sunny .forecast li,
.weather-card.sunny,
.weather-card.sunny .weather-header {
  color: #336b32;
  border-bottom-color: #336b32;
}

.weather-card.rain .forecast li,
.weather-card.rain,
.weather-card.rain .weather-header {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

.weather-card.cloudy .forecast li,
.weather-card.cloudy,
.weather-card.cloudy .weather-header {
  color: #ff6666;
  border-bottom-color: #ff6666;
}

.weather-card.cloudy .weather-detail {
  color: #ff6666;
}

/* iPad och uppåt (768px – 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  h1 {
    text-align: center;
  }

  .main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .navbar .favorites {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;

  }

  .search-container {
    max-width: 350px;
    width: 100%;
  }

  .weather-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .weather-card {
    width: 550px;
    word-wrap: break-word;
  }

  .weather-detail {
    font-size: 26px;
  }
}

/* Dator upp till 1600px */
@media (min-width: 1025px) and (max-width: 1600px) {
  h1 {
    text-align: center;
  }

  .main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .navbar .favorites {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;

  }

  .search-container {
    max-width: 400px;
    width: 100%;
  }

  .weather-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .weather-card {
    max-width: 500px;
    width: 500px;
  }

  .weather-detail {
    font-size: 28px;
    text-align: center;
  }
}

/* Extra stor skärm >1600px */
@media (min-width: 1601px) {
  .weather-card {
    max-width: 550px;
  }
}