/* font-family: "Roboto", sans-serif; */
/* font-family: "Raleway", sans-serif; */

/* common */

body {
  font-family: "Roboto", sans-serif;
  color: #2e2f42;
  background-color: #fff;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
address {
  font-style: normal;
}
button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
.logo {
  color: #4d5ae5;
}
h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
p {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
h2 {
  color: #2e2f42;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
.container {
  width: 100%;
  max-width: 1158px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}
.section {
  padding: 120px 0;
}
/* common */
/* header */
.header-container {
  display: flex;
  align-items: center;
}
.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-nav {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.logo-nav {
  font-family: "Raleway", sans-serif;
  color: #2e2f42;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16667;
  letter-spacing: 0.03em;
  margin-right: 76px;
}
.header-list {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  display: flex;
  gap: 40px;
}
.header-link {
  display: block;
  padding: 24px 0;
  position: relative;
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.header-link:hover,
.header-link:focus {
  color: #404bbf;
}
.address {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  font-style: normal;
  display: flex;
  gap: 40px;
}
.contact-link {
  color: #434455;
  display: block;
  font-style: normal;
  text-decoration: none;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-link:hover,
.contact-link:focus {
  color: #404bbf;
}
.header-link:hover,
.header-link:focus,
.header-link.current {
  color: #404bbf;
}
.header-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  opacity: 0;
  transform: scaleX(0);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
   /* opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), */
}
.header-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  opacity: 1;
  transform: scaleX(1);
}

/* header */
/* hero */

.page-hero {
  max-width: 1440px;
  margin: 0 auto;
  background-color: #2e2f42;
  color: #ffffff;
  padding: 188px 0;
  background-image: url("../images/people-office\ 1.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-image:
    linear-gradient(rgb(46, 47, 66, 0.7), rgb(46, 47, 66, 0.7)),
    url("../images/people-office\ 1.svg");
}
.main-title {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 496px;
  margin: 0 auto 48px auto;
}
.hero-button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background-color: #4d5ae5;
  color: #ffffff;
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  margin: 0 auto;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

/* hero */

/* features */

.features-list {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  display: flex;
  gap: 24px;
}
.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;
}
.features-subtitle {
  margin-bottom: 8px;
}
.features-item {
  width: calc((100% - 72px) / 4);
}
.features-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  background-color: #f4f4fd;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid #8e8f99
}
.footer-social-list {
  gap: 16px;
}

/* features */
/* team */

.page-team {
  background-color: #f4f4fd;
  padding: 120px 0;
}
.team {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 72px;
  text-align: center;
}
.list-team {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  display: flex;
  gap: 24px;
  justify-content: center;
}
.team-item {
  background-color: #fff;
  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);
}
.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.social-link {
  width: 40px;
  height: 40px;
  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);
}
.social-link:hover,
.social-link:focus {
  background-color: #404bbf;
}
.team-text {
  text-align: center;
}
.team-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
}
.team-card-content {
  padding: 32px 16px;
  text-align: center;
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08);
}
.team-title {
  margin-bottom: 8px;
}
.item-link {
  width: 40px;
  height: 40px;
}
.item-link:hover,
.item-link:focus {
  color: #31d0aa;
}
.team-social-icon {
  fill: #f4f4fd;
}
/* team */
/* portfolio */

.portfolio-page {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 72px;
}
.portfolio-list {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}
.portfolio-title {
  margin-bottom: 8px;
  text-align: left;
}
.portfolio-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-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-content-wrapper {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.portfolio-image-wrapper {
  overflow: hidden;
  position: relative;
  overflow: hidden;
}
.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  color: #f4f4fd;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

/* portfolio */
/* footer */

.page-footer {
  background-color: #2e2f42;
  color: #f4f4fd;
  padding: 100px 0;
}
.logo-footer {
  text-transform: uppercase;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.16667;
  letter-spacing: 0.03em;
  display: inline-block;
  margin-bottom: 16px;
}
.footer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  width: 264px;
  flex-direction: column;
  max-width: 264px;
}
.footer-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  text-transform: uppercase;
}
.footer-container {
  display: flex;
  align-items: baseline;
}
.footer-text-container {
  margin-right: 120px;
}
.footer-social-title {
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 16px;
}
.footer-social-container {
  margin-right: 80px;
}

.footer-social-container .social-link:hover,
.footer-social-container .social-link:focus {
  background-color: #31d0aa;
  fill: #f4f4fd;
}
.footer-social-list {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-link .social-icon {
  fill: #f4f4fd;
}
.footer-social-icon {
  fill: #f4f4fd;
}

.subscribe-title {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.subscribe-form {
  display: flex;
  gap: 24px; 
}
.subscribe-input {
  width: 264px;
  height: 40px;
  border: 1px solid #ffffff;
  background-color: transparent;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding-left: 16px;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
  border-radius: 4px;
  color: #ffffff;
  outline: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-input:focus {
  border-color: #31d0aa;
}
.subscribe-input::placeholder {
  color: #ffffff;
}
.subscribe-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 4px;
  border: none;
  color: #ffffff;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-btn:hover,
.subscribe-btn:focus {
  background-color: #31d0aa;
}
.subscribe-icon {
  margin-left: 16px;
  fill: #ffffff;
}
.footer-subscribe-container {
  margin-left: auto; 
}
.footer-logo-container {
  margin-right: 120px;
}

/* footer */

.backdrop {
  position: fixed;
  z-index: 1000;
  background-color: rgba(46, 47, 66, 0.4);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  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);

}
.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.popup-review {
  position: relative;
  background-color: #fcfcfc;
  width: 408px;
  max-height: 584px;
  overflow-y: auto;
  border-radius: 4px;
  padding: 72px 24px 24px 24px;
  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);
}
.close-popup {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  border-radius: 100%;
  fill: #2E2F42;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #E7E9FC;
  cursor: pointer;
 transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), 
              fill 250ms cubic-bezier(0.4, 0, 0.2, 1);

}
.close-popup:hover,
.close-popup:focus {
  background-color: #404BBF;
  stroke: #404BBF;
  fill: #FFFFFF;
}
.close-popup-icon {
  fill: #2E2F42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-popup:hover .close-popup-icon,
.close-popup:focus .close-popup-icon {
  fill: #ffffff;
}
.leave-contacts-description {
  font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
text-align: center;
color: #2E2F42;
margin-bottom: 16px;
}
.field-wrapper {
  margin-bottom: 8px;
}
.field-wrapper-inner {
  position: relative;
}
.lable-field {
display: block;
font-weight: 400;
font-size: 12px;
line-height: 1.16;
letter-spacing: 0.04em;
color: #8e8f99;
margin-bottom: 4px;
width: 15px;
height: 24px;
}
.terms-label {
display: inline-block;
font-weight: 400;
font-size: 12px;
line-height: 1.33;
letter-spacing: 0.04em;
color: #8E8F99;
margin-bottom: 24px;


}
.text-field {
width: 100%;
height: 40px;
border: 1px solid rgba(46, 47, 66, 0.4);
transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 4px;
padding: 0 10px 0 38px;
font-weight: 400;
font-size: 12px;
line-height: 1.16667;
letter-spacing: 0.04em;
}
.form-icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 16px;
stroke: none;
fill: #2E2F42;
transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.comment-field {
border: 1px solid rgba(46, 47, 66, 0.4);
transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 4px;
width: 360px;
height: 120px;
padding: 8px 16px;
margin-bottom: 16px;
resize: none;
font-weight: 400;
font-size: 12px;
line-height: 1.16667;
letter-spacing: 0.04em;
}
.text-field,
.comment-field {
  width: 100%;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.comment-field::placeholder {
  color: rgba(46, 47, 66, 0.4);
}
.comment-field:focus,
.text-field:focus {
  border-color: #4D5AE5;
  outline: none;
}
.privacy-link {
  color: #4D5AE5;
  text-decoration: underline;
}
.privacy-link:hover,
.privacy-link:focus {
  text-decoration: none;
}
.form-submit-button {
border-radius: 4px;
padding: 16px 65px;
height: 56px;
min-width: 169px;
background-color: #4D5AE5;
border: none;
color: #FFFFFF;
font-weight: 500;
line-height: 1.5;
letter-spacing: 0.04em;
justify-content: center;
align-items: center;
display: block;
margin: 0 auto;
transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

}
.subscribe-title {
  display: block;
}
.form-submit-button:hover,
.form-submit-button:focus {
  background-color: #404BBF;
  outline: none;
}
.text-field:focus+.form-icon {
fill: #4D5AE5;
}
.custom-checkbox {
  display: inline-block;
  height: 16px;
  width: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  fill: transparent;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 250ms cubic-bezier(0.4, 0, 0.2, 1), 
              fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.input-checkbox:focus+.terms-label .custom-checkbox {
  background-color: #4D5AE5;
  outline: none;
}
.input-checkbox:checked+.terms-label .custom-checkbox {
background-color: #404BBF;
fill: #FFFFFF;

}
input[type="checkbox"]:checked + .terms-label .custom-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}