:root {
  --icon-color-light: #f4f4fd;

  /* Animations */
  --anim-fast: 300ms ease-in;
  --anim-slow: 600ms ease-out;
}

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}
/*#region reset*/
h1,
h2,
h3,
h4,
h5,
p {
  margin: 0;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: currentColor;
  text-decoration: none;
}

img {
  display: block;
}
.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;
}

.btn-reset {
  padding: 0;
  border: none;
  background-color: transparent;
}
/*#endregion reset*/

/*#region common*/
.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}
section {
  padding: 120px 0;
}

h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
/*#endregion common*/

/* #region Header */
.page-header {
  border-bottom: 1px solid #e7e9fc;
  box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 2px 1px 0 rgba(46, 47, 66, 0.08);
}
.header-container {
  display: flex;
  align-items: center;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-header {
  display: flex;
  align-items: center;
}
.contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}
.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;
}
.header-logo {
  padding: 24px 0;
  margin-right: 76px;
}

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

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

.nav-link.current {
  position: relative;
}

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

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

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

/* #endregion Header*/

/* #region hero */
.btn-hero {
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  color: currentColor;
  cursor: pointer;
  background: #4d5ae5;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover,
button:focus {
  background-color: #404bbf;
  color: #fff;
}
.hero {
  max-width: 1440px;
  margin: 0 auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/Hero/background.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 188px 0;
}
.ttl-hero {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  margin-bottom: 48px;
  max-width: 496px;
}
.hero-container {
  text-align: center;
}
/*#endregion hero*/
/* #region Section 1 */
.advanteges {
  padding: 120px 0;
}
.section-one {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.section-one-item {
  width: calc((100% - 3 * 24px) / 4);
  display: flex;
  flex-direction: column;
  align-items: self-start;
  flex-wrap: wrap;
}
.paragraph {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
h2 {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-transform: capitalize;
}
.title-card {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.container-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f4f4fd;
  width: 100%;
  max-width: 264px; /* Максимальна ширина іконки */
  height: 112px; /* Висота контейнера для іконки */
  border: 1px solid #8e8f99;
  border-radius: 4px;
  margin-bottom: 8px;
}

.icon {
  display: block;
  width: 100%; /* Іконка займатиме всю ширину контейнера */
  height: 100%;
  max-width: 64px; /* Обмежуємо максимальний розмір іконки */
}

/* #endregion Section 1 */

/* #region Section 2 */

.ttl-team {
  text-align: center;
  margin-bottom: 72px;
}
.team {
  background-color: #f4f4fd;
  padding-bottom: 120px;
  padding-top: 120px;
}
.team-list-item {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  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);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-list-item:hover,
.team-list-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);
}
.team-list {
  display: flex;
  gap: 24px;
}
.team-text {
  text-align: center;
  padding: 32px 0;
}
.icons-team {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}
.team-link {
  display: flex;
  align-items: center;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.icons-team,
.icons-footer {
  margin-top: 8px;
}

.team-svg {
  display: inline-block;
  fill: var(--icon-color-light);
  width: 16px;
  height: 16px;
}

.team-svg:last-child {
  margin-right: 0;
}

/* #endregion Section 2 */

/* #region Section 3 */

.ttl-portfolio {
  text-transform: capitalize;
  text-align: center;
  margin-bottom: 72px;
}

.paragraph-portfolio {
  font-size: 16px;
  color: #434455;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  background-color: #ffffff;
  gap: 48px 24px;
}
.portfolio-item {
  background: #fff;
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.porfolio-thumb {
  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);
}
.overlay {
  position: absolute;
  top: 0;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background: #4d5ae5;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

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

.portfolio {
  background-color: inherit;
  padding: 120px 0;
}

.portfolio-text {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.portfolio-title {
  margin-bottom: 8px;
}

/* #endregion Section 3 */

/* #region Footer */

.page-footer {
  background-color: #2e2f42;
  padding: 100px 0;
}
.text-footer,
.title-footer {
  color: #f4f4fd;
}
.footer-logo .logo-part {
  color: #f4f4fd;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}
.text-footer {
  width: 264px;
}
.title-footer {
  margin-bottom: 16px;
}
.footer-logo-part {
  max-width: 264px;
  margin-right: 120px;
}

.footer-container {
  display: flex;
  justify-content: space-between; /* Розкидаємо блоки по ширині */
  align-items: flex-start;
  /* margin-right: 120px; */
  margin: 0 auto;
}
.social-list {
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.social-icon {
  fill: #f4f4fd;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-item {
  width: 40px;
  height: 40px;
}
.icons-footer svg:hover {
  fill: #31d0aa;
}
.paragraph-social,
.paragraph-subscribe {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  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 {
  display: inline-block;
  fill: #f4f4fd;
}
.subscribe-item {
  margin-left: auto;
}
.subscribe-input {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  outline: none;
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid #fff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}
.subscribe-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2%;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.btn-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 4px;
  padding-right: 24px;
  padding-left: 24px;
  width: 165px;
  height: 40px;
  min-width: 165px;
  background: #4d5ae5;
  color: #ffffff;

  gap: 16px;
}
.btn-footer:hover {
  background-color: #31d0aa;
}
.footer-btn-icon {
  fill: #ffffff;
  margin-left: 16px;
}
.footer-form {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 24px;
}

/* #endregion Footer*/

/* #region Modal */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(46, 47, 66, 0.4);
  z-index: 10;
  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);
}

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.backdrop.is-open .modal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 408px;
  width: 100%;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  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%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(1.5);
}
.modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #e7e9fc;
  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-btn:hover,
.modal-btn:focus {
  color: #404bbf;
  border-color: none;
  border: none;
}

.modal-btn-icon {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-btn:hover .modal-btn-icon,
.modal-btn:focus .modal-btn-icon {
  fill: #ffffff;
}
.modal-btn-icon {
  stroke: currentColor;
}

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

.modal-form-box {
  margin-bottom: 8px;
}
.comment-div {
  margin-bottom: 16px;
}
.modal-form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-form-field {
  position: relative;
}
.modal-form-input {
  display: block;
  padding: 16px 38px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  outline: transparent;
  background-color: transparent;
  border-radius: 4px;
  width: 100%;
  height: 40px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: border-color;
}
.modal-form-input:focus {
  border-color: #4d5ae5;
}

.modal-form-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  fill: currentColor;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-form-input:focus + .modal-form-icon {
  fill: #4d5ae5;
}
.modal-form-message {
  width: 100%;
  height: 120px;
  padding: 8px 16px;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  background-color: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  outline: transparent;
  border-radius: 4px;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: border-color;
}
.modal-form-message:focus {
  border-color: #4d5ae5;
}
.modal-form-message::placeholder {
  color: rgba(46, 47, 66, 0.4);
}
.modal-form-agreement {
  margin-bottom: 24px;
}

.modal-form-agreement-field {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-form-agreement-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  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);
  transition-property: background-color, border, fill;
  fill: transparent;

  cursor: pointer;
}
.checkbox:checked
  + .modal-form-agreement-field
  > .modal-form-agreement-checkbox {
  background-color: #404bbf;
  border: none;
  fill: var(--icon-color-light);
}

.modal-form-agreement-link {
  line-height: 1, 33;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}
.btn-accent {
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  padding: 16px 32px;
  width: 169px;
  height: 56px;
  min-width: 169px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #4d5ae5;
  color: #fff;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition-property: background-color;
}
.btn-accent:hover {
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: #404bbf;
}
/* #endregion Modal  */
