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

}

a {
    text-decoration: none;
}

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

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

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

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

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




/* Header */
.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);
}

.header .container {
    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;
    margin-right: 76px;
    text-decoration: none;
}

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

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

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

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

.nav-link-studio::after{
    position: absolute;
    content:"";
    width: 100%;
    height: 4px;
    left: 0;
    bottom: -1px;
    background-color: #404bbf;
    border-radius: 2px;
}

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

address {
    font-style: normal;
}

.contact {
    margin-left: auto;
}

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

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

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




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

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

.btn {
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    justify-content: center;
    background: #4d5ae5;
    color: #fff;
    border: 1px solid #4d5ae5;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    margin-top: 48px;
    padding: 16px 32px;
    border-radius: 4px;
    display: block;        
    min-width: 169px;       
    height: 56px;
    margin-left: auto;      
    margin-right: auto;     
    border: none;           
}

.btn:hover,
.btn:focus {
    background-color: #404BBF;
}




/* Features */
.features {
    padding-top: 120px;
    padding-bottom: 120px;
}

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

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

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

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

.feature-icon-container{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 112px;
    background-color: #F4F4FD;
    border-radius: 4px;
    border: 1px solid #8e8f99;
    margin-bottom: 8px;
}



/* Team */
.team {
    background-color: #F4F4FD;
    padding-top: 120px;
    padding-bottom: 120px;
}

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

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

.team-card {
    background-color: #FFFFFF;
    width: calc((100% - 72px) / 4);
    border-radius: 0px 0px 4px 4px;
    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);
}

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

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

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

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

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

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

.team-social-link svg {
    fill: #f4f4fd;
}



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

.portfolio-list {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-top: 72px;
    row-gap: 48px;
}

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

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

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

.portfolio-card {
    transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.portfolio-card:hover {
    box-shadow: 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);
    transform: translateY(0%);
}

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

.portfolio-img-text {
    position: absolute;
    top: 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);
}

.portfolio-img-container:hover .portfolio-img-text {
    transform: translateY(0%);
}



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

.footer .container {
    display: flex;
    align-items: baseline;
    width: 1158px;
}

.footer .logo-container{
    margin-right: 120px;
}

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

.footer-text-left {
    line-height: 1.5;
    color: #F4F4FD;
    letter-spacing: 0.02em;
    width: 264px;
}

/* Social media */
.footer-span-logo {
    color: #f4f4fd;
}

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

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

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

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

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

.footer-social-link svg {
    fill: #f4f4fd;
}

/* Subscribe */
.subscribe-container {
    margin-left: 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.subscribe-form {
    display: flex;
    gap: 24px;
    font-size: 12px;
}

.subscribe-content {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 264px;
    font-size: 12px;
}

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

.subscribe-input::placeholder {
    color: #fff;
}

.btn-subscribe {
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
    background: #4d5ae5;
    border: none;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-subscribe-primary {
    border-radius: 4px;
    padding-block: 8px;
    padding-inline: 24px;
    min-width: 165px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

.btn-subscribe:hover,
.btn-subscribe:focus {
    background-color: #404BBF;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-subscribe svg {
    fill: #fff;
}

.footer-subscribe-svg {
    margin-left: 16px;
}



/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(46, 47, 66, 0.4);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    /* pointer-events: none; */
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* .modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;} */

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

/* Close */
.icon-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: #e7e9fc;
    border: 1px solid rgba(0, 0, 0, 0.1); 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

.form-container-textarea {
    margin-bottom: 16px;
}

.contact-form {
    max-width: 360px;
}

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

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

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

.input-group {
    position: relative;
}

.input-group .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

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

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    border-radius: 4px;
    padding: 16px 18px;
    padding-left: 38px;
}

.form-textarea {
    width: 100%;
    height: 120px;
    font-weight: 400;
    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: transparent;
    padding: 8px 16px;
    outline: transparent;
    resize: none;
    transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea:focus,
.form-input:focus {
border: 1px solid #4d5ae5;
}

.form-textarea::placeholder {
    opacity: 1;
}

/* Privacy Policy */
.accept-policy {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.policy-text {
    align-items: center;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #8e8f99;
}

.privacy-policy-text {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.33;
    text-decoration: underline;
    color: #4d5ae5;
    margin-left: 4px;
}

.user-privacy-checkbox {
    position: relative;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid rgba(46, 47, 66, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    fill: transparent;
    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);
}

.user-privacy-checkbox svg {
    opacity: 0;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.visually-hidden:checked+.policy-text .user-privacy-checkbox {
    border-radius: 2px;
    background-color: #404bbf;
    border: none;
    fill: #f4f4fd;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.visually-hidden:checked+.policy-text .user-privacy-checkbox svg {
    opacity: 1;
    border: none;
    fill: #f4f4fd;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button */
.btn-modal {
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
    justify-content: center;
    background: #4d5ae5;
    color: #fff;
    border: 1px solid #4d5ae5;
    cursor: pointer;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modal-primary {
    padding: 16px 32px;
    border-radius: 4px;
    display: block;
    min-width: 169px;
    height: 56px;
    margin-left: auto;
    margin-right: auto;
    border: none;
}

.btn-modal:hover,
.btn-modal:focus {
    background-color: #404BBF;
    transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}



/* Utilities */
.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;
}