/* Estilos para el Cuestionario de Inversión - Sincronizado con style.css */

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ocultar contenido original cuando el cuestionario esté activo */
body:has(.questionnaire) .app {
    display: none !important;
}

/* Fallback para navegadores que no soportan :has() */
body .app {
    transition: opacity 0.3s ease;
}

body.questionnaire-active .app {
    display: none !important;
}

/* Cuestionario principal - Posicionamiento absoluto para ocupar toda la pantalla */
.questionnaire {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: #141516;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

/* Fondo con gradiente igual al original */
.questionnaire::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #1a1b1c 0%, #0f1011 100%);
    z-index: -1;
}

.questionnaire .container {
    position: relative;
    margin: 0 auto;
    display: flex;
    height: 100%;
    width: 100%;
    max-width: 400px;
    flex-direction: column;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .questionnaire .container {
        max-width: 100%;
    }
}

/* Header del cuestionario - Igual que style.css */
.questionnaire-header {
    position: relative;
    display: flex;
    height: 60px;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #2a2a2a;
    padding: 12px 16px;
    background: rgba(20, 21, 22, 0.95);
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .questionnaire-header {
        height: 64px;
    }
}

.questionnaire-header .header-content {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo Container - Exactamente igual que style.css */
.questionnaire-header .logo-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.questionnaire-header .brand-logo {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
    text-transform: none;
    position: relative;
    background: linear-gradient(135deg, #c0d475 0%, #a8c157 25%, #90ae39 50%, #7a9b1b 75%, #658800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 10px rgba(192, 212, 117, 0.2));
    }
    100% {
        filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 20px rgba(192, 212, 117, 0.4));
    }
}

.questionnaire-header .brand-logo:hover {
    background: linear-gradient(135deg, #d4e685 0%, #c0d475 25%, #a8c157 50%, #90ae39 75%, #7a9b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 25px rgba(192, 212, 117, 0.6));
    animation: none;
}

.questionnaire-header .brand-logo::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, rgba(192, 212, 117, 0.1), rgba(168, 193, 87, 0.1));
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.questionnaire-header .brand-logo:hover::before {
    opacity: 1;
}

.questionnaire-header .logo-underline {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c0d475 20%, #a8c157 50%, #c0d475 80%, transparent 100%);
    margin: 4px auto 0;
    border-radius: 1px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.questionnaire-header .logo-underline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.questionnaire-header .logo-container:hover .logo-underline {
    width: 90px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #d4e685 20%, #c0d475 50%, #d4e685 80%, transparent 100%);
    box-shadow: 0 0 15px rgba(192, 212, 117, 0.5);
}

.questionnaire-header .logo-container:hover .logo-underline::before {
    left: 100%;
}

/* Responsive Design para Logo */
@media (min-width: 768px) {
    .questionnaire-header .brand-logo {
        font-size: 2.1rem;
        letter-spacing: -0.8px;
    }
    
    .questionnaire-header .logo-underline {
        width: 80px;
        height: 3px;
    }
    
    .questionnaire-header .logo-container:hover .logo-underline {
        width: 110px;
        height: 4px;
    }
}

@media (min-width: 1024px) {
    .questionnaire-header .brand-logo {
        font-size: 2.3rem;
        letter-spacing: -1px;
    }
    
    .questionnaire-header .logo-underline {
        width: 90px;
    }
    
    .questionnaire-header .logo-container:hover .logo-underline {
        width: 120px;
    }
}

@media (max-width: 479px) {
    .questionnaire-header .brand-logo {
        font-size: 1.5rem;
        letter-spacing: -0.3px;
    }
    
    .questionnaire-header .logo-underline {
        width: 50px;
        height: 2px;
    }
    
    .questionnaire-header .logo-container:hover .logo-underline {
        width: 70px;
        height: 2px;
    }
}

/* Barra de progreso mejorada */
.progress-container {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(42, 42, 42, 0.3);
    border-bottom: 1px solid #2a2a2a;
}

.progress-bar {
    width: 100%;
    max-width: 320px;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #3a3a3a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c0d475 0%, #a8c157 50%, #90ae39 100%);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 15px rgba(192, 212, 117, 0.4);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    color: #a0a0a0;
    font-size: 12px;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

@media (min-width: 768px) {
    .progress-text {
        font-size: 14px;
    }
}

/* Contenido del cuestionario */
.questionnaire-content {
    flex: 1;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

.question-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 32px;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .question-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
}

/* Contenedor de opciones mejorado */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    flex: 1;
    min-height: 0;
}

/* Opciones individuales mejoradas */
.option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(42, 42, 42, 0.2);
    position: relative;
    min-height: 70px;
    backdrop-filter: blur(5px);
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(192, 212, 117, 0.05), rgba(168, 193, 87, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option:hover {
    border-color: #c0d475;
    background: rgba(192, 212, 117, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 212, 117, 0.15);
}

.option:hover::before {
    opacity: 1;
}

.option.selected {
    border-color: #c0d475;
    background: rgba(192, 212, 117, 0.12);
    box-shadow: 0px 8px 30px 0px rgba(192, 212, 117, 0.25);
    transform: translateY(-1px);
}

.option.selected::before {
    opacity: 1;
}

.option-text {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    color: #ffffff;
    text-align: left;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .option-text {
        font-size: 16px;
    }
}

.option-check {
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    color: #c0d475;
    margin-left: 15px;
    transform: scale(0.8);
}

.option.selected .option-check {
    opacity: 1;
    transform: scale(1);
}

/* Formulario de contacto mejorado */
.contact-form {
    margin-bottom: 40px;
    flex: 1;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #a0a0a0;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid #2a2a2a;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: rgba(42, 42, 42, 0.3);
    color: #ffffff;
    font-family: inherit;
    backdrop-filter: blur(5px);
}

.form-group input::placeholder {
    color: #666;
    transition: color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #c0d475;
    box-shadow: 0 0 0 3px rgba(192, 212, 117, 0.15);
    background: rgba(192, 212, 117, 0.05);
    transform: translateY(-1px);
}

.form-group input:focus::placeholder {
    color: #999;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* Botones de navegación mejorados */
.questionnaire-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding: 20px 0;
    flex-shrink: 0;
}

.nav-btn {
    position: relative;
    border-radius: 12px;
    padding: 18px 32px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    min-width: 140px;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .nav-btn {
        font-size: 16px;
        padding: 18px 40px;
        min-width: 160px;
    }
}

.nav-btn.primary {
    background: linear-gradient(135deg, #c0d475 0%, #a8c157 100%);
    color: #141516;
    box-shadow: 0px 12px 35px 0px rgba(192, 212, 117, 0.35);
}

.nav-btn.primary:hover {
    background: linear-gradient(135deg, #d4e685 0%, #c0d475 100%);
    transform: translateY(-3px);
    box-shadow: 0px 18px 45px 0px rgba(192, 212, 117, 0.45);
}

.nav-btn.primary:active {
    transform: translateY(-1px);
    box-shadow: 0px 8px 25px 0px rgba(192, 212, 117, 0.35);
}

.nav-btn.primary:disabled {
    background: #6b7a3d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #999;
}

.nav-btn.secondary {
    background: rgba(42, 42, 42, 0.6);
    color: #a0a0a0;
    border: 2px solid #2a2a2a;
}

.nav-btn.secondary:hover {
    border-color: #c0d475;
    color: #c0d475;
    background: rgba(192, 212, 117, 0.08);
    transform: translateY(-2px);
    box-shadow: 0px 8px 25px 0px rgba(192, 212, 117, 0.15);
}

/* Mensaje de éxito mejorado */
.success-message {
    text-align: center;
    padding: 60px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.success-content {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 32px;
    animation: successPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(192, 212, 117, 0.5));
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(192, 212, 117, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(192, 212, 117, 0.7));
    }
}

.success-content h2 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .success-content h2 {
        font-size: 32px;
        margin-bottom: 24px;
    }
}

.success-content p {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .success-content p {
        font-size: 18px;
    }
}

.next-steps {
    background: rgba(192, 212, 117, 0.08);
    border: 2px solid rgba(192, 212, 117, 0.3);
    padding: 32px;
    border-radius: 16px;
    margin: 32px 0;
    text-align: left;
    backdrop-filter: blur(10px);
}

.next-steps h3 {
    color: #c0d475;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 8px 0;
    color: #a0a0a0;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.next-steps li::before {
    content: '✓';
    color: #c0d475;
    font-weight: bold;
    font-size: 16px;
}

.success-btn {
    background: linear-gradient(135deg, #c0d475 0%, #a8c157 100%);
    color: #141516;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0px 12px 35px 0px rgba(192, 212, 117, 0.35);
    font-family: inherit;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .success-btn {
        font-size: 18px;
        padding: 20px 50px;
    }
}

.success-btn:hover {
    background: linear-gradient(135deg, #d4e685 0%, #c0d475 100%);
    transform: translateY(-3px);
    box-shadow: 0px 18px 45px 0px rgba(192, 212, 117, 0.45);
}

.success-btn:active {
    transform: translateY(-1px);
    box-shadow: 0px 8px 25px 0px rgba(192, 212, 117, 0.35);
}

/* Responsive para móviles pequeños */
@media (max-width: 479px) {
    .questionnaire .container {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .questionnaire-content {
        padding: 24px 16px 20px;
    }
    
    .question-title {
        font-size: 20px;
    }
    
    .option {
        padding: 16px 20px;
        min-height: 60px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .nav-btn {
        min-width: 120px;
        padding: 16px 24px;
        font-size: 14px;
    }
    
    .questionnaire-buttons {
        gap: 12px;
    }
    
    .form-group input {
        padding: 16px 20px;
        font-size: 15px;
    }
}

/* Estados de carga y transiciones mejorados */
.questionnaire-content {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras de accesibilidad */
.option:focus,
.nav-btn:focus,
.form-group input:focus {
    outline: 3px solid #c0d475;
    outline-offset: 3px;
}

/* Scroll suave para dispositivos móviles */
.questionnaire {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Animaciones adicionales */
.option {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

.option:nth-child(1) { animation-delay: 0.1s; }
.option:nth-child(2) { animation-delay: 0.2s; }
.option:nth-child(3) { animation-delay: 0.3s; }
.option:nth-child(4) { animation-delay: 0.4s; }
.option:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}