@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --white: #ffff;
  --orange: #ee5522;
  --blue: #1C7DEE;
  --grey: rgb(105, 105, 105);
  --light-grey: #dcdcdc;
  --yellow: #ffaa00;
  --friend-name-color: rgb(85, 85, 85); 
}

body {
  width: 100vw;
  overflow-x: hidden;
  font-family: 'Open Sans', sans-serif;
  color: var(--white);
  background-image: url(./img/Papers.co-so43-blur-gradation-dark-blue-android-medium.jpg);
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
  
.header {
  display: -webkit-box;
  display: flex;
  height: 75px;
  
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='146' height='146' viewBox='0 0 200 200'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='100' y1='33' x2='100' y2='-3'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='100' y1='135' x2='100' y2='97'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='%230069d7' fill-opacity='0.5'%3E%3Crect x='100' width='100' height='100'/%3E%3Crect y='100' width='100' height='100'/%3E%3C/g%3E%3Cg fill-opacity='0.5'%3E%3Cpolygon fill='url(%23a)' points='100 30 0 0 200 0'/%3E%3Cpolygon fill='url(%23b)' points='100 100 0 130 0 100 200 100 200 130'/%3E%3C/g%3E%3C/svg%3E");
  border-bottom: 3px solid var(--white);
}

.header-title {
  margin: auto;
  color: var(--white);
  font-size: 32px;
  text-align: center;
  letter-spacing: 5px;
}
  
.main {
  padding: 25px;
}
  
.friends-filters {
  margin-bottom: 45px;
}
  
.filters-button {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 20px;
  padding-left: 50px;
  padding-right: 50px;
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  color: var(--grey);
  letter-spacing: 1px;
  background: var(--white);
  border: none;
  border-radius: 5px;
  box-shadow: rgba(50, 50, 93, .25) 0px 13px 27px -5px, rgb(0, 0, 0, .3) 0px 8px 16px -8px;
  transition: .5s ease;
}

.filters-button:after {
  content: "";
  display: block;
  position: absolute;
  top: 5.5px;
  right: 9px;
  width: 30px;
  height: 30px;
  background-image: url(./img/tune_black_48dp.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px;
  opacity: .5;
}
  
.form {
  display: none;
}
  
.form--open {
  display: block;
}

.filters-button-active {
  margin-bottom: 20px;
}
  
.form-header {
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 7px;
}
  
.search {
  position: relative;
  margin-bottom: 30px;
}
  
.search:after {
  content: "";
  display: block;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  background-image: url(./img/search_black_48dp.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 26px;
  background-size: cover;
  opacity: .3;
}
  
.search-input {
  box-sizing: border-box;
  width: 100%;
  height: 45px;
  padding: 15px;
  padding-left: 40px;
  font-weight: 500;
  font-size: 16px;
  color: var(--grey);
  letter-spacing: 1px;
  background-color: var(--white);
  border: none;
  border-radius: 5px;
  -webkit-appearance: none;
  box-shadow: rgba(0, 0, 0, 0.4) 5px 15px 30px;
}
  
.sorting {
  position: relative;
  margin-bottom: 30px;
}
  
.sorting:after {
  content: "";
  display: block;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  background-image: url(./img/expand_more_black_48dp.svg);
  background-size: cover;
  opacity: .3;
}
  
.sorting-select {
  width: 100%;
  height: 45px;
  padding-left: 40px;
  font-weight: 500;
  font-size: 16px;
  color: var(--grey);
  letter-spacing: 0.5px;
  background: var(--white);
  border: none;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: rgba(0, 0, 0, 0.4) 5px 15px 30px;
}
  
.filter {
  margin-bottom: 30px;
  padding: 25px 20px;
  color: var(--grey);
  background: var(--light-grey);
  border: none;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.4) 5px 15px 30px;
}
  
.filter-elem {
  position: relative;
  display: block;
  box-sizing: border-box;
  height: 40px;
  margin-bottom: 20px;
  padding: 9.5px 40px;
  font-weight: 500;
  font-size: 16px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: rgba(50, 50, 93, .25) 0px 13px 27px -5px, rgb(0, 0, 0, .3) 0px 8px 16px -8px;
  transition: .5s ease;
}

.filter-elem:nth-of-type(3) {
  margin-bottom: 0;
}
  
.filter-checkbox {
  position: absolute;
  width: 0;
  height: 0;
  cursor: pointer;
  opacity: 0;
}
  
.filter-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 16px;
  height: 16px;
  background: var(--light-grey);
  border: 1px solid var(--white);
  border-radius: 50%;
}

.filter-checkbox:checked ~ .filter-mark:after {
  content: "";
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  background: var(--grey);
  border: 1px solid var(--grey);
  border-radius: 50%;
}
  
.form-button {
  display: block;
  height: 40px;
  width: 100%;
  padding: 0 25px;
  font-weight: 500;
  font-size: 16px;
  color: var(--grey);
  letter-spacing: 1px;
  background: var(--white);
  border: none;
  border-radius: 5px;
  box-shadow: rgba(50, 50, 93, .25) 0px 13px 27px -5px, rgb(0, 0, 0, .3) 0px 8px 16px -8px;
  transition: .5s ease;
}
  
.search-input:focus,
.sorting-select:focus,
.form-button:focus,
.filters-button:focus {
  outline: none;
}

.filters-button:hover,
.form-button:hover,
.filter-elem:hover {
  box-shadow: rgba(60, 64, 67, .3) 0px 1px 2px 0px, rgb(60, 64, 67, .15) 0px 1px 3px 1px;
}
  
.sorting-select:hover,
.filter-elem:hover,
.form-button:hover,
.filters-button:hover {
  cursor: pointer;
}
  
.friend {
  position: relative;
  width: 100%;
  margin-bottom: 35px;
  padding: 15px 30px;
  text-align: center;
  color: var(--grey);
  background: #dcdcdc;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.4) 5px 15px 30px;
}
  
.friend:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 209px;
  background-color: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Cg %3E%3Cpath fill='%23ffb100' d='M486 705.8c-109.3-21.8-223.4-32.2-335.3-19.4C99.5 692.1 49 703 0 719.8V800h843.8c-115.9-33.2-230.8-68.1-347.6-92.2C492.8 707.1 489.4 706.5 486 705.8z'/%3E%3Cpath fill='%23ffb800' d='M1600 0H0v719.8c49-16.8 99.5-27.8 150.7-33.5c111.9-12.7 226-2.4 335.3 19.4c3.4 0.7 6.8 1.4 10.2 2c116.8 24 231.7 59 347.6 92.2H1600V0z'/%3E%3Cpath fill='%23ffbe00' d='M478.4 581c3.2 0.8 6.4 1.7 9.5 2.5c196.2 52.5 388.7 133.5 593.5 176.6c174.2 36.6 349.5 29.2 518.6-10.2V0H0v574.9c52.3-17.6 106.5-27.7 161.1-30.9C268.4 537.4 375.7 554.2 478.4 581z'/%3E%3Cpath fill='%23ffc500' d='M0 0v429.4c55.6-18.4 113.5-27.3 171.4-27.7c102.8-0.8 203.2 22.7 299.3 54.5c3 1 5.9 2 8.9 3c183.6 62 365.7 146.1 562.4 192.1c186.7 43.7 376.3 34.4 557.9-12.6V0H0z'/%3E%3Cpath fill='%23ffcc00' d='M181.8 259.4c98.2 6 191.9 35.2 281.3 72.1c2.8 1.1 5.5 2.3 8.3 3.4c171 71.6 342.7 158.5 531.3 207.7c198.8 51.8 403.4 40.8 597.3-14.8V0H0v283.2C59 263.6 120.6 255.7 181.8 259.4z'/%3E%3Cpath fill='%23ffd914' d='M1600 0H0v136.3c62.3-20.9 127.7-27.5 192.2-19.2c93.6 12.1 180.5 47.7 263.3 89.6c2.6 1.3 5.1 2.6 7.7 3.9c158.4 81.1 319.7 170.9 500.3 223.2c210.5 61 430.8 49 636.6-16.6V0z'/%3E%3Cpath fill='%23ffe529' d='M454.9 86.3C600.7 177 751.6 269.3 924.1 325c208.6 67.4 431.3 60.8 637.9-5.3c12.8-4.1 25.4-8.4 38.1-12.9V0H288.1c56 21.3 108.7 50.6 159.7 82C450.2 83.4 452.5 84.9 454.9 86.3z'/%3E%3Cpath fill='%23ffef3d' d='M1600 0H498c118.1 85.8 243.5 164.5 386.8 216.2c191.8 69.2 400 74.7 595 21.1c40.8-11.2 81.1-25.2 120.3-41.7V0z'/%3E%3Cpath fill='%23fff852' d='M1397.5 154.8c47.2-10.6 93.6-25.3 138.6-43.8c21.7-8.9 43-18.8 63.9-29.5V0H643.4c62.9 41.7 129.7 78.2 202.1 107.4C1020.4 178.1 1214.2 196.1 1397.5 154.8z'/%3E%3Cpath fill='%23ffff66' d='M1315.3 72.4c75.3-12.6 148.9-37.1 216.8-72.4h-723C966.8 71 1144.7 101 1315.3 72.4z'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  background-size: cover;
  border-radius: 10px 10px 0 0;
}
  
.friend-image {
  position: relative;
  z-index: 100;
  border: 5px solid var(--white);
  border-radius: 50%;
}
  
.friend-name {
  color: var(--friend-name-color);
  position: relative;
  margin-bottom: 10px;
  z-index: 100;
}
  
.friend-info {
  position: relative;
  z-index: 100;
  font-size: 14px;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: justify;
  justify-content: space-evenly;
  padding: 5px 0px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: rgba(50, 50, 93, .25) 0px 13px 27px -5px, rgb(0, 0, 0, .3) 0px 8px 16px -8px;
}
  
.friend-email,
.friend-location,
.friend-phone {
  position: relative;
  margin-top: 20px;
  padding: 5px 7px 5px 35px;
  font-size: 13px;
  text-align: left;
  word-wrap: break-word;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: rgba(50, 50, 93, .25) 0px 13px 27px -5px, rgb(0, 0, 0, .3) 0px 8px 16px -8px;
  transition: .5s ease;
}
  
.friend-email:after,
.friend-location:after,
.friend-phone:after {
  content: "";
  position: absolute;
  top: 5px;
  left: 10px;
  width: 17px;
  height: 17px;
  background-repeat: no-repeat;
  opacity: .5;
}
  
.friend-location:after {
  background-image: url("./img/location_city_black_48dp.svg");
  background-size: 18px;
}
  
.friend-email:after {
  background-image: url("./img/email_black_48dp.svg");
  background-size: 18px;
}
  
.friend-phone:after {
  background-image: url("./img/phone_black_48dp.svg");
  background-size: 18px;
}

.friend-email:hover,
.friend-location:hover,
.friend-phone:hover {
  box-shadow: rgba(60, 64, 67, .3) 0px 1px 2px 0px, rgb(60, 64, 67, .15) 0px 1px 3px 1px;
}
  
@media (min-width: 360px) {
  .main {
    padding: 10px 37.5px;
  }
}
  
@media (min-width: 700px) {
  .friends-filters {
    width: 605px;
    margin: auto;
    margin-bottom: 45px;
  }
  .friends-container {
    display: -webkit-box;
    display: flex;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    justify-content: space-between;
    width: 605px;
    margin: auto;
  }
  .friend {
    width: 285px;
  }
}
  
@media (min-width: 1000px) {
  .main {
    display: -webkit-box;
    display: flex;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: start;
    align-items: flex-start;
    width: 945px;
    margin: auto;
    padding: 30px 0;
  }
  .friends-filters {
    width: 285px;
    height: auto;
    margin: 0;
  }
  .filters-button {
    display: none;
  }
  .form {
    display: block;
  }
  .friends-container {
    margin: 0;
  }
}
  
@media (min-width: 1400px) {
  .main {
    width: 1265px;
    margin: auto;
    padding: 30px 0;
  }
  .friends-container {
    -webkit-box-pack: start;
    justify-content: flex-start;
    width: 925px;
  }
  .friend {
    margin-right: 35px;
  }
  .friend:nth-of-type(3n) {
    margin-right: 0;
  }
}
