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

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

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
  margin-bottom: 0;
}

a {
  text-decoration: none;
}
.section-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
}
.subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.btn {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  display: block;
  border-radius: 4px;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover,
.btn:focus {
  background-color: #404bbf;
}

/* header */
.page-header {
  border-bottom: 1px solid #e7e9fc;
  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-container {
  display: flex;
  align-items: center;
}

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

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

.header-logo .logo-part {
  color: #2e2f42;
}

.header-logo {
  padding: 18px 0;
  /* padding: 24px 0; */
  /* margin-right: 76px; */
}

.open-menu-icon {
  fill: #2f2f37;
}

.open-menu-btn {
  border: none;
  background-color: transparent;
  margin-left: auto;
  padding: 0;
}

.mob-menu {
  padding: 16px;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.mob-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-close-btn.mob {
  background-color: transparent;
}

.modal-close-icon {
}

.mob-nav {
  margin-bottom: 50px;
}

.mob-nav-list {
  padding-top: 72px;
}

.mob-nav-item:not(:last-child) {
  margin-bottom: 40px;
}

.mob-nav-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mob-nav-link.active {
  color: #404bbf;
}

.mob-contacts-box {
}

.mob-contacts {
  margin-bottom: 48px;
}

.mob-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mob-contacts-item:first-child {
  order: 2;
}
.mob-contacts-item:last-child {
  order: 1;
}

.mob-contacts-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  font-style: normal;
}

.mob-contacts-link.active {
  color: #4d5ae5;
}

.mob-contacts-box .social-icons-list {
  justify-content: space-between;
  padding: 0;
}

.social-icons-item {
}

.social-icons {
}

.mob-contacts-box .team-icons {
  width: 24px;
  height: 24px;
}

.nav-list {
  /* display: flex; */
  display: none;
  align-items: center;
  gap: 40px;
}

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

.nav-link {
  display: block;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active {
  color: #404bbf;
}

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

.contacts {
  font-style: normal;
  margin-left: auto;
  display: none;
}

/* .contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
} */

.contacts-link {
  display: block;
  /* padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em; */
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus {
  color: #404bbf;
}

/* main */

.page-hero {
  background-color: #2e2f42;
  /* padding: 188px 0; */
  padding: 72px 52px;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/mobile-bg.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 1440px;
  margin: 0 auto;
}

@media screen and (min-resolution: 2x) {
  .page-hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/mobile-bg-2x.jpg);
  }
}

.hero-title {
  font-weight: 700;
  font-size: 36px;
  /* font-size: 56px; */
  /* line-height: 1.07; */
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
  color: #ffffff;
  text-transform: capitalize;
  /* max-width: 496px; */
  margin: 0 auto;
  margin-bottom: 72px;
  /* margin-bottom: 48px; */
}

/* about */

.about {
  padding: 96px 0;

  display: flex;
  justify-content: center;
}

.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;
}

.about-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
}

.about-box-icon {
  display: none;
  /* background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px; */
}

.about-subtitle {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
  margin-bottom: 8px;
}

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

.about-item-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* our team */

.team {
  background-color: #f4f4fd;
  padding: 96px 0;
  /* padding: 120px 0; */
  margin: 0 auto;
}
.team-title {
  margin-bottom: 72px;
}
.team-box {
  padding: 32px 0;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  /* gap: 24px; */
}

.team-item {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  max-width: 264px;
  margin: 0 auto;
  /* width: 100%; */
  /* width: calc((100% - 72px) / 4); */
  box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

.team-photo {
  max-width: 264px;
  max-height: 260px;
  display: block;
}

.team-subtitle {
  text-align: center;
  margin-bottom: 8px;
}

.team-text {
  text-align: center;
  margin-bottom: 8px;
}

.social-icons-list {
  padding: 0 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

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

.social-icons:hover,
.social-icons:focus {
  background-color: #404bbf;
}

.team-icons {
  fill: #f4f4fd;
}

/* our portfolio */

.portfolio {
  padding: 96px 0;
  margin: 0 auto;
}

.portfolio-title {
  margin-bottom: 72px;
}

.portfolio-box {
  padding: 32px 16px;
  border-right: 1px solid #e7e9fc;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

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

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

.portfolio-item:hover .portfolio-cover-text {
  transform: translateY(0);
}

.portfolio-cover {
  position: relative;
  overflow: hidden;
}

.portfolio-img {
  width: 288px;
  height: 280px;
  display: block;
}
.portfolio-subtitle {
  margin-bottom: 8px;
}

.portfolio-cover-text {
  background-color: #4d5ae5;
  color: #f4f4fd;
  position: absolute;
  top: 0;
  padding: 40px 32px;
  height: 100%;
  transform: translateY(100%);
  transition-property: transform;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* footer */

.page-footer {
  background-color: #2e2f42;
  padding: 96px 0;
}

.footer-box {
  /* margin-right: 120px; */
  margin-bottom: 72px;
}

.footer-logo {
  /* display: inline-block; */
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-logo .logo-part {
  color: #f4f4fd;
}

.footer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  /* max-width: 264px; */
}

/* .page-footer .container {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
} */

.footer-social-box {
  margin-bottom: 72px;
}

.footer-social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
.footer-icons-list {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.footer-icons-item {
  /* width: calc((100% - 48px) / 4); */
}

.footer .social-icons {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

footer .social-icons:hover,
footer .social-icons:focus {
  background-color: #31d0aa;
}

.footer-form-box {
  /* margin-left: auto; */
}

.footer-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  /* gap: 24px; */
}

.footer-form-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: center;
}

.footer-input {
  border: 1px solid #fff;
  border-radius: 4px;
  /* width: 264px; */
  width: 288px;
  height: 40px;
  outline: transparent;
  background-color: transparent;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  color: #ffffff;
  padding-left: 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
}

.footer-input:focus {
  border-color: #31d0aa;
}

.footer-input::placeholder {
  color: #ffffff;
}

.footer-btn {
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-btn:hover,
.footer-btn:focus {
  background-color: #31d0aa;
}

.footer-btn-icon {
  fill: #ffffff;
  margin-left: 16px;
}

/* MODAL */

.backdrop {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal {
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  background-color: #fcfcfc;
  border-radius: 4px;
  padding: 24px;
  /* width: 408px; */
  width: 288px;
  min-height: 623px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 72px 16px 24px 16px;
  /* padding: 72px 24px 24px 24px; */
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.backdrop:not(.is-open) .modal {
  transform: scale(1.5);
  transform: translate(-50%, -50%);
}

.modal-close-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn {
  background-color: #e7e9fc;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 0;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #404bbf;
  border: none;
}

.modal-close-btn:hover .modal-close-icon,
.modal-close-btn:focus .modal-close-icon {
  fill: #ffffff;
}

.modal-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.modal-input-text {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}

.modal-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  /* width: 360px; */
  height: 40px;
  width: 256px;
  padding-left: 38px;
  outline: transparent;
  background-color: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input-cover {
  position: relative;
}

.modal-icons {
  fill: #2e2f42;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input:focus {
  border-color: #4d5ae5;
}

.modal-input:focus + .modal-icons {
  fill: #4d5ae5;
}

.modal-field.comment {
  margin-bottom: 16px;
}

.modal-textarea {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  /* width: 360px; */
  width: 256px;
  height: 120px;
  resize: none;
  padding: 8px 16px;
  outline: transparent;
  color: rgba(46, 47, 66, 0.4);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  background-color: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-textarea::placeholder {
  color: rgba(46, 47, 66, 0.4);
}

.modal-textarea:focus {
  border-color: #4d5ae5;
}

.modal-field.checkbox {
  margin-bottom: 24px;
}
.modal-check {
}

.check-text {
}

.privacy-link {
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
  margin-left: 4px;
}

.check-element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  width: 16px;
  height: 16px;
  margin-right: 8px;
  fill: transparent;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-check:checked + .check-text .check-element {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

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

  .team .container {
    max-width: 584px;
  }

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

  .open-menu-btn {
    display: none;
  }

  .nav-list {
    display: flex;
  }

  .contacts {
    display: flex;
  }

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

  .contacts-link {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
  }

  .page-hero {
    padding: 112px 0;

    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/tablet-bg.jpg);
  }

  @media screen and (min-resolution: 2x) {
    .page-hero {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/tablet-bg-2x.jpg);
    }
  }

  .hero-title {
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 48px;
  }

  .about-subtitle {
    text-align: left;
  }

  .about-list {
    row-gap: 72px;
    column-gap: 24px;
  }

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

  .team-item {
    width: calc((100% - 24px) / 2);
  }
  .team-list {
    row-gap: 64px;
    column-gap: 24px;
  }

  .portfolio-list {
    row-gap: 72px;
    column-gap: 24px;
  }

  .portfolio-img {
    width: 356px;
    height: 300px;
  }

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

  .page-footer {
    padding: 96px 76px;
  }

  .page-footer .container {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    flex-wrap: wrap;
  }

  .footer-box {
    margin-right: 24px;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .footer-text {
    max-width: 264px;
  }

  .footer-social-text {
    text-align: left;
  }

  .footer-form-text {
    text-align: left;
  }

  .footer-form {
    gap: 24px;
  }

  .footer-input {
    width: 264px;
  }

  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }

  .modal-input {
    width: 360px;
  }

  .modal-textarea {
    width: 360px;
  }
}

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

  .team .container {
    max-width: 1158px;
  }

  .header-logo {
    padding: 24px 0;
    margin-right: 76px;
  }

  .contacts-list {
    display: flex;
    flex-direction: row;
    gap: 40px;
  }

  .contacts-link {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }

  .page-hero {
    padding: 188px 0;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/desktop-bg.jpg);
  }

  @media screen and (min-resolution: 2x) {
    .page-hero {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/desktop-bg-2x.jpg);
    }
  }

  .about {
    padding: 120px 0;
  }

  .about-subtitle {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
  }

  .about-list {
    gap: 24px;
  }

  .about-item {
    width: calc((100% - 72px) / 4);
  }
  .about-box-icon {
    background-color: #f4f4fd;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    width: 264px;
    height: 112px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
  }

  .about-item-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
  }

  .team {
    padding: 120px 0;
  }

  .team-list {
    gap: 24px;
  }

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

  .portfolio {
    padding: 120px 0;
  }

  .portfolio-list {
    row-gap: 48px;
    column-gap: 24px;
  }

  .portfolio-img {
    width: 360px;
    height: 300px;
  }

  .portfolio-item {
    width: calc((100% - 48px) / 3);
  }

  .page-footer {
    padding: 100px 0;
  }

  .footer-form-box {
    margin-left: auto;
  }

  .footer-box {
    margin-right: 120px;
    margin-bottom: 0;
  }

  .footer-social-box {
    margin-bottom: 0;
  }
}
