/* Custom Tailwind CSS */

/* Animation for spinning circle */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin 8s linear infinite;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Text direction for Arabic */
[dir="rtl"] {
    text-align: right;
}

/* Custom button hover effects */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

/* Custom form inputs */
input,
textarea,
select {
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
}

/* Hero section gradient */
.hero-gradient {
    background: linear-gradient(135deg, #eff6ff 0%, #fff 50%, #eff6ff 100%);
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

/* Price highlight */
.price-highlight {
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile optimization */
@media (max-width: 640px) {
    /* Reduce padding on mobile */
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Ensure text is readable */
    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    /* Stack grid items on mobile */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
}

/* Loading animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Smooth fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* RTL text alignment */
[dir="rtl"] label {
    text-align: right;
}

[dir="rtl"] .flex {
    text-align: right;
}

/* Print styles */
@media print {
    nav,
    footer,
    button,
    .no-print {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .bg-white {
        background: white;
    }
}

/* Accessibility improvements */
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-duration: 200ms;
}

/* Input placeholder styling */
input::placeholder,
textarea::placeholder {
    opacity: 0.7;
}

/* Selection styling */
::selection {
    background-color: #2563eb;
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #be185d;
}
