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

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

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

a {
  text-decoration: none;
}

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

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

.section {
  padding: 120px 0;
}

/* -----------------HEADER------------------ */
.page-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;
}

.header-navigation {
  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 {
  padding: 24px 0;
  margin-right: 76px;
}

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

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

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

.header-link.current {
  position: relative; /* відносне позіціювання */
}

.header-link.current::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -1px;

  width: 100%;
  height: 4px;

  border-radius: 2px;
  background-color: #404bbf;
}

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

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

.header-link:hover,
.header-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.header-link.current {
  color: #404bbf;
}
/* ---------------------HERO------------------ */

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

.hero-title {
  max-width: 496px;
  margin: 0 auto;
  margin-bottom: 48px;
  font-size: 56px;
  line-height: 1.07143;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
}

.hero-button {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  padding: 16px 32px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  border: none;

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

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

/* ---------------------FEATURES------------------ */
.features {
}

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

.features-title {
}

.features-list {
  display: flex;
  gap: 24px;
}

.features-item {
  width: calc((100% - 24px * 3) / 4);
}

.features-icon-wrapper {
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
  margin-bottom: 8px;
  display: flex;
  justify-content: center; /* по горизонтали */
  align-items: center;
}

.features-icon {
}

.features-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
.features-item-text {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* ------------------TEAM------------------ */
.team {
  background: #f4f4fd;
}
.team-title {
  /* padding-top: 120px; */
  margin-bottom: 72px;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}
.team-list {
  display: flex;
  gap: 24px;
}
.team-item {
  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);
  background: #fff;
  border-radius: 0 0 4px 4px;
  width: calc((100% - 72px) / 4);
}
.team-image {
}

.team-card {
  padding: 32px 16px;
  text-align: center;
}

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

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

.team-social-link {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;

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

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

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

/* --------------------PORTFOLIO------------------ */

.portfolio {
}
.portfolio-title {
  margin-bottom: 72px;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
}
.portfolio-item {
  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-wrapper {
  position: relative;
  overflow: hidden;
}

.portfolio-image {
}

.portfolio-overlay-text {
  position: absolute;
  top: 0;
  left: 0;

  padding: 40px 32px;
  width: 100%;
  height: 100%;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;

  background-color: #4d5ae5;

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

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

.portfolio-card {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
}
.portfolio-team-subtitle {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
.portfolio-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
/* ---------------------FOOTER------------------ */
.page-footer {
  background: #2e2f42;
  padding: 100px 0;
}

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

.footer-info {
  display: flex;
  flex-direction: column;
  margin-right: 120px;
}

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

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16667;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-right: 80px;
}

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

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

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

.footer-social-item {
}

.footer-social-link {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;

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

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

.footer-social-icon {
  fill: #f4f4fd;
}

.footer-subscribe {
  margin-left: auto;
}

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

.footer-form {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-input {
  width: 264px;
  height: 40px;

  border: 1px solid #fff;
  border-radius: 4px;
  background-color: transparent;

  padding: 8px 16px;
  color: #fff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}

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

.footer-input::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
  /* padding: 8px 16px; */
}

.footer-submit-btn {
  width: 165px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  border-radius: 4px;
  background-color: #4d5ae5;
  border: none;

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

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

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

/* .footer-field-wrapper {
  position: relative;
} */
.footer-send-icon {
  fill: #fff;
}
/* .footer-send-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  fill: #fff;
} */

.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%;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  width: 408px;
  min-height: 584px;
  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;
  padding: 72px 24px 24px 24px;

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

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

.modal-form {
  display: block;
}

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

/* .modal-group--policy {
  margin-top: 16px;
} */

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

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

.modal-close-btn {
  display: flex;
  justify-content: center;
  align-items: center;

  position: absolute;
  top: 24px;
  right: 24px;

  width: 24px;
  height: 24px;

  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);

  color: #000;
  cursor: pointer;

  transition:
    background-color 250ms ease,
    color 250ms ease;
}

.modal-close-icon {
  fill: currentColor;
}

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

.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-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  padding-left: 38px;
}

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

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

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

.modal-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: #2e2f42;

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

.modal-textarea {
  height: 120px;
  resize: none;
  padding: 8px 16px;
}

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

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

.modal-checkbox-label a {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.checkbox-mark {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  fill: transparent;

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

.modal-checkbox:checked + .modal-checkbox-label .checkbox-mark {
  border-radius: 2px;
  background-color: #404bbf;
  border: 1px solid #404bbf;
  fill: #f4f4fd;
}

.modal-submit-btn {
  display: block;
  margin: 0 auto;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
  background-color: #4d5ae5;
  /* margin-bottom: 24px; */

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

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

.modal-submit-btn:hover,
.modal-submit-btn:focus {
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #404bbf;
}

.modal-input,
.modal-textarea {
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
