.hiden {
  display: none;
}

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

ul {
  list-style-type: none;
  padding-left: 0;
  margin: 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;
  font-family: inherit;
  padding: 0;
}

.hero-banner-title,
.hero-banner-button {
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 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 */

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

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-list,
.address {
  display: none;
}

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

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.54px;
  line-height: 1.17;
  color: #4d5ae5;
}

.header-logo {
  padding: 16px 0;
  display: block;
}

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

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

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

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

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

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

  .header-list-item-link {
    color: #2e2f42;
    padding: 24px 0;
    display: block;
    position: relative;

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

  .line {
    color: #404bbf;
  }

  .header-list-item-link::after {
    content: "";
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .address {
    font-style: normal;
    display: block;
  }

  .address-list {
    gap: 12px;
  }

  .header-list-item-link:hover,
  .header-list-item-link:focus {
    color: #404bbf;
  }

  .header-list-item-link.line::after {
    opacity: 1;
  }

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

  .address-list-link:hover {
    color: #404bbf;
  }

  .address-list-link:focus {
    color: #404bbf;
  }

  .address-list-link {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #434455;

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

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

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

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

/* mobile menu  */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;

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

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

.mobile-menu-container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mobile-menu-container .mob-menu-close {
  background-color: transparent;
}

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

.nav-list-item {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mob-menu-contact {
  margin-bottom: 48px;
}

.addres-list-item {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-style: normal;
  color: #2e2f42;
}

.mobile-menu-container .mob-soc-list {
  gap: 40px;
}

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

/* mobile menu end */

/* hero banner */

.hero-banner {
  max-width: 320px;
  padding: 72px 0;
  text-align: center;
  background-color: #2e2f42;
  background-size: cover;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero-banner-mob.jpg);
  background-repeat: no-repeat;
  background-position: inherit;
  margin: auto;
}

@media (min-resolution: 192dpi) {
  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero-banner-mob@2x.jpg);
  }
}

.hero-banner-title {
  max-width: 216px;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  margin: auto;
  margin-bottom: 72px;
}

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

@media screen and (min-width: 768px) {
  .hero-banner {
    max-width: 768px;
    padding: 112px 0;
  }

  .hero-banner {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/hero-banner-tablet.jpg);
  }

  @media (min-resolution: 192dpi) {
    .hero-banner {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero-banner-tablet@2x.jpg);
    }
  }

  .hero-banner-title {
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 36px;
  }
}

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

  @media (min-resolution: 192dpi) {
    .hero-banner {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../images/hero-banner@2x.jpg);
    }
  }

  .hero-banner-title {
    margin-bottom: 48px;
  }
}

/* benefits section */

.benefits-link {
  display: none;
}

.benefits {
  padding: 96px 0;
}

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

.benefits-list-item {
  width: 100%;
}

.benefits-list-title {
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
  text-align: center;
  margin-bottom: 8px;
  color: #2e2f42;
}

.benefits-list-text {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

@media screen and (min-width: 768px) {
  .benefits-list-item {
    width: calc((100% - 24px) / 2);
  }

  .benefits-list {
    row-gap: 72px;
    column-gap: 24px;
  }

  .benefits-list-title {
    text-align: left;
  }
}

@media screen and (min-width: 1158px) {
  .benefits-link {
    display: flex;
  }

  .benefits {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .benefits-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    background-color: #f4f4fd;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .benefits-list {
    background-color: #ffffff;
    color: #434455;
    max-width: 1128px;
    justify-content: space-between;
    gap: 24px;
  }

  .benefits-list-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
  }

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

/* team section */

.team {
  background: #f4f4fd;
  padding: 96px 0;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 72px;
}

.team-list-item {
  background-color: #ffffff;
  border-radius: 0px 0px 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-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: capitalize;
  color: #2e2f42;
  margin-bottom: 72px;
}

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

.team-list-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  margin: 0;
  text-align: center;
  margin-bottom: 8px;
}

.team-container {
  padding: 32px 0;
}

.soc-list {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.soc-list-item {
  width: 40px;
  height: 40px;
  fill: #f4f4fd;
}
.soc-link:hover {
  background-color: #404bbf;
}

.soc-link:focus {
  background-color: #404bbf;
}

@media screen and (min-width: 768px) {
  .team-list {
    row-gap: 64px;
    column-gap: 24px;
  }

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

  .team-cont-item {
    max-width: 584px;
  }
}

@media screen and (min-width: 1158px) {
  .team-cont-item {
    max-width: 1128px;
  }

  .team {
    padding: 120px 0;
  }

  .team-list {
    gap: 24px;
    justify-content: space-between;
  }

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

/* portfolio section  */

.portfolio {
  padding: 96px 0;
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: center;
}
.portfolio-list-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);
}

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

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

.portfolio-list-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.portfolio-cont-text {
  display: none;
}

.text-container {
  padding: 32px 0 32px 16px;
}

@media screen and (min-width: 768px) {
  .portfolio-list {
    row-gap: 72px;
    column-gap: 24px;
  }

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

@media screen and (min-width: 1158px) {
  .portfolio {
    padding-top: 120px;
    padding-bottom: 120px;
  }

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

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

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

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

  .portfolio-list-image {
    box-shadow: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

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

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

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

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

/* footer section */

.footer {
  background-color: #2e2f42;
  padding: 96px 0;
}

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

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

.footer-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 72px;
}

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

.footer-container {
  margin-bottom: 72px;
}

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

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

.footer-soc-item {
  width: 40px;
  height: 40px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icons {
  fill: #f4f4fd;
}

.footer-form-input {
  border: 1px solid #fff;
  border-radius: 4px;
  width: 288px;
  height: 40px;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  padding-left: 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
}

.form-button {
  min-width: 165px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-icons {
  fill: #ffffff;
  margin-left: 16px;
}

@media screen and (min-width: 768px) {
  .logo-container {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 72px 24px;
    max-width: 584px;
  }

  .footer-form-input {
    width: 264px;
  }

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

  .footer-soc-text,
  .footer-logo {
    text-align: left;
  }

  .footer-logo-container,
  .footer-container {
    margin-bottom: 0;
    align-items: flex-start;
  }
}

@media screen and (min-width: 1158px) {
  .footer-container {
    justify-content: center;
    align-items: center;
    gap: 16px;
  }

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

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

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

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

  .logo-container {
    align-items: baseline;
    flex-wrap: nowrap;
    max-width: 1158px;
    gap: 0;
  }

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

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

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

  .form-input::placeholder {
    color: #ffffff;
  }

  .form-icons {
    fill: #ffffff;
    margin-left: 16px;
  }

  .footer-form {
    margin-left: 80px;
  }
}

/* overlay - pop-up */

.overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.pop-up {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  width: 288px;
  min-height: 623px;
  display: flex;
  flex-direction: column;
  padding: 72px 16px 24px 16px;
  position: absolute;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  background: #fcfcfc;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.pop-up-close-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  align-self: flex-end;
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.pop-up-close-btn:hover,
.pop-up-close-icon:hover {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}

.pop-up-close-btn:focus {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}

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

.pop-up-form {
  margin-bottom: 8px;
}

.pop-up-form-comment {
  margin-bottom: 16px;
}

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

.form-input {
  position: relative;
}

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

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

.form-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input-line:focus ~ .form-input-icon {
  fill: #4d5ae5;
}

.form-textarea {
  width: 100%;
  height: 120px;
  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;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.pop-up-check {
  margin-bottom: 24px;
}

.pop-up-button {
  margin-top: 0;
}

.check-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-form {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  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);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  flex-shrink: 0;
}

.check-input:checked ~ .check-form {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

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

.check-input:checked + .check-label .check-form {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.check-form-list {
}

@media screen and (min-width: 768px) {
  .pop-up {
    width: 408px;
    min-height: 584px;
    padding-left: 24px;
    padding-right: 24px;
  }
}
