/* ----------ЗАГАЛЬНІ СТИЛІ---------- */
body {
  background-color: #ffffff;
  color: #434455;
  font-family: "Roboto", sans-serif;
  margin: 0;
}

header {
  border-bottom: 1px solid #e7e9fc;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0;
}

p {
  margin: 0;
}

ul,
ol {
  list-style-type: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

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

.container {
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px 0 15px;
}

section {
  padding: 120px 0;
}

/* ----------ХЕДЕР---------- */
.header {
  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;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e9fc;
}

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

.nav-list {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-list-link {
  color: #2e2f42;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-weight: 500;
  padding: 24px 0;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.current {
  position: relative;
  color: #404bbf;
}
.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* .nav-list-link:hover::after {
  opacity: 1;
} */

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

.nav-item {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #2e2f42;
}

.nav-address {
  font-style: normal;
}

.nav-address-list {
  list-style: none;
  display: flex;
  gap: 40px;
}
.nav-address-item {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-style: normal;
  color: #434455;
}

.address-list-link {
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  padding: 24px 0;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-list-link:hover,
.address-list-link:focus {
  color: #404bbf;
}

/* ----------ПЕРША СЕКЦІЯ---------- */
.hero {
  max-width: 1440px;
  padding: 188px 0;
  margin: 0 auto;
  background-color: #2e2f42;
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-title {
  max-width: 496px;
  font-weight: 700;
  font-size: 48px;

  letter-spacing: 0.02em;
  color: #ffffff;
  text-align: center;

  font-size: 56px;
  line-height: 1.07;
  margin: 0 auto;
}

.btn {
  display: block;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background-color: #4d5ae5;
  color: #ffffff;
  cursor: pointer;
  margin-top: 48px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px 32px;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ----------ДРУГА СЕКЦІЯ---------- */
.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;
}

.about-list {
  list-style: none;
  display: flex;
  gap: 24px;
}

.about-item {
  width: calc((100% - 72px) / 4);
}

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

.about-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}
.about-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ----------ТРЕТЯ СЕКЦІЯ---------- */
.team-title {
  text-transform: capitalize;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 72px;
}

.team {
  background-color: #f4f4fd;
}
.member-info {
  padding: 32px 0;
}

.team-members {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 24px;
}

.team-member-card {
  width: calc((100% - 72px) / 4);
  text-align: center;
  background-color: #ffffff;
  border-radius: 0 0 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);
}
.member-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
  text-align: center;
}
.member-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
}

.member-icons-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
}

.member-icons-item {
  width: 40px;
  height: 40px;
}

.member-icons {
  fill: #f4f4fd;
}

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

.member-icon-link:hover,
.member-icon-link:focus {
  background-color: #404bbf;
}

/* ----------ЧЕТВЕРТА СЕКЦІЯ---------- */
.portfolio-title {
  text-transform: capitalize;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 72px;
}
.portfolio-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 48px;
}
.portfolio-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* тут задали тіні при ховері */
.portfolio-item:hover,
.portfolio-item:focus {
  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);
}

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

/* цей сворений дів для того щоб випадайка 
зпозиціонувалась тільки в рамках картинки 
яку огортає цей дів 
задаємо relative для цього*/
.portfolio-position {
  position: relative;
  overflow: hidden;
}

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

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

.portfolio-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

/* ----------ФУТЕР---------- */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

.footer-main-container {
  display: flex;
  align-items: baseline;
}
.footer-link-container {
  margin-right: 80px;
}

.footer-logo-div {
  margin-right: 120px;
}

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

.social-media {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-icons-list {
  display: flex;
  gap: 16px;
}

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

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

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

.footer-icons {
  fill: #f4f4fd;
}

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

.footer-icon {
  width: 20px;
  height: 20px;
  fill: #ffffff;
  margin-left: 16px;
}

.btn-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  min-width: 165px;
  font-family: "Roboto", sans-serif;
  height: 40px;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-input {
  border: 1px solid #ffffff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  background-color: transparent;
  color: #ffffff;
  padding: 8px 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);

  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
}

.footer-form {
  display: flex;
  gap: 24px;
}
.footer-input:hover,
.footer-input:focus {
  border: 1px solid #4d5ae5;
}
.footer-input:active {
  border: 1px solid #4d5ae5;
}
.footer-input::placeholder {
  color: #ffffff;
}

/* ----------ЛОГО ХЕДЕР ФУТЕР---------- */
.logo-web {
  font-family: "Raleway", sans-serif;
  color: #4d5ae5;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  margin-right: 76px;
  display: inline-block;
}

.logo-web-footer {
  font-family: "Raleway", sans-serif;
  color: #4d5ae5;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  display: inline-block;
  margin-bottom: 16px;
}
.logo-studio {
  font-family: "Raleway", sans-serif;
  color: #f4f4fd;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
}

.logo-studio-header {
  font-family: "Raleway", sans-serif;
  color: #2e2f42;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
}

/* -----------------MODAL--------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  background-color: #fcfcfc;
  border-radius: 4px;
  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);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #404bbf;
  border: none;
}

.modal-close-icon {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-btn:hover .modal-close-icon,
.modal-close-btn:focus .modal-close-icon {
  fill: #ffffff;
}

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

.modal-form-cont {
  margin-bottom: 8px;
}

.modal-checkbox-cont {
  margin-bottom: 24px;
}

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

.modal-label:not(:last-child) {
  margin-bottom: 4px;
}

.modal-form-input {
  position: relative;
}

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

.modal-icon {
  position: absolute;

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

.modal-input:hover,
.modal-input:focus {
  border: 1px solid #4d5ae5;
  fill: #4d5ae5;
}

.modal-input:active {
  border: 1px solid #4d5ae5;
}

.modal-input:hover + .modal-icon,
.modal-input:focus + .modal-icon {
  fill: #4d5ae5;
}

.modal-form-textarea {
  margin-bottom: 16px;
}

.modal-textarea {
  width: 100%;
  height: 120px;
  resize: none;
  border-radius: 4px;
  background-color: transparent;
  outline: transparent;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-textarea:hover,
.modal-textarea:focus {
  border: 1px solid #4d5ae5;
}

.modal-textarea:active {
  border: 1px solid #4d5ae5;
}

.modal-checkbox {
  width: 16px;
  height: 16px;
}

.visually-hidden:checked + .modal-label-checkbox :first-child {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

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

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

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

.modal-btn {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  border: none;
  margin: 0 auto;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #ffffff;
  cursor: pointer;
  outline: transparent;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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