.p-for-mainmenu {
    margin: 5px;
    font-size: 1.0em;
}

.h2-for-mainmenu {
    margin: 10px;
    font-size: 1.6em;
}

.h3-for-mainmenu {
    margin: 10px;
    font-size: 1.6em;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 8;
}


.form-popup {
    font-size: 0.8em;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #f1f1f1;
    z-index: 9;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    height: auto;
    box-sizing: border-box;
}

.form-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.form-group .error {
    color: red;
    font-size: 0.875em;
    margin-top: -15px;
    margin-bottom: -30px;
}

.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}


.form-container .btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    opacity: 0.8;
    border-radius: 5px;
    transition: opacity 0.3s;
    font-size: 15px;
}

.recaptcha-wrapper {
    display: flex;
    justify-content: center; /* Центрирует reCAPTCHA по горизонтали */
    margin: 20px 0; /* Добавляет отступы сверху и снизу */
    width: 100%; /* Убедитесь, что обертка занимает всю ширину формы */
}

.g-recaptcha {
    transform: scale(1.18); /* Измените масштаб, если необходимо */
    transform-origin: center; /* Центрирует трансформацию для более точного позиционирования */
}


.close-button {
    position: absolute;
    top: -5px;
    right: 5px;
    font-size: 40px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 9;
}

.close-button:hover {
    color: #000;
}


.features-section {
    position: relative;
    z-index: 2;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    color: #fff; /* Контрастный цвет текста */
}

.features-section h2, .features-section p {
    text-align: center;
}

.features-section h3 {
    margin-top: 20px;
    text-align: center;
    font-size: 30px;
    position: relative;
    bottom: 45px;
    margin-bottom: -15px;
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 50px;
    align-items: stretch; /* Все элементы растягиваются по высоте */
    margin: 50px;
}

.feature-item {
    flex: 1 1 calc(25% - 40px); /* Ширина для 4 элементов в строке */
    max-width: 250px;
    text-align: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Равномерно распределяет контент по вертикали */
    min-height: 100px; /* Минимальная высота для выравнивания */
    height: auto;
}

.feature-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    flex-grow: 0; /* Не растягивается */
}

.feature-item p {
    flex-grow: 1; /* Растягивается, чтобы занимать доступное пространство */
    display: flex;
    align-items: center;
    justify-content: center;
}


.logo-image {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 800px;
    height: 800px;
    background-image: url("../images/vityaz.2cba5597da67.png");
    background-size: contain;
    background-repeat: no-repeat;
}


.button-container {
    position: absolute;
    bottom: 150px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 4;
}

.custom-button {
    background-color: #ff0000;
    color: white;
    padding: 20px 5px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 400px;
    text-align: center;
}

.custom-button:hover {
    background-color: #cc0000;
}

.second-button {
    background-color: #0000ff;
}

.second-button:hover {
    background-color: #0000cc;
}

@media (max-width: 768px) {

    .rc-anchor-normal {
        width: 100% !important;
    }


    .features-grid {
        display: flex;
        gap: 20px;
        margin: 10px;
        flex-direction: column;
        align-items: center;
        align-content: center;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .feature-item {
        flex: 1 1 100%; /* 2 элемента в строке на маленьких экранах */
    }

    .g-recaptcha {
        width: auto;
    }

    .image-element {
        width: 100%;
        height: auto;
    }

    .g-recaptcha {
        transform: none; /* Измените масштаб, если необходимо */
    }

    .custom-button {
        width: 300px;
        padding: 15px 15px;
        font-size: 20px;
    }

    .logo-image {
        width: 90%;
        height: 90%;
    }

    .button-container {
        bottom: 100px;
        flex-direction: column;
        align-items: center;
        gap: 10px; /* Расстояние между кнопками */
        display: flex; /* Добавляем display: flex для активации flexbox */
    }

    .feature-item {
        max-width: 300px;
    }

    .features-section {
        display: flex;
        position: relative;
        z-index: 2;
        padding: 0px;
        padding: 10px;
        border-radius: 10px;
        margin-top: 20px;
        color: #fff;
        flex-direction: column;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: center;
        align-items: center;
    }
}

@media (min-width: 2000px) {
    .feature-item {
        max-width: 350px;
    }

}

@media (min-width: 4000px) {
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 8;
    }


    .form-popup {
        border: 6px solid #f1f1f1;
        padding: 40px;
        border-radius: 20px;
        width: 90%;
        max-width: 800px;
    }

    .form-container {
        width: 100%;
    }

    .form-group {
        margin-bottom: 30px;
    }

    .form-group label {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 20px;
        border: 2px solid #ccc;
        border-radius: 10px;
        width: 100%;
    }

    .form-group .error {
        font-size: 1.5em;
        margin-top: -15px;
        margin-bottom: -30px;
    }

    .form-group select {
        padding: 20px;
        border: 2px solid #ccc;
        border-radius: 10px;
        width: 100%;
        font-size: 32px;
    }


    .form-container .btn {
        padding: 20px 30px;
        width: 100%;
        margin-bottom: 20px;
        border-radius: 10px;
        font-size: 30px;
    }

    .recaptcha-wrapper {
        margin: 80px 0; /* Добавляет отступы сверху и снизу */
    }

    .g-recaptcha {
        transform: scale(2.36); /* Измените масштаб, если необходимо */
    }


    .close-button {
        top: -5px;
        right: 5px;
        font-size: 80px;
    }


    .features-section {
        padding: 40px;
        border-radius: 10px;
        margin-top: 40px;
    }


    .features-section h3 {
        font-size: 70px;
        bottom: 60px;
        margin-bottom: -30px;
    }

    .features-grid {
        gap: 50px;
        margin: 50px;
    }

    .feature-item {
        flex: 1 1 calc(25% - 40px); /* Ширина для 4 элементов в строке */
        max-width: 500px;
        padding: 20px;
        border-radius: 16px;
        min-height: 200px; /* Минимальная высота для выравнивания */
        height: auto;
    }

    .feature-item img {
        max-width: 200%;
        height: auto;
        margin-bottom: 20px;
        flex-grow: 0; /* Не растягивается */
    }


    .logo-image {
        top: 200px;
        width: 1600px;
        height: 1600px;
    }

    .button-container {
        bottom: 150px;
        width: 100%;
        gap: 40px;
        z-index: 4;
    }

    .custom-button {
        padding: 50px 10px;
        font-size: 36px;
        border-radius: 10px;
        width: 800px;

    }


}

@media (max-width: 340px) {

    .rc-anchor-normal {
        width: 100% !important;
    }

    .g-recaptcha {
        width: 100% !important;
    }

    .g-recaptcha div {
        width: 100% !important;
    }

    iframe {
        width: 100% !important;
    }
}

/* Стили для иконки звонка */
.call-icon-container {
    position: fixed;
    bottom: 60px;
    right: 30px;
    z-index: 5;
    display: none;
}

.call-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #28a745;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.call-icon:hover {
    background-color: #218838;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: white;
}

.call-icon:hover .phone-icon {
    fill: white;
}

.phone-icon {
    width: 32px;
    height: 32px;
    fill: white;
    display: block;
    margin: 0 auto;
}

/* Анимация пульсации */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .call-icon-container {
        display: block;
    }

    .call-icon {
        width: 50px;
        height: 50px;
    }

    .phone-icon {
        width: 28px;
        height: 28px;
        display: block;
        margin: 0 auto;
    }
}
