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

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

/* ------header */
.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-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;
  margin-right: 76px;
}

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

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

.header-navigation {
  display: flex;
  align-items: center;
}

.header-menu-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Меню */
.nav-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-decoration: none;
  display: flex;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.current {
  position: relative;
  color: #404bbf;
}

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

/* Контакти */
.header-contacts {
  font-style: normal;
}

.header-contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header-contacts-link {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-decoration: none;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* --------feature----- */
.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 {
  padding-top: 120px;
  padding-bottom: 120px;
}

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

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

.features-item {
  width: calc((100% - 3 * 24px) / 4);
}

.features-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.features-description {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
/* ------team */
.team {
  background: #f4f4fd;
  padding-top: 120px;
  padding-bottom: 120px;

  margin: 0 auto;
}
.team-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
  margin-bottom: 72px;
}
.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.team-item {
  background-color: #ffffff;
  width: calc((100% - 3 * 24px) / 4);
  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);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.team-item:hover,
.team-item:focus {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.team-card-content {
  padding: 32px 0;
}
.team-image {
  display: block;
}
.team-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}
.team-description {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
}
.team-socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}
.team-socials-item {
  width: 40px;
  height: 40px;
}
.team-socials-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);
}

.team-socials-link:hover,
.team-socials-link:focus {
  background-color: #404bbf;
}
.team-socials-icon {
  width: 16px;
  height: 16px;
  fill: #f4f4fd;
}
/* ------portfolio */

.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}

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

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  row-gap: 48px;
}

.portfolio-item {
  background-color: #ffffff;
  width: calc((100% - 2 * 24px) / 3);
  border-bottom: 1px solid #e7e9fc;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.portfolio-item:hover,
.portfolio-item:focus {
  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-image {
  display: block;
}

/* Контейнер для картинки з overlay */
.portfolio-overlay {
  position: relative;
  overflow: hidden;
}

/* Текст, який з’являється при ховері */
.portfolio-overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-overlay-text,
.portfolio-item:focus .portfolio-overlay-text {
  transform: translateY(0%);
}

.portfolio-card-content {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.portfolio-description {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  margin-bottom: 0;
}

/* Декоративна лінія у меню */
.header-menu-link.current::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: #404bbf;
  margin-top: 4px;
  border-radius: 2px;
}

/* ------footer */
.footer {
  background: #2e2f42;
  padding-top: 100px;
  padding-bottom: 100px;
  color: #f4f4fd;
}

/* flex для контейнера футера */
.footer .container {
  display: flex;
  align-items: baseline;

  flex-wrap: wrap; /* щоб блоки переносилися на маленьких екранах */
}

.footer-logo-wrapper {
  max-width: 264px;
  margin-right: 120px;
}

.footer-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;

  color: #4d5ae5;
  margin-bottom: 16px;
  display: inline-block;
}

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

.footer-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 264px;
}

.footer-social-wrapper {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  text-transform: lowercase;
}

.footer-socials {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.social-icon {
  fill: #f4f4fd;
}
.footer-subscribe-wrapper {
  margin-left: auto;
}
.footer-form {
  display: flex;
  gap: 24px;
}
.footer-label {
  flex: 1;
}
.footer-input {
  width: 264px;
  height: 40px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  background-color: transparent;
  padding: 0 16px;
  color: #fff;
  outline: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
}
.footer-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.footer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  min-width: 165px;
  border: none;
  border-radius: 4px;
  background-color: #4d5ae5;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-button-icon {
  fill: #fff;
  margin-left: 16px;
}
.footer-button svg {
  margin-left: 16px;
}
/* Базові стилі */
ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
}

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

.container {
  max-width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  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);
}
.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 408px;
  min-height: 584px;
  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;
  transform: translate(-50%, -50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px 24px;
}
.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -100%);
}
.modal-close-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background: transparent;
  background-color: #e7e9fc;
  border-radius: 50%;
  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;
}
.close-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-close-button:hover .close-icon,
.modal-close-button:focus .close-icon {
  fill: #ffffff;
}
.modal-title {
  text-align: center;
  width: 100%;
  margin-bottom: 16px;
  margin-top: 24px;
  padding: 0;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  font-size: clamp(14px, 2vw, 16px);
}
.modal-label-input {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-input {
  width: 100%;
  height: 40px;
  background-color: transparent;
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  padding-left: 38px;
  padding-right: 16px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-input:focus {
  border-color: #4d5ae5;
}
.input-wrapper:focus-within .input-icon {
  fill: #4d5ae5;
}

.modal-label {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;

  margin-bottom: 4px;
}
.modal-field {
  margin-bottom: 8px;
}
.modal-field-comment {
  margin-bottom: 16px;
}
.modal-field-checkbox {
  margin-bottom: 24px;
}
.input-wrapper {
  position: relative;
}
.input-icon {
  fill: #2e2f42;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-textarea {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  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);
}
.modal-textarea:focus {
  border-color: #4d5ae5;
  outline: none;
}
.modal-check:checked + .modal-check-label > .modal-check-box {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}
a {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}
.modal-check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  margin-right: 8px;
  background-color: transparent;
  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);
  margin-right: 8px;
  fill: transparent;
}
.modal-check-box svg {
  display: block;
  width: 10px;
  height: 8px;
  fill: #f4f4fd;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-check:checked + .modal-check-label > .modal-check-box svg {
  opacity: 1;
}
.modal-button {
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background: #4d5ae5;
  cursor: pointer;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  text-align: center;
  display: block;
  border: none;
  border-radius: 4px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-button:hover,
.modal-button:focus {
  background: #404bbf;
}
.modal-check.visually-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.modal-check-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-check-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}
.modal-check-link:hover,
.modal-check-link:focus {
  color: #404bbf;
}
