/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Cancel a global RTL mirror for specific things (icons, logos, images) */
html[dir="rtl"] .no-rtl-flip { 
  transform: scaleX(-1) !important; /* cancels parent's -1 */
  transform-origin: center; 
}


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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

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

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-pulse-custom {
    animation: pulse 2s ease-in-out infinite;
}

/* Delay Classes */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Custom Components */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.stat-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* Gradient Text */
.text-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* RTL Support */
.rtl {
    direction: rtl;
}

.rtl .text-left {
    text-align: right;
}

.rtl .text-right {
    text-align: left;
}

.rtl .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

.rtl .pl-4 {
    padding-left: 0;
    padding-right: 1rem;
}

.rtl .pr-4 {
    padding-right: 0;
    padding-left: 1rem;
}

.rtl .flex-row {
    flex-direction: row-reverse;
}

/* Dashboard Specific Styles */
.dashboard-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.dashboard-card:hover {
    border-left-color: #3b82f6;
    transform: translateX(4px);
}

.sidebar-link {
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: #f3f4f6;
    padding-left: 1.5rem;
}

.sidebar-link.active {
    background-color: #dbeafe;
    color: #3b82f6;
    border-right: 3px solid #3b82f6;
}

/* Blog Post Styles */
.blog-post {
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Portfolio Project Styles */
.portfolio-item {
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.9);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

/* Form Styles */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Pricing Card Styles */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card.featured {
    border-color: #3b82f6;
    position: relative;
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .animate-fadeInUp {
        animation-delay: 0s !important;
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .blog-post:hover,
    .portfolio-item:hover {
        transform: none;
    }
    
    .pricing-card:hover {
        transform: none;
    }
}

/* Dark Mode Support (for future use) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .feature-card,
    .blog-post,
    .portfolio-item {
        border: 2px solid #000;
    }
}

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