/*Tag styles */

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  line-height: 24px;
  background: #fff;
}

ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:hover,
button:focus {
  background: #404bbf;
}

/*Tag styles */

/* Global styles */

/* .hidden {
  display: none;
} */

.visually-hidden {
  position: absolute;
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(100%);
}

.container {
  width: 320px;
  margin: 0 auto;
  padding: 0 16px;
}

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

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

/* Global styles */

/* Header styles */

.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 .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-nav-list,
.contact-info-list {
  display: none;
}

.logo-web {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 117%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #404bbf;
}

.logo-studio-header {
  color: #2e2f42;
}

header .logo-web {
  padding: 16px 0;
  display: block;
}

.burger-btn {
  padding: 0;
  background-color: transparent;
  border: none;
}

.burger-icon {
  display: block;
  fill: #2f2f37;
}

.logo-web:hover,
.logo-web:focus,
.logo-studio-header:hover,
.logo-studio-header:focus,
.logo-studio-footer:hover,
.logo-studio-footer:focus {
  color: #404bbf;
}

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

  .main-nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
  }

  header .logo-web {
    padding: 24px 0;
    margin-right: 120px;
  }

  .contact-info-list {
    display: block;
    font-style: normal;
  }

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

  .main-nav-item {
    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);
  }

  .main-nav-item.current {
    position: relative;
  }

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

  .main-nav-item:hover,
  .main-nav-item:focus,
  .main-nav-item.current,
  .contact-info-list:hover,
  .contact-info-list:focus {
    color: #404bbf;
  }

  .contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .contact-info-item {
    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);
  }

  .contact-info-item:hover,
  .contact-info-item:focus {
    color: #404bbf;
  }
}

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

  .contact-info-list {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .contact-info-item {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
}

/* Header styles */

/* Mobile menu styles */

.mobile-menu .container {
  justify-content: normal;
  align-items: normal;
}

.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-conteiner {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  cursor: pointer;
  margin-top: 0;
  min-width: 0;
}

.mobile-menu-close:hover,
.mobile-menu-close:focus {
  fill: #ffffff;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-nav {
  margin-bottom: auto;
}

.mobile-menu-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.mobile-menu-item {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mobile-menu-item:hover,
.mobile-menu-item:focus {
  color: #404bbf;
}

.mobile-menu-contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu-contact-info-item {
  font-style: normal;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-contact-info-item:hover,
.mobile-menu-contact-info-item:focus {
  color: #4d5ae5;
}

.mobile-menu-social-list {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
}
.mobile-menu-social-item {
  width: 40px;
  height: 40px;
}

.mobile-menu-social-link {
  width: 100%;
  height: 100%;
  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);
}

.mobile-menu-social-link:hover,
.mobile-menu-social-link:focus {
  background-color: #404bbf;
}

.mobile-menu-social-icon {
  fill: #f4f4fd;
}

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

/* Mobile menu styles */

/* Modal overlay styles (input form) */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  background-color: #fcfcfc;
  border-radius: 4px;
  padding: 72px 16px 16px 16px;
  width: 288px;
  min-height: 623px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  cursor: pointer;
  margin-top: 0;
  min-width: 0;
}

.close-btn:hover,
.close-btn:focus {
  fill: #ffffff;
  background-color: #404bbf;
  border: none;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-title {
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 16px;
}

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

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

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding-left: 34px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-field.comment {
  margin-bottom: 16px;
}

.form-textarea {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  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::placeholder {
  opacity: 0.5;
}

.check {
  margin-bottom: 24px;
}

.accept-text {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: flex;
  align-items: center;
}

.policy {
  width: 16px;
  height: 16px;
  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);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  margin-right: 8px;
  flex-shrink: 0;
}

.check-input:checked + .accept-text > .policy {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.policy-link {
  color: #4d5ae5;
  text-decoration: underline;
}

.overlay.main-button {
  margin-top: 24px;
}

.form-input:focus {
  border-color: #4d5ae5;
}

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

.form-textarea:focus {
  border-color: #4d5ae5;
}

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
  }

  .policy {
    margin-right: 8px;
  }
}

@media screen and (min-width: 1158px) {
  .modal {
    padding: 72px 24px 24px 24px;
  }

  .form-input {
    padding-left: 38px;
  }
}

/* Modal overlay styles (input form) */

/* Hero section styles */

#hero {
  background: #2e2f42;
  padding: 72px 0;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/mobile-hero.jpg);
  max-width: 320px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0 auto;
}

.main-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #fff;
  max-width: 216px;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
}

.main-button {
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  margin-top: 72px;
  padding: 16px 32px;
  border-radius: 4px;
  margin-right: auto;
  margin-left: auto;
  display: block;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  min-width: 169px;
  height: 56px;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-resolution: 192dpi) {
  #hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/mobile-hero@2x.jpg);
  }
}

@media screen and (min-width: 768px) {
  #hero {
    padding: 112px 0;
    max-width: 768px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/tablet-hero.jpg);
  }

  .main-title {
    font-size: 56px;
    line-height: 107%;
    max-width: 496px;
  }

  .main-button {
    margin-top: 36px;
  }
}

@media (min-width: 768px) and (min-resolution: 192dpi) {
  #hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/tablet-hero@2x.jpg);
  }
}

@media screen and (min-width: 1158px) {
  #hero {
    padding: 188px 0;
    max-width: 1440px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/desktop-hero.jpg);
  }

  .main-button {
    margin-top: 48px;
  }
}

@media (min-width: 1158px) and (min-resolution: 192dpi) {
  #hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/desktop-hero@2x.jpg);
  }
}

/* Hero section styles */

/*Main sections styles */

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

.icons-list {
  display: none;
}

.card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  justify-content: center;
}

.card-item {
  flex-basis: 100%;
}

.card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

.card-descr {
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #434455;
}

.section-title {
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-transform: capitalize;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 72px;
}

#features .card-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
}

#features .card-descr {
  font-weight: 500;
}

#team {
  background-color: #f4f4fd;
  text-transform: capitalize;
}

#team .card-item {
  border-radius: 0 0 4px 4px;
  padding: 0;
  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);
  text-align: center;
  max-width: fit-content;
}

#team .card-title {
  text-align: center;
}

#team .card-descr {
  font-weight: 400;
}

.card-team-title-descr {
  padding: 32px 0;
  background-color: #fff;
  border-radius: 0 0 4px 4px;
}

.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
  padding: 0 16px;
}

.social-item {
  width: 40px;
  height: 40px;
}

.social-link {
  width: 100%;
  height: 100%;
  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;
}

.social-icon {
  fill: #f4f4fd;
}

#portfolio .card-list {
  width: 100%;
}

.portfolio-list-item {
  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 .card-title {
  text-align: left;
}

.card-title-descr {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
  border-top: none;
}

.portfolio-item-text {
  display: none;
}

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

.footer-container {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
}

#footer .logo-web {
  display: inline-block;
  margin-bottom: 16px;
}

.logo-studio-footer {
  color: #f4f4fd;
}

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

.logo-studio-footer:hover {
  color: #404bbf;
}

.footer-descr {
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  padding-left: 0;
  text-align: left;
  margin-bottom: 72px;
}

.footer-social-media {
  width: 100%;
}

.footer-social-media-title {
  font-weight: 500;
  color: #fff;
  line-height: 150%;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.footer-social-list {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 72px;
}

.footer-social-item {
  width: 40px;
  height: 40px;
}

.footer-social-link {
  width: 100%;
  height: 100%;
  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);
}

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

.footer-social-media-icons-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.footer-social-icon {
  fill: #f4f4fd;
}

.footer-form-div {
  width: 100%;
}

.footer-form-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-form-input {
  width: 288px;
  height: 40px;
  border: 1px solid #ffffff;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  color: #ffffff;
  margin-bottom: 16px;
}

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

.footer-form-button {
  min-width: 165px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  margin-top: 0;
}

.footer-form-icon {
  margin-left: 16px;
  fill: #ffffff;
}

.footer-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/*Main sections styles */

/* Media styles */

@media screen and (min-width: 768px) {
  .card-list {
    gap: 72px 24px;
  }
  .card-item {
    flex-basis: calc((100% - 24px) / 2);
  }

  #portfolio .portfolio-list-item {
    width: calc((100% - 24px) / 2);
  }

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

  .footer-descr {
    max-width: 264px;
  }

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

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

  .container.footer-container {
    padding-left: 108px;
    gap: 72px 24px;
  }

  .footer-social-media {
    max-width: 208px;
  }

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

  .footer-form {
    gap: 24px;
    justify-content: flex-start;
  }
}

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

  .icons-list {
    background: #f4f4fd;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 112px;
  }

  .card-list {
    flex-wrap: nowrap;
  }

  .card-item {
    flex-basis: calc((100% - 3 * 24px) / 4);
  }

  .card-title {
    font-size: 20px;
    line-height: 120%;
    font-weight: 500;
  }

  .card-descr {
    font-weight: 400;
  }

  .section-title {
    font-weight: 500;
  }

  #team .card-item {
    flex-basis: calc((100% - 3 * 24px) / 4);
  }

  #portfolio .card-list {
    flex-wrap: wrap;
    gap: 48px 24px;
  }

  .portfolio-list-item {
    flex-basis: calc((100% - 48px) / 3);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .portfolio-list-item {
    box-shadow: none;
  }

  .portfolio-list-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-list-item:hover .portfolio-item-text {
    transform: translateY(0);
  }

  .portfolio-item-descr {
    position: relative;
    overflow: hidden;
  }

  .portfolio-item-text {
    display: inline-block;
    position: absolute;
    top: 0;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    background-color: #4d5ae5;
    padding: 40px 32px;
    height: 100%;
    width: 100%;
    transform: translateY(100%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .footer {
    padding: 100px 0;
  }

  .container.footer-container {
    gap: 80px;
    padding-left: 15px;
  }

  .footer-form-div {
    width: auto;
  }

  .footer-logo-descr {
    margin-right: 40px;
  }
}
