/* ======================================================
    SECCIÓN LEADS (MEJORADA CON AVATAR Y ESTRELLAS)
======================================================*/
.leads {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    scroll-margin-top: 70px;
    margin: 0px 55px 10px 20px;
    margin-bottom: 6rem;
}

.leads .titulo {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    padding-left: 3rem;
}

.leads-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    width: fit-content;
}

.leads-badge i {
    font-size: 0.8rem;
    color: #ff6b4a;
}

.leads-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.08;
    color: #ffffff;
    margin-bottom: 1.2rem;
}

.leads-title .highlight-gradient {
    background: linear-gradient(135deg, #ff6b4a, #ff9e7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leads-title .highlight-dark {
    color: #ffffff;
}

.leads-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: 90%;
}

.leads-description strong {
    color: #ff6b4a;
}

.leads-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1.5rem;
    margin-bottom: 2rem;
}

.leads-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.leads-feature:hover {
    transform: translateX(4px);
}

.leads-feature i {
    width: 36px;
    height: 36px;
    background: #ffebe7;
    color: #ff6b4a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.leads-feature:hover i {
    background: #ff6b4a;
    color: white;
    transform: scale(1.05) rotate(-5deg);
}

.leads-feature div {
    display: flex;
    flex-direction: column;
}

.leads-feature-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
}

.leads-feature-desc {
    font-size: 0.65rem;
    color: #999999;
    font-weight: 400;
}

/*======================================================
    VISTA DE LA TARJETA (FORMULARIO ANIMADO)
======================================================*/
.leads .vista {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.l-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.l-container {
    max-width: 700px;
    height: 700px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    padding: 2rem 2rem;
    box-shadow: 10px 20px 38px rgba(92, 92, 92, 0.479);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    justify-content: space-between;
    transition: box-shadow 0.5s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.l-container.demo-active {
    box-shadow: 0 0 0 3px #ff6b4a, 10px 20px 38px rgba(255, 107, 74, 0.2);
}

.l-container.transitioning {
    animation: cardPulse 0.6s ease;
}

@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); box-shadow: 0 0 30px rgba(255, 107, 74, 0.15); }
    100% { transform: scale(1); }
}

/* ===== CABECERA CON AVATAR GOOGLE-STYLE ===== */
.lead-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-avatar-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.avatar-circle .avatar-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 1rem;
    font-weight: 700;
    color: #0b1a33;
    transition: all 0.3s ease;
}

.user-stars {
    display: flex;
    gap: 1px;
    font-size: 0.7rem;
    color: #fbbc04;
    letter-spacing: 0.5px;
}

.user-stars i {
    transition: all 0.3s ease;
}

.user-stars i.fa-star {
    color: #fbbc04;
}

.user-stars i.fa-star-half-alt {
    color: #fbbc04;
}

.lead-badge-status {
    display: flex;
    align-items: center;
}

.badge-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    background: #e8f5e9;
    color: #2e7d32;
    transition: all 0.4s ease;
    white-space: nowrap;
}

.badge-pill.sending {
    background: #fff3e0;
    color: #e65100;
    animation: pulseBadge 1s ease-in-out infinite;
}

.badge-pill.success {
    background: #e8f5e9;
    color: #2e7d32;
    animation: none;
}

.badge-pill.waiting {
    background: #f5f5f5;
    color: #757575;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.97); }
}

/* ===== FORMULARIO ===== */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    justify-content: center;
    margin-top: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4d5a6e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-container {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border: 1px solid #eef2f8;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: #ff6b4a;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.1);
}

.input-container i {
    font-size: 0.9rem;
    color: #b3c0d2;
    transition: color 0.3s ease;
}

.input-container:focus-within i {
    color: #ff6b4a;
}

.input-container input,
.input-container select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    color: #0b1a33;
    width: 100%;
    font-family: inherit;
}

.input-container input:read-only {
    cursor: default;
    color: #0b1a33;
}

.input-container select:disabled {
    opacity: 0.7;
    cursor: default;
}

/* ===== BOTÓN ===== */
.lead-submit-btn {
    background: #0b1a33;
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    margin-top: 0.2rem;
}

.lead-submit-btn:hover:not(:disabled) {
    background: #ff6b4a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 74, 0.3);
}

.lead-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lead-submit-btn i {
    transition: transform 0.3s ease;
}

.lead-submit-btn:hover:not(:disabled) i {
    transform: translateX(4px);
}

.lead-submit-btn.success-btn {
    background: #2e7d32;
}

.lead-submit-btn.success-btn i {
    animation: none;
}

/* ===== FOOTER ===== */
.lead-card-footer {
    border-top: 1px solid #f0f2f5;
    padding-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-live {
    font-size: 0.7rem;
    color: #6f7b8e;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.status-live .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34a853;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-live .status-dot.sending {
    background: #fbbc04;
    animation: pulseDot 0.8s ease-in-out infinite;
}

.status-live .status-dot.success {
    background: #34a853;
    animation: none;
    box-shadow: 0 0 12px rgba(52, 168, 83, 0.4);
}

.status-live .status-dot.waiting {
    background: #9e9e9e;
    animation: none;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.lead-counter {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9e9e9e;
    background: #f5f7fa;
    padding: 0.2rem 0.8rem;
    border-radius: 100px;
}

/* ===== TOAST DE ENVÍO EXITOSO ===== */
.submit-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(46, 125, 50, 0.95);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
}

.submit-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
}

.submit-toast i {
    font-size: 1.8rem;
}

.submit-toast .toast-sub {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
    margin-top: 0.2rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .leads {
        grid-template-columns: 1fr 1fr;
        margin: 0px 20px 10px 20px;
        gap: 20px;
        margin-bottom: 6rem;
    }
    .leads .titulo { padding-left: 2rem; padding-right: 1rem; }
    .leads-title { font-size: 2.6rem; }
    .leads-description { font-size: 0.95rem; max-width: 100%; }
    .l-container { height: 620px; padding: 1.5rem 1.2rem; }
}

@media (max-width: 768px) {
    .leads { display: flex; flex-direction: column; margin: 0px 10px 10px 10px; gap: 15px; margin-bottom: 6rem;}
    .leads .titulo { padding: 1.5rem; order: 1; width: 100%; }
    .leads .vista { order: 2; width: 100%; padding: 10px; }
    .leads-title { font-size: 2.2rem; }
    .leads-features { grid-template-columns: 1fr; gap: 0.5rem; }
    .l-container { height: 560px; border-radius: 16px; padding: 1.2rem; }
    .avatar-circle { width: 40px; height: 40px; font-size: 1.2rem; }
    .user-name { font-size: 0.85rem; }
    .lead-card-header { flex-direction: row; align-items: center; }
    .badge-pill { font-size: 0.55rem; padding: 0.2rem 0.7rem; }
    .submit-toast { padding: 1rem 1.5rem; font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .leads { margin: 0px 5px 10px 5px; margin-bottom: 6rem; }
    .leads .titulo { padding: 1rem 0.8rem; }
    .leads-title { font-size: 1.8rem; }
    .leads-description { font-size: 0.8rem; }
    .l-container { height: 480px; padding: 0.8rem; }
    .lead-form { gap: 0.6rem; }
    .input-container { padding: 0.5rem 0.8rem; }
    .lead-submit-btn { padding: 0.7rem; font-size: 0.8rem; }
    .avatar-circle { width: 34px; height: 34px; font-size: 1rem; }
    .user-name { font-size: 0.75rem; }
    .user-stars { font-size: 0.6rem; }
    .lead-counter { font-size: 0.6rem; padding: 0.1rem 0.6rem; }
    .submit-toast { padding: 0.8rem 1.2rem; font-size: 0.85rem; }
    .submit-toast i { font-size: 1.4rem; }
}

@media (max-width: 360px) {
    .leads-title { font-size: 1.5rem; }
    .l-container { height: 430px; }
}