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

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

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

a {
  text-decoration: none;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

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

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

/* --------------------HEADER--------------------- */

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

.header-navigation {
  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;
  color: #4d5ae5;
  
}

.header-logo {
  padding: 24px 0;
  margin-right: 76px;
}

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

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

.header-menu-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);
  position: relative;
}


.header-menu-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
  opacity: 0;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-menu-link:hover::after,
.header-menu-link:focus::after,
.header-menu-link.current::after {
  opacity: 1;
}

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

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

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

/* --------------------HERO--------------------- */

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


 
.hero-text {
  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 48px;
}

.hero-button {
  background: #4d5ae5;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
 min-width: 169px;
 height: 56px;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  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;
}

.features-list {
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

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

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

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

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

/* --------------------TEAM--------------------- */

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

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

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

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

}

.team-image {
width: 100%;
height: auto;
}

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

.team-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 8px;
}

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

.team-social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

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

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

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

.team-icon {
  fill: #f4f4fd
}

/* --------------------PORTFOLIO--------------------- */

.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}

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

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



.portfolio-item {
  width: calc((100% - 2*24px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
  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-cover {
  position: relative;
  overflow: hidden;
}

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

.portfolio-item:hover .portfolio-item-text {
  transform: translateY(0);
}

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

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

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

/* --------------------FOOTER--------------------- */

.footer {
  background-color: #2e2f42;
  padding-top: 100px;
  padding-bottom: 100px;
}

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

.footer-logo-about{
  margin-right: 120px
}


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

.footer .logo {
  display: inline-block;
  margin-bottom: 16px;
} 

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

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

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

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

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

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