/* ==========================================================================
   Puerta Secreta - Estilos Vanguardistas (V 1.8)
   ========================================================================== */

/* --- 1. Contenedor Principal (Overlay) --- */
/* Efecto de desenfoque de fondo (Glassmorphism) para centrar la atención */
#ps-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5); /* Color pizarra oscuro traslúcido */
    backdrop-filter: blur(10px); /* Desenfoque de alta gama */
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999999;
    display: none !important; /* Controlado por JS .ps-show */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Estado activo del overlay */
#ps-popup-overlay.ps-show {
    display: flex !important;
    opacity: 1;
}

/* --- 2. La Ventana (Modal) --- */
/* Diseño encuadrado, simétrico y profesional */
.ps-modal {
    background: rgba(255, 255, 255, 0.95); /* Blanco casi puro muy suave */
    border-radius: 30px; /* Bordes muy suaves y modernos */
    max-width: 650px; /* Ancho idéntico a tu referencia */
    width: 100%;
    max-height: 90vh; /* Seguridad para no salirse de pantalla */
    position: relative;
    /* Sombra profunda y suave para dar sensación de flotado */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Mantiene las franjas y el contenido dentro de los bordes curvos */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde sutil estilo cristal */
    
    /* Animación de entrada elegante (Pop-in con ligero rebote) */
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Estado activo de la ventana */
#ps-popup-overlay.ps-show .ps-modal {
    transform: scale(1) translateY(0);
}

/* --- 3. Franjas Decorativas de Vanguardia --- */
/* Degradado premium entre tus colores: Verde Esmeralda y Magenta Vibrante */
.ps-stripe-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px; /* Un poco más gruesa para mayor impacto */
    background: linear-gradient(90deg, #2ecc71 0%, #a55eea 50%, #e73c7e 100%);
    z-index: 1;
}

/* --- 4. Botón Cerrar (X) Minimalista --- */
.ps-close {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8; /* Gris azulado suave */
    transition: all 0.3s ease;
    z-index: 10;
    font-family: Arial, sans-serif; /* Asegura X limpia */
    line-height: 1;
}

.ps-close:hover {
    color: #e73c7e; /* Cambia a magenta en hover */
    transform: rotate(90deg); /* Animación novedosa */
}

/* --- 5. Contenedor Interno (Simetría Total) --- */
.ps-modal-inner {
    padding: 60px 50px 50px; /* Padding generoso: el texto NO queda apiñado */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- 6. El Logo Sincronizado --- */
.ps-logo-wrapper {
    margin-bottom: 30px;
}

.ps-logo {
    max-width: 180px; /* Tamaño profesional */
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); /* Sombra suave exclusiva para el logo */
}

/* --- 7. Contenido Poderoso (Tipografía Profesional) --- */
.ps-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
}

/* h1/h2 generados por wp_editor */
.ps-content h1,
.ps-content h2 {
    color: #0f172a; /* Slate oscuro, más legible y moderno que el negro puro */
    font-weight: 800; /* Extra bold para autoridad */
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -0.03em; /* Tracking ajustado estilo Apple/Google */
    line-height: 1.2;
}

/* h1/h2 en color de marca si quieres resaltar (opcional, usa el color primario configurado) */
.ps-content h1 strong,
.ps-content h2 strong {
    color: var(--ps-color);
}

.ps-content p {
    color: #334155; /* Gris Slate intermedio */
    line-height: 1.8; /* Interlineado amplio para máxima legibilidad (no apiñado) */
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 30px; /* Espacio simétrico antes del botón */
}

/* --- 8. Botón de Acción Vanguardista --- */
.ps-btn-action {
    display: inline-block;
    padding: 18px 50px;
    background: var(--ps-color); /* Color primario configurado en PHP */
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 50px; /* Botón píldora, muy novedoso */
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Doble sombra para efecto de relieve profesional */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.ps-btn-action:hover {
    transform: translateY(-3px); /* Levanta sutilmente */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    filter: brightness(1.1); /* Aclara ligeramente */
}

.ps-btn-action:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px -3px rgba(0, 0, 0, 0.1);
}

/* --- 9. Scrollbar Personalizada para el Modal --- */
/* Si el texto es muy largo, la barra de scroll será estética */
.ps-modal::-webkit-scrollbar {
    width: 8px;
}

.ps-modal::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.ps-modal::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.ps-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* --- 10. Ajustes Simétricos para Móviles --- */
@media (max-width: 640px) {
    .ps-modal {
        padding: 0; /* Quitamos padding externo del modal */
        width: 95%;
        border-radius: 20px;
    }
    
    .ps-modal-inner {
        padding: 50px 25px 30px; /* Reducimos padding interno en móvil */
    }
    
    .ps-content h1,
    .ps-content h2 {
        font-size: 1.7rem;
    }
    
    .ps-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .ps-btn-action {
        padding: 15px 30px;
        width: 100%; /* Botón ancho completo en móvil */
        font-size: 1rem;
    }
    
    .ps-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}