body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #fff;
}
/**  Reset some default styles*/
ul,
ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

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

img {
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

a {
  text-decoration: none;
}

p {
  margin: 0;
  padding: 0;
}

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

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

.logo {
  display: flex;
  align-items: center;
  margin-right: 76px;
  padding: 24px 0;

  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 .logo-part {
  color: #2e2f42;
}

.nav-list {
  display: flex;
}

.nav-item:not(:last-child) {
  margin-right: 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;

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

  bottom: -1px;
  width: 100%;
  height: 4px;
}

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

.contacts-list {
  display: flex;
  align-items: center;
}

.contacts-item:not(:last-child) {
  margin-right: 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);
}

.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
  color: #404bbf;
}

/** Hero section styles */
.hero {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  padding-top: 188px;
  padding-bottom: 188px;

  max-width: 1440px;

  background: #2e2f42;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url('../images/people-office.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

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

.hero-title {
  margin: 0 auto;
  margin-bottom: 48px;

  max-width: 496px;

  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
}

.hero-button,
.modal-submit-button {
  display: block;
  padding: 16px 32px;
  margin-left: auto;
  margin-right: auto;

  height: 56px;
  min-width: 169px;

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

  border: none;
  border-radius: 4px;

  background: #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,
.footer-button:hover,
.modal-submit-button:hover,
.hero-button:focus,
.footer-button:focus,
.modal-submit-button:focus {
  background-color: #404bbf;
}

/** Section with description */
.section-description {
  padding: 120px 0;
}

.description-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;

  height: 112px;
  width: 264px;

  border: 1px solid #8e8f99;
  border-radius: 4px;
  background-color: #f4f4fd;
}

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

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

.description-title {
  margin-bottom: 8px;

  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

/** Section with team members */

.section-team {
  display: flex;
  padding: 120px 0;

  background: #f4f4fd;
}

.team-container {
  display: flex;
  flex-direction: column;
}

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

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

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

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

  width: 100%;
  height: 100%;

  border-radius: 50%;
  background-color: #4d5ae5;

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

.social-icon {
  fill: #f4f4fd;
}

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

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

.team-main-title {
  margin-bottom: 72px;
  text-align: center;

  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-transform: capitalize;
}

.team-text {
  margin-bottom: 8px;
}

.team-item {
  padding: 0px 0px 32px 0px;

  width: 264px;
  height: 428px;

  background: #fff;
  border-radius: 0 0 4px 4px;
  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);
}

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

.team-title {
  margin-bottom: 8px;

  text-align: center;
  text-transform: capitalize;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.team-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
}

/** Section with portfolio items */
.section-portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}

.portfolio-container {
  display: flex;
  flex-direction: column;
}

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

.portfolio-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover,
.portfolio-item: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-thumb {
  position: relative;
  overflow: hidden;
}

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

.overflow-text {
  position: absolute;
  padding: 40px 32px;
  top: 0;

  height: 100%;
  width: 100%;

  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;

  background-color: #4d5ae5;

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

.portfolio-text-container {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-main-title {
  margin-bottom: 72px;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
}

.portfolio-title {
  margin-bottom: 8px;

  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

/** Page footer styles */
.page-footer {
  padding: 100px 0;
  background-color: #2e2f42;
}

.footer-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

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

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

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.page-footer .logo {
  margin-right: 0;
  padding: 0;
}

.footer-text {
  max-width: 264px;

  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

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

.social-media-text {
  margin-bottom: 16px;

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

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

.social-item-footer .contacts-link {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-section {
  margin-left: auto;
}

.footer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;

  width: 165px;
  height: 40px;
  min-width: 165px;

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

  background: #4d5ae5;
  border-radius: 4px;
  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);
}

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

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

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

.input-footer {
  padding: 8px 16px;

  width: 264px;
  height: 40px;

  font-size: 12px;
  line-height: 2;
  color: #fff;
  letter-spacing: 0.04em;

  background-color: inherit;
  border: 1px solid #fff;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.input-footer::placeholder {
  color: #fff;
  font-size: 12px;
}

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

.modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;

  width: 100%;
  height: 100%;

  background-color: rgba(46, 47, 66, 0.4);

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

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

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

  width: 408px;
  min-height: 584px;
  max-width: 408px;
  overflow-y: auto;

  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;
  border-radius: 4px;

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

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

.modal-cross-button {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  padding: 0;
  top: 24px;
  right: 24px;

  width: 24px;
  height: 24px;

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

  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-cross-button:hover,
.modal-cross-button:focus {
  background-color: #404bbf;
  border-color: #404bbf;
  border: none;
  outline: none;
}

.modal-cross-button:focus .icon-cross,
.modal-cross-button:hover .icon-cross {
  fill: #ffffff;
}

.modal-submit-button {
  margin: 0 auto;
}

.icon-cross {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.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-label {
  display: block;
  margin-bottom: 4px;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-input {
  padding-left: 38px;

  height: 40px;
  width: 100%;

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

.modal-textarea {
  padding: 8px 16px;

  width: 100%;
  height: 120px;
  resize: none;

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

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

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

.modal-input-container {
  margin-bottom: 8px;
}

.modal-input-area {
  margin-bottom: 16px;
}

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

.icon-form {
  position: absolute;
  top: 50%;
  left: 16px;

  fill: #2e2f42;

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

.modal-input:focus,
.modal-textarea:focus,
.input-footer:focus {
  border-color: #4d5ae5;
  outline: none;
}

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

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

.checkbox-label {
  align-items: center;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.privacy-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 8px;

  width: 16px;
  height: 16px;

  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  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);
}

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