/* Variables y reset */
:root {
    --primary-color: #004b8f;
    --primary-light: #0063bc;
    --primary-dark: #003366;
    --secondary-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #f0f2f5;
    min-height: 100vh;
}

/* Layout principal */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 2rem;
    margin-right: 0.75rem;
    color: var(--light-color);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.client-logo {
    height: 40px;
    margin-right: 15px;
    filter: brightness(0) invert(1); /* Hace que el logo sea blanco */
}

.header-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.app-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    display: flex;
    padding: 2rem;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.app-footer {
    background-color: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

.app-footer a {
    color: var(--success-color);
    text-decoration: none;
    transition: var(--transition);
}

.app-footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Contenedor del formulario */
.form-container {
    flex: 1;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    overflow: hidden;
}

/* Barra de progreso */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 3px;
    width: 100%;
    background-color: var(--gray-300);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--gray-300);
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-align: center;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background-color: var(--primary-color);
    color: white;
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background-color: var(--success-color);
    color: white;
}

/* Pasos del formulario */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 1rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="radio"] {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--gray-100);
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: white;
}

input::placeholder {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Navegación entre pasos */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.next-btn {
    background-color: var(--primary-color);
    color: white;
}

.next-btn:hover {
    background-color: var(--primary-dark);
}

.prev-btn {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.prev-btn:hover {
    background-color: var(--gray-300);
}

.submit-btn {
    background-color: var(--success-color);
    color: white;
}

.submit-btn:hover {
    background-color: #3db5d8;
}

.reset-btn {
    background-color: var(--danger-color);
    color: white;
}

.reset-btn:hover {
    background-color: #e03e3e;
}

/* Contenedor de vista previa */
.preview-container {
    width: 40%;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-header {
    background-color: var(--gray-800);
    color: white;
    padding: 1rem;
    text-align: center;
}

.preview-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.preview-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
}

.preview-placeholder {
    text-align: center;
    color: var(--gray-500);
}

.preview-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

/* Notificación */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    font-weight: 500;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Validación de formulario */
.error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.submitted .error-message {
    display: block;
}

input:invalid {
    border-color: var(--danger-color);
}

.submitted input:invalid {
    border-color: var(--danger-color);
    background-color: rgba(249, 65, 68, 0.05);
}

/* Popup de Descarga y WhatsApp */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 550px;
    overflow: hidden;
    animation: popupFadeIn 0.4s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.popup-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.popup-close:hover {
    transform: scale(1.1);
}

.popup-content {
    padding: 1.5rem;
}

/* Estilos para los pasos numerados */
.steps-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--gray-100);
    transition: var(--transition);
}

.step-item:hover {
    background-color: var(--gray-200);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 0.5rem;
    color: var(--gray-800);
}

.step-content p {
    margin: 0 0 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Botones de acción */
.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.download-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.download-button i {
    font-size: 1.1rem;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #25D366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.whatsapp-button:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.whatsapp-button i {
    font-size: 1.2rem;
}

/* Responsive para el popup */
@media (max-width: 576px) {
    .steps-container {
        gap: 1rem;
    }
    
    .step-item {
        padding: 0.75rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .step-content h4 {
        font-size: 1rem;
    }
    
    .step-content p {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .download-button, .whatsapp-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .preview-container {
        width: 100%;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .form-container, .preview-container {
        padding: 1.5rem;
    }
    
    .step-label {
        display: none;
    }
    
    .form-navigation {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .app-header {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .app-description {
        font-size: 0.9rem;
    }
    
    .header-logos {
        flex-direction: column;
        gap: 10px;
    }
    
    .client-logo {
        height: 45px; /* Aumentado de 30px a 45px para hacer el logo más grande */
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    /* Ocultar el bloque de vista previa en móvil */
    .preview-container {
        display: none;
    }
    
    /* Ajustar los radio buttons en móvil */
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .radio-option {
        padding: 5px 0;
    }
    
    .radio-option input[type="radio"] {
        width: auto;
        margin-right: 10px;
    }
}
