﻿:root {
    --text-color: #212121;
    --secondary-text-color: #757575;
    --logo-and-button: #2196F3;
    --dark-background-color: #2F303A;
    --light-background-color: #F5F4FA;
    --nav-menu-color: #ECECEC;
    --black-color: #000000;
    --white-color: #FFFFFF;
}
body {
        font-family: 'Roboto', sans-serif;
        color: var(--text-color);
        display: flex;
        flex-direction: column;
        min-height: 100vh;
}

button {
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

section {
    padding: 60px 0;
}
.header {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid rgb(202, 202, 202);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.header-logo {
  font-family: 'Raleway', sans-serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--black-color);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.header-logo_brand {
    color: var(--logo-and-button);
}
.header-logo--white {
  font-family: 'Raleway', sans-serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--white-color);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
}
.header-nav-list {
    display: flex;
    gap: 50px;
    list-style: none;
    flex: 1;
}
.header-nav-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-color);
}
.header-contact {
    font-style: normal;
    display: flex;
    gap: 50px;
    flex-shrink: 0;
}
.header-contact a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    color: grey;
}
.center-container {
  display: flex;
  justify-content: center;
  width: 100%;
}
.hero {
    background-color: var(--dark-background-color);
    background-image: linear-gradient( 135deg, rgba(34, 34, 35, 0.8), rgba(36, 37, 36, 0.534) ), url('./img/herosectionbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 200px 0;
}
.hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.group-section {
    background-color: #F5F4FA;
    width: 100%;
    max-width: 1600px;
    height: 648px;
}
.hero-container {
    background-color: var(--logo-and-button);
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 15px 30px;
    font-size: 1em;
    font-weight: 550;
    cursor: pointer;
}
.hero-title {
    color: #FFFFFF;
    font-size: 44px;
    line-height: 1.36;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
/* Features */
.features-list {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
    flex-wrap: wrap;
}

.features-item {
    width: 100%;
    max-width: 260px;
}

.features-item_img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    background-color: var(--light-background-color);
    border-radius: 4px;
    padding: 20px 0;
}

.features-item_title {
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.features-item_text {
    color: #797979;
    line-height: 1.5;
}
/* Work */
.work {
    text-align: center;
}

.work_title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

.work-list {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
    flex-wrap: wrap;
    align-items: center;
}

.work-item {
    position: relative; /* БАЗА для absolute */
    overflow: hidden;
}

.work-item_img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: 240px;
    border-radius: 5px;
}

.work-overlay {
    position: absolute;
    bottom: 0; 
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(63, 61, 61, 0.8); 
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.work-item_img {
    width: 100%;
    max-width: 360px;
    height: 240px;
    border-radius: 5px;
}

/* Group */
.team {
    background-color: #F5F4FA;
    text-align: center;
}
.team_title {
    font-size: 36px;
    line-height: 1.2;
    text-align: center;
    margin-top: auto;
    margin-bottom: 50px;
    color:var(--text-color);
}
.team-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
main {
    flex: 1 0 auto;
    width: 100%;
}

.team-card {
    background-color: #FFFFFF;
    border-radius: 0 0 4px 4px;
    width: 270px;
    text-align: center;
    list-style: none;
    box-shadow: 0 1px 3px #0000001A, 0 1px 6px #00000026, 0 2px 1px #0000001A;
    transition: 0.3s;
    padding-bottom: 20px;
}

.team-card:hover {
    box-shadow: 0 4px 8px #00000026, 0 4px 12px #00000033, 0 8px 4px #00000040;
}
.team-card img {
    width: 100%;
    height: auto;
}
.team-card h3 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    margin: 30px 0 10px 0;
    color: #212121;
}
.team-card p {
    font-size: 16px;
    line-height: 1.2;
    color: #757575;
    margin: 0 0 30px 0;
}
/* Portfolio */
.portfolio-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}
.portfolio-projects > .portfolio-project {
    flex: 1 0 calc((100% - 60px) / 3);
    max-width: 430px;
}
.portfolio-project {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 1px 1px 7px 1px  rgb(192, 192, 192);
    height: 404px;
}

.portfolio-project_poster {
    background: #ffffff;
}

.portfolio-project_poster img {
    display: block;
    width: 100%;
    height: auto;
}
.portfolio-project_text {
    padding: 20px 24px;
}
.portfolio-project_text p {
    font-size: 16px;
    line-height: 1.2;
    color: #757575;
    margin: 0;
    letter-spacing: 0.03em;
    font-weight: normal;
}
.portfolio-project_title {
    font-size: 18px;
    line-height: 2;
    letter-spacing: 0.03em;
    margin: 0 0 4px 0;
    color: #212121;
}
.btn-item button {
    background: var(--light-background-color);
    color: var(--text-color, #212121);
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}
.btn-item button:hover, .btn-item button:focus {
    background-color: var(--logo-and-button); 
    color: var(--white-color);
}
.btn-group {
    width: 100%;
    padding: 94px 0 50px 0;
}
.btn-list {
    display: flex;
    gap: 8px; 
    list-style: none;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Clients section */
.clients {
    background-color: var(--white-color);
}

.clients-title {
    margin: 0 0 50px;
    text-align: center;
    font-size: 36px;
    line-height: 1.16;
    font-weight: 700;
    color: var(--text-color);
}

.clients-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.clients-card {
    width: 150px;
    height: 92px;
}

.clients-logo {
    width: 100%;
    height: 100%;
    border: 1px solid #afb1b8;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: #afb1b8;
    transition: 0.25s;
}

.clients-icon {
    width: 150px;
    height: 60px;
}

.clients-logo:hover,
.clients-logo:focus-within {
    border-color: var(--logo-and-button);
    fill: var(--logo-and-button);
}

/* Social base */
.social {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 0;
}

.social-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
}

.social-item a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: inherit;
    text-decoration: none;
}

.social-icon {
    width: 20px;
    height: 20px;
}

.team .social-item {
    background-color: transparent;
    fill: #afb1b8;
}

.team .social-icon {
    fill: #afb1b8;
}

.team .social-item:hover {
    background-color: var(--logo-and-button);
    color: var(--white-color);
}

.team .social-item:hover .social-icon {
    fill: var(--white-color);
}

/* Footer styles */
.footer {
    background-color: var(--dark-background-color);
    width: 100%;
    padding: 30px 0;
    color: #ffffff;
}

.footer .container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.site-footer-address {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.8;
}

.site-footer-address p {
    margin: 0 auto;
}

.site-footer-address a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.footer-right {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.footer-social-title {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--white-color);
}

.footer-right .social {
    margin: 0;
    justify-content: flex-start;
}

.footer-right .social-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
}

.footer-right .social-icon {
    fill: var(--white-color);
}

.footer-right .social-item:hover {
    background-color: var(--logo-and-button);
}

.footer-flex {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start;
    gap: 40px;
}
.footer-subscribe {
    margin-left: auto;
}

.subscribe-form {
    display: flex;
    gap: 10px;
}

.subscribe-input {
    padding: 10px;
    width: 250px;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: #fff;
    border-radius: 4px;
}

.subscribe-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.subscribe-btn {
    background: #2196F3;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.subscribe-btn:hover {
    background: #1976D2;
}
/* JS */
/* BACKDROP */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, visibility 0.3s;
}

.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.no-scroll {
    overflow: hidden;
}

/* MODAL */
.modal {
    width: 500px;
    background: var(--white-color);
    border-radius: 8px;
    padding: 30px;
    position: relative;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 30px;
    height: 30px;

    border-radius: 50%;
    border: 1px solid #c7c7c7;
    background: var(--white-color);
    cursor: pointer;

    font-size: 18px;
}

.modal-close:hover {
    background: var(--logo-and-button);
    color: var(--white-color);
}

/* FORM */
.modal-title {
    text-align: center;
    margin-bottom: 20px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #757575;
}

.modal-input, .modal-textarea {
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #c7c7c7;
    border-radius: 4px;
    outline: none;
}

.modal-input:focus, .modal-textarea:focus {
    border-color: var(--logo-and-button);
}

.modal-textarea {
    height: 80px;
}

.modal-checkbox {
    font-size: 12px;
}

.modal-submit {
    background: var(--logo-and-button);
    color: var(--white-color);
    border: none;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.modal-submit:hover {
    background: #1976D2;
}
