:root{
  --white: #ffffff;
  --primary: #4d5ae5;
  --hover: #31d0aa;
  --icon-color: #f4f4fd;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: white;
  line-height: 1.5;
  margin: 0;
}

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

li {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

section {
  padding-top: 120px;
  padding-bottom: 120px;
}

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


button {
  cursor: pointer;
}

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

a {
  text-decoration: none;
}

.header-content {
  border-bottom: 1px solid #e7e9fc;
  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); 
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-menu {
  display: flex;
  gap: 40px;
}


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

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

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

.header-link:hover::after,
.header-link.active::after {
  width: 100%;
  bottom: -1px; 
  height: 4px; 
  background-color: #404bbf;
  border-radius: 2px; 
}

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


.logo-heder {
  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;
}


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

.header-contact-info {
  font-family: "Roboto", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}

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

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

.path-of-logo-footer {
  color: #f4f4fd;
}

address {
  font-style: normal;
}

.first-section-color {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 188px 0;
  background: 
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/first-section-people-office.jpg");

  max-width: 1440px;
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: cover; 
  margin: 0 auto;
}


.first-section-color .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 48px;
}

.first-title {
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  color: #fff;
  line-height: 1.07;
  text-align: center;
  letter-spacing: 0.02em
}

.service-button {
  color: #fff;
  background-color: #4D5AE5;
  font-weight: 500 ;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: none;
  padding: 16px 32px;
  min-width: 169px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.service-button:hover {
  background: #404bbf;
}

.service-button:focus {
  background: #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;
  }
  

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

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

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



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

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

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

.team-section {
  background-color: #F4F4FD;
}

.team-group {
  width: 100%;              
  display: flex;                         
  justify-content: space-between; 
  text-align: center;
  gap: 24px;
}

.team-group-list {
  background-color: #fff;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 1px rgba(46, 47, 66, 0.08), 
              0 1px 1px rgba(46, 47, 66, 0.16), 
              0 1px 6px rgba(46, 47, 66, 0.08);
  flex-basis: calc((100% - 3*24px)/4);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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


.social-icons {
  display: flex;          
  gap: 24px;             
  padding: 0;
  margin: 0;
  list-style: none;     
  justify-content: center; 
}


.icon-list {
  list-style: none; 
}


.icon-list .link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1); 
  color: #fff;
}


.icon-list .link .icon {
  width: 16px;
  height: 16px;
  fill:  #f4f4fd;
  transition: fill 250ms ease-in-out;
}


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


.portfolio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}


.team-list {
  flex-basis: calc((100% - 2 * 24px) / 3);

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


.portfolio-img-wrapper {
  position: relative;
  overflow: hidden; 
}


.portfolio-img-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

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

.team-list:hover .overlay-text {
  transform: translateY(0%);
}


.portfolio-img-wrapper:hover,
.team-list:hover {
  transform: translateY(0);
}

.team-list:hover {
  box-shadow: 0 2px 1px rgba(46, 47, 66, 0.08),
              0 1px 1px rgba(46, 47, 66, 0.16),
              0 1px 6px rgba(46, 47, 66, 0.08);
}


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

.portfolio-title {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.portfolio-text {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.footer-block {
  background-color: #2e2f42;
  padding: 100px 0;
}

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

.logo-section {
  margin-right: 120px;
}

.logo-footer {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  display: inline-block; 
  margin-bottom: 16px;   
}

.path-of-logo-footer {
  color: #f4f4fd;
}

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

.media-text {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

.social-media-icons {
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.icon-media-list {
  width: 40px;       
  height: 40px;     
}

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

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

.social-icon {
  fill: #f4f4fd;
}
