/* Modern enhancements for Devocionales Cristianos website */

/* Smooth animations and transitions */
* {
    transition: all 0.3s ease;
}

/* Modern gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Pulsing animation for CTA buttons */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Floating animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Modern gradient text - CORREGIDO */
.gradient-text {
    /* Color sólido como respaldo */
    color: #374151 !important; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Si el gradiente falla, mostrar color sólido */
@supports not (background-clip: text) {
    .gradient-text {
        color: #374151 !important;
        background: none;
    }
}

/* Enhanced language selector */
.language-selector {
    position: relative;
    z-index: 1000;
}

.language-selector select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Loading animations */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Parallax scroll effect for hero section */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Interactive elements */
.interactive {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.interactive:hover::before {
    width: 300px;
    height: 300px;
}

/* Scroll reveal animations - CORREGIDO */
.scroll-reveal {
    /* SOLUCIÓN: Hacer elementos visibles por defecto */
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* Opcional: Mantener animación si JavaScript está disponible */
.scroll-reveal.hidden {
    opacity: 0;
    transform: translateY(50px);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Mobile-first responsive design enhancements */
@media (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .language-selector select {
        font-size: 0.875rem;
        padding: 0.25rem 2rem 0.25rem 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .gradient-bg,
    .gradient-purple {
        background: #000000;
        color: #ffffff;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus states for accessibility */
button:focus,
a:focus,
select:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
}

.skip-to-main:focus {
    top: 0;
}

/* Asegurar contraste en footer */
footer, footer * {
    color: white !important;
}

footer a {
    color: #d1d5db !important; /* gray-300 */
}

footer a:hover {
    color: white !important;
}

/* Mejorar contraste en secciones de contacto */
#contact, #contact * {
    color: white !important;
}

/* Corrección específica para elementos con animación float que puedan tener opacity 0 */
.float-animation {
    opacity: 1 !important;
}

/* Corrección para casos específicos de texto blanco sobre fondo blanco - MEJORADA */
.bg-white p,
.bg-white span:not(.text-purple-600):not(#features *) {
    color: #374151;
}

.bg-white h1, .bg-white h2, .bg-white h3 {
    color: #111827;
}

/* Asegurar que los elementos de Tailwind tengan el color correcto */
.text-gray-800 {
    color: #1f2937 !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.text-white {
    color: white !important;
}

/* CORRECCIONES ESPECÍFICAS PARA COLORES MORADOS */

/* 1. CORRECCIÓN: Título "Our Vision" debe ser morado */
#our-vision h2 {
    color: #7c3aed !important; /* purple-600 equivalent */
}

/* 2. CORRECCIÓN: TODOS los íconos de funciones deben ser morados */
#features .text-purple-600 {
    color: #7c3aed !important; /* Forzar morado para íconos */
}

/* 3. CORRECCIÓN: TODOS los títulos de funciones deben ser morados */
#features h3 {
    color: #7c3aed !important; /* Forzar morado para títulos de funciones */
}

/* 4. CORRECCIÓN: Asegurar que las descripciones mantengan su color gris */
#features p {
    color: #6b7280 !important; /* gray-500 - mantener descripción en gris */
}

/* 5. CORRECCIÓN: Botón de email igual que "Learn about Features" */
#contact a[href^="mailto"] {
    background: transparent !important;
    border: 2px solid white !important;
    color: white !important;
}

#contact a[href^="mailto"]:hover {
    background: white !important;
    color: #7c3aed !important; /* purple-600 */
}

/* CORRECCIÓN: Asegurar que los elementos morados mantengan su color */
.text-purple-600,
.text-purple-800 {
    color: #7c3aed !important;
}

/* CORRECCIÓN: Elementos de contacto mantienen color blanco */
#contact h2,
#contact p {
    color: white !important;
}

/* =============================================
   CORRECCIÓN DEFINITIVA PARA EL BOTÓN "VOLVER A LA PÁGINA PRINCIPAL"
   ============================================= */

/* Corrección específica para botones con bg-purple-600 */
.bg-purple-600,
a.bg-purple-600,
.inline-block.bg-purple-600 {
    background-color: #7c3aed !important; /* purple-600 */
    color: white !important;
    border: none !important;
}

.bg-purple-600:hover,
a.bg-purple-600:hover,
.inline-block.bg-purple-600:hover {
    background-color: #6d28d9 !important; /* purple-700 */
    color: white !important;
}

/* Forzar color blanco para todos los elementos internos del botón */
.bg-purple-600 *,
.bg-purple-600 span,
.bg-purple-600 i {
    color: white !important;
}

/* Selector específico para el botón en el contenedor de la página de privacidad */
.bg-purple-50 a.bg-purple-600,
.bg-purple-50 .bg-purple-600 {
    background-color: #7c3aed !important;
    color: white !important;
}

.bg-purple-50 a.bg-purple-600:hover,
.bg-purple-50 .bg-purple-600:hover {
    background-color: #6d28d9 !important;
    color: white !important;
}

/* Selector ultra-específico para garantizar que funcione */
.text-center a[href="index.html"].bg-purple-600 {
    background-color: #7c3aed !important;
    color: white !important;
}

.text-center a[href="index.html"].bg-purple-600:hover {
    background-color: #6d28d9 !important;
    color: white !important;
}

/* Override final para cualquier conflicto */
[class*="bg-purple-6"] {
    color: white !important;
}

[class*="bg-purple-6"]:hover {
    color: white !important;
}