
/* Custom CSS for AL RAFIDAIN EXCHANGE Website */

/* Font Families */
.font-inter {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-arabic {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

/* Arabic Language Styles */
body[dir="rtl"] {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

body[dir="rtl"] .text-left {
    text-align: right;
}

body[dir="rtl"] .text-right {
    text-align: left;
}

body[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

body[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

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

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

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

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

/* Animation Delays */
.animation-delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

.animation-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
}

.animation-delay-900 {
    animation-delay: 0.9s;
    opacity: 0;
}

/* Hero Slider Styles */
#heroSlider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.slide.active {
    opacity: 1;
}

/* Slider Dots */
.slider-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-dot.active {
    opacity: 1 !important;
    transform: scale(1.2);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2d7d32, #1e5f27);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#mobileMenu.show {
    max-height: 300px;
}

/* Form Styles */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.1);
    border-color: #2d7d32;
}

.form-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

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

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1e5f27;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #2d7d32, #1e5f27);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
    .animation-delay-300,
    .animation-delay-600,
    .animation-delay-900 {
        animation-delay: 0s;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-7xl {
        font-size: 3.5rem;
    }
}

/* Arabic RTL Specific Styles */
body[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

body[dir="rtl"] .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

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

body[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

body[dir="rtl"] .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

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

/* Success and Error States */
.success-state {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.error-state {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Interactive Elements */
.interactive-element {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.interactive-element:hover {
    transform: scale(1.02);
}

.interactive-element:active {
    transform: scale(0.98);
}

/* Custom Focus Styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2d7d32;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bg-primary-600 {
        background-color: #000000;
    }
    
    .text-primary-600 {
        color: #000000;
    }
    
    .border-primary-600 {
        border-color: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .slide {
        transition: none;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Keep light theme for now as per requirements */
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.7;
}

/* Button Enhancements */
button {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease;
}

img[loading] {
    opacity: 0;
}

img[loaded] {
    opacity: 1;
}

/* Custom Border Radius */
.rounded-custom {
    border-radius: 1.5rem;
}

.rounded-custom-lg {
    border-radius: 2rem;
}

/* Enhanced Shadow Effects */
.shadow-custom {
    box-shadow: 0 4px 6px -1px rgba(45, 125, 50, 0.1), 0 2px 4px -1px rgba(45, 125, 50, 0.06);
}

.shadow-custom-lg {
    box-shadow: 0 10px 15px -3px rgba(45, 125, 50, 0.1), 0 4px 6px -2px rgba(45, 125, 50, 0.05);
}

/* Utility Classes */
.overflow-hidden {
    overflow: hidden;
}

.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

.select-none {
    user-select: none;
}

.select-text {
    user-select: text;
}
