/* =============================================================
   Avatar Guía — Estilos
   ============================================================= */

/* ---- Contenedor principal -------------------------------- */
.avatar-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    overflow: hidden;
    position: relative;
}
.avatar-section::before {
    content: ''; position: absolute; top: -80px; right: -80px;
    width: 400px; height: 400px; border-radius: 50%;
    background: rgba(201,168,76,.06);
}

.avatar-wrapper {
    display: grid; grid-template-columns: 340px 1fr; gap: 64px;
    align-items: flex-start;
}

/* ---- Personaje del avatar -------------------------------- */
.avatar-character {
    display: flex; flex-direction: column; align-items: center;
    gap: 16px;
}
.avatar-figure {
    position: relative; width: 200px; height: 200px;
}
.avatar-circle {
    width: 200px; height: 200px; border-radius: 50%;
    background: var(--navy-mid);
    border: 3px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 80px;
    box-shadow: 0 0 40px rgba(201,168,76,.25);
    transition: box-shadow 0.4s ease;
}
.avatar-circle.speaking {
    box-shadow: 0 0 60px rgba(201,168,76,.5);
    animation: pulse-ring 1.5s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(201,168,76,.4); }
    50%  { box-shadow: 0 0 0 16px rgba(201,168,76,.0); }
    100% { box-shadow: 0 0 0 0 rgba(201,168,76,.0); }
}

/* Indicador de voz (ondas) */
.avatar-voice {
    display: flex; align-items: flex-end; gap: 4px; height: 28px;
}
.avatar-voice span {
    width: 4px; border-radius: 2px;
    background: var(--gold); opacity: .4;
    animation: voice-bar 1.2s ease-in-out infinite;
}
.avatar-voice span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.avatar-voice span:nth-child(2) { height: 16px; animation-delay: .15s; }
.avatar-voice span:nth-child(3) { height: 24px; animation-delay: .3s; }
.avatar-voice span:nth-child(4) { height: 16px; animation-delay: .45s; }
.avatar-voice span:nth-child(5) { height: 8px;  animation-delay: .6s; }
.avatar-voice.active span { opacity: 1; }
.avatar-voice.active span:nth-child(1) { animation: voice-bar 0.6s ease-in-out infinite; }
.avatar-voice.active span:nth-child(2) { animation: voice-bar 0.8s ease-in-out infinite .1s; }
.avatar-voice.active span:nth-child(3) { animation: voice-bar 0.5s ease-in-out infinite .2s; }
.avatar-voice.active span:nth-child(4) { animation: voice-bar 0.7s ease-in-out infinite .05s; }
.avatar-voice.active span:nth-child(5) { animation: voice-bar 0.9s ease-in-out infinite .15s; }
@keyframes voice-bar {
    0%, 100% { transform: scaleY(1); }
    50%       { transform: scaleY(.3); }
}

.avatar-name {
    font-size: 20px; font-weight: 700; color: var(--white);
    text-align: center;
}
.avatar-badge {
    font-size: 12px; font-weight: 600; color: var(--gold);
    background: rgba(201,168,76,.15); padding: 3px 12px;
    border-radius: 20px; border: 1px solid rgba(201,168,76,.3);
    text-align: center;
}

/* ---- Área de conversación -------------------------------- */
.avatar-chat {
    display: flex; flex-direction: column; gap: 24px;
    min-height: 400px;
}

/* Burbuja de mensaje del avatar */
.chat-bubble {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 4px 16px 16px 16px;
    padding: 20px 24px;
    max-width: 540px;
    position: relative;
}
.chat-bubble::before {
    content: ''; position: absolute; top: 0; left: -10px;
    width: 0; height: 0;
    border-top: 10px solid rgba(255,255,255,.07);
    border-left: 10px solid transparent;
}
.chat-text {
    font-size: 16px; color: rgba(255,255,255,.9); line-height: 1.7;
}
.chat-text strong { color: var(--gold); }

/* Cursor de escritura */
.typing-cursor::after {
    content: '|'; animation: blink .7s step-end infinite; color: var(--gold);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---- Opciones de respuesta ------------------------------- */
.chat-options {
    display: flex; flex-direction: column; gap: 10px;
    animation: fade-up .4s ease;
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-option {
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.15);
    border-radius: var(--radius); padding: 14px 20px;
    color: rgba(255,255,255,.85); font-size: 15px;
    cursor: pointer; text-align: left;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 12px;
}
.chat-option:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,.1);
    color: var(--white);
}
.chat-option.selected {
    border-color: var(--gold);
    background: rgba(201,168,76,.2);
    color: var(--white);
}
.option-letter {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(201,168,76,.2); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
    transition: all var(--transition);
}
.chat-option:hover .option-letter,
.chat-option.selected .option-letter {
    background: var(--gold); color: var(--navy);
}

/* Barra de progreso */
.chat-progress {
    display: flex; gap: 6px; margin-bottom: 8px;
}
.chat-progress__dot {
    flex: 1; height: 3px; border-radius: 2px;
    background: rgba(255,255,255,.15);
    transition: background .4s ease;
}
.chat-progress__dot.done { background: var(--gold); }
.chat-progress__dot.active { background: rgba(201,168,76,.5); }

/* Resultado de recomendación */
.chat-result {
    background: rgba(201,168,76,.1);
    border: 1.5px solid rgba(201,168,76,.4);
    border-radius: var(--radius-lg); padding: 28px;
    animation: fade-up .5s ease;
}
.chat-result__label {
    font-size: 12px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.chat-result__vehicle {
    font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 12px;
}
.chat-result__text {
    font-size: 15px; color: rgba(255,255,255,.75); margin-bottom: 24px; line-height: 1.7;
}
.chat-result__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Mobile -------------------------------------------- */
@media (max-width: 900px) {
    .avatar-wrapper { grid-template-columns: 1fr; gap: 32px; }
    .avatar-character { flex-direction: row; justify-content: center; align-items: center; gap: 24px; }
    .avatar-figure { width: 100px; height: 100px; }
    .avatar-circle { width: 100px; height: 100px; font-size: 42px; }
}
