.hidden {
  display: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

a {
  text-decoration: none;
}

ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

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

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

/*COMMON*/

.container {
  max-width: 320px;
  margin: 0 auto;
  padding: 0 16px;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
    padding: 0 16px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding: 0 15px;
  }
}

/*HEADER*/

.page-header {
  border-bottom: 1px solid #e7e9fc;
  background: #fff;
  box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 1px 6px rgba(46, 47, 66, 0.08);
}

.header-cont {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-list,
.address-cont {
  display: none;
}

.h-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 117%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;

  padding: 16px 0;
  display: block;
}

.h-logo-s {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 117%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2e2f42;
}

.h-logo-sp {
  color: #f4f4fd;
}

.burger-btn {
  padding: 0;
  border: none;
  background-color: transparent;
}

.burger-icon {
  display: block;
  fill: #2f2f37;
}

@media screen and (min-width: 768px) {
  .burger-btn {
    display: none;
  }

  .header-cont-nav {
    display: flex;
    align-items: center;
  }

  .h-logo {
    padding: 24px 0;
    margin-right: 120px;
  }

  .header-list {
    display: flex;
    align-items: center;
    gap: 40px;
  }

  .header-list-item {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    color: #2e2f42;

    display: block;
    padding: 24px 0;

    position: relative;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .studio::after {
    content: "";
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
  }

  .header-list-item:hover,
  .header-list-item:focus,
  .address-item:hover,
  .address-item:focus,
  .header-list-item.studio {
    color: #404bbf;
  }

  .address-cont {
    font-family: "Roboto", sans-serif;
    font-style: normal;
    display: block;
  }

  .address-cont-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .address-item {
    font-size: 12px;
    line-height: 117%;
    letter-spacing: 0.04em;
    color: #434455;

    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media screen and (min-width: 1158px) {
  .h-logo {
    margin-right: 76px;
  }

  .address-cont-list {
    flex-direction: row;
    gap: 40px;
  }

  .address-item {
    padding: 24px 0;

    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    color: #434455;

    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/*MAIN PAGE*/

.main-page-cont {
  padding: 72px 0;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);
  max-width: 1440px;

  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: auto;
}

.main-page-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;

  max-width: 216px;
  margin: 0 auto 72px auto;
}

.main-page-button {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #fff;

  display: block;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;

  border: none;
  border-radius: 4px;
  background: #4d5ae5;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

  cursor: pointer;
}

.main-page-button:hover,
.main-page-button:focus {
  background-color: #404bbf;
}

@media screen and (min-width: 768px) {
  .main-page-cont {
    padding: 112px 0;
  }

  .main-page-title {
    font-size: 56px;
    line-height: 107%;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;

    max-width: 496px;
    margin: 0 auto 36px auto;
  }
}

@media screen and (min-width: 1158px) {
  .main-page-cont {
    padding: 188px 0;
  }

  .main-page-title {
    margin: 0 auto 48px auto;
  }
}

/*ADVANTAGE*/
.advan-cont {
  padding: 96px 0;
}

.advan-list {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.advan-icon {
  display: none;
}

.advan-list-item-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;

  margin-bottom: 8px;
}

.advan-list-item-descr {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #434455;
}

@media screen and (min-width: 768px) {
  .advan-list {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 24px;
  }

  .advan-list-item {
    width: calc((100% - 24px) / 2);
  }
}

@media screen and (min-width: 1158px) {
  .advan-list-item {
    width: calc((100% - 72px) / 4);
  }

  .advan-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    background-color: #f4f4fd;
    border-radius: 4px;
    border: 1px solid #8e8f99;
    margin-bottom: 8px;
  }
}

/*TEAM*/
.team-cont {
  background-color: #f4f4fd;
  padding: 96px 0;
}

.team-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  text-transform: capitalize;

  margin-bottom: 72px;
}

.team-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
}

.team-list-item {
  width: 264px;
  height: 428px;
  background-color: #ffffff;
  border-radius: 0px 0px 4px 4px;
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 2px 1px rgba(46, 47, 66, 0.08);
}

.team-list-item-cont {
  padding: 32px 0;
}

.team-list-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #2e2f42;

  text-align: center;
  margin-bottom: 8px;
}

.team-list-descr {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #434455;

  text-align: center;
}

.team-list-item-cont-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}

.team-icon {
  width: 40px;
  height: 40px;
}

.team-icon-a {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-icon-a:hover,
.team-icon-a:focus {
  background-color: #404bbf;
}

.team-icon-svg {
  fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
  .team-list {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }

  .team-list-item {
    margin-bottom: 72px;
  }
}

@media screen and (min-width: 1158px) {
  .team-cont {
    padding: 120px 0;
  }

  .team-list {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: none;
    justify-content: none;
    gap: 24px;
  }

  .team-list-item {
    width: calc((100% - 72px) / 4);
  }
}

/*PORTFOLIO*/
.port-cont {
  padding-top: 96px;
  padding-bottom: 96px;
}

.port-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  text-transform: capitalize;

  margin-bottom: 72px;
}

.port-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.port-list-item {
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08);
}

.port-list-item-cont {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.port-list-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #2e2f42;

  margin-bottom: 8px;
}

.port-list-item-descr {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #434455;
}

.port-list-item-img-cont {
  position: relative;
  overflow: hidden;
}

.port-list-item-p {
  display: none;
}

@media screen and (min-width: 768px) {
  .port-list {
    flex-wrap: wrap;
    column-gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: row;
    row-gap: 72px;
  }

  .port-list-item {
    flex-basis: calc((100% - 24px) / 2);
    box-shadow: none;
  }
}

@media screen and (min-width: 1158px) {
  .port-list {
    row-gap: 48px;
  }

  .port-list-item {
    flex-basis: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .port-list-item:hover {
    box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
      0px 1px 1px rgba(46, 47, 66, 0.16), 0px 2px 1px rgba(46, 47, 66, 0.08);
  }

  .port-list-item:hover .port-list-item-p {
    transform: translateY(0%);
  }

  .port-list-item-p {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    padding: 40px 32px;
    background-color: #4d5ae5;
    height: 100%;
    width: 100%;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
  }
}
