/* ===== Base ===== */
body {
    font-family: "Roboto", sans-serif;
    color: #434455;
    background-color: #fff;
}
ul,ol {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    color: inherit;
}
h1, h2, h3, h4, h5, h6, p {
    margin: 0;
}
.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;
}
.section-title {
    margin-bottom: 72px;
    color: #2e2f42;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    text-align: center;
}
 
img {
    display: block;
    max-width: 100%;
    height: auto;
}
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}
/* ===== Header ===== */

.page-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-logo {
    font-family: "Raleway", sans-serif;
    line-height: 1.17;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.03em;
    margin-right: 76px;
    color: #4d5ae5;
    text-transform: uppercase;
        margin-bottom: 16px;
}

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


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



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



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

    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;


}
.nav-link:hover,
.nav-link:focus {
    color: #404bbf;
}
.nav-link.current {
    color: #404bbf;
}
.contacts {
    font-style: normal;
}
.contacts-list{
    display: flex;
    gap: 40px;
    padding: 0;
    text-align: left;
}

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


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

/* ===== Hero ===== */
.hero-section {
    background-color: #2e2f42;
    text-align: center;
   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-repeat: no-repeat;
   background-position: center;
   background-size: cover;
   max-width: 1440px;
   margin-left: auto;
   margin-right: auto;
   
}

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

.primary-btn {
    background-color: #4d5ae5;
    color: #ffffff;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
        gap: 10px;
    border-radius: 4px;
        padding: 16px 32px;
        border: none;
        transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0 auto;
        min-width: 169px;
        display: block;
        height: 56px;
        box-shadow: 0,25s ease;
}

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


/* ===== Features ( 2 сeкція)===== */
.features {
    padding: 120px 0;
    overflow: hidden;
}

.features-list {
   display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;

}

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

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

.features-text {
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: left;
}
.features-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    width: auto;
    background-color: #f4f4fd;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: visible;
}
.features-icon .features-icon,
.features-icon svg{

    width: 64px !important;
    height: 64px !important;
    display: block;
    overflow: visible;
    flex-shrink: 0;
}


/* ===== Team ===== */
.team-container {
    padding: 32px 0;
}

.team {
    background-color: #f4f4fd;
    padding: 120px 0;
}
.team-list {
        display: flex;
        gap: 24px;
    }
.team-card {
    background-color: #ffffff;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    flex-basis: 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-card-content {
    padding: 32px 0;
    text-align: center;

}


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

}

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

/* ===Соц-іконки (для Team ) ===*/

.socials {
    display: flex;
    justify-content: center;
    gap: 24px;
  
}
.socials-item {
    width: 40px;
    height: 40px;
}

.socials-link {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #4d5ae5;
color: #f4f4fd;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.socials-link:hover,
.socials-link:focus {
    background-color: #404bbf;
}
.socials-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;  
}

/* ===== Portfolio ===== */
.portfolio {
    padding: 120px 0;
}
.project-container {
    width: 1158px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    overflow: hidden;
}
.project-list {
       display: flex;
       flex-wrap: wrap; 
       column-gap: 24px;
       row-gap: 48px;

}

.project-card 
 {
    flex-basis: calc((100% - 48px) / 3);
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0px 0px 4px 4px;
 }
 

.project-title {
    color: #2e2f42;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    margin: 0 8px 0;
    text-align: left;
    
} 

.project-text {
    color: #434455;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin: 0;
    text-align: left;
}
.project-card:hover,
.project-card:focus {
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);
}
.project-thumb {
    position: relative;
    overflow: hidden;
}
.project-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

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

}




/* ===== Footer ===== */
.page-footer {
background-color: #2e2f42;
padding: 100px 0;  
}
.footer-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 72px;
}

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

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

.footer-text {
    color: #f4f4fd;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    margin: 0;
   
}
/* ===F=ooter socials ===*/
.footer-socials {
    text-align: left;
}
.footer-socials-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-weight: 500;
    margin: 0 0 16px 0;

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

}
.footer-item {
    width: 40px;
    height: 40px;
}
.footer-socials-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #4d5ae5;
    width: 40px;
    height: 40px;
}
.footer-socials-link {
    color: #f4f4fd;
}
.footer-socials-link:hover {
background-color: #31d0aa;
}
.footer-socials-link:focus {
    background-color: #31d0aa;
}
.footer-socials-icon {
   fill: #f4f4fd;
}
.form-container-text {
margin-bottom: 16px;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-align: left;
}

.container-form-container {
border: 1px solid var(--white);
    border-radius: 4px;
    width: 264px;
    height: 40px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}
.footer-form {
    display: flex;
    gap: 24px;
}

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

.footer-input::placeholder {
    color: #ffffff;
}

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

.btn-form-subscribe:hover,
.btn-form-subscribe:focus {
    background-color: #31d0aa;
}
/* Бекдроп */
.icon-send {
    fill: #ffffff;
    margin-left: 16px;
}

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

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

/* Модалка */
.modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 408px;
    min-height: 584px;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    background: #fcfcfc;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.14),
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 2px 1px rgba(0, 0, 0, 0.2);
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
    padding: 72px 24px 24px 24px;
}

.backdrop .is-open .modal {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    transition-delay: 250ms;
}

/* Кнопка закриття */
.modal-button {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #e7e9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2e2f42;
    /* використовуємо currentColor для іконки */
    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-button-icon {
   transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
   fill: currentColor;
}

.modal-button:hover .modal-button-icon,
.modal-button:focus .modal-button-icon {
    fill: #ffffff;
}
.modal-text {
    margin-bottom: 16px;
    font-weight: 500;
        font-size: 16px;
        line-height: 1.5;
        letter-spacing: 0.02em;
        text-align: center;
        color: #2e2f42;
}

/* Поля форми + іконки в полях */
.form-field {
padding: 72px 24px 24px 24px;
margin-bottom: 8px;
}

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

.form-field .input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

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

.input {
    height: 40px;
    padding-left: 38px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    background-color: transparent;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #2e2f42;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
    outline: transparent;
    width: 100%;
}
.input:checked + .checkbox-box {
    border: none;
    fill: #f4f4fd;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    fill: rgba(46, 47, 66, 0.4);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 18px;
    height: 24px;

}

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

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

.textarea:focus {
background-color: #4d5ae5;
    outline: transparent;
}

.textarea {
    width: 100%;
    height: 120px;
    resize: none;
    border: 1px solid rgba(46, 47, 66, 0.4);
    border-radius: 4px;
    background-color: transparent;
    padding: 8px 16px;
    font-size: 12px;
    line-height: 1.17;
    outline: transparent;
    letter-spacing: 0.04em;
    color: rgba(46, 47, 66, 0.4);
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.textarea:focus {
    outline: none;
    border-color: #4d5ae5;
}

/* чекбокс */
.form-agreement {
    margin-bottom: 24px;
}
.checkbox-label {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}
.checkbox-input:checked + .checkbox-label .checkbox-box {
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
}

.checkbox-box {
    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;
    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);
        fill: transparent;
    }
.checkbox-icon {
    margin-bottom: 16px;
}

.policy-link {
    color: #4d5ae5;
    text-decoration: underline;
}

/* кнопка */
.modal-submit {
    display: block;
    min-width: 169px;
    height: 56px;
    margin: 0 auto;
    background-color: #4d5ae5;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-submit:hover {
    fill: #ffffff;
}
.modal-submit:focus {
    fill: #ffffff;
    background-color: #404bbf;
}

