* {
  box-sizing: border-box;
}

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

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

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

a {
  text-decoration: none;
}

img {
  display: block;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
}

.container {
  width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

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

/* HEADER */

.header {
  border-bottom: 1px solid #e7e9fc;
  max-width: 1440px;
  margin: 0 auto;
  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;
}

.footer .container {
  display: flex;
}

.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;
}

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

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

.header-menu-item {
}

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

.header-menu-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42; 
  padding-top: 24px;
  padding-bottom: 24px;
  display: block;
  transition-property: color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.header-menu-link.studio {
  color: #404bbf; 
}

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

.header-menu-link.studio::after {
  content: "";
  border-radius: 2px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  transition: width 0.3s ease;
  position: absolute;
  left: 0;
  bottom: -1px;
}

/* .header-menu-link:is(:hover, :focus) {
  color: #404bbf;
} */

.header-contacts {
  margin-left: auto;
}

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

.header-contacts-item {
}

.header-contacts-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition-property: color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* HERO */
.hero {
  background-color: #2e2f42;
  margin: 0 auto;
  padding-top: 188px;
  padding-bottom: 188px;
  max-width: 1440px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/main-bg.jpg");
}

.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;
  margin-bottom: 48px;
}

.hero-button {
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: #4d5ae5;
  display: block;
  margin: 0 auto;
  min-width: 169px;
  min-height: 56px;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  border: none;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* features */
.features {
  padding-top: 120px;
  padding-bottom: 120px;
}

.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;
  gap: 24px;
}

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

.features-icon {
  width: 64px;
  height: 64px;
}

.features-item-cover {
  display: flex;
  padding-bottom: 24px;
  padding-top: 24px;
  padding-right: 100px;
  padding-left: 100px;
  background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  margin-bottom: 8px;
  align-items: center;
  justify-content: center;
}

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

/* TEAM */
.team {
  background-color: #f4f4fd;
  padding-bottom: 120px;
  padding-top: 120px;
}

.team-title {
  text-transform: capitalize;
  margin-bottom: 72px;
}

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

.team-item {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  width: calc((100% - 72px) / 4);
  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-item-overlay {
  padding: 32px 0;
}

.team-subtitle {
  text-align: center;
}

.img-title .team-subtitle {
  text-align: center;
  text-transform: capitalize;
  margin-bottom: 8px;
}

.svg-icon-item {
  width: 40px;
  height: 40px;
}

.team-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  margin-bottom: 8px;
}

.team-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 232px;
  max-height: 40px;
  margin: 0 auto;
  gap: 24px;
}

.team-icon {
  fill: #f4f4fd;
  height: 40px;
}
 
.team-icon-item {
width: 100%;
height: 100%;
height: 40px;
background-color: #4d5ae5;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)
}

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

/* PORTFOLIO */
.portfolio {
  padding-bottom: 120px;
  padding-top: 120px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-title {
  text-transform: capitalize;
  margin-bottom: 72px;
}

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

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

.portfolio-item:hover {
box-shadow:  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-item:hover .portfolio-item-text{
  transform: translateY(0);
}

.portfolio-item-cover {
  position: relative;
  overflow: hidden;
}

.portfolio-item-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color:#f4f4fd;
  position: absolute;
  top: 0;
  left: 0;
  background-color: #4d5ae5;
  /* padding-left: 22px;
  padding-right: 42px;
  padding-top: 40px;
  padding-bottom: 164px; */
  padding: 40px 32px;
  height: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}


.portfolio-subtitle {
  margin-bottom: 8px;
}

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

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

/* FOOTER */
.footer {
  background-color: #2e2f42;
  padding-top: 100px;
  padding-bottom: 100px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}

.footer-logo {
  display: inline-block; /* окремо, щоб система точно знайшла */
}

.footer-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-bottom: 16px;
  display: inline-block;
}

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

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

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

.footer-left {
  margin-right: 120px;
  align-items: baseline;
}

/* .footer-contacts {
  position: absolute;
  left: 540px;
  top: 0;
  width: calc(100% - 540px - 804px);
} */

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

.footer-icon-wrapper {
  display: flex;
  gap: 16px;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

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

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

.footer-icon {
  fill: #f4f4fd;
}

.footer-social-media {
  position: absolute;
  bottom: 132px;
  left: 540px;
}