.hidden {
    display: none;
}
body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #ffffff;
}

/* RESET */
ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
  padding: 0;
}
a {
  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;
}
/* 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;
}
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
button {
font-family: inherit;
cursor: pointer;
}
.section {
  padding: 96px 0;
}
/* HEADER */

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-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);
}
.nav-list,
.contacts {
  display: none;
}
.header-logo {
  padding: 16px 0;
  display: block;
}
.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 .logo-part {
  color: #2e2f42;
}
.burger-button {
    padding: 0;
    border: none;
    background-color: transparent;
}
.burger-icon {
    display: block;
    fill: #2F2F37;
}
@media screen and (min-width: 768px) {
.burger-button {
    display: none;
}
.header-nav {
  display: flex;
  align-items: center;
}
.header-logo {
  padding: 24px 0;
  margin-right: 120px;
}
.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.current {
  position:relative;
}
.nav-link.current::after {
  content: "";
  position: absolute;
  background-color: #404bbf;;
  width: 100%;
  height: 4px;
  left: 0;
  bottom: -1px;
  border-radius: 2px;
}
.contacts {
  display: block;
  font-style: normal;
}
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contacts-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);
}
.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
  color: #404bbf;
}
}
@media screen and (min-width: 1158px) {
 .header-logo {
  margin-right: 76px;
} 
.contacts-list {
  flex-direction: row;
  align-items: center;
  gap: 40px;
} 
.contacts-link {
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.section {
  padding: 120px 0;
}
}
/* 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%;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}
.mobile-menu:not(.is-open) .mobile-menu-container {
  transform: scale(1.5);
}
.menu-close-button {
    display: flex;
    align-items: center;
    justify-content: center; 
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1); 
    padding: 0; 
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-close-button:hover,
.menu-close-button:focus {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}
.menu-close-button {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}
.mobile-menu-nav {
  margin-bottom: auto;
}

.mobile-nav-list {
 display: flex;
 align-items: flex-start;
 justify-content: flex-start;
 flex-direction: column;
 gap: 40px;
}
.mobile-nav-item a,
.about-title {
 font-weight: 700;
 font-size: 36px;
 line-height: 1.11;
 letter-spacing: 0.02em;
 color: #2e2f42;
}

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

.mobile-menu-contacts {
  margin-bottom: 48px;
  font-style: normal;
}
.mobile-contacts-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 24px;   
}
.mobile-contacts-item a {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-social-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.menu-social-link-item a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.social-icon {
  fill: #F4F4FD;
} 

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

/* MODAL OVERLAY */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  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); 
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 288px;
  min-height: 623px;
  background-color: #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; 
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1); 
  padding: 72px 16px 24px 16px;
}
.modal-overlay:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(1.5);
}
.modal-close-button {
  display: flex;
  align-items: center;
  justify-content: center; 
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1); 
  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);
}
.modal-close-button:hover,
.modal-close-button:focus {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}
.modal-icon-close {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}
.modal-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

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

.user-input-group {
  position: relative;
}
.modal-input {
  color: #2E2F42;
  width: 100%;
  height: 40px;
  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);
}

.modal-input:focus {
  border-color: #4D5AE5; 
}
.modal-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}
.modal-input:focus + .modal-icon {
  fill:#4D5AE5;
}
.textarea-user-comment {
  color: #2E2F42;
  width: 100%; 
  height: 120px;
  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);
}
.textarea-user-comment::placeholder {
  font-size: 12px; 
  line-height: 1.17; 
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}
.textarea-user-comment:focus {
  border-color: #4D5AE5;
}
.privacy-policy {
  margin-bottom: 24px; 
}
.modal-check-label {
    display: flex;
    align-items: center;
}

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

.privacy-check {
  display: inline-flex; 
  flex-shrink: 0;
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  fill: transparent;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  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);
}
.checkbox-privacy-policy:checked + label > .privacy-check {
  background-color: #404bbf;
  fill: #F4F4FD;
  border: none;
}
.privacy-link {
  color: #4d5ae5;
  cursor: pointer;
  text-decoration: underline;
}
.modal-send-button {
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  background-color: #4D5AE5;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 4px;
  padding: 16px 32px; 
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-send-button:hover,
.modal-send-button:focus {
  background-color: #404bbf;
}

/* MODAL OVERLAY TABLET AND DESKTOP*/

@media screen and (min-width: 768px) {
  .modal {
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
}  
}
/* HERO SECTION*/
.hero-section {
  background-color: #2e2f42;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), 
  url(../images/hero-mob-min.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 72px 0;
  max-width: 320px;
  margin: 0 auto;
}

@media (min-resolution: 192dpi) {
.hero-section {
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), 
  url(../images/hero-mob@2x-min.jpg);
}
}
.hero-text {
  max-width: 216px;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  margin: 0 auto;
  margin-bottom: 72px;
}
.hero-button {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none; 
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  cursor: pointer;
  margin: 0 auto;
  padding: 16px 32px;
  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,
.hero-button:focus {
  background-color: #404bbf;
}
/* HERO TAB */
@media screen and (min-width: 768px) {
  .hero-section {
    max-width: 768px;
    padding: 112px 0;
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), 
  url(../images/hero-tab-min.jpg);
  }
  .hero-text {
   font-size: 56px;
   line-height: 1.07;
   max-width: 496px;
   margin-bottom: 36px;
  }
}
@media screen and (min-width: 768px) and (min-resolution: 192dpi) {
  .hero-section {
      background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), 
  url(../images/hero-tab@2x-min.jpg);
  }
  }
/* HERO DESK */

@media screen and (min-width: 1158px) {
  .hero-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/hero-desk-min.jpg);
}
  .hero-text {
  margin-bottom: 48px;
}
}
@media screen and (min-width: 1158px) and (min-resolution: 192dpi) {
  .hero-section {
      background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), 
  url(../images/hero-desk@2x-min.png);
  }
}
/* ABOUT SECTION */

.about-icons {
  display: none;
}
.about-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 72px 24px;
}
.about-title {
  text-align: center;
  margin-bottom: 8px;
}

.about-text {
  font-weight: 500;
}
.about-text,
.team-text,
.portfolio-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ABOUT TAB */

 @media screen and (min-width: 768px) {
 .about-item,
 .team-item {
  width: calc((100% - 24px) / 2);
}
.about-title {
  text-align: left;
}
 }

 /* ABOUT DESK */

 @media screen and (min-width: 1158px) {
  .about-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  margin-bottom: 8px;
  }
  .about-item,
  .team-item {
  width: calc((100% - 72px) / 4);
}
.about-title,
.team-name,
.portfolio-products {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
}
 }

 /* TEAM SECTION */
.team-section {
  background-color: #f4f4fd;
}
.team-section-title,
.portfolio-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 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 72px 24px; 
}
.team-item {
  max-width: 264px;
  background-color: #fff;
  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-inform {
  padding: 32px 0;
}
.team-name,
.team-text {
  text-align: center;
  margin-bottom: 8px
}
.social-links-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.social-link-item a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-link-item a:hover,
.social-link-item a:focus {
  background-color: #404bbf;
}
.social-icon {
  fill: #F4F4FD;
}

/* TEAM TAB AND DESK*/
@media screen and (min-width: 768px) {
  .team-item {
  width: calc((100% - 24px) / 2);
  }
}

/* PORTFOLIO SECTION */

.portfolio-overlay {
  display: none;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 48px;
}
.portfolio-item {
  max-width: 288px;
  box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}
.portfolio-inform {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.portfolio-products {
  margin-bottom: 8px;
}
/* PORTFOLIO TAB AND DESK*/
@media screen and (min-width: 768px){
    .portfolio-item {
    max-width: 356px;
    }
}

@media screen and (min-width: 1158px) {
  .portfolio-overlay {
  display: flex;
}
  .portfolio-item {
  max-width: 360px;
  box-shadow: none;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.portfolio-item:hover .thumb p {
transform: translateY(0);
}
.thumb {
  position: relative;
  overflow: hidden;
}
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;
  height: 100%;
  width: 100%;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item:hover,
.portfolio-item:focus {
  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);
}
}

/* FOOTER */

.page-footer {
  background-color: #2e2f42;
  padding: 96px 0;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* gap: 72px 24px;  */
}
.footer-content {
  text-align: center;
  margin-bottom: 72px;
}
.footer-logo .logo-part {
  color: #f4f4fd;
}
.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}
.footer-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 288px;
  text-align: left;
}
.footer-social-title,
.footer-subscribe-title {
 font-weight: 500;
 font-size: 16px; 
 line-height: 1.5;
 letter-spacing: 0.02em;
 color: #fff;
 text-align: center;
 margin-bottom: 16px;
}
.footer-social-media {
  margin-bottom: 72px;
}
.footer-social-list {
  display: flex;
  gap: 16px; 
}
.social-link-item .footer-social-link:hover,
.social-link-item .footer-social-link:focus {
  background-color: #31d0aa;
}
.social-link-item {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-subscribe-form {
  display: flex;
  flex-wrap: wrap;
}
.footer-form-input {
  border: 1px solid #fff;
  border-radius: 4px;
  width: 288px;
  height: 40px;
  padding-left: 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  opacity: 0.3;
  background-color: transparent;
  outline: none;
  margin-bottom: 16px;
}
.footer-form-input::placeholder {
font-size: 12px;
line-height: 2;
letter-spacing: 0.04em;
color: #fff;
opacity: 0.6;
}
.footer-subscribe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', sans-serif;
  border-radius: 4px;
  min-width: 165px;
  height: 40px;
  padding: 8px 24px;
  margin: 0 auto;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  cursor: pointer;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-subscribe-button:hover,
.footer-subscribe-button:focus {
  background-color: #404bbf;
}
.footer-icon {
  fill: #F4F4FD;
  margin-left: 16px;
}

/* FOOTER TAB */

@media screen and (min-width: 768px) {
.footer-container{
  justify-content: flex-start;
  padding: 0 108px;
}  
.footer-content {
  text-align: left;
  margin-right: 24px;
}
.footer-social-title,
.footer-subscribe-title {
  text-align: left;
}
.footer-text {
  max-width: 264px;
}

.footer-subscribe-form {
  gap: 24px;
}
.footer-form-input {
  width: 264px;
  padding-left: 16px;
  margin-bottom: 0;
}
}

/* FOOTER DESK */
 
@media screen and (min-width: 1158px) {
.page-footer {
  padding: 100px 0;
}
.footer-content {
  margin-right: 120px;
}
.footer-form-input {
  opacity: 1;
}
.footer-form-input::placeholder {
  opacity: 1;
}
 .footer-social-media {
  margin-right: 80px;
} 
.footer-container {
  align-items: baseline; 
  padding: 0;
}
}