/* Custom styles for automatitzem.cat */

/* Button styles with new color palette */
.btn-primary {
    background-color: #1E40AF !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    border: none !important;
}

.btn-primary:hover {
    background-color: #1D4ED8 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-2px) !important;
}

.btn-secondary {
    border: 2px solid #1E40AF !important;
    color: #1E40AF !important;
    background-color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

.btn-secondary:hover {
    background-color: #1E40AF !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Modern button styles */
.btn-primary-modern {
    @apply bg-gradient-to-r from-primary to-primary-hover text-white px-6 py-3 rounded-xl font-semibold shadow-xl hover:shadow-2xl hover:-translate-y-1 transition-all duration-300 inline-block text-center border-none;
}

.btn-secondary-modern {
    @apply bg-white/90 backdrop-blur-sm text-primary px-6 py-3 rounded-xl font-semibold border-2 border-white/60 hover:bg-white hover:border-white transition-all duration-300 inline-block text-center shadow-lg;
}

.btn-secondary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.15), 0 10px 10px -5px rgba(30, 64, 175, 0.1);
}

/* Accent button */
.btn-accent {
    background-color: #F59E0B !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    border: none !important;
}

.btn-accent:hover {
    background-color: #D97706 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    transform: translateY(-2px) !important;
}

/* Pricing cards */
.pricing-card {
    transition: transform 0.2s ease-in-out;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation classes */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Swiper custom styles */
.casos-swiper .swiper-pagination-bullet {
    background: #4F46E5;
    opacity: 0.5;
}

.casos-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

.casos-swiper .swiper-button-next,
.casos-swiper .swiper-button-prev {
    color: #4F46E5;
}

/* Form styles */
input:focus, 
select:focus, 
textarea:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Table responsive styles */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Focus states for accessibility */
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success message */
.success-message {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cookie banner animation */
#cookie-banner {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Text selection */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Advanced hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
}

/* Animated backgrounds */
.bg-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating animation improvements */
.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-delay-1 {
    animation: float 8s ease-in-out infinite;
    animation-delay: 2s;
}

.float-delay-2 {
    animation: float 8s ease-in-out infinite;
    animation-delay: 4s;
}

/* Pulse glow effect */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from {
        text-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(79, 70, 229, 0.8), 0 0 30px rgba(79, 70, 229, 0.6);
    }
}

/* Modern gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced card styles */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.modern-card:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar for modern browsers */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}





/* Modal animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

.modal-leave {
    animation: modalLeave 0.2s ease-in;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalLeave {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Enhanced cookie banner */
#cookie-banner {
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-primary-modern,
    .btn-secondary-modern {
        @apply w-full text-center;
    }
    
    .pricing-card {
        margin-bottom: 2rem;
    }
    
    h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.1;
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    /* Reduce motion for mobile */
    .hover-lift:hover {
        transform: translateY(-4px);
    }
    
    /* Simplify animations on mobile */
    .bg-animated {
        background: linear-gradient(135deg, #667eea, #764ba2);
        animation: none;
    }
}