@import url(./base.css);
@import url(./container.css);
@import url(./section.css);
@import url(./header.css);
@import url(./logo.css);
@import url(./navigation.css);
@import url(./hero.css);
@import url(./advantages.css);
@import url(./team.css);
@import url(./social.css);
@import url(./mobile-menu.css);
@import url(./footer.css);

:root {
  --main-color: #4d5ae5;
}

:root {
  --icon-color: #f4f4fd;
}

:root {
  --white: #ffffff;
}

.link {
  text-decoration: none;
}

.contact-link {
  text-decoration: none;
}

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

.portfolio-items {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-items: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);
}

.portfolio .section-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  margin-bottom: 72px;
}

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

.portfolio-list li {
  @media screen and (min-width: 768px) {
    width: calc((100% - 24px) / 2);
    gap: 72px 24px;
  }
  @media screen and (min-width: 1158px) {
    width: calc((100% - 48px) / 3);
  }
}

.portfolio-list img {
  width: 100%;
  height: auto;
  display: block;
}

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

.overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--icon-color);
  width: 100%;
  height: 100%;

  background-color: #4d5ae5;

  padding: 40px 32px;

  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.categories-app {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

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

.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;

  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-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fcfcfc;
  border-radius: 4px;
  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);
  padding: 72px 24px 24px;
  width: 90%;
  gap: 16px;
  @media screen and (min-width: 768px) {
    width: 408px;

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

.form {
  display: flex;
  flex-direction: column;
}

.modal-close-button,
.menu-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;

  border: 1px solid rgba(0, 0, 0, 0.1);

  background-color: #e7e9fc;
  border-radius: 50%;
  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-button:hover,
.menu-close-button:hover,
.menu-close-button:focus,
.modal-close-button:focus {
  background-color: #404bbf;
  border: none;
}

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

.modal-close-button:hover .modal-close-icon,
.modal-close-button:focus .modal-close-icon,
.menu-close-button:hover .menu-close-icon,
.menu-close-button:focus .menu-close-icon {
  fill: #fff;
}

.modal-title {
  margin-bottom: 16px;

  font-weight: 500;
  font-size: 16px;

  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

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

.modal-form-comment {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

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

.policy-wrapper {
  margin-bottom: 24px;
}
.modal-input-wrapper {
  position: relative;
}

.modal-form-input {
  width: 100%;
  height: 40px;
  padding: 8px 38px;

  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: transparent;
  background-color: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.modal-form-input,
.modal-form-textarea,
.modal-form-textarea::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.checkbox-mark {
  min-width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  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);
}

.checkbox-input:checked + .checkbox-label .checkbox-mark {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.link-privacy-policy {
  color: #4d5ae5;
}

.modal-button {
  display: block;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 0px;

  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin: 0 auto;
  min-width: 169px;
  padding: 16px 32px;

  height: 56px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;

  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.none {
  display: none;
}
