@font-face {
    font-family: "Roboto";
      font-weight: 400;
      font-style: normal;
      font-display: swap;
      src: url("fonts/Roboto-Regular.ttf") format("ttf");
}
  
@font-face {
      font-family: "Roboto";
        font-weight: 500;
        font-style: normal;
        font-display: swap;
        src: url("fonts/Roboto-Medium.ttf") format("ttf");
}
@font-face {
    font-family: "Roboto";
      font-weight: 700;
      font-style: normal;
      font-display: swap;
      src: url("fonts/Roboto-Bold.ttf") format("ttf");
}

@font-face {
    font-family: "Advent Pro";
    font-weight: 800;
    font-style: normal;
    font-display: swap;
    src: url("fonts/AdventPro_Expanded-ExtraBold.ttf") format("ttf");
}

:root {
    --primary-color: #86B909;      
    --accent-color: #FF6B06;
    --border: #D0D5DD; 
    --accent-link: #98A2B3;      
}

body {
    font-family: "Roboto", "Arial", sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, rgba(250,250,250,1) 0%, rgba(245,245,245,1) 90%, rgba(194,194,194,1) 100%);
}

a {
    text-decoration: none;
    color: inherit;
}

ul, p {
    list-style: none;
    margin: 0;
    padding: 0;
}

.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 930px;
    background-image: url('img/images/main-slide_clear.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1; /* Размещаем контейнер за другими элементами */
}


header {
    position: relative;
    z-index: 1;
    background-color: #F5F5F5;
    padding: 20px 0;
    border-bottom-right-radius: 30px;
    border-bottom-left-radius: 30px;
}

.container {
    width: 80%;
    max-width: 1440px;
    margin: 0 auto;
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

nav {
    margin-left: auto;
}


nav ul {
    display: flex;
    gap: 40px;
}

nav a {
    color: #344054;
    font-size: 16px;
    font-weight: 500;
}

.nav-link__active {
    color: var(--accent-color);
}

.contact-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
}

.contact-info__phone::before {
    content: url(img/icon/phone-icon.svg);
    vertical-align: middle;
    margin-right: 7px;
}

.contact-info__email::before {
    content: url(img/icon/letter-icon.svg);
    vertical-align: middle;
    margin-right: 7px;
}


.hero {
    background: url('hero-image.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 50px 0 200px;
}


.hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    /* font-family: "Advent Pro", sans-serif; */
    color: var(--accent-color);
    font-weight: 700;
}

.hero p {
    font-weight: 500;
    margin-bottom: 70px;
}

/* Формы */

.hero form {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 24px;
    border-radius: 25px;
}

.consultation-form__title {
    color: #333333;
    margin-top: 0;
    font-size: 1.5em;
    font-weight: 500;
}

.consultation-form__wrap {
    display: flex;
    gap: 10px;
}


form input,
textarea {
    padding: 10px;
    font-size: 16px;
    width: 265px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

textarea {
    width: 95%;
    height: 130px;
    resize: none;
}

.consultation-form__button {
    width: 100%;
    color: white;
    background-color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 30px;
    margin-bottom: 20px;
    cursor: pointer; 
    transition: background-color 0.5s ease;
}

.consultation-form__button:hover {
    background-color: var(--accent-color);
}

.second-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 96px 0;
}

.second-form h2{
    font-size: 1.8em;
    font-weight: 500;
}

.second-form form{
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    background: white;
    padding: 24px;
    border-radius: 25px;
}

.second-form__text {
    font-size: 1.25em;
    font-weight: 400;
    line-height: 1.8em;
    color: #667085;
    margin-bottom: 40px;
}

.politic {
    color: #333333;
    font-weight: 500;
}

.politic a {
    text-decoration: underline;
}


.subtitle {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 50px;
}

/* Компетенции */

.blocks-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    gap: 40px; 
    padding: 50px 0;
}

.competencies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.competencies__block {
    display: flex;
    width: 45%;
    gap: 30px;
    font-size: 1.3em;
    font-weight: 500;
    color: #000000;
}


.tactic p {
    margin-bottom: 20px;
}

.result__text {
    font-size: 2em;
    font-weight: 500;
}

.result span {
    color: var(--accent-color);
}

/* Преимущества */

.advantages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.block {
    padding: 30px;
    padding-top: 0;
    padding-left: 60px;
    background-color: #f9f9f9;
    border-right: 1px solid #dcdcdc;
    border-bottom: 1px solid #dcdcdc;
    box-sizing: border-box;
    align-self: start;   
    position: relative;
    counter-increment: block-counter;
}

.block::before {
    content: "0" counter(block-counter); 
    position: absolute;
    top: -3px;
    left: -30px;
    color: black;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 20px;
    margin: 0 30px;
}

.block h3 {
    font-size: 1em;
    margin: 0 0 20px;
    font-weight: bold;
}

.block__content {
    margin: 0;
}

.block:nth-child(odd) {
    grid-column: 1;
    grid-row: span 2;
}

.block:nth-child(even) {
    grid-column: 2;
    grid-row: span 3;
    height: -webkit-fill-available;
}

/* Услуги */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.service-item {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.service-item h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: bold;
}
.service-item p {
    margin-bottom: 0;
    font-size: 14px;
    color: #333;
}

/* Цены */

.pricing {
    padding: 50px 0;
}

.pricing__text {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    padding: 20px 24px;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    margin-bottom: 20px;
}

.pricing table {
    width: 100%;
    border-collapse: collapse;
}

table td span {
    background: #eee;
    color: dimgrey;
    display: none;
    font-size: 9px;
    font-weight: bold;
    padding: 5px;
    position: absolute;
    text-transform: uppercase;
    top: -10px;
    left: 0;
}

.pricing th, .pricing td {
    padding: 15px;
    border: 1px solid var(--border);
    text-align: left;
}


/* FOOTER */
footer {
    background-color: #f8f8f8;
}

.footer {
    display: flex;
    flex-direction: column;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    width: 80%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 50px 0;
}

.footer-logo__text {
    margin-top: 15px;
    color: #667085;
}

.accent-link,
.footer-menu li {
    margin-bottom: 15px;
}

.mr {
    margin-right: 100px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


.footer-menu {
    list-style: none;
    padding: 0;
}

.accent-link {
 color: var(--accent-link);
}

.contact-wrap {
    display: flex;
    flex-direction: column;
    color: var(--primary-color);
}

.copyright {
    margin-top: 20px;
    font-size: 14px;
    background-color: #333333;
    color: #D0D5DD;
    padding: 10px 0;
}


/* Модальное окно */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed; 
    z-index: 1000; /* На переднем плане */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Темный фон */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* Центрирование модального окна */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; /* Ограничение ширины */
    border-radius: 5px; /* Скругленные углы */
    position: relative; /* Важное изменение для позиционирования крестика */
    text-align: center;
}

.close {
    color: #aaa;
    position: absolute; /* Переключение на абсолютное позиционирование */
    top: 10px; /* Расположение в верхнем правом углу */
    right: 15px; /* Расположение в верхнем правом углу */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Ошибки валидации */
.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
}


@media (max-width: 1280px) {
    .hero {
        padding: 50px 0 200px;
    }
    .background-container {
        height: 940px;
    }

}

@media (max-width: 950px) {
    .advantages {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .container div:nth-child(odd), 
    .container div:nth-child(even) {
        grid-column: auto; 
        grid-row: auto; 
    }
    
    nav {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {

    .tactic .blocks-wrap {
        flex-direction: column-reverse;
    }

    #advantages .blocks-wrap {
        flex-direction: column;
    }
}

@media(max-width: 800px) {
    table thead {
        left: -9999px;
        position: absolute;
        visibility: hidden;
    }
    table tr {
        border-bottom: 0;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 40px;
    }
    table td {
        margin: 0 -1px -1px 0;
        padding-top: 35px;
        position: relative;
        width: 95%;
    }
    table td span {
        display: block;
    }
}

@media (max-width: 750px) {
    
    .consultation-form__wrap {
        flex-direction: column;
        width: 100%;
    }

    form input, textarea {
        width: 95%;
    }

    .background-container {
        height: 1200px;
    }

    .result .blocks-wrap {
        flex-direction: column;
    }

    .result__text {
        font-size: 1em;
    }
    
    .background-container {
        height: 1020px;
    }
}

@media (max-width: 500px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .competencies .blocks-wrap {
        flex-direction: column;
    }
    
    .hero {
        padding: 50px 0 120px;
    }

    .hero h1 {
        font-size: 2.5em;
        margin-bottom: 20px;
    }
}
@media (max-width: 420px) {
    .background-container {
        height: 1200px;
    }
    
    .hero {
        padding: 50px 0 200px;
    }
}
    
