/* General */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: #ffffff;
  color: #2e2f42;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
  line-height: 1;
  letter-spacing: 0.04em;
}

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

ul {
  list-style: none;
}

.container {
  margin: 0 auto;
  padding: 0 16px;
  max-width: 100%;
}

.section {
  padding: 60px 0;
}

.icon {
  width: 16px;
  height: 16px;
}

.link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  color: #ffffffff;
}

.btn,
.link,
.nav-item a,
.address-item a,
.submit-btn {
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.no-scroll {
  overflow: hidden;
}

/* Header */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid #e7e9fc;
  padding: 18px 24px;
}

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

.header-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: block;
}

.header-menu-btn .icon {
  width: 17px;
  height: 15px;
  stroke: #2e2f42;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
}

.logo-web {
  color: #4d5ae5;
}

.logo-header {
  margin-right: auto;
}

.navbar,
.address {
  display: none;
}

.nav-item a {
  color: #2e2f42;
  font-weight: 500;
  position: relative;
}

.nav-item a:hover,
.nav-item a:focus {
  color: #404bbf;
}

.nav-item a:active {
  text-decoration: underline;
}

.nav-item a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

.address {
  font-style: normal;
  margin-left: auto;
}

.address-item a {
  color: #434455;
}

.address-item a:hover,
.address-item a:focus {
  color: #404bbf;
}

/* Section - 1 */
.sec-1 {
  text-align: center;
  color: #ffffff;
  height: 432px;
  padding: 60px 0;
  background-color: #2e2f42;
  background-image: linear-gradient(#2e2f42b2, #2e2f42b2),
    url("../images/effective-background.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
  padding: 0 12px;
}

.btn {
  padding: 12px 24px;
  background-color: #4d5ae5;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0px 4px 4px 0px #00000026;
  transition: background-color 250ms ease-in-out;
}

.btn:hover,
.btn:focus {
  background-color: #404bbf;
}

/* Seciton - 2 */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.feature-item-icon {
  display: none;
}

.feature-item {
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 16px;
}

.feature-item h3 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-item p {
  text-align: left;
  font-weight: 500;
  font-size: 16px;
  color: #434455;
}

.sec-2 .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
}

/* Section - 3 */
.sec-3 {
  background-color: #f4f4fd;
  padding: 96px 0;
  text-align: center;
}

.sec-3 h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 72px;
  color: #2e2f42;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 72px;
  align-items: center;
}

.team-card-item {
  background-color: #ffffff;
  width: 100%;
  max-width: 100%;
  border-radius: 0 0 4px 4px;
  box-shadow: 0px 2px 1px #2e2f4214, 0px 1px 1px #2e2f4229,
    0px 1px 6px #2e2f4214;
}

.team-card-item img {
  display: block;
  width: 100%;
  height: auto;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.card-content {
  padding: 32px 0;
}

.card-content h3 {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #2e2f42;
}

.card-content p {
  font-size: 16px;
  color: #434455;
  margin-bottom: 12px;
}

.card-social-list {
  display: flex;
  gap: 24px;
  padding: 0;
  list-style: none;
  justify-content: center;
}

.card-social-item .link:hover {
  background-color: #404bbf;
}

/* Section - 4 */
.sec-4 {
  padding: 96px 0;
}

.sec-4 h2 {
  font-size: 28px;
  text-align: center;
  font-weight: 700;
  margin-bottom: 72px;
  color: #2e2f42;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  list-style: none;
  gap: 48px 24px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.project-card-item {
  background-color: #ffffff;
  width: 360px;
  height: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.project-top {
  position: relative;
  overflow: hidden;
}

.project-top img {
  display: block;
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  color: #ffffff;
  padding: 40px 32px;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 250ms ease-in-out, transform 250ms ease-in-out;
}

.project-card-item:hover .overlay,
.project-card-item:focus-within .overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-card-item:hover {
  box-shadow: 0px 2px 1px 0px #2e2f4214;
  box-shadow: 0px 1px 1px 0px #2e2f4229;
  box-shadow: 0px 1px 6px 0px #2e2f4214;
}

.project-info {
  padding: 32px 16px;
}

.project-card-item h3 {
  font-size: 20px;
  font-weight: 500;
  color: #2e2f42;
  margin-bottom: 8px;
}

.project-card-item .project-info p {
  font-size: 16px;
  color: #434455;
}

.project-card-item img {
  display: block;
}

.project-card-item .project-info {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

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

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

.footer-middle,
.footer-right {
  text-align: center;
}

.footer-left .logo {
  display: block;
  text-align: center;
  margin-bottom: 16px;
}

.footer-left p {
  font-size: 16px;
  max-width: 268px;
  color: #f4f4fd;
}

.footer-title {
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-social-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0;
  list-style: none;
}

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

.footer-right .subscribe-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-right .form-input {
  padding: 8px 16px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  background-color: transparent;
  color: #ffffff;
  width: 288px;
}

.footer-right .form-input::placeholder {
  color: #ffffff99;
}

.submit-btn {
  padding: 8px 24px;
  background-color: #4d5ae5;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0px 4px 4px 0px #00000026;
  display: flex;
  align-items: center;
  text-align: center;
  gap: 8px;
  max-width: 165px;
  transition: background-color 250ms ease-in-out;
}

.submit-btn:hover,
.submit-btn:focus {
  background-color: #404bbf;
}

.footer .icon {
  width: 24px;
  height: 24px;
}

/* Modal */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #2e2f4266;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.is-hidden {
  display: none;
}

.is-open {
  display: flex;
}

.modal {
  background-color: #ffffff;
  padding: 40px 24px;
  width: 408px;
  border-radius: 4px;
  position: relative;
  box-shadow: 0px 1px 1px 0px #00000024;
  box-shadow: 0px 1px 3px 0px #0000001f;
  box-shadow: 0px 2px 1px 0px #00000033;
}

.modal-close {
  background-color: #e7e9fc;
  border: 1px solid #0000001a;
  border-radius: 100%;
  width: 24px;
  height: 24px;
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-close .icon {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}

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

.modal-label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #2e2f42;
  gap: 8px;
}

.modal-form input,
.modal-form textarea {
  padding: 12px 16px;
  border: 1px solid #2e2f4266;
  border-radius: 4px;
  outline: none;
  width: 360px;
  resize: none;
}

.modal-form input:focus,
.modal-form textarea:focus {
  border-color: #404bbf;
}

.modal-form input:focus .icon {
  fill: #404bbf;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid #2e2f4266;
  border-radius: 2px;
  transition: border-color 250ms, background-color 250ms;
}

.custom-checkbox .icon {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: white;
  opacity: 0;
  transition: opacity 250ms ease-in-out;
}

.checkbox-input:checked + .custom-checkbox {
  background-color: #4d5ae5;
  border-color: #4d5ae5;
}

.checkbox-input:checked + .custom-checkbox .icon-check {
  opacity: 1;
}

.checkbox-text {
  font-size: 12px;
  color: #757575;
  letter-spacing: 0.5px;
}

.checkbox-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
}

.modal-checkbox {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.17;
  color: #8e8f99;
}

.modal-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid #2e2f42;
  accent-color: #4d5ae5;
  cursor: pointer;
}

.modal-checkbox a {
  color: #4d5ae5;
  text-decoration: underline;
}

.modal .btn {
  align-self: center;
  width: 169px;
  letter-spacing: 1px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  padding-left: 36px;
}

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

.input-wrapper input:focus + .icon {
  fill: #4d5ae5;
}

/* Mobile Menu */

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  padding: 40px 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0;
  margin-top: 36px;
}

.mobile-nav-link {
  font-size: 36px;
  font-weight: 700;
  color: #2e2f42;
  text-decoration: none;
}

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

.mobile-address {
  margin-top: 168px;
}

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

.mobile-address-list-item a {
  font-size: 20px;
  font-weight: 500;
  font-style: normal;
}

.mobile-address-list-item a:hover,
.mobile-address-list-item a:focus {
  color: #404bbf;
}

.mobile-menu .mobile-menu-close {
  background-color: #e7e9fc;
  border: 1px solid #0000001a;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  position: absolute;
  top: 16px;
  right: 16px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mobile-menu .mobile-menu-close .icon {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-socials-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  margin-top: 40px;
}

.mobile-socials-list-item .link .icon {
  width: 24px;
  height: 24px;
}

.mobile-socials-list-item .link:hover,
.mobile-socials-list-item .link:focus {
  background-color: #31d0aa;
}

/* Tablet */
@media screen and (min-width: 768px) {
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar {
    display: flex;
    gap: 40px;
  }

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

  .address {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .container {
    padding: 0 24px;
    max-width: 768px;
  }

  .section {
    padding: 100px 0;
  }

  .feature-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
  }

  .feature-item {
    flex: 1 1 calc((100% - 24px) / 2);
    max-width: 336px;
    text-align: left;
  }

  .header-menu-btn {
    display: none;
  }

  .sec-1 {
    height: 496px;
    padding: 80px 0;
  }

  .title {
    font-size: 36px;
    margin-bottom: 32px;
  }

  .sec-2 .icon {
    width: 64px;
    height: 64px;
  }

  .team-card {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 64px 24px;
  }

  .team-card-item {
    flex: 1 1 calc((100% - 24px) / 2);
    max-width: 264px;
  }

  .project-card {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 72px 24px;
  }

  .project-card-item {
    flex: 1 1 calc((100% - 24px) / 2);
  }

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

  .footer-container {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    text-align: left;
    justify-content: center;
  }

  .footer-title {
    text-align: left;
  }

  .footer-right .subscribe-form {
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: row;
    gap: 16px;
  }

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

/* Desktop */
@media screen and (min-width: 1158px) {
  .nav-list {
    gap: 40px;
  }

  .address-list {
    font-size: 14px;
    gap: 40px;
  }

  .container {
    max-width: 1158px;
  }

  .section {
    padding: 120px 0;
  }

  .feature-list {
    display: flex;
    gap: 24px;
  }

  .feature-item {
    flex: 1 1 calc((100% - 72px) / 4);
    max-width: 264px;
  }

  .feature-item-icon {
    background-color: #f4f4fd;
    border-radius: 4px;
    border: 1px solid #8e8f99;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    padding: 32px 16px;
  }

  .feature-item h3 {
    font-size: 20px;
  }

  .feature-item p {
    font-size: 16px;
  }

  .sec-1 {
    height: 600px;
    padding: 120px 0;
  }

  .title {
    font-size: 56px;
    margin-bottom: 40px;
  }

  .btn {
    padding: 16px 32px;
  }

  .team-card {
    flex-direction: row;
    gap: 64px 24px;
  }

  .team-card-item {
    flex: 1 1 calc((100% - 72px) / 4);
    max-width: 264px;
  }

  .project-card {
    gap: 48px 24px;
  }

  .project-card-item {
    flex: 1 1 calc((100% - 48px) / 3);
    max-width: 360px;
  }

  .footer {
    padding: 100px 0;
  }

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

  .footer-container {
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 40px;
    margin: 0 auto;
  }

  .footer-title {
    text-align: left;
    font-weight: 500;
    margin-bottom: 16px;
  }

  .footer-right .subscribe-form {
    display: flex;
    flex-direction: row;
  }
}

/* Background Screen Intensity 2x */
@media (min-resolution: 2x) {
  .sec-1 {
    background-image: linear-gradient(#2e2f42b2, #2e2f42b2),
      url("../images/effective-background@2x.jpg");
  }
}
