body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
  line-height: 1.5;
}
/* header css */
.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;
  justify-content: space-between;
}
.nav {
  display: flex;
  align-items: center;
}
.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-right: 76px;
}

.light {
  color: #2e2f42;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 40px;
}
.nav-link {
  text-decoration: none;
  color: #2e2f42;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  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;
}
.nav-link:hover,
.nav-link:focus,
.nav-link.current {
  color: #404bbf;
}

address {
  font-style: normal;
}

.contacts-list {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}
.contacts-link {
  text-decoration: none;
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contacts-link:hover,
.contacts-link:focus {
  color: #404bbf;
}
.nav-link,
.contacts-link {
  padding: 24px 0; /* висота формується падінгами посилань */
  display: block;
}

/* section one */

.fon {
  background-color: #2e2f42;
  padding: 188px 0;
  text-align: center;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/background-fon.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.title {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin: 0 0 32px 0;
  max-width: 496px;
  margin-left: auto;
  margin-right: auto;
}
.btn {
  display: block;
  margin: 0 auto;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  border: none;
  cursor: pointer;
  padding: 16px 32px;
  min-width: 169px;
  border-radius: 4px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover,
.btn:focus {
  background-color: #404bbf;
}

/* features section */
.features-list {
  list-style: none;
  display: flex;
  gap: 24px;
}
.features-item {
  width: calc((100% - 3 * 24px) / 4);
}
.features-item-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}
.features-item-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
.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;
}
.icon-style {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background: #f4f4fd;
  margin-bottom: 8px;
}
.icon {
  width: 64px;
  height: 64px;
}

/* our-team section */

.team {
  background-color: #f4f4fd;
  list-style: none;
}
.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: 0 0 72px 0;
}
.team__list {
  display: flex;
  gap: 24px;
  list-style: none;
  justify-content: center;
}

.team-item {
  width: calc((100% - 3 * 24px) / 4);
  text-align: center;
  background-color: #ffffff;
  border-radius: 0px 0px 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);
}

.team-container {
  padding: 32px 0;
  text-align: center;
}
.team-name {
  color: #2e2f42;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.team-role {
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 8px;
}

.social-links-team {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 24px;
  padding: 0;
  margin: 0;
}
.social-item-team {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
}

:root {
  --color-social-bg: #4d5ae5;
  --color-social-hover: #404bbf;
  --color-social-icon: #f4f4fd;
}

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

.social-link-team:hover,
.social-link-team:focus {
  background-color: var(--color-social-hover);
}

.social-icon-team {
  width: 16px;
  height: 16px;
  fill: var(--color-social-icon);
}

/* portfolio section */

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

.portfolio-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
}
.portfolio-item {
  width: calc((100% - 2 * 24px) / 3);
  background-color: #ffffff;
  overflow: hidden;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.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-photo {
  display: block;
}

.portfolio-card-content {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.portfolio-subtitle {
  color: #2e2f42;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.portfolio-text {
  color: #434455;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.portfolio-thumb {
  position: relative;
  overflow: hidden; /* щоб параграф не виходив за межі зображення */
}

.overlay-text-p {
  font-family: "Roboto", sans-serif;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  --overlay-color: #f4f4fd;
  color: var(--overlay-color);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  display: flex;
  align-items: flex-start;
  padding: 40px 32px;
  text-align: left;

  transform: translateY(100%);
  opacity: 1;

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

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

/* footer сss */

.footer {
  background-color: #2e2f42;
}
.footer .container {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  max-width: 1158px;
  margin: 0 auto;

  padding: 100px 15px;
  box-sizing: border-box;
}
.container-footer {
  display: flex;
  flex-direction: column;
  margin-right: 120px;
}

.logo-footer {
  display: inline-block;
  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;
}

.light-footer {
  color: #f4f4fd;
}

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

.social-list {
  list-style: none;
  gap: 16px;
  display: flex;
  padding: 0;
  margin: 0;
}
.social-item a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  text-decoration: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-item a:hover,
.social-item a:focus {
  background-color: #31d0aa;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-icon {
  width: 24px;
  height: 24px;
  --icon-fill: #f4f4fd;
  fill: var(--icon-fill);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* HM-03 */
h1,
h2,
h3,
p {
  margin: 0;
}
ul,
li {
  margin: 0;
  padding-left: 0;
}
img {
  display: block;
}
.container {
  max-width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}
.section {
  padding: 120px 0;
}
