/* Единая форма заявки. Подключается на всех страницах после стилей страницы,
   поэтому классы с префиксом lead- не пересекаются со старыми .contact-form. */

.lead-section {
    margin: 70px auto 60px;
    max-width: 820px;
    scroll-margin-top: 80px;
}

.lead-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary, #2c3e50);
    margin-bottom: 10px;
}

.lead-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    margin: 15px auto 0;
    background: linear-gradient(to right, var(--accent, #00d2ff), var(--secondary, #3a7bd5));
}

.lead-subtitle {
    text-align: center;
    color: var(--text-light, #777);
    margin-bottom: 30px;
}

.lead-form {
    position: relative;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.12);
    padding: 40px;
    overflow: hidden;
}

.lead-form::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary, #2c3e50), var(--secondary, #3a7bd5), var(--accent, #00d2ff));
}

.lead-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.lead-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-field--wide {
    grid-column: 1 / -1;
}

.lead-field label {
    font-weight: 500;
    color: var(--primary, #2c3e50);
    font-size: 0.95rem;
}

.lead-field label .req {
    color: #e74c3c;
    margin-left: 2px;
}

.lead-input {
    position: relative;
}

.lead-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary, #3a7bd5);
    opacity: 0.7;
    pointer-events: none;
}

.lead-input--area i {
    top: 18px;
    transform: none;
}

.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form input[type="email"],
.lead-form select,
.lead-form textarea {
    width: 100%;
    padding: 12px 15px 12px 42px;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    background: #fbfcfd;
    font: inherit;
    font-size: 16px;
    color: var(--text, #333);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.lead-form select {
    appearance: none;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #3a7bd5 50%), linear-gradient(135deg, #3a7bd5 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

.lead-form textarea {
    resize: vertical;
    min-height: 120px;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent, #00d2ff);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.2);
}

.lead-field.is-invalid input,
.lead-field.is-invalid textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.lead-error {
    min-height: 1em;
    font-size: 0.85rem;
    color: #e74c3c;
}

.lead-counter {
    align-self: flex-end;
    font-size: 0.8rem;
    color: var(--text-light, #777);
}

.lead-counter.is-limit {
    color: #e74c3c;
}

/* Скрытое поле-ловушка для ботов */
.lead-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lead-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-light, #777);
    cursor: pointer;
}

.lead-consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--secondary, #3a7bd5);
    cursor: pointer;
}

.lead-consent a {
    color: var(--secondary, #3a7bd5);
}

.lead-consent.is-invalid {
    color: #e74c3c;
}

.lead-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.lead-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 230px;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    background: var(--accent, #00d2ff);
    color: var(--dark, #2c2c2c);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.lead-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    background: #00b8e6;
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
}

.lead-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.lead-note {
    font-size: 0.85rem;
    color: var(--text-light, #777);
}

.lead-note a {
    color: var(--secondary, #3a7bd5);
    text-decoration: none;
    font-weight: 500;
}

.lead-status {
    display: none;
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 6px;
    font-weight: 500;
}

.lead-status.is-success {
    display: block;
    background: rgba(60, 179, 113, 0.12);
    color: #24804f;
    border-left: 4px solid var(--success, #3CB371);
}

.lead-status.is-error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

@media (max-width: 700px) {
    .lead-form {
        padding: 28px 20px;
    }

    .lead-grid {
        grid-template-columns: 1fr;
    }

    .lead-title {
        font-size: 1.6rem;
    }

    .lead-submit {
        width: 100%;
    }
}
