/* -----global----- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-family: "Roboto", sans-serif;
  font-style: normal;
  color: #434455;
  background-color: #ffffff;
}

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

a {
  text-decoration: none;
}

button {
  padding: 0;
  cursor: pointer;
  border: none;
}

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

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

input {
  font-family: inherit;
}

.container {
  max-width: 1158px;
  /* margin: 0 auto; */
  margin-left: auto;
  margin-right: auto;
  /* padding: 0 15px; */
  padding-left: 15px;
  padding-right: 15px;
}

.section {
  padding: 120px 0;
}

.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;
}
/* ----MAIN PAIGE CSS---- */

/* HEADER */

/* .header .container {
    display: flex;
} */
/* 2 способ как применить display flex */

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

.flex-container {
  display: flex;
  justify-content: space-between;
}

.navigation {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
}

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

.logo {
  color: #2e2f42;
}

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

.navigation-link {
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  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);
}

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

.current {
  position: relative;
  color: #404bbf;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.address {
  font-style: normal;
}

.address-list {
  display: flex;
}

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

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

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

/* ----HERO---- */

.hero-section {
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);
  max-width: 1440px;
  height: 600px;
  margin-left: auto;
  margin-right: auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-section {
  padding-top: 188px;
  padding-bottom: 188px;
  background-color: #2e2f42;
}

.hero-header {
  max-width: 496px;
  margin: 0 auto;
  margin-bottom: 48px;
  text-align: center;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.hero-button {
  padding-top: 16px;
  padding-right: 32px;
  padding-bottom: 16px;
  padding-left: 32px;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #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);
}

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

/* ----FEATURES---- */

.features-list {
  display: flex;
}

.features-list-items {
  width: 264px;
  margin-right: 24px;
}

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

.features-list-items:last-child {
  margin-right: 0;
}

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

.features-description {
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ----OUR TEAM---- */

.team-section {
  background-color: #f4f4fd;
}

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

.team-list {
  display: flex;
}

.employee-card:not(:last-child) {
  margin-right: 24px;
}

.employee-card {
  width: calc((100% - 24px * 3) / 4);
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  background-color: #ffffff;
  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-thumb {
  /* padding: 32px 0; */
  padding-top: 32px;
  padding-right: 0px;
  padding-bottom: 32px;
  padding-left: 0px;
}

.employee-name,
.position {
  text-align: center;
}

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

.position {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

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

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

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

.team-icon {
  fill: #f4f4fd;
}
/* ----PORTFOLIO---- */

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

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

.portfolio-card {
  /* flex-basis: calc(100% / 3 - 24px); */
  width: calc((100% - 48px) / 3);
}

.portfolio-img-container {
  overflow: hidden;
  position: relative;
}

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

/* .card-link {
  display: block;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
} */

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

.portfolio-card:hover,
.portfolio-card:focus {
  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-card:hover .overlay,
.portfolio-card:focus .overlay {
  transform: translateY(0%);
}

.portfolio-card-thumb {
  /* padding:32px 16px; */
  border: 1px solid #e7e9fc;
  border-top: none;
  padding: 32px 16px;
}

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

.portfolio-card-description {
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ----FOOTER---- */

.footer {
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: #2e2f42;
}

.footer-cantainer {
  display: flex;
  align-items: baseline;
}

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

.logo-link-footer {
  display: inline-block;
  margin-bottom: 16px;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

.logo-fooret {
  color: #f4f4fd;
}

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

.footer-social-media {
  margin-right: auto;
}

.footer-links-title {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}

.footer-list {
  display: flex;
  gap: 16px;
  justify-content: center;
}

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

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

.subscribe-paragraph {
  margin-bottom: 16px;

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

.footer-subscribe-form {
  display: flex;
  gap: 24px;
}

.footer-subscribe-input {
  outline: none;
  padding: 8px 16px;
  width: 264px;
  height: 40px;
  border: 1px solid #fff;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: transparent;
  transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);

  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}

.footer-subscribe-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}

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

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-subscribe-icon {
  margin-left: 16px;
}

/* .btn-subscribe::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 20px;
  margin-left: 16px;
  fill: #fff;
  background-image: url(../images/icons.svg#icon-send);
} */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  /* bottom: 0;
  right: 0; */
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

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

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  padding: 72px 24px 24px 24px;

  min-height: 584px;
  width: 408px;
  border-radius: 4px;
  background: #fcfcfc;
  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);
  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 {
  display: flex;
  position: absolute;
  align-items: center;
  justify-content: center;
  top: 24px;
  right: 24px;
  margin-left: 336px;
  margin-bottom: 24px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  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: #fff;
}

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

.form-paragraph {
  margin-bottom: 16px;
  width: 360px;
  height: 24px;

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

.form-field {
  display: block;
  margin-bottom: 8px;
}

/* .input-icon-wrapper input:focus {
  border: 1px solid #4d5ae5;
  border-radius: 4px;
} */

/* .input-icon-wrapper input:focus + svg {
  fill: #4d5ae5;
} */

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

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

.modal-form-input:focus {
  border: 1px solid #4d5ae5;
  border-radius: 4px;
}

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

.input-icon-wrapper {
  position: relative;
}

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

.modal-container-textarea {
  margin-bottom: 16px;
}

.modal-text-area {
  padding: 8px 16px;
  width: 100%;
  height: 120px;
  resize: none;

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

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.modal-text-area:focus {
  border: 1px solid #4d5ae5;
  border-radius: 4px;
}

.form-field-checkbox {
  display: block;
  margin-bottom: 24px;
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

/* input:checked + label > span {
  border-radius: 2px;
  fill: #404bbf;
  border: 1px solid #404bbf;
} */

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

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

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

.modal-form-btn {
  display: block;
  text-align: center;
  margin: 0 auto;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

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

  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: #fff;
}

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