/* Custom CSS for AI Tools Website */

/* Base styles and animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

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

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Intersection Observer animations */
.animate-in {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    @apply bg-gray-100 dark:bg-gray-800;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-300 dark:bg-gray-600 rounded;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400 dark:bg-gray-500;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Custom gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

/* Custom button styles */
.btn-primary {
    @apply bg-primary hover:bg-blue-700 text-white font-medium px-6 py-3 rounded-lg transition-all duration-200 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-secondary {
    @apply bg-secondary hover:bg-purple-700 text-white font-medium px-6 py-3 rounded-lg transition-all duration-200 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-outline {
    @apply border-2 border-primary text-primary hover:bg-primary hover:text-white font-medium px-6 py-3 rounded-lg transition-all duration-200;
}

/* Custom card styles */
.card {
    @apply bg-white dark:bg-gray-800 rounded-xl shadow-sm hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1;
}

.card-gradient {
    @apply bg-gradient-to-br from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 rounded-xl shadow-sm hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1;
}

/* Navigation enhancements */
.nav-link {
    @apply relative text-gray-700 dark:text-gray-300 hover:text-primary px-3 py-2 rounded-md text-sm font-medium transition-all duration-200;
}

.nav-link::after {
    content: '';
    @apply absolute bottom-0 left-1/2 transform -translate-x-1/2 w-0 h-0.5 bg-primary transition-all duration-300;
}

.nav-link:hover::after {
    @apply w-full;
}

/* Dropdown animations */
.dropdown {
    @apply opacity-0 invisible transform scale-95 transition-all duration-300;
}

.dropdown.show {
    @apply opacity-100 visible transform scale-100;
}

/* Form enhancements */
.form-input {
    @apply w-full px-4 py-3 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-primary focus:border-transparent transition-all duration-200;
}

.form-input:focus {
    @apply shadow-lg ring-4 ring-primary ring-opacity-20;
}

.form-textarea {
    @apply form-input resize-none min-h-[120px];
}

/* Loading states */
.loading {
    @apply relative overflow-hidden;
}

.loading::after {
    content: '';
    @apply absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Hover effects */
.hover-scale {
    @apply transition-transform duration-200 hover:scale-105;
}

.hover-shadow {
    @apply transition-shadow duration-200 hover:shadow-lg;
}

.hover-lift {
    @apply transition-all duration-300 hover:-translate-y-1 hover:shadow-xl;
}

/* Text gradient effects */
.text-gradient-primary {
    @apply bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent;
}

.text-gradient-accent {
    @apply bg-gradient-to-r from-accent to-primary bg-clip-text text-transparent;
}

/* Custom borders and dividers */
.border-gradient {
    background: linear-gradient(90deg, transparent, #3B82F6, transparent) bottom/100% 1px no-repeat;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-center {
        @apply text-center;
    }
    
    .mobile-full {
        @apply w-full;
    }
}

/* RTL support */
[dir="rtl"] .rtl\:text-right {
    text-align: right;
}

[dir="rtl"] .rtl\:mr-4 {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="rtl"] .rtl\:ml-4 {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .rtl\:rotate-180 {
    transform: rotate(180deg);
}

/* Dark mode specific styles */
.dark .dark\:shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Glass morphism effects */
.glass {
    @apply bg-white/10 dark:bg-gray-900/10 backdrop-blur-lg border border-white/20 dark:border-gray-700/20;
}

.glass-card {
    @apply glass rounded-xl p-6 shadow-xl;
}

/* Custom focus styles */
.focus-ring {
    @apply focus:outline-none focus:ring-4 focus:ring-primary focus:ring-opacity-20;
}

/* Utility classes for spacing */
.section-padding {
    @apply py-16 lg:py-24;
}

.container-padding {
    @apply px-4 sm:px-6 lg:px-8;
}

/* Hero section specific styles */
.hero-title {
    @apply text-4xl md:text-5xl lg:text-6xl font-bold leading-tight;
}

.hero-subtitle {
    @apply text-lg md:text-xl lg:text-2xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto;
}

/* Feature card hover effects */
.feature-card {
    @apply card p-6 group cursor-pointer;
}

.feature-card:hover .feature-icon {
    @apply scale-110;
}

.feature-icon {
    @apply w-12 h-12 rounded-lg flex items-center justify-center mb-4 transition-transform duration-300;
}

/* Pricing card enhancements */
.pricing-card {
    @apply card p-8 relative overflow-hidden;
}

.pricing-card.popular {
    @apply border-2 border-primary transform scale-105 shadow-2xl;
}

.pricing-card.popular::before {
    content: '';
    @apply absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary to-secondary;
}

/* Blog card styles */
.blog-card {
    @apply card overflow-hidden group;
}

.blog-card img {
    @apply transition-transform duration-300 group-hover:scale-110;
}

/* Timeline styles */
.timeline-item {
    @apply relative pl-8 pb-8 border-l-2 border-gray-200 dark:border-gray-700;
}

.timeline-item::before {
    content: '';
    @apply absolute -left-2 top-0 w-4 h-4 bg-primary rounded-full border-4 border-white dark:border-gray-900;
}

.timeline-item:last-child {
    @apply border-l-0;
}

/* Statistics counter animation */
.stat-number {
    @apply text-3xl md:text-4xl font-bold text-primary;
}

/* Testimonial card styles */
.testimonial-card {
    @apply card p-6 relative;
}

.testimonial-card::before {
    content: '"';
    @apply absolute -top-2 -left-2 text-6xl text-primary opacity-20 font-serif;
}

/* Team card enhancements */
.team-card {
    @apply card text-center group overflow-hidden;
}

.team-card img {
    @apply transition-transform duration-300 group-hover:scale-110;
}

/* Footer enhancements */
.footer-link {
    @apply text-gray-300 hover:text-white transition-colors duration-200 hover:underline;
}

/* Cookie notice styles */
.cookie-notice {
    @apply fixed bottom-0 left-0 right-0 bg-gray-900 text-white p-4 z-50 transform translate-y-full transition-transform duration-300;
}

.cookie-notice.show {
    @apply translate-y-0;
}

/* Search and filter styles */
.search-input {
    @apply form-input pl-10;
}

.search-icon {
    @apply absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400;
}

.filter-button {
    @apply px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors duration-200;
}

.filter-button.active {
    @apply bg-primary text-white border-primary;
}

/* Progress bar styles */
.progress-bar {
    @apply w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 overflow-hidden;
}

.progress-fill {
    @apply h-full bg-primary transition-all duration-500 ease-out;
}

/* Badge styles */
.badge {
    @apply inline-flex items-center px-3 py-1 rounded-full text-sm font-medium;
}

.badge-primary {
    @apply badge bg-primary/10 text-primary;
}

.badge-secondary {
    @apply badge bg-secondary/10 text-secondary;
}

.badge-accent {
    @apply badge bg-accent/10 text-accent;
}

/* Alert styles */
.alert {
    @apply p-4 rounded-lg border-l-4 mb-4;
}

.alert-info {
    @apply alert border-primary bg-primary/5 text-primary;
}

.alert-success {
    @apply alert border-accent bg-accent/5 text-accent;
}

.alert-warning {
    @apply alert border-yellow-500 bg-yellow-50 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-200;
}

.alert-error {
    @apply alert border-red-500 bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-200;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        @apply border-2 border-gray-900 dark:border-white;
    }
    
    .btn-primary {
        @apply border-2 border-white;
    }
}

/* Focus visible for better accessibility */
.focus-visible\:ring-4:focus-visible {
    @apply ring-4 ring-primary ring-opacity-20;
}

/* Skip to content link */
.skip-to-content {
    @apply absolute -top-full left-4 bg-primary text-white px-4 py-2 rounded-lg z-50 focus:top-4 transition-all duration-200;
}

/* Custom selection colors */
::selection {
    @apply bg-primary/20 text-primary;
}

::-moz-selection {
    @apply bg-primary/20 text-primary;
}

/* Smooth focus transitions */
input:focus,
textarea:focus,
select:focus,
button:focus {
    transition: all 0.2s ease-in-out;
}

/* Custom checkbox and radio styles */
.custom-checkbox {
    @apply appearance-none w-5 h-5 border-2 border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 checked:bg-primary checked:border-primary focus:ring-2 focus:ring-primary focus:ring-opacity-20 transition-all duration-200;
}

.custom-radio {
    @apply custom-checkbox rounded-full;
}