*,
*::before,
*::after {
  box-sizing: border-box;
}

/* #region Main */

body {
  font-family: 'Roboto', sans-serif;
  color: #2e2f42;
  background-color: #ffffff;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
}

h1 {
  font-weight: 700;
  font-size: 56px;
  letter-spacing: 0.02em;
  line-height: 1.07;
  color: #ffffff;
  text-align: center;
  margin: 0;
}

h2 {
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin: 0;
}

h3 {
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin: 0;
}

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

p {
  margin: 0;
}

.container {
  max-width: 1158px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}
/* #endregion */

/* #region Header */

.header {
  background-color: #ffffff;
  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;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* #region Navigation */

.navigation {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.navigation-list {
  font-weight: 500;
  letter-spacing: 0.04em;
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.navigation-link {
  color: #2e2f42;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-style: normal;
  display: block;
  padding: 24px 0;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
}

.navigation-link.current {
  color: #404bbf;
}

.navigation-link.current::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.navigation-link:hover,
.navigation-link:focus {
  color: #404bbf;
}

.navigation-link:active {
  color: #404bbf;
  text-decoration: underline;
}
/* #endregion */

/* #region Contacts */

/* .contacts {} */

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

.contacts-link {
  color: #434455;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-style: normal;
  display: block;
  padding: 24px 0;
  gap: 40px;
  text-decoration: none;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* #endregion */

/* #region Hero */
.hero {
  background-color: #2e2f42;
  text-align: center;
  padding-top: 188px;
  padding-bottom: 188px;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/hero_photo.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 1440px;
  margin: 0 auto;
}

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

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

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

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-button-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: row;
  gap: 10px;
}

/* #endregion */

/* #region Features */

.features {
  background-color: #ffffff;
  padding-top: 120px;
  padding-bottom: 120px;
}

.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-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

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

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

.features-subtitle {
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
  margin-bottom: 8px;
}

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

.features-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* #endregion */

/* #region Team */

.team {
  background-color: #f4f4fd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 120px;
  padding-top: 120px;
}

.team-title {
  line-height: 1.11;
  text-align: center;
  max-width: 165px;
  margin: 0 auto;
}

.team-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 72px;
}

.team-item {
  text-align: center;
  background-color: #ffffff;
  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);
  border-radius: 0 0 4px 4px;
  padding: 0px;
  width: 264px;
  /* height: 380px; */
}

.team-img {
  display: block;
  max-width: 100%;
}

.team-item-text {
  padding: 32px 16px;
}

.team-subtitle {
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  /* margin-top: 32px; */
  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;
}

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

  list-style: none;
}
.team-socials-item {
}

.team-socials-img {
  fill: #f4f4fd;
}

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

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

/* #endregion */

/* #region Portfolio */

.portfolio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 120px;
  padding-top: 120px;
}

.portfolio-title {
  max-width: 220px;
  line-height: 1.11;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 72px;
  text-align: center;
}

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

.portfolio-item {
  max-width: 360px;
  transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover,
.portfolio-item:focus {
  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-text {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-img {
  display: block;
  max-width: 100%;
}

.portfolio-subtitle {
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

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

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

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  transform: translateY(100%); /* сховано знизу */
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
  padding: 40px 32px;
  text-align: left;
}

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

.overlay-text {
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

/* #endregion */

/* #region Footer */
.footer-container {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-direction: row;
  /* gap: 24px; */
  /* margin-top: 100px; */
}

.footer {
  background-color: #2e2f42;
  color: #f4f4fd;
  padding-top: 100px;
  padding-bottom: 100px;
  display: flex;
  align-items: flex-start;
}

.footer-info {
}

.footer-logo {
  margin-bottom: 16px;
  max-width: 115px;
}
.footer-text {
  color: #f4f4fd;
  font-weight: 400;
  letter-spacing: 0.02em;
  max-width: 264px;
  /* margin-top: 0; */
}
.footer-socials {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-left: 120px;
}
.footer-socials-text {
  color: #fff;
  margin-bottom: 16px;
  margin-top: 0;
  font-weight: 500;
}
.footer-socials-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  list-style: none;
}
/* .team-socials-item {
} */

.footer-socials-img {
  fill: #f4f4fd;
}

.footer-socials-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  color: #f4f4fd;
  border-radius: 50%;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-socials-link:hover,
.footer-socials-link:focus {
  background-color: #31d0aa;
}

/* Subscribe */

.footer-form {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  margin-left: 80px;
}
.footer-form-label {
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}
.footer-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 24px;
}
.footer-form-input {
  border: 1px solid #fff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: transparent;
  color: #fff;
  padding: 8px 16px;
  outline: none;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
}

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

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

.footer-form-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;

  border: none;
  border-radius: 4px;
  padding: 8px 24px;
  width: 165px;
  height: 40px;
  background-color: #4d5ae5;

  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;

  cursor: pointer;

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

.footer-form-icon {
  fill: #fff;
}

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

/* #endregion */

/* #region Logo */
.logo {
  text-transform: uppercase;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  letter-spacing: 0.03em;
  line-height: 1.17;
  margin-right: 76px;
  display: block;
  /* padding: 24px 0; */
}

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

/* #region Backdrop */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  /* display: flex;
  align-items: center;
  justify-content: center; */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.25s 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%;

  width: 408px;
  min-height: 584px;
  border-radius: 4px;
  padding: 72px 24px 24px;

  transform: translate(-50%, -50%);

  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;

  transition: transform 0.25s 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;
  width: 24px;
  height: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-img {
  transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close-btn:hover .modal-close-img,
.modal-close-btn:focus .modal-close-img {
  fill: #fff;
}

.modal-text {
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
}

/* #region Modal_form */
.callback-form {
}
.callback-wrapper:not(:last-child) {
  margin-bottom: 8px;
}
.callback-label {
  display: block;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}
.callback-field {
  position: relative;
}
.callback-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 100%;
  height: 40px;
  padding: 8px 38px;
  outline: none;
  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.callback-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  fill: #2e2f42;
  pointer-events: none;
  transition: fill 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.callback-textarea {
  width: 100%;
  height: 120px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  margin-bottom: 16px;
  padding: 8px 16px;
  outline: none;

  font-size: 12px;
  line-height: 1.33;
  letter-spacing: 0.04em;

  resize: none;

  transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Custom chekbox */
.callback-agree-label {
  display: block;
  margin-bottom: 24px;

  font-size: 12px;
  line-height: 1.33;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.callback-agree-input:checked + .callback-toggler {
  background-color: #404bbf;
  border-color: transparent;
}

.callback-agree-input:checked + .callback-toggler > .callback-toggler-icon {
  opacity: 1;
  fill: #f4f4fd;
}

.callback-toggler-icon {
  opacity: 0;
  fill: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.callback-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-right: 8px;

  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: background-color, border-color;

  cursor: pointer;
}
.callback-toggler-icon {
  opacity: 0;
}
.callback-link {
  line-height: 1.33;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}
/* end Custom chekbox */
.callback-submit-btn {
  display: block;
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  margin: 0 auto;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.callback-submit-btn:focus,
.callback-submit-btn:hover {
  background-color: #404bbf;
}
/* #endregion */
/* #endregion */
