/* RESET STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  --bg_main: hsl(0, 0%, 100%);
  --text_light: #000000;
  --bgcolor: linear-gradient(#e91e625e, #ffc18764);
  --text_med: #ffffff;
  --text_dark: #0084ff;
  --red: #0084ff;
  --darkred: #c3112d;
  --orange: #ff8c00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: normal;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}
 
input {
  -webkit-appearance: none;
  
  background: #e0e0e0;
  box-shadow: inset 8px 8px 16px #c5c5c5,
              inset -8px -8px 16px #fbfbfb;
}
 form{
    display:flex ;
    justify-content: center;
    align-items: center;
 }
button,
input {
  
  border: none;
  background: none;
  outline: none;
  color: inherit;
  
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

body {
 
  font: 1rem/1.3 "Roboto", sans-serif;
  /* background: url("https://wallpapers.com/images/featured/weather-xqhs9axpy8btfd3y.jpg"); */
  background-color: #e0e0e0;;
  color: var(--text_dark);
  padding: 1px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}


/* SECTION #1
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.top-banner {
  color: var(--text_light);
}

.heading {
  font-weight: bold;
  font-size: 4rem;
  letter-spacing: 0.02em;
  padding: 0 0 60px 0;
  text-align: center;
}

.top-banner form {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-banner form input {
  font-size: 1.5rem;
  height: 60px;
  padding: 25px 25px 25px;
  border-radius: 15px;
  
}

.top-banner form input::placeholder {
  color: currentColor; 
}

.top-banner form button {
  font-size: 1rem;
  font-weight: bolder;
  letter-spacing: 0.1em;
  padding: 20px 25px;
  margin-left: 15px;
  
  color: var(--red);
background: #e0e0e0;
box-shadow:  8px 8px 16px #c5c5c5,
             -8px -8px 16px #fbfbfb;
  transition: background 0.3s ease-in-out;
  border-radius: 15px;
}

.top-banner form button:hover {
  /* background: var(--darkred);border-radius: 50px; */
  background: #e0e0e0;
  box-shadow: inset 8px 8px 16px #c5c5c5,
              inset -8px -8px 16px #fbfbfb;

}

.top-banner form .msg {
  position: absolute;
  bottom: -40px;
  center : 0;
  
  max-width: 450px;
  min-height: 40px;
}


/* SECTION #2
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.ajax-section {
  margin: 70px 0 20px;
}

.ajax-section .cities {
  display: grid;
  grid-gap: 32px 40px;
  grid-template-columns: repeat(4, 1fr);
}

.ajax-section .city {
  position: relative;
  padding: 40px 10%;
  /* border-radius: 20px;
  background: var(--bgcolor);
  backdrop-filter: blur(15px);
  color: var(--text_med);
  box-shadow:
  10.8px 10.8px 3.6px rgba(0, 0, 0, 0.012),
  21.1px 21.1px 10px rgba(0, 0, 0, 0.019),
  40.1px 40.1px 24.1px rgba(0, 0, 0, 0.033),
  100px 100px 80px rgba(0, 0, 0, 0.07)
; */
border-radius: 50px;
background: #e0e0e0;
box-shadow:  20px 20px 60px #bebebe,
             -20px -20px 60px #ffffff;
}

.ajax-section .city::after {
  content: '';
}

.ajax-section figcaption {
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ajax-section .city-temp {
  font-size: 5rem;
  font-weight: bold;
  margin-top: 10px;
  color: var(--text_dark);
}

.ajax-section .city sup {
  font-size: 0.6em;
}

.ajax-section .city-name sup {
  padding: 0.3em 0.7em;
  border-radius: 30px;
  color: var(--text_light);
  background: var(--orange);
}

.ajax-section .city-icon {
  margin-top: 10px;
  width: 100px;
  height: 100px;
}


/* FOOTER
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.page-footer {
  text-align: center;
  font-size: 1rem;
  color: var(--text_light);
  margin-top: 40px;
}

.page-footer span {
  color: var(--red);
}


/* MQ
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width: 1000px) {
  body {
    padding: 30px;
  }
  
  .ajax-section .cities {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 700px) {
  .heading,
  .ajax-section .city-temp {
    font-size: 3rem;
  }
  
  .ajax-section {
    margin-top: 20px;
  }
  
  .top-banner form {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .top-banner form input,
  .top-banner form button {
    width: 100%;
  }

  .top-banner form button {
    margin: 20px 0 0 0;
  }
  
  .top-banner form .msg {
    position: static;
    max-width: none;
    min-height: 0;
    margin-top: 10px;
  }

  .ajax-section .cities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 500px) {
  body {
    padding: 15px;
  }
  
  .ajax-section .cities {
    grid-template-columns: repeat(1, 1fr);
    
  }

}


/* API Key banner
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.api {
  background: #fffbbc27;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
}

.api a {
  text-decoration: underline;
}

.api a:hover {
  text-decoration: none;
}