/* =================================================================== */
/*        LANDING.CSS - v12.1 (DISEÑO RESTAURADO Y FUNCIONAL)          */
/* =================================================================== */

:root {
    --color-surface: #FFFFFF;
    --color-primary: #4CAF50; 
    --color-primary-dark: #388E3C;
    --color-accent-pink: #E91E63; 
    --color-text-dark: #212121; 
    --color-text-secondary: #757575; 
    --color-border: #E0E0E0;
    --color-elite: #673AB7; 
    --color-advanced: #FF9800; 
    
    --font-titles: 'Cinzel', serif;
    --font-cta: 'Teko', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.12);
    --border-radius-main: 16px;
}
body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    margin: 0;
    overflow: hidden;
    
    /* === ANIQUILACIÓN TOTAL DEL FONDO === */
    background: none !important; 
}

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    
    /* === ANIQUILACIÓN TOTAL DEL OVERLAY Y EL BLUR === */
    background-color: transparent !important; /* El velo se vuelve invisible. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 15px; 
    box-sizing: border-box;
}

/* ============================================================= */
/* >> INICIO DE LA CORRECCIÓN CLAVE <<
/* Se cambió '.visible' por '.show' para que coincida con la
/* función UI.showModal() del archivo core.js. Este era el
/* motivo por el cual el modal no aparecía.
/* ============================================================= */
.welcome-overlay.show { 
    opacity: 1; 
    visibility: visible; 
}
/* ============================================================= */
/* >> FIN DE LA CORRECCIÓN CLAVE << */
/* ============================================================= */


/* DISEÑO COMPACTO Y RESPONSIVO DEL MODAL */
.welcome-modal-container {
    background-color: var(--color-surface);
    box-shadow: var(--shadow-medium);
    border-radius: var(--border-radius-main);
    width: 100%;
    max-width: 320px; 
    padding: 15px; /* <-- Reducido */
    max-height: 90vh;  /* <-- Reducido a 90vh, crucial para iPhone */
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Mantenemos el overflow hidden en el contenedor */
}

@media (min-width: 480px) {
    .welcome-modal-container {
        max-width: 380px; /* <-- También reducido para pantallas medianas */
        padding: 25px 30px;
    }
}

/* ESTRUCTURA DE SCROLL INTERNO */
/* Forzamos al contenedor del paso a usar flexbox verticalmente */
.welcome-step { 
    display: none;
    flex-direction: column; /* AÑADIDO */
    flex-grow: 1;
    min-height: 0;
}
.welcome-step.active { 
    display: flex; /* Cambiado a flex */
}

/* El contenedor del scroll ahora funcionará correctamente */
#welcome-step-pricing .pricing-grid-container {
    overflow-y: auto; /* Muestra el scroll si el contenido se desborda */
    padding: 5px 15px 5px 5px; /* Añade espacio a la derecha para la barra de scroll */
    -webkit-overflow-scrolling: touch;

    /* === EL MARTILLO - LA SOLUCIÓN FINAL === */
    /* Forzamos a que el contenedor tenga una altura máxima del 60% de la pantalla. */
    /* Si las tarjetas ocupan más que eso, el scroll APARECERÁ SÍ O SÍ. */
    max-height: 60vh; 
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.pricing-grid, #auth-container {
    overflow-y: auto;
    flex-grow: 1;
    padding: 5px;
    /* --- LA MAGIA PARA IOS --- */
    -webkit-overflow-scrolling: touch; /* Habilita el scroll con inercia */
    position: relative; /* Provee un contexto de posicionamiento estable */
}
#welcome-step-pricing > *:not(.pricing-grid-container),
#welcome-step-auth > *:not(#auth-container) {
    flex-shrink: 0;
}

/* ESTILOS DE CONTENIDO COMPACTOS */
@keyframes slowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animated-logo-modal {
    max-width: 70px;
    margin: 0 auto 10px;
    animation: slowBounce 4s ease-in-out infinite;
}
.welcome-title {
    font-family: var(--font-titles);
    font-size: 1.4rem; /* <-- Reducido */
    margin: 0 0 4px 0; /* <-- Reducido */
    color: var(--color-text-dark);
}
.makumoto-pink { color: var(--color-accent-pink); }
.welcome-subtitle, .section-subtitle {
    font-size: 0.8rem; 
    line-height: 1.3;
    margin: 0 auto 12px; /* <-- Reducido */
    color: var(--color-text-secondary);
}
.welcome-question {
    font-family: var(--font-cta);
    font-size: 1.2rem; /* <-- Reducido */
    margin-bottom: 12px; /* <-- Reducido */
    font-weight: 600;
    color: var(--color-text-dark);
}
/* --- Marca de Agua para Pasos Secundarios --- */
#welcome-step-pricing::before,
#welcome-step-auth::before {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 35px;
    height: 35px;
    background-image: url('../images/logo.png');
    background-size: contain;
    opacity: 0.1;
    pointer-events: none;
}
.btn {
    padding: 12px 18px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}
/* AÑADIDO: Arregla la falta de cursor */
#welcome-step-choice .btn {
    cursor: pointer;
}
.btn-primary-glow {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}
.btn-primary-glow:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: #F5F5F5;
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover { background-color: #EEEEEE; }
.welcome-login-link {
    font-size: 0.8rem;
}
.welcome-login-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.welcome-login-link a:hover { text-decoration: underline; }

/* =============================================================== */
/*   INICIO: ESTILOS RESTAURADOS PARA TARJETAS DE PRECIOS          */
/* =============================================================== */
.pricing-grid {
    display: flex; /* Usamos flexbox para que las tarjetas se apilen verticalmente */
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

/* Y se lo ponemos al contenedor del PASO COMPLETO */
#welcome-step-pricing .pricing-grid-container {
    overflow-y: auto;
    flex-grow: 1; /* Ocupa el espacio disponible */
    padding: 5px;
    -webkit-overflow-scrolling: touch; /* Mejora la experiencia en iOS */
}
.pricing-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-main);
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
    padding: 12px; /* <-- Reducido */
    display: flex;
    flex-direction: column;
}
.pricing-card.recommended {
    border: 2px solid var(--color-elite);
    box-shadow: 0 0 20px rgba(103, 58, 183, 0.2);
}
/* AÑADIDO: El marco de abundancia para el plan Advanced */
.pricing-card.plan-advanced {
    border: 2px solid #FFD700; /* Oro */
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}
.popular-badge {
    position: absolute;
    top: 10px; /* <-- Ajustado */
    right: -35px; /* <-- Ajustado */
    background: var(--color-elite);
    color: white;
    padding: 3px 35px; /* <-- Ajustado */
    font-weight: 600;
    font-size: 0.65rem; /* <-- Reducido */
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}
.plan-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px; /* <-- Reducido */
    margin-bottom: 10px; /* <-- Reducido */
}
.plan-icon { font-size: 1.3rem; } /* <-- Reducido */
.plan-header h3 {
    font-family: var(--font-cta);
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem; /* <-- Reducido */
    line-height: 1.2; 
}
.price-tag {
    font-family: var(--font-titles);
    font-weight: 700;
    margin: 0;
    font-size: 1.7rem; /* <-- Reducido */
    grid-column: 2 / 3; 
    text-align: left;
}
.price-tag span {
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--color-text-secondary);
    font-weight: 400;
    margin-left: 5px;
}
.plan-elite .plan-icon, .plan-elite .price-tag { color: var(--color-elite); }
.plan-advanced .plan-icon, .plan-advanced .price-tag { color: var(--color-advanced); }

.features-grid {
    margin-top: 15px;
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
    flex-grow: 1; /* Empuja el botón hacia abajo */
}
.feature-item {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0 10px;
    align-items: start;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.feature-title {
    grid-column: 1 / 2;
    font-weight: 600;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.feature-title i { color: var(--color-primary); font-size: 0.8em; }
.feature-description {
    grid-column: 2 / 3;
    color: var(--color-text-secondary);
    text-align: left;
}
.btn-elite { background-color: var(--color-elite); color: #fff; margin-top: 15px; }
.btn-advanced { background-color: var(--color-advanced); color: #fff; margin-top: 15px; }
/* =============================================================== */
/*   FIN: ESTILOS RESTAURADOS PARA TARJETAS DE PRECIOS             */
/* =============================================================== */

/* --- FORMULARIO (DISEÑO RESTAURADO) --- */
#auth-container {
    text-align: left;
}
.form-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}
.form-toggle {
    display: flex;
    background-color: #EEEEEE;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}
.form-toggle-btn {
    flex: 1;
    padding: 8px;
    font-size: 0.85rem;
    border: none;
    background-color: transparent;
    color: var(--color-text-secondary);
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.form-toggle-btn.active {
    background-color: var(--color-surface);
    color: var(--color-text-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #F9F9F9;
    box-sizing: border-box;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}
.form-group {
    margin-bottom: 12px;
    position: relative;
}
.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--color-text-secondary);
}
.form-text {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 15px 0;
    text-align: center;
}
.form-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.form-text a:hover { text-decoration: underline; }
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}
.security-badge i { color: var(--color-primary); }

.welcome-back-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    z-index: 10;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
}
.welcome-back-btn:hover { background: #e0e0e0; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 3px; }

/* --- ESTILOS PARA MODAL DE RESETEO DE CONTRASEÑA --- */
#password-reset-form .welcome-actions {
    margin-top: 15px; /* Añade un espacio sobre los botones */
    margin-bottom: 0;
}
/* =============================================================== */
/*   NUEVO: ESTILOS PARA MODALES DE DIÁLOGO Y NOTIFICACIÓN         */
/* =============================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    background-color: var(--color-surface);
    padding: 30px 40px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-medium);
    max-width: 400px;
    width: 90%;
    text-align: center;
}
.notification-content {
    padding: 20px;
    font-weight: 500;
    color: var(--color-text-dark);
}
.notification-content.error {
    background-color: #f44336;
    color: white;
}
.dialog-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.dialog-icon .fa-exclamation-triangle { color: #f44336; }
.dialog-message-text h4 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}
.dialog-message-text p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text-secondary);
}
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
/* =============================================================== */
/*   NUEVO: ESTILOS PARA EL CAMPO DE TEXTO DEL DIÁLOGO (PROMPT)   */
/* =============================================================== */
#dialog-prompt-input {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #F9F9F9;
    box-sizing: border-box;
    text-align: center;
}
#dialog-prompt-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Hacemos que el botón "Enviar Enlace" se vea como el principal */
.modal-actions .btn {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    width: 100%;
}
.modal-actions .btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}
/* =============================================================== */
/*   NUEVO: ESTILOS PARA LA "OPERACIÓN ALFOMBRA ROJA"            */
/* =============================================================== */

/* Estilo para el nuevo botón de beneficios */
.btn-features {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    padding: 8px 12px;
    margin-top: 10px;
    box-shadow: none;
}
.btn-features:hover {
    background-color: #f5f5f5;
    color: var(--color-text-dark);
}

/* Contenedor para los dos botones de acción en la tarjeta de precios */
.pricing-card .card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* Empuja los botones al final */
    padding-top: 15px;
}

/* Estilos para el futuro modal de beneficios */
.benefits-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}
.benefits-modal-content li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.benefits-modal-content li i {
    color: var(--color-primary);
    font-size: 1.1rem;
}
/* AÑADIDO: Animación de pulso para los botones de beneficios */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.4); }
    100% { box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); }
}
.btn-features {
    animation: pulse-glow 2.5s infinite ease-in-out;
}

/* =============================================================== */
/*   BLINDAJE DE CSS PARA EL CONTENEDOR DE VIDEO (A PRUEBA DE BALAS) */
/* =============================================================== */
.benefits-modal-content .gif-container {
    width: 100%;
    /* Le damos una proporción cinematográfica (16:9) para que se adapte al video 1920x1080 */
    padding-top: 56.25%; /* 1080 / 1920 = 0.5625 */
    position: relative; /* ¡CRÍTICO! Es el ancla para el video. */
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden; /* Asegura que el video no se salga de las esquinas redondeadas */
    background-color: #000; /* Fondo negro por si el video tarda en cargar */
}

.benefits-modal-content .gif-container video {
    /* ¡LA PUTA MAGIA! */
    position: absolute; /* Lo liberamos del flujo normal */
    top: 0;
    left: 0;
    width: 100%; /* Fuerza al video a ocupar todo el ancho del contenedor */
    height: 100%; /* Fuerza al video a ocupar toda la altura del contenedor */
    object-fit: cover; /* ¡LA CLAVE! Rellena el espacio, recortando lo que sobre,
                          pero manteniendo la proporción y el centro.
                          Esto arregla el problema del video vertical descentrado. */
}
/* =============================================================== */
/*   NUEVO: ESTILOS PARA "OPERACIÓN PULIDO FINAL"                  */
/* =============================================================== */

/* Botón de Regreso Genérico para Modales */
.modal-back-btn, .modal-close-btn {
    position: absolute;
    top: 12px;
    width: 35px;
    height: 35px;
    z-index: 10;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 1rem;
    text-decoration: none; /* Para que funcione en botones y enlaces */
}
.modal-back-btn:hover, .modal-close-btn:hover {
    background: #e0e0e0;
}

.modal-back-btn {
    left: 12px; /* Flecha a la izquierda */
}
.modal-close-btn {
    right: 12px; /* 'X' a la derecha */
}

/* Ajustes para el modal de beneficios (más compacto) */
.benefits-modal-content {
    position: relative; /* ¡LA CORRECCIÓN CLAVE! */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.benefits-modal-content #benefits-modal-body {
    overflow-y: auto; /* Habilitamos el scroll interno */
}

.benefits-modal-content ul {
    margin: 15px 0 0 0; /* Reducimos margen superior */
}

.benefits-modal-content li {
    display: grid; /* Usamos grid para alinear en columnas */
    grid-template-columns: 20px 1fr; /* Columna para el ícono y columna para el texto */
    gap: 12px;
    align-items: start; /* Alineamos al inicio */
    margin-bottom: 15px;
    font-size: 0.85rem; /* Reducimos el tamaño de la fuente */
    line-height: 1.5;
}

.benefits-modal-content li i {
    color: var(--color-primary);
    font-size: 1rem;
    margin-top: 2px;
}

/* El texto ahora ocupa la segunda columna */
.benefits-modal-content li div {
    grid-column: 2 / 3;
}
/* =============================================================== */
/*   NUEVO: Estilos para el modal de reseteo de contraseña en       */
/*   la landing, que es diferente al de la app.                    */
/* =============================================================== */
#password-reset-modal.welcome-overlay {
    display: none; /* Oculto por defecto */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#password-reset-modal.welcome-overlay.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* =================================================================== */
/*        NUEVO: ESTILOS PARA EL FOOTER DE SOPORTE                     */
/* =================================================================== */

.landing-footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-support-section {
    width: 100%;
    max-width: 700px;
    text-align: center;
    padding: 25px 30px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-soft);
    margin-bottom: 15px;
}

.footer-support-section h4 {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.footer-support-section p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer-support-section a {
    color: var(--color-primary);
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-support-section a:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

.footer-bottom-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}
/* =================================================================== */
/*        NUEVO: FONDO PARA LA SECCIÓN "SOCIAL PROOF" (BLINDADO)
/* =================================================================== */

/* Usamos un selector más específico para darle prioridad */
body #social-proof-section {
    position: relative;
    background-image: url('../images/social-proof-bg.jpg'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    padding: 60px 20px;
}
body #social-proof-section::before {
    content: '';
    position: absolute;
    inset: 0; /* Abarca todo, es lo mismo que top/left/right/bottom = 0 */
    background-color: rgba(44, 62, 80, 0.85);
    z-index: 1;
}
body #social-proof-section .social-proof-header,
body #social-proof-section .social-proof-container {
    position: relative;
    z-index: 2;
}