.hidden {
  display: none;
}

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

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

button {
  cursor: pointer;
}

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

/*common */

.container {
  max-width: 320px;
  padding: 0 16px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding: 0 15px;
  }
}

/* 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;
  justify-content: space-between;
}

.nav-list,
.header-addrees {
  display: none;
}

.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 {
  display: block;
  padding: 16px 0;
}

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

.mobile-menu-btn {
  padding: 0;
  border: none;
  background-color: transparent;
}

.mobile-menu-icon {
  display: block;
  fill: #2f2f37;
}

@media screen and (min-width: 768px) {
  .header-nav {
    display: flex;
    align-items: center;
  }

  .header-logo {
    margin-right: 120px;
    padding: 24px 0;
  }

  .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 {
    display: block;
    font-style: normal;
  }

  .address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

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

  .mobile-menu-btn {
    display: none;
  }

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

@media screen and (min-width: 1158px) {
  .header-logo {
    margin-right: 76px;
  }

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

  .address-link {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
}

/* mobile menu */

.mobile-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;

  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

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

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

.mobile-menu-container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;

  padding-top: 72px;
  padding-bottom: 40px;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
}

.mobile-menu-nav {
  margin-bottom: auto;
}

@media screen and (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}

/* first-section */

.first-section {
  padding: 72px 0;
  margin: 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 320px;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/mob/office-mob-1@2x-min.jpg");
}

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

.first-section-btn {
  margin: auto;
  display: block;
  font-family: "Roboto", sans-serif;
  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;
}

@media screen and (min-width: 768px) {
  .first-section {
    padding: 112px 0;
    max-width: 768px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/tab/office-tab-1-min.jpg");
  }

  .first-section-txt {
    margin-bottom: 36px;
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07143;
  }
}

@media screen and (min-width: 1158px) {
  .first-section {
    padding: 188px 0;
    max-width: 1440px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/desk/office-desk-1-min.jpg");
  }

  .first-section-txt {
    margin-bottom: 48px;
  }
}

/* second-section */

.second-section {
  padding: 96px 0;
}

.icon-items {
  display: none;
}

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

.second-section-item {
  width: 100%;
}

.second-section-name {
  text-align: center;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1111;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

@media screen and (min-width: 768px) {
  .second-section-list {
    justify-content: center;
    gap: 24px;
  }

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

@media screen and (min-width: 1158px) {
  .second-section {
    padding: 120px 0;
  }

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

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

  .second-section-name {
    font-weight: 500;
    font-size: 20px;
  }
}

/* third section */

.third-section {
  padding: 96px 0;
  background-color: #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;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.img-user {
  display: block;
}

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

.third-section-item {
  overflow: hidden;
  width: 264px;
  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;
}

@media screen and (min-width: 768px) {
  .third-section-list {
    gap: 72px;
  }
}

@media screen and (min-width: 1158px) {
  .third-section {
    padding: 120px 0;
    background-color: #f4f4fd;
  }

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

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

/* fourth section */

.fourth-section {
  padding: 96px 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;
  row-gap: 48px;
}

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

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

@media screen and (min-width: 768px) {
}

@media screen and (min-width: 1158px) {
  .fourth-section {
    padding: 120px 0;
  }
  .fourth-section-list {
    column-gap: 24px;
  }
}
