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

/* reset */

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

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

a {
  text-decoration: none;
}

/*common */

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

/* header */

.header {
  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);
  border-bottom: 1px solid #e7e9fc;
}

.header-container {
  display: flex;
  align-items: center;
}

.header-nav {
  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 .logo2 {
  color: #2e2f42;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 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.nav-pos {
  position: relative;
}

.nav-link.nav-pos::after {
  content: "";

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

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

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

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

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

/* main */

/* first-section */

.first-section {
  padding: 188px 0;
  margin: 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/people-office.jpg");
  max-width: 1440px;
}

.first-section-txt {
  margin: auto;
  margin-bottom: 48px;
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07143;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  align-items: center;
}

.first-section-btn {
  margin: auto;
  display: block;
  font-family: "Roboto", sans-serif;
  cursor: pointer;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  font-weight: 500;
  font-size: 16px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  background: #4d5ae5;
  color: #ffffff;
}

.first-section-btn:hover,
.first-section-btn:focus {
  background-color: #404bbf;
}

/* second-section */

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

.icon-items {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  gap: 24px;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  min-height: 112px;
  position: relative;
}
.icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

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

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

.second-section-txt {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* third section */

.third-section {
  padding: 120px 0;
  background: #f4f4fd;
}

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

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

.img-user {
  display: block;
}

.user-name {
  padding: 32px 0;
}

.third-section-item {
  overflow: hidden;
  width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
  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);
  background-color: #ffffff;
}

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

.third-section-txt {
  margin-bottom: 8px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
}

.network-list {
  display: flex;
  justify-content: center;
  overflow: hidden;
  gap: 24px;
}

.network-item {
  width: 40px;
  height: 40px;
}

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

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

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  fill: #f4f4fd;
}

/* fourth section */

.fourth-section {
  padding: 120px 0;
}

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

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

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

.fourth-section-item: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);
}

.fourth-section-img {
  position: relative;
  overflow: hidden;
}

.fourth-section-item:hover .img-txt {
  transform: translateY(0%);
}

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

.img-portfolio {
  display: block;
}

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

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

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

/* footer*/

.footer {
  padding: 100px 0;
  background: #2e2f42;
}

.footer-container {
  display: flex;
  align-items: baseline;
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

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

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

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

.footer-txt {
  max-width: 264px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #f4f4fd;
}

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

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

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

.sm-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  width: 100%;
  border-radius: 50%;
  background-color: #4d5ae5;
}
.sm-link:hover,
.sm-link:focus {
  background-color: #31d0aa;
}

.sm-icons {
  fill: #f4f4fd;
}

.subscribe {
  margin: 0 auto;
}

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

.form_sub {
  display: flex;
  gap: 24px;
}

.input_sub {
  padding-left: 16px;
  background-color: transparent;
  border: 1px solid #fff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

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

.button_sub {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  cursor: pointer;
  border: none;

  border-radius: 4px;
  padding: 8px 16px;
  min-width: 165px;
  height: 40px;

  background: #4d5ae5;

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

  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;
}

.icon_sub {
  margin-left: 16px;
  fill: #fff;
}

/* modal */

.modal-overlay {
  position: fixed;
  justify-content: center;
  align-items: center;
  list-style-type: none;

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  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);
}

.modal-overlay.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;
  padding: 72px 24px 24px 24px;

  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;

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

.modal-close {
  position: absolute;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  top: 24px;
  right: 24px;

  border-radius: 4px;
  width: 24px;
  height: 24px;

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

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

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

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

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

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

.form-other {
  margin-bottom: 8px;
}

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

.form-icon {
  position: relative;
}

.form-icon svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

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

.form-input {
  outline: none;
  outline: transparent;
  background-color: transparent;

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

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

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

.form-textarea {
  margin-bottom: 16px;
}

.form-comments {
  background-color: transparent;
  outline: transparent;
  resize: none;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  padding: 8px 16px;
  padding-left: 16px;
  width: 100%;
  height: 120px;
  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);
}

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

.modal-check {
  margin-bottom: 24px;
}

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

.span-check {
  fill: transparent;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  width: 16px;
  height: 16px;
  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:checked + .label-check > .span-check {
  border-radius: 2px;
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.icon-check {
  fill: #f4f4fd;
}

.policy-link {
  text-decoration: underline;
  color: #4d5ae5;
}

.modal-button {
  margin: 0 auto;
  display: block;
  cursor: pointer;
  min-width: 169px;
  min-height: 56px;
  border: none;
  border-radius: 4px;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.5;
  font-weight: 500;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  background: #4d5ae5;
  color: #ffffff;
}

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