/* General */
body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}
ul, ol {
  list-style-type: none;
  margin-top: 0px;
  margin-bottom: 0px;
  padding-left: 0px;
}
a {
  text-decoration: none;
}
img {
  display: block;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}
/* Logo */
.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;
}

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

.header {
    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);

}

.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}
.header-container {
  display: flex;
}
/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
}
.header-logo{
    margin-right: 76px;
}

nav a:hover,
nav a:focus,
address a:hover,
address a:focus {
  color: #404bbf;
}

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

.active-link::after {
  content: "";
  width: 100%;
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}
.nav-link {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding: 24px 0;
  text-decoration: none;
  transition-property: color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}


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

.active-link {
  position: relative;
  color: #404bbf;
}
/* Contacts */
.address {
  display: block;
  margin-left: auto;
  font-style: normal;
  padding-bottom: 24px;
  padding-top: 24px;
}

.address-list,
.nav-list {
  list-style: none;
  margin: 0;
}
.address-list {
    display: flex;
    gap: 40px;
}
.address-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-decoration: none;
  padding-bottom: 24px;
  padding-top: 24px;
   transition-property: color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link:hover,
.address-link:focus {
  color: #404bbf;
}
/* Hero section */
.hero {
  background-color: #2e2f42;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: linear-gradient(
    to bottom,
    rgba(46, 47, 66, 0.7),
    rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero/background-office.jpg);
  padding: 188px 0;
  max-width: 1440px;
  background-position: center;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-button {
  
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  background-color: #4d5ae5;
  color: #ffffff;
  border-radius: 4px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-right: auto;
  margin-left: auto;
  margin-top: 56px;
  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;
}

/* Section 2: Strengths */
.strengths {
    padding: 120px 0;
}
.strengths-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(100%);
}

.strengths-list {
  display: flex;
  gap: 24px;
}
.icon-container-sth{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  margin-bottom: 8px;
}
.strengths-item {
  flex-basis: calc((100% - 72px) / 4);
}

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

/* Section 3: Team */
.team {
  background-color: #f4f4fd;
  padding: 120px 0;
}

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

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

.team-item {
  background-color: #ffffff;
  flex-basis: calc((100% - 72px) / 4);
  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-item-container {
  padding: 32px 0;
}
.team-item-title {
  font-size: 20px;
  font-weight: 500;
  color: #2e2f42;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 8px;
}

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

.team-icon-list{
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
}

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

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

.team-icon,
.icon{
  fill: var(--overlay-text-color);
}

/* Section 4: Portfolio */
.portfolio {
  background-color: #ffffff;
  padding: 120px 0 120px 0;
}

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

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

.portfolio-item{
  width: calc((100% - 48px) / 3);
  transition-property: box-shadow;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.image-wrapper{
  position: relative;
  overflow: hidden;
}

li:hover .image-wrapper p{
  transform: translateY(0%);
}
:root{
  --overlay-text-color: #f4f4fd;
}
.portfolio-overlay-text{
  position: absolute;
  top: 0;
  width: 100%;
  height:100%;
  background-color:#4d5ae5;
  transform: translateY(100%);
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--overlay-text-color);
  padding: 40px 32px;
  transform: translateY(100%);
  transition-property:transform ;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Footer */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}
.footer-container {
display: flex;
align-items: baseline;

}
.logo-container {
  margin-right: 120px;
}
.footer-logo , .logo-link {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.17;
  text-transform: uppercase;
  color: #4d5ae5;
  margin-bottom: 16px;
}
.footer-logo-accent {
  color: #f4f4fd;
}

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

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

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

.footer-icon-link:hover,
.footer-icon-link:focus{
  background-color: #31d0aa;
}
:root {
  --footer-text-color: #ffffff;
}
.footer-icon-text{
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--footer-text-color);
  margin-bottom: 16px;
}

.social-container{
  margin-left: 120px;
}

.form-container{
  margin-left: auto ;
}

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

.form{
  display: flex;
  gap: 24px;
}

.form-input{
  width: 264px;
  height: 40px;
  border: 1px solid #ffffff;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  color: #ffffff;
}
.form-input::placeholder{
  color: #ffffff;
}

.form-button{
  min-width: 165px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-size: 16x;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
}

.button-icon{
  margin-left: 16px;
  fill: #ffffff;
}

          /* modal */

.modal-container{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-container.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 408px;
  min-height: 584px;
  background: #fcfcfc;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 2px 1px 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-button{
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.modal-button:hover,
.modal-button:focus{
  background-color: #404bbf;
  border: none;

}

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

.modal-button:focus .modal-icon,
.modal-button:hover .modal-icon{
  fill: #ffffff;
}

:root{
  --modal-text-color: #2e2f42;
}

.modal-text{
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--modal-text-color);
  margin-bottom: 16px;

}

.form-container{
  margin-bottom: 8px;

}
:root{
  --label-text-color: #8e8f99;
}
.modal-label{
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--label-text-color);
  display: block;
  margin-bottom: 4px;

}

.input-container{
  position: relative;
}

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

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

.input-icon{
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);

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

.form-container-comment{
  margin-bottom: 16px;

}

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

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

.label-checkbox{
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--label-text-color);
}

.privacy-span{
  width: 16px;
  height: 16px;
  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;
  margin-right: 4px;
}

:root{
  --background-color: #404bbf;
  --icon-color: #F4F4FD;
}

.checkbox-input[type="checkbox"]:checked + .label-checkbox .privacy-span{
  background-color: var(--background-color);
  border: none;
  fill: var(--icon-color);
}

:root{
  --link-color: #4d5ae5;
}

.privacy-link{
  color: var(--link-color);
}

.modal-send-button{
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 169px;
  height: 56px;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}