/* =========================================
   Base Reset & Typography (No CDNs)
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f3f4f6; /* Light gray background like Tailwind */
    color: #1f2937;
    direction: rtl; /* Important for Persian text */
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* =========================================
   Layout Containers
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* =========================================
   Custom Animations & Effects
   ========================================= */
.gradient-bg {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 50%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

.icon-bounce { animation: bounce 2s infinite; }

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-6px,0); }
    70% { transform: translate3d(0,-3px,0); }
    90% { transform: translate3d(0,-1px,0); }
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   Hero Section Elements
   ========================================= */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    z-index: 10;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-icon-container {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
}

.hero-subtitle {
    color: #dbeafe;
    font-size: 1.125rem;
    max-width: 42rem;
    font-weight: 500;
}

.hero-divider {
    margin-top: 1.5rem;
    width: 5rem;
    height: 0.25rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 9999px;
}

/* =========================================
   Service Cards Grid
   ========================================= */
.services-header {
    text-align: center;
    margin-bottom: 2rem;
}

.services-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.services-divider {
    width: 4rem;
    height: 0.25rem;
    background: linear-gradient(to right, #3b82f6, #2563eb, #1d4ed8);
    border-radius: 9999px;
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.service-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s;
}

.service-card:hover::before { left: 100%; }
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.service-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.service-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
}

.arrow-container {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.arrow-icon { transition: transform 0.3s ease; }
.service-card:hover .arrow-icon { transform: translateX(-4px); } /* Negative X because RTL */

/* =========================================
   Empty State
   ========================================= */
.empty-state {
    background: linear-gradient(145deg, #f8fafc 0%, #ffffff 100%);
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}

.empty-icon-wrap {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #60a5fa, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.empty-divider {
    width: 6rem;
    height: 0.375rem;
    background: linear-gradient(to right, #60a5fa, #3b82f6, #2563eb);
    border-radius: 9999px;
    margin: 0 auto;
    opacity: 0.6;
}

/* =========================================
   Pagination
   ========================================= */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.page-link, .page-span {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.page-link {
    color: #2563eb;
}

.page-link:hover {
    background-color: #eff6ff;
}

.page-active {
    background-color: #2563eb;
    color: white;
    font-weight: 700;
}

.page-disabled {
    color: #9ca3af;
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 1rem; }
    .grid-container { grid-template-columns: 1fr; }
    
    /* Mobile Card Adjustments */
    .service-card {
        padding: 0.75rem 1rem;
        min-height: 4rem;
    }
    
    .service-info {
        gap: 0.75rem;
    }
    
    .service-icon {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
    }
    
    .service-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .arrow-container {
        width: 2rem;
        height: 2rem;
        border-radius: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .arrow-container svg {
        width: 16px;
        height: 16px;
    }
    
    .service-name {
        font-size: 0.95rem;
        line-height: 1.4;
        /* Truncate long names to 2 lines max */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}