.hidden {
  display: none;
}

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

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

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

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

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

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

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

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

/* HEADER */

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

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

.nav-list,
.contacts {
  display: none;
}

.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 {
  display: block;
  padding: 16px 0;
}

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

.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-nav {
    display: flex;
    align-items: center;
  }

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

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

  .nav-link.current {
    position: relative;
  }

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

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

  .contacts {
    font-style: normal;
    display: block;
  }

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

  .contacts-link {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    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,
  .nav-link.current {
    color: #404bbf;
  }

  .mobile-menu {
    display: none;
  }
}

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

  .contacts-list {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

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

/* Mobile Menu */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

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

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

.mobile-menu-container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;

  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: auto;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  margin-bottom: 24px;
  border: 1px solid #e7e9fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-icon {
  fill: #2e2f42;
}

.mobile-menu-nav {
  margin-bottom: auto;
}

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

.mobile-list-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  gap: 24px;
  display: block;
}
.mobile-current {
  color: #404bbf;
}
.menu-contacts-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  display: block;
  margin-top: 24px;
}

.mobtel-current {
  color: #4d5ae5;
}

.mob-soc-list {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
}
.mob-soc-item {
  width: 40px;
  height: 40px;
}
.mob-soc-link {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.mob-soc-icon {
  fill: #f4f4fd;
}

/* MAIN SECTION */

.main-section {
  background-color: #2e2f42;
  padding-top: 72px;
  padding-bottom: 72px;
  max-width: 320px;
  margin: 0 auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero-image-mob.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

@media (min-resolution: 192dpi) {
  .main-section {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero-image-mob-2x.jpg);
  }
}

.main-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 216px;
  margin: 0 auto;
  margin-bottom: 72px;
}

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

@media screen and (min-width: 768px) {
  .main-section {
    padding-top: 112px;
    padding-bottom: 112px;
    max-width: 768px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero-image-tab.jpg);
  }

  @media (min-resolution: 192dpi) {
    .main-section {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero-image-tab-2x.jpg);
    }
  }

  .main-title {
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    max-width: 496px;
    margin-bottom: 36px;
  }
}

@media screen and (min-width: 1158px) {
  .main-section {
    padding-top: 188px;
    padding-bottom: 188px;
    max-width: 1440px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero-image.jpg);
  }

  @media (min-resolution: 192dpi) {
    .main-section {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero-image-2x.jpg);
    }
  }

  .main-title {
    max-width: 496px;
    margin-bottom: 48px;
  }

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

/* SUBMAIN SECTION */

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

.submain-section {
  padding: 96px 0;
}

.submain-section-icon {
  display: none;
}

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

.submain-list-item {
  width: 100%;
}

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

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

@media screen and (min-width: 768px) {
  .submain-list {
    column-gap: 24px;
    row-gap: 72px;
  }

  .submain-list-title {
    text-align: left;
  }

  .submain-list-text {
    font-weight: 500;
  }

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

@media screen and (min-width: 1158px) {
  .submain-section-contaiter {
    display: flex;
    align-items: center;
  }

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

  .submain-section {
    padding: 120px 0;
  }

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

  .submain-list-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
  }

  .submain-list-text {
    font-weight: 400;
  }
}

/* OUR TEAM */

.team {
  background-color: #f4f4fd;
  padding: 96px 0px;
}

.team-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
  margin-bottom: 72px;
}

.team-list {
  display: flex;

  justify-content: center;
  flex-wrap: wrap;
  gap: 72px;
}

.team-item {
  width: 264px;
  background-color: #ffffff;
  border-radius: 0 0 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);
}

.employee-name {
  padding: 32px 0;
}

.team-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

.team-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  margin-bottom: 8px;
}

.icon-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

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

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

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

.icon-img {
  fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
  .team-list {
    gap: 24px;
    row-gap: 64px;
  }
}

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

  .team-list {
    gap: 24px;
  }

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

/* OUR PORTFOLIO */

.portfolio {
  padding-top: 96px;
  padding-bottom: 96px;
}

.portfolio-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
  margin-bottom: 72px;
}

.portfolio-list {
  display: flex;
  align-items: center;
  row-gap: 48px;
  flex-wrap: wrap;
}

.portfolio-item {
  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);
}

.overlay-img {
  position: relative;
  overflow: hidden;
}

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

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

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

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

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

@media screen and (min-width: 768px) {
  .portfolio-list {
    column-gap: 24px;
    row-gap: 72px;
  }
  .portfolio-item {
    width: 356px;
  }
}

@media screen and (min-width: 1158px) {
  .portfolio {
    padding-top: 120px;
    padding-bottom: 120px;
  }

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

  .portfolio-item {
    width: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
  }
  .portfolio-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);
    transform: translateY(0%);
  }

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

/* FOOTER */

.page-footer {
  background: #2e2f42;
  padding-top: 96px;
  padding-bottom: 96px;
}

.footer-main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 72px 24px;
  justify-content: center;
}

.footer-logo {
  display: block;
  margin-bottom: 16px;
  text-align: center;
}

.logo-piece {
  color: #f4f4fd;
}

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

.soc-container {
  box-sizing: border-box;
}

.footer-social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  max-width: 208px;
  margin-bottom: 16px;
  text-align: center;
}

.footer-social-list {
  display: flex;
  gap: 16px;
}

.footer-social-item {
  width: 40px;
  height: 40px;
}

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

.icon-img {
  fill: #f4f4fd;
}

.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-form {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

.footer-form-btn {
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  background: #4d5ae5;
  border: none;
  display: flex;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  cursor: pointer;
  align-items: center;
}

.icon-send {
  fill: #fff;
  margin-left: 16px;
}

@media screen and (min-width: 768px) {
  .footer-main-container {
    align-items: baseline;
    justify-content: start;
    padding-left: 108px;
  }

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

  .footer-logo,
  .footer-social-text,
  .footer-form-text {
    text-align: left;
  }

  .footer-input {
    width: 264px;
  }
}

@media screen and (min-width: 1158px) {
  .page-footer {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .footer-main-container {
    padding-left: 15px;
    gap: 0;
  }

  .footer-container {
    margin-right: 120px;
  }

  .soc-container {
    margin-right: auto;
  }

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

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

/* BACKDROP */

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

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 4px;
  width: 288px;
  min-height: 623px;
  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;
  transform: translate(-50%, -50%);
  padding: 72px 16px 24px 16px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  margin-bottom: 24px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  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-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-field {
  margin-bottom: 8px;
}

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

.modal-field-wrap {
  position: relative;
}

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

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

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

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

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

.modal-comment {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0.04em;
  line-height: 1.17;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  margin-bottom: 6px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.modal-check-text {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
}

.span-checkbox {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  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);
  flex-shrink: 0;
}

.checkbox-link {
  color: #4d5ae5;
}

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

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

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

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }
}
