/*       -----------------             General Settings          -------------------       */
body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  background-color: #fff;
}
a {
  text-decoration: none;
  color: #2e2f42;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
  padding: 0;
}
section {
  padding-top: 120px;
  padding-bottom: 120px;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.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;
}
.header-nav,
h3 {
  font-weight: 500;
}
h3 {
  font-size: 20px;
  line-height: 1.2;
}
h2 {
  font-size: 36px;
  line-height: 1.11;
}
h3,
h2 {
  color: #2e2f42;
  letter-spacing: 0.02em;
}
img {
  display: block;
}
.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}
/*           --------------------------         HEADER SECTION STYLING           --------------------            */
.header-main {
  border-bottom: 1px solid #e7e9fc;
  box-shadow:
    0px 1px 6px 0px #2e2f4214,
    0px 1px 1px 0px #2e2f4229,
    0px 2px 1px 0px #2e2f4214;
}
.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 76px;
}
.header-nav {
  display: flex;
  gap: 40px;
}
.header-nav a:hover,
.header-nav a:focus,
.header-nav a:active {
  color: #404bbf;
}
.header-nav a {
  position: relative;
  display: block;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav a::after {
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.header-nav a:target::after {
  content: "";
  height: 4px;
  width: 100%;
  background-color: #404bbf;
  position: absolute;
  top: 69px;
  left: 0;
  border-radius: 2px;
}
.header-nav a:hover,
.header-nav a:focus {
  color: #404bbf;
}
.header-nav a.current {
  color: #404bbf;
}
.header-nav a:hover::after,
.header-nav a:focus::after,
.header-nav a.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

.logo a {
  text-transform: uppercase;
  font-family: Raleway;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0.03em;
}
.logo a > span {
  color: #4d5ae5;
}
.header-address {
  font-style: normal;
}
.header-address ul {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}
.header-address a {
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.header-address a:hover,
.header-address a:focus {
  color: #404bbf;
}
/*               -------------------------            BANNER SECTION STYLING        -----------------               */
.banner-main {
  background-color: #2e2f42;
  background:
    linear-gradient(to bottom, rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/people-office.jpg") no-repeat center;
  background-size: cover;
  padding-top: 188px;
  padding-bottom: 188px;
  max-width: 1440px;
  margin: 0 auto;
}
.banner-main h1 {
  color: #fff;
  text-align: center;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  max-width: 496px;
  margin: 0 auto;
}
.banner-main button {
  display: block;
  background-color: #4d5ae5;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.04em;
  font-size: 16px;
  line-height: 1.5;
  padding: 16px 32px;
  margin: 48px auto 0 auto;
  border: none;
  border-radius: 4px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.banner-main button:hover,
.banner-main button:focus {
  background-color: #404bbf;
}
/*      ------------------                  FEATURES SECTION STYLING          -----------------              */
.features ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
}

.features li {
  width: 264px;
}
.feature-icon-container {
  background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  height: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.features h3 {
  margin-top: 8px;
}
.features p {
  margin-top: 8px;
}
/*            --------------------                 TEAM SECTION STYLING             ---------------                   */
.our-team {
  background-color: #f4f4fd;
}
.our-team h2,
.our-portfolio h2,
.team-card h3,
.team-card p {
  text-align: center;
}
.team-content {
  display: flex;
  gap: 24px;
  margin-top: 72px;
}
.team-card {
  background-color: #fff;
  border-radius: 0 0 4px 4px;
  box-shadow:
    0px 2px 1px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 1px 6px 0px rgba(46, 47, 66, 0.08);
}
.team-card-content {
  padding: 32px 16px;
}
.team-card h3 {
  margin-bottom: 8px;
}
.team-icon-container {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.team-icon-container a {
  display: block;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  position: relative;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.team-icon-container a:hover,
.team-icon-container a:focus,
.team-icon-container a:active {
  background-color: #404bbf;
}

.team-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  fill: #f4f4fd;
}
/*          -----------------            PORTFOLIO SECTION STYLING          ------------------            */
.our-portfolio img {
  width: 360px;
  height: 300px;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
  margin-top: 72px;
}
.portfolio-card {
  display: flex;
  flex-direction: column;
  max-width: 360px;
  transition-property: box-shadow;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-overlay {
  position: relative;
  overflow: hidden;
}
.overlay-text {
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  background-color: rgba(77, 90, 229, 1);
  color: #f4f4fd;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(100%);
  transition-property: transform;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-card:hover {
  box-shadow:
    0px 2px 1px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 1px 6px 0px rgba(46, 47, 66, 0.08);
  cursor: pointer;
}
.portfolio-card:hover .overlay-text {
  transform: translateY(0);
}
.portfolio-card-content {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.portfolio-list h3 {
  margin-bottom: 8px;
}
/*            ----------------                  FOOTER SECTION STYLING            --------------              */
.footer-main {
  background-color: #2e2f42;
  color: #f4f4fd;
  padding: 100px 0;
  display: flex;
}
.footer-main .container {
  display: flex;
  align-items: baseline;
}
.logo-content {
  max-width: 264px;
  margin-right: 120px;
}
.logo-content .logo {
  margin-bottom: 16px;
}
.footer-main a {
  color: #f4f4fd;
}
.social-media {
  margin-right: 80px;
}
.social-media .team-icon-container {
  gap: 16px;
  margin-top: 16px;
}
.social-media .team-icon {
  transition-property: fill;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.social-media a:hover .team-icon,
.social-media a:focus .team-icon,
.social-media a:active .team-icon {
  fill: rgba(244, 244, 253, 1);
}
.social-media a:hover,
.social-media a:focus,
.social-media a:active {
  background-color: #31d0aa;
}
.social-media p,
.newsletter-subscription p {
  font-weight: 500;
  color: #fff;
}
.newsletter-subscription {
  margin-left: auto;
}
.newsletter-subscription p {
  margin-bottom: 16px;
}
.newsletter-form {
  display: flex;
  align-items: flex-end;
  column-gap: 24px;
}

.newsletter-form input {
  width: 264px;
  border: 1px solid #fff;
  border-radius: 4px;
  background-color: #2e2f42;
  padding-left: 16px;
  font-size: 12px;
  height: 40px;
  letter-spacing: 0.04em;
  line-height: 2;
  color: #fff;
  transition-property: border-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
}
.newsletter-form input:hover,
.newsletter-form input:focus {
  border-color: #31d0aa;
  outline: none;
}
.newsletter-form input::placeholder {
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  font-family: "Roboto";
  letter-spacing: 0.5px;
}
.newsletter-submit {
  padding: 8px 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 16px;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.6px;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.newsletter-submit:hover,
.newsletter-submit:focus {
  background-color: #31d0aa;
  cursor: pointer;
}
.newsletter-submit svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #fff;
}
/*         ----------------------------            MODAL WINDOW            -----------------------                  */
.form-contact input,
.ta-comment-contact {
  transition-property: border-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.close-button,
.submit-contact,
.close-button {
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition-property: opacity;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}
.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.modal {
  width: 408px;
  height: 584px;
}
.form-contact {
  font-family: Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  padding: 24px;
  font-size: 12px;
  line-height: 1.17;
  color: #8e8f99;
  border-radius: 4px;
  background-color: #fcfcfc;
  box-shadow:
    0px 1px 1px 0px rgba(0, 0, 0, 0.14),
    0px 1px 3px 0px rgba(0, 0, 0, 0.12),
    0px 2px 1px 0px rgba(0, 0, 0, 0.2);
}
.form-icon-container {
  position: relative;
  margin-top: 8px;
  transition-property: fill;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.form-icon-container:first-of-type {
  margin-top: 16px;
}
.close-button {
  align-self: flex-end;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}
.close-button svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition-property: fill;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.close-button:hover,
.close-button:focus {
  background-color: rgba(64, 75, 191, 1);
  cursor: pointer;
}
.close-button:hover svg,
.close-button:focus svg {
  fill: #fff;
}
.form-contact .form-contact-main {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: #2e2f42;
  margin-top: 24px;
  letter-spacing: 0.3px;
}
.form-contact label {
  letter-spacing: 0.5px;
}
.form-contact input {
  display: block;
  width: 100%;
  height: 40px;
  margin: 4px auto;
  margin-bottom: 0;
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  padding: 11px 38px;
}
.form-contact input:focus {
  outline: none;
}
.ta-comment-contact {
  display: block;
  resize: none;
  outline: none;
  width: 100%;
  height: 120px;
  border-radius: 4px;
  margin-top: 4px;
  padding: 8px 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  font-size: 12px;
  margin-bottom: 16px;
}
.ta-comment-contact::placeholder {
  letter-spacing: 0.5px;
}
.textarea-comment-label {
  margin-top: 8px;
}
.form-icon {
  position: absolute;
  top: 46%;
  left: 16px;
  z-index: 2;
}
.form-icon > use {
  height: 24px;
  width: 18px;
}

.terms-label {
  display: flex;
  align-items: center;
  position: relative;
}
.ta-text {
  display: flex;
  gap: 4px;
  align-items: center;
}
.custom-checkbox {
  height: 16px;
  width: 16px;
  display: inline-block;
  border: 1px solid #2e2f4266;
  margin-right: 8px;
  fill: #f4f4fd;
  position: relative;
  cursor: pointer;
  border-radius: 2px;
}
.custom-checkbox svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition-property: opacity;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.terms-link {
  text-decoration: underline;
  color: rgba(77, 90, 229, 1);
  letter-spacing: 0.5px;
}
.terms-contact:checked + .custom-checkbox > svg {
  opacity: 1;
}
.terms-contact:checked + .custom-checkbox {
  background-color: #404bbf;
}
.submit-contact {
  width: 169px;
  height: 56px;
  margin: 0 auto;
  padding: 16px 32px;
  margin-top: 24px;
  background-color: #4d5ae5;
  color: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.6px;
  cursor: pointer;
}
.submit-contact:hover,
.submit-contact:focus,
.submit-contact:active {
  background-color: #404bbf;
}
.form-icon-container {
  fill: #2e2f42;
}
.form-icon-container:focus-within {
  fill: #4d5ae5;
}
.form-icon-container:focus-within input,
.ta-comment-contact:focus-within,
.ta-comment-contact:focus {
  border: 1px solid #4d5ae5;
}
