:root {
  --prima-text-color: #434455;
  --title-text-color: #2e2f42;
  --accent-color: #4d5ae5;
  --prima-white-color: rgba(255, 255, 255, 0.84);
  --secondary-color: rgba(245, 245, 252, 0.982);
  --bg-color: #2e2f42;
  --btn-bg-color: rgb(64, 75, 191);
  --secondary-btn-bg-color: rgb(232, 234, 252);
  --icon-color: rgb(244, 244, 253);
  --shadow-color: rgba(46, 47, 66, 0.7);
  --icon-logo-color: rgb(142, 143, 153);
  --border-color: rgb(142, 143, 153);
  --icon-hover-color: rgb(64, 75, 191);
  --footer-text-color: #FFFFFF;
  --ovarley-text-color: rgb(244, 244, 253);
  --modal-desc-color: rgb(142, 143, 153);
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--prima-text-color);
  background-color: var(--prima-white-color);
}

h1,
h2,
h3,
p {
  margin-top: 0;
  margin-bottom: 0;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

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


.list {
  list-style: none;
}

.link {
  text-decoration: none;
}

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

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

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

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

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}


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

.section-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  margin-bottom: 72px;
  color: var(--title-text-color);

}

.title-name {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 2%;
  text-align: center;

  margin-bottom: 8px;
  color: var(--title-text-color);
}

@media only screen and (min-width: 768px) {
  .title-name {
    text-align: left;
  }
}

@media only screen and (min-width: 1158px) {
  .title-name {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: left;
  }
}

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

.social-list-icon {
  fill: var(--icon-color);
}

.social-list-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--accent-color);
}

/* Main*/

/* ===============Header================= */

.page-nav {
  display: flex;
  align-items: center;
}

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

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

.menu-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-color);
  padding-top: 24px;
  padding-bottom: 22px;
}

@media only screen and (min-width: 768px) {
  .menu-logo {
    margin-right: 120px;

  }
}

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

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--title-text-color);
}

.menu-item:not(:last-child) {
  margin-right: 40px;
}

.menu-item {
  content: '';
}

.menu-link {
  position: relative;
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  padding: 24px 0;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--title-text-color);
}

.activ {
  color: #404bbf
}

.activ::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
}

.menu-link.activ::after {
  background-color: var(--icon-hover-color);
}

.menu-link:hover,
.menu-link:focus {
  color: var(--accent-color);
}

/*-- Address --*/

@media screen and (max-width: 767px) {
  .menu {
    display: none;
  }

  .address {
    display: none;
  }
}

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

}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .address {
    display: flex;
    flex-wrap: wrap;
    row-gap: 12px;
    padding-left: 122px;
  }
}

@media only screen and (min-width: 1158px) {
  .address {
    display: flex;
    align-items: center;
    gap: 40px;
  }
}

@media only screen and (min-width: 768px) {
  .contact {
    font-weight: 400;
    font-size: 12px;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0.04em;
    color: var(--prima-text-color);
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media only screen and (min-width: 1158px) {
  .contact {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin-left: auto;
  }
}

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

  .contact:hover,
  .contact:focus {
    color: var(--accent-color);
  }
}

/*==== Mobile-menu ====*/

.mobile-menu-open {
  padding-top: 24px;
  padding-bottom: 24px;
  border: none;
  background-color: transparent;
  line-height: 0;
  padding: 0;
}

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

.mobile-menu-open-icon {
  stroke: var(--bg-color);
}

.mobile-menu {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 999;
  top: 0;
  left: 0;
  background-color: var(--footer-text-color);
  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);

  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 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100vw;
  height: 100vh;
  position: relative;
  padding-top: 80px;
  padding-left: 40px;
  padding-bottom: 40px;
}

.mobile-menu-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(231, 233, 252);
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mobile-menu-close-btn:hover,
.mobile-menu-close-btn:focus {
  background-color: var(--accent-color);
}

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

.mobile-menu-list:not(:last-child) {
  margin-bottom: 40px;
}

.mobile-menu-link {
  font-style: normal;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--title-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-link:hover {
  color: var(--accent-color);
}

.mobile-menu-item {
  margin-bottom: 40px;
}

.mobile-menu-active-studio {
  font-style: normal;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--accent-color);
}

.mobile-menu-active-portfolio {
  font-style: normal;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--accent-color);
}

.contact-social-container {
  display: flex;
  flex-direction: column;
}

.mobile-menu-adress {
  gap: 40px;
  margin-bottom: 48px;
}

.address-list-mobile {
  display: flex;
  flex-direction: column;
  gap: 40px;
  list-style: none;
}

.mobile-menu-contact-tel {
  font-style: normal;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--prima-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-contact-tel:hover {
  color: var(--accent-color);
}

.mobile-menu-contact-mail {
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--prima-text-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-contact-mail:hover {
  color: var(--prima-text-color);
}

.mobile-menu-social-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}



/* ===============Hero section============ */

.hero {
  display: flex;
  padding: 112px 0;
  min-width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)),
    url("../images/hw-07/office_mob@1x.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: var(--bg-color);
}

@media only screen and (min-width: 1158px) {
  .hero {
    padding: 188px 0;
  }
}

@media (min-device-pixel-ratio: 2),
(min-resolution: 192dpi),
(min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)),
      url("../images/hw-07/office_mob@2x.jpg");
  }
}

@media only screen and (min-width: 429px) {
  .hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)),
      url("../images/hw-07/office_tab@1x.jpg");
  }

  @media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
    .hero {
      background-image: linear-gradient(rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)),
        url("../images/hw-07/office_tab@2x.jpg");
    }
  }
}

@media only screen and (min-width: 769px) {
  .hero {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)),
      url("../images/hw-07/office_desk@1x.jpg");
  }

  @media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
    .hero {
      background-image: linear-gradient(rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)),
        url("../images/hw-07/office_desk@2x.jpg");
    }
  }
}

.hero-container {
  width: 100%;
}

.hero-title {
  max-width: 320px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  color: var(--prima-white-color);
  letter-spacing: 0.02em;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 72px;
}

@media only screen and (min-width: 768px) {
  .hero-title {
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07;
    margin-bottom: 36px;
  }
}

@media only screen and (min-width: 1158px) {
  .hero-title {
    margin-bottom: 48px;
  }
}

.modal-btn {
  font-family: "Roboto", sans-serif;
  min-width: 169px;
  height: 56px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  display: block;
  align-items: center;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: none;
  padding-top: 16px;
  padding-right: 32px;
  padding-bottom: 16px;
  padding-left: 32px;
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0px 4px 4px var(--shadow-color);
  background: var(--accent-color);
  color: var(--prima-white-color);

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

.modal-btn:hover,
.modal-btn:focus,
.modal-btn:active {
  background: var(--btn-bg-color);
  color: var(--prima-white-color);
}

/* ===========Objectives section============= */

.goal-wrapper {
  display: none;
}

@media only screen and (min-width: 1158px) {
  .goal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 264px;
    height: 112px;
    margin-bottom: 8px;
    background: #F4F4FD;
    border-radius: 4px;
  }
}

@media only screen and (min-width: 1158px) {
  .icon {
    width: 64px;
    height: 64px;
  }
}

@media only screen and (min-width: 1158px) {
  .goal-item:not(:last-child) {
    margin-right: 24px;
  }
}

.goal-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 2%;
  width: 100%;
  padding: 24p 0;
  color: var(--prima-text-color);
}

@media only screen and (min-width: 768px) {
  .goal-text {
    width: 356px;
  }
}

@media only screen and (min-width: 1158px) {
  .goal-text {
    width: 264px;
  }
}

.goal-item {
  display: block;
}

@media only screen and (max-width: 767px) {
  .goal-item {
    gap: 72px;
  }
}

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

@media only screen and (min-width: 1158px) {
  .goal-item {
    width: none;
  }
}


@media only screen and (min-width: 428px) and (max-width: 1157px) {
  .goal {
    display: flex;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }
}

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

/*=======Devices section=======*/

.devices-section {
  display: none;
}

@media only screen and (min-width: 1158px) {
  .devices-section {
    display: block;
    padding-top: 0px;
  }
}

.devices {
  display: flex;
}

.devices-images:not(:last-child) {
  margin-right: 24px;
}

/*=======Team section=======*/
.team-section {
  background-color: var(--secondary-color);
}

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

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .team-container {
    width: 552px;
    padding-left: 0;
    padding-right: 0;
  }
}

.team-container {
  width: 100%;
}

.card-title-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;

  margin-bottom: 8px;
  color: var(--title-text-color);
}

.team {
  column-gap: 24px;
  row-gap: 72px;
  display: flex;
  justify-content: center;

}

@media only screen and (max-width: 1157px) {
  .team {
    flex-wrap: wrap;
  }
}

.team-work {
  text-align: center;
  border-radius: 0px 0px 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: var(--prima-white-color);
}

.team-card-wrapper {
  padding: 32px 0;
  margin: auto;
  border-radius: 0px 0px 4px 4px;
}

.team-features-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: var(--prima-text-color);
}

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

.team-link:hover,
.team-link:focus {
  background-color: var(--btn-bg-color);
}

/*-- Customers section --*/

.customers-container {
  width: 100%;
}

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

@media only screen and (min-width: 1158px) {
  .customers-container {
    width: 100%;
  }
}

.customers-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 72px;
}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .customers-list {
    row-gap: 63px;
  }
}

@media only screen and (min-width: 1158px) {
  .customers-list {
    flex-wrap: nowrap;
    column-gap: 24px;
  }
}

.customers-icon {
  fill: currentColor;
}

.customers-title {
  font-size: 36px;
  line-height: 40px;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--title-text-color);
  margin-bottom: 72px;
}

.customers-list-item {
  width: calc((100% - 16px) / 2);
  height: 88px;
}

@media only screen and (min-width: 768px) {
  .customers-list-item {
    width: calc((100% - 48px) / 3);
  }
}

@media only screen and (min-width: 1158px) {
  .customers-list-item {
    width: calc((100% - 120px) /6);
  }
}

.customers-item-link {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border-color);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.customers-item-link:hover,
.customers-item-link:focus {
  border-color: var(--icon-hover-color)
}

.customers-item-link:hover,
.customers-item-link:focus {
  color: var(--icon-hover-color)
}

/*-- Footer --*/

.footer-container-content {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;

}

@media only screen and (max-width: 767px) {
  .footer-container-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 72px;
    max-width: 428px;
  }
}

@media only screen and (min-width: 1158px) {
  .footer-container-content {
    flex-wrap: nowrap;
    margin-left: auto;
    margin-right: auto;
  }
}

.page-footer {
  padding-top: 96px;
  padding-bottom: 96px;
  background-color: var(--bg-color);
}

@media only screen and (min-width: 768px) {
  .page-footer {}
}

@media only screen and (min-width: 1158px) {
  .page-footer {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

.footer-menu-logo {
  font-family: "Raleway", sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.17;
  display: inline-block;
  align-items: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--accent-color);
}

.footer-logo {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.17;
  display: inline-block;
  align-items: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--secondary-color);
}

@media only screen and (max-width: 767px) {
  .footer-menu-logo {
    padding-left: 75px;
  }
}

.footer-text {
  width: 264px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--secondary-color);
}

.page-footer-container {
  display: inline-block;
}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .page-footer-container {
    margin-right: 24px;
    margin-bottom: 72px;
    padding-left: 108px;
  }
}

@media only screen and (min-width: 1158px) {
  .page-footer-container {
    margin-right: 120px;
  }
}

.footer-list {
  gap: 16px;
}

.wrapper-container {
  display: block;
  align-items: center;
  width: 208px;
}

@media only screen and (min-width: 1158px) {
  .wrapper-container {
    margin-right: 80px;
  }
}

.text-social {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  text-align: left;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--footer-text-color);
}

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

.footer-link:hover,
.footer-link:focus {
  background-color: #31D0AA;
}

.form-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .form-container {
    display: block;
    padding-left: 108px;
  }
}

@media only screen and (min-width: 1158px) {
  .form-container {
    width: 100%;
    display: block;
  }
}

.form-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  color: rgb(255, 255, 255);
}

.footer-form {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  outline: none;
}

@media only screen and (min-width: 1158px) {
  .footer-form {
    flex-wrap: nowrap;
  }
}

.footer-form-input {
  width: 100%;
  height: 40px;
  padding-left: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 16px;
  background-color: var(--bg-color);

  border: 1px solid #FFFFFF;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
  border-radius: 4px;
  color: var(--prima-white-color)
}

@media only screen and (max-width: 767px) {
  .footer-form-input {
    margin-bottom: 16px;
  }
}

@media only screen and (min-width: 768px) {
  .footer-form-input {
    margin-right: 24px;
    width: 264px;
  }
}

.footer-form-btn {
  position: relative;
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--prima-white-color);
  padding-top: 8px;
  padding-right: 64px;
  padding-bottom: 8px;
  padding-left: 24px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid var(--accent-color);
  background-color: var(--accent-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

@media only screen and (max-width: 767px) {
  .footer-form-btn {
    margin-left: auto;
    margin-right: auto;
  }
}

.footer-form-btn:hover,
.footer-form-btn:focus {
  background: var(--btn-bg-color);
  color: var(--prima-white-color);
}

.footer-form-icon {
  display: block;
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  fill: #ffffff;
}

/*-- Portfolio --*/

.container-products {
  width: 100%;
}

.page-main {
  background-color: var(--prima-white-color);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 72px;
}

@media only screen and (min-width: 768px) {
  .filters {
    flex-wrap: nowrap;
    justify-content: center;
  }
}

.filters-button {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  border-radius: 4px;
  text-align: center;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding-top: 12px;
  padding-left: 24px;
  padding-bottom: 12px;
  padding-right: 24px;
  border: 1px solid var(--secondary-btn-bg-color);
  background: var(--secondary-color);
  color: var(--accent-color);

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

.filters-button:hover,
.filters-button:focus {
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 2px 1px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.12);
}

.filters-button:hover,
.filters-button:focus {
  border: 1px solid transparent;
  background: var(--btn-bg-color);
  color: var(--prima-white-color);
}

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

.products-section {
  padding: 96px 0 120px
}

.products-images {
  display: block;
  border-top: none;

}

@media only screen and (min-width: 768px) {
  .products-images {
    width: calc((100% - 24px) / 2);
  }
}

@media only screen and (min-width: 1158px) {
  .products-images {
    width: calc((100% - 48px) / 3);
  }
}

.features-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--prima-text-color);
}

.content-card-wrapper {
  padding-top: 32px;
  padding: 32px 16px;
  border: 1px solid var(--secondary-btn-bg-color);
  border-top: none;
}

.products-overlay {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  transform: translate(0, 100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;

  line-height: 1.5;
  letter-spacing: 0.02em;
  overflow: auto;
  color: #F4F4FD;
  padding: 40px 32px;
  background-color: rgb(77, 90, 229);
}

.products-link:hover .overlay,
.products-link:focus .overlay {
  transform: translate(0, 0);
}

.products-link {
  display: block;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.products-link:hover,
.products-link: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);
}

.carde-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: left;
  margin-bottom: 8px;
  color: var(--title-text-color);
}

/*-- Modal window--*/

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  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);

}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .backdrop {
    overflow: scroll;
  }
}

.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  min-width: 320px;
  min-height: 576px;
  background: #FCFCFC;
  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);
  border-radius: 4px;
  padding: 72px 24px 24px;

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

@media only screen and (min-width: 428px) {
  .modal {
    min-width: 428px;
  }
}

@media only screen and (min-width: 600px) and (max-width: 1157px) {
  .modal {
    top: 30%;
    left: 50%;
    transform: translate(-50%);
  }
}

@media only screen and (min-width: 1158px) {
  .modal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;

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

  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #E7E9FC;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: var(--icon-hover-color);
  border: none;
}

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

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

.modal-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  color: var(--title-text-color);
}

.modal-form {
  display: flex;
  flex-direction: column;
}

.modal-form-field {
  margin-bottom: 8px;
}

.modal-form-desc {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  color: var(--modal-desc-color);
}

.current {
  letter-spacing: 0.04em;
}

.modal-form-input {
  width: 100%;
  height: 40px;
  left: 0px;
  top: 84px;
  padding-left: 38px;
  color: var(--modal-desc-color);
  border: 1px solid var(--shadow-color);
  border-radius: 4px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-input:focus {
  outline: none;
  border-color: var(--icon-hover-color);
}

.modal-icon-wrapper {
  display: block;
  position: relative;
}

.modal-input-icon {
  display: contents;
}

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

.modal-form-input:focus+.modal-input-icon {
  fill: var(--icon-hover-color);
}

.modal-form-comment {
  margin-bottom: 15px;
}

.modal-form-message {
  resize: none;
  width: 100%;
  height: 120px;
  padding: 8px 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;

  border: 1px solid var(--shadow-color);
  border-radius: 4px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-link {
  color: var(--accent-color);
}

.modal-form-message:focus {
  outline: none;
  border-color: var(--icon-hover-color);
}

.modal-form-check-desc {
  display: flex;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  align-items: center;
  margin-bottom: 24px;
  color: #8E8F99;
}

.modal-form-check-desc::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  cursor: pointer;
  margin-right: 8px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-check:checked+.modal-form-check-desc::before {
  background-color: var(--icon-hover-color);
  fill: var(--prima-white-color);
  background-size: contain;
  background-image: url(../images/checkbox.svg);
}

.modal-form-check:focus+.modal-form-check-desc::before {
  border-color: var(--icon-hover-color);
}

.modal-form-submit {
  font-family: "Roboto", sans-serif;
  min-width: 169px;
  height: 56px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  display: block;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: none;
  padding-top: 16px;
  padding-right: 32px;
  padding-bottom: 16px;
  padding-left: 32px;
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0px 4px 4px var(--shadow-color);
  background: var(--accent-color);
  color: var(--prima-white-color);

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

.modal-form-submit:hover,
.modal-form-submit:focus,
.modal-form-submit:active {
  background: var(--btn-bg-color);
  color: var(--prima-white-color);
}