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

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

p {
  margin: 0;
}

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

section {
  padding: 120px 0;
}

img {
  display: block;
}

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

button {
  cursor: pointer;
  border: none;
}

/* #region Header */
.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;
  justify-content: space-between;
  align-items: center;
}

/* fixed size of all global containers in all sections */
.container {
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}

.logo-header {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #4d5ae5;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1.17;
  letter-spacing: 0.03em;
  padding: 24px 0;
  margin-right: 76px;
}

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

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

.nav-list {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  display: flex;
  gap: 40px;
}

.nav-item:nth-child(1) .nav-link {
  color: #404bbf;
}

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

.nav-link:focus {
  color: #404bbf;
  text-decoration: underline;
}

/* підкреслення */
.nav-link {
  /* псевдоелемент прив’язаний */
  position: relative;
  text-decoration: none;
  color: #2e2f42;
  letter-spacing: 0.02em;
  padding: 24px 0;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.studio::after {
  content: "";
  position: absolute;
  left: 0;
  /* лінія під текстом */
  bottom: 0;
  /* початково невидима width 0 */
  width: 100%;
  /* товщина підкреслення */
  height: 4px;
  /* колір лінії */
  background-color: #404bbf;
  border-radius: 2px;
  transition: width 0.3s ease;
  bottom: -1px;
}

.nav-link:hover::after,
.nav-link:focus::after {
  /* ефект наводження */
  width: 100%;
  bottom: -1px;
}
/* _________ */

.contact-header {
  font-style: normal;
}

.cntct-list {
  display: flex;
  gap: 40px;
}

.contact-header {
  color: #434455;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  letter-spacing: 0.02em;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-header:hover {
  color: #404bbf;
}

.contact-header:focus {
  color: #404bbf;
}

/* #endregion */

/* #region HERO */
.hero {
  background-color: #2e2f42;
  /* Gradient and image for hero section */
  /* backgroun photo and gradient */
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/office-work.jpg);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 100%;
  padding: 188px 0;
}

.hero-title {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 496px;
  margin: 0 auto 48px;
}

.hero-btn {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  background-color: #4d5ae5;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-align: center;
  display: block;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  padding: 16px 32px;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgb(0 0 0 / 15%);

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-btn:hover,
.hero-btn:focus,
.hero-btn:active {
  transform: scale(1.3);
  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;
}

.features-list {
  display: flex;
  text-align: left;
  gap: 24px;
}

.features-item {
  flex-basis: calc((100% - 72px) / 4);
}

/* style for naming of section Features, Portfolio */
.features-title,
.portfolio-name,
.team-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: #2e2f42;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

/* styles for <p> of section Features, Team and Portfolio */
.features-text,
.team-position,
.portfolio-dsr {
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

/* SECTION TEAM */
.team {
  background-color: #f4f4fd;
  display: flex;
}

.team-container {
  padding: 32px 0;
}

.team-list {
  text-align: center;
  display: flex;
  gap: 24px;
}

/* стилі title для section Team and Portfolio */
.team-title,
.portfolio-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  color: #2e2f42;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  margin-bottom: 72px;
}

.team-item {
  border-radius: 0 0 4px 4px;

  /* shadow for the box li */
  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-socials-list {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.team-socials-item {
  height: 40px;
  width: 40px;
}

.team-socials-icon {
  fill: #f4f4fd;
}

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

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-link:hover,
.team-link:focus,
.team-link:active {
  transform: scale(1.3);
  background-color: #404bbf;
}

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

/* контейнер для overlay */
.info-box {
  position: relative;
  overflow: hidden;
}

.overlay {
  /* позиція контенту*/
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* стиль тексту */
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;

  /* внутрішні відступи тексту */
  padding: 40px 32px;

  /* зміщення на 100% (ховаємо) */
  transform: translateY(100%);

  /* анімація - перехід*/
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .overlay {
  /* зміщення контенту на 0 */
  transform: translateX(0);
}

/* PORTFOLIO SECTION */
.portfolio-img {
  padding: 0 auto;
}

.portfolio-text-section {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
  width: 360px;
  height: 120px;
}

.portfolio-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  row-gap: 48px;
  margin-bottom: 0;
}

.portfolio-item {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover,
.portfolio-item:active,
.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);
}

/* #endregion */
/* #region Footer */
footer {
  background-color: #2e2f42;
  width: 100%;
  padding: 100px 0;
}
.logo-footer {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  text-transform: uppercase;
  text-decoration: none;
  color: #4d5ae5;
  letter-spacing: 0.03em;
  display: inline-block;
  margin-bottom: 16px;
}

.logo-text-part-web-footer {
  color: #f4f4fd;
}

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

.footer .container {
  display: flex;
  align-items: baseline;
}

.footer-content-container {
  margin-right: 120px;
}

.footer-social-container {
  display: flex;
  flex-direction: column;
  margin-right: 80px;
}

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

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

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

.footer-social-link {
  background-color: #4d5ae5;
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-link:hover,
.footer-social-link:focus,
.footer-social-link:active {
  transform: scale(1.3);
  background-color: #31d0aa;
}

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

/* Footer Form */
.footer-subscribe-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
}

.footer-subscribe-form {
  display: flex;
  gap: 24px;
}

.footer-subscribe-input {
  border: 1px solid #fff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  background-color: transparent;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;

  padding-left: 16px;
}

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

.footer-subscribe-btn {
  font-family: "Roboto", sans-serif;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  background: #4d5ae5;
  border: none;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-subscribe-btn:hover,
.footer-subscribe-btn:focus,
.footer-subscribe-btn:active {
  transform: scale(1.1);
  background-color: #404bbf;
  border: none;
}

.footer-subscribe-btn-svg {
  margin-left: 16px;
}

.footer-subscribe-btn-use {
  fill: white;
}
/* #endregion */

/* Modal Window */
.modal-box {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  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-box.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  background-color: #fcfcfc;

  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);
  border-radius: 4px;

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px 24px;
}

.modal-btn-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  /* box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 3px 0 rgba(0, 0, 0, 0.12); */

  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  position: absolute;
  top: 24px;
  right: 24px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

.modal-form-box {
  margin-bottom: 8px;
  width: 360px;
}

.modal-icon-box {
  position: relative;
}

/* +стилі */
.modal-field {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
  display: block;
}

.modal-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 100%;
  height: 40px;
  background-color: transparent;
  padding-left: 38px;
  outline: transparent;

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-input:hover,
.modal-input:focus,
.modal-input:active {
  border-color: #4d5ae5;
}

.modal-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);

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

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

/* *TEXTAREA */
.modal-comment-box {
  margin-bottom: 16px;
}

.modal-text {
  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-text:hover,
.modal-text:focus,
.modal-text:active {
  border-color: #4d5ae5;
}

/* checked */
.modal-visual:checked + .modal-field .span-modal {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

/* * */
.modal-box-check {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

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

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

.modal-btn {
  font-family: "Roboto", sans-serif;
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  border-radius: 4px;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

  margin: 0 auto;
}

.span-modal {
  height: 16px;
  width: 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);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
}
