/* Font Family Settings */
[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

/* Animated Gradient Border for Service Cards */
@keyframes rotate-border {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.service-card {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
}

.service-card::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: 50%;
    left: 50%;
    background: conic-gradient(from 0deg, #FF6B35, #3B82F6, #FF6B35, #FF6B35);
    animation: rotate-border 5s linear infinite;
    will-change: transform;
    z-index: 0;
}

.service-card::after {
    content: '';
    position: absolute;
    background: white;
    inset: 1px;
    border-radius: calc(0.75rem - 1px);
    z-index: 1;
}

.service-card-blue::before {
    background: conic-gradient(from 0deg, #3B82F6, #FF6B35, #3B82F6, #3B82F6);
}

.service-card > div {
    position: relative;
    z-index: 2;
    background: transparent;
}

/* Improve text readability in service cards */
.service-card {
    background: white !important;
}

.service-card::after {
    background: white !important;
    opacity: 1;
}

.service-card > div {
    position: relative;
    z-index: 10 !important;
}

.service-card h3,
.service-card p,
.service-card li,
.service-card span {
    position: relative;
    z-index: 11 !important;
}

.service-card h3 {
    color: #111827 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.service-card p {
    color: #374151 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.service-card li,
.service-card span {
    color: #374151 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.service-card ul {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hide scrollbar for carousel */
#vision-carousel::-webkit-scrollbar {
    display: none;
}

/* How It Works Timeline RTL/LTR Support */
[dir="ltr"] .how-it-works-line {
    left: 1.5rem;
}

@media (min-width: 640px) {
    [dir="ltr"] .how-it-works-line {
        left: 2rem;
    }
}

@media (min-width: 768px) {
    [dir="ltr"] .how-it-works-line {
        left: 2.5rem;
    }
}

[dir="rtl"] .how-it-works-line {
    right: 1.5rem;
    left: auto;
}

@media (min-width: 640px) {
    [dir="rtl"] .how-it-works-line {
        right: 2rem;
    }
}

@media (min-width: 768px) {
    [dir="rtl"] .how-it-works-line {
        right: 2.5rem;
    }
}

/* Reverse flex order for RTL */
[dir="rtl"] .how-it-works-step {
    flex-direction: row-reverse;
}

/* Grid Background Pattern for How It Works */
.how-it-works-grid {
    background-image: 
        linear-gradient(to right, rgba(156, 163, 175, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(156, 163, 175, 0.1) 1px, transparent 1px);
    background-size: 2rem 2rem;
    background-position: 0 0, 0 0;
}

@media (min-width: 768px) {
    .how-it-works-grid {
        background-size: 3rem 3rem;
    }
}

@media (min-width: 1024px) {
    .how-it-works-grid {
        background-size: 4rem 4rem;
    }
}

