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

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

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

}

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


.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
} 

.main {    
    flex-grow: 1; 
}

/*----HEAD-----*/

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

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


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

.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-link-logo { 
    font-family: "Raleway",
    sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.17;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2e2f42;
    text-decoration: none;
    padding: 24px 0;   
    margin-right: 76px;
}



.span-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-nav {
}


.header-nav-list {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-decoration: none;
   list-style-type: none;
   display: flex;
   align-items: center;
   gap: 40px;
}
.header-nav-item {    
}

.header-link {
    
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-decoration: none;
    padding: 24px 0;
    display: block;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

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

.header-link-studio {
    
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #404bbf;
    text-decoration: none;
    padding: 24px 0;
    display: block;
    position: relative;
}

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

.header-link-studio:hover, 
.header-link-studio:active, 
.header-link-studio:focus {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;        
    color: #404bbf;
}

.header-contacts {
    font-style: normal;
    margin-left: auto;
    
    

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

}
 
.contacts-link {
    font-family: "Roboto",
    sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    text-decoration: none;
    font-style: normal;
    padding: 24px 0;
    display: block;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover,
.contacts-link:focus {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #404bbf;
}

/*----SOLUTIONS-----*/

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

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    margin: 0 auto;
}

/*.hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;

}*/


.solutions-title {
    font-family: "Roboto",
        sans-serif;
    font-weight: 700;
    font-size: 56px;
    line-height: 1.07;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fff;
    margin: 0 auto 48px;
    max-width: 496px;
    align-items: center;
}

.hero-button {
    display: flex;
    align-items: center;
    justify-content: center; 
}

.solutions-button {      
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: #fff;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background: #4d5ae5;
    cursor: pointer;
    padding: 16px 32px;
    border-radius: 4px;
    height: 56px;
    min-width: 169px; 
    border: none; 
    transition: 
        background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.solutions-button:hover,
.solutions-button:focus {
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
    background-color: #404bbf;  
}


/*----FEATURES-----*/

.section {
    padding: 120px 0;
      
}

.features {
}

/*.features-title {
    font-family: "Roboto",
        sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 72px;
} */

.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 { 
    list-style-type: none;
    display: flex;
    gap: 24px;  
}

.icon-features-list {
    border: 1px solid #8e8f99;;
    border-radius: 4px;
    width: 264px;
    height: 112px;
    background-color: #f4f4fd;
    margin-bottom: 8px;
}

.icon-features {
    margin: 24px 100px;
}

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

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

.features-text {

    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    text-align: left;
    }


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

.team { 
    background-color: #f4f4fd;
}


.team-title {
    font-family: "Roboto",
        sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 72px;
}



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


.team-item { 
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    width: calc((100% - 72px) / 4);
    border-radius: 0 0 4px 4px;
    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);
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-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);
    background: #fff;   
}
.team-img {
    display: block;
    flex-shrink: 0;

}

.team-icon-list {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    list-style: none;
}

.container-team {
    padding: 32px 16px;
}

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

.team-text {
  font-family: "Roboto",
  sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  margin-bottom: 8px;
}

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

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

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

.portfolio {
    display: flex;
    flex-direction: column;
    align-items: center;    
}

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

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 48px 24px;
    justify-content: center;
    width: 100%;
}
.portfolio-item {
    width: calc((100% - 48px) / 3);
    /*min-width: 360px;*/
    /*height: 420px;*/
    background: #fff;
    /*border-radius: 4px;*/
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}

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

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

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

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

.container-portfolio {
    padding: 32px 16px;
    border: 1px solid #e7e9fc;
    border-top: none;
    border-radius: 4px;
}
.portfolio-subtitle {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
    margin-bottom: 8px;
}

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


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

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

.footer .container { 
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
}

.footer-brand {
    margin-right: 120px;
    max-width: 264px;
}

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


.footer-text {
    font-family: "Roboto",
    sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #f4f4fd;
    max-width: 264px;
}

.social-text {
    font-family: "Roboto",
    sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #fff;
    margin-bottom: 16px;
}

.social-link-list {
   display: flex;
   align-items: center;
   gap: 16px;
}

.footer-social {
    max-width: 208px;
    margin-right: 80px;

}


.social-link-item {
    display: flex;
    
}

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

.social-link:hover,
.social-link:focus {
    background-color: #31D0AA;
}

.icon-link {
    fill: #f4f4fd;
}

.footer-subscribe {
    width: 453px;
    margin-left: auto;
}


.footer-form {
    display: flex;
    align-items: center;
    justify-content: start;
}
 
.footer-form-input {
border: 1px solid #fff;
border-radius: 4px;
width: 264px;
height: 40px;
padding-left: 16px;
background-color: transparent;
color: #fff;
box-sizing: border-box;
cursor: text;
outline: none;
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-input:hover, .footer-form-input:focus-visible {
    border-color: #31D0AA;
}


.footer-form-input::placeholder {
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 2;
    outline: none;
    letter-spacing: 0.04em;
    color: #fff;
}


.footer-btn {
    margin-left: 24px;
}

.footer-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 16px;
border-radius: 4px;
padding: 0 24px;
width: auto;
height: 40px;
border: none;
text-align: center;
background-color: #4d5ae5;
font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.04em;
color: #fff;
cursor: pointer;
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-button:hover, .footer-button:focus {
    background-color: #31D0AA;
}

.icon-footer {    
    fill: #fff;
}

/*----modal ---*/

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

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

.modal {
    border-radius: 4px;
    width: 408px;
    height: 584px;
    padding: 72px 24px 24px;
    background-color: #fcfcfc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay:not(.is-open) .modal {
    transform: translate(-50%, -100%) scale(0.9);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    border-radius: 50px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e7e9fc;
    box-shadow:
            0 1px 1px 0 rgba(0, 0, 0, 0.14),
            0 1px 3px 0 rgba(0, 0, 0, 0.12),
            0 2px 1px 0 rgba(0, 0, 0, 0.2);
    transition:  background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close:hover,
.modal-close:focus-visible {
    background-color: #404bbf;
}
.modal-close:hover .modal-icon-close,
.modal-close:focus-visible .modal-icon-close {
    fill: #fff;    
}

.modal-field {
    padding: 0;
    margin-bottom: 8px;
}


.modal-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    color: #2e2f42;
    margin-bottom: 8px;
}


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

}

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

.input-wrapper:hover .form-icon,
.input-wrapper:focus-within .form-icon {
     fill: #4d5ae5;
}

.input-wrapper:hover .modal-input,
.input-wrapper:focus-within .modal-input {
    border-color: #4d5ae5;
}

.modal-field-comment {
    margin-bottom: 16px;
}

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

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


.modal-input-comment::placeholder {
    color: rgba(46, 47, 66, 0.4);
}

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

.modal-submit {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}  

.input-wrapper {
    position: relative;
}

.form-icon {
    fill: #2e2f42;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.checkbox-field {
    margin-bottom: 24px;
}

.label-policy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 2px;
    margin-right: 8px;
    fill: transparent;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

}

.check-icon {
    fill: #f4f4fd;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-checkbox:checked + .checkbox-label .label-policy {
    background-color: #404bbf;
    border-color: #404bbf;
}

.modal-checkbox:checked+.checkbox-label .check-icon {
    opacity: 1;
    visibility: visible;
}


.policy-link {
    line-height: 1.33;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    color: #4d5ae5;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
    cursor: pointer;
}