/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.lang-btn.active {
    background: #8b5a8c;
    color: white;
}

.lang-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* Page Title */
.page-title {
    text-align: center;
    font-size: 2.5rem;
    color: #8b5a8c;
    margin-bottom: 3rem;
    font-weight: 600;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #8b5a8c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Service Card */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b5a8c, #a67ba8);
}

/* Service Icon */
.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    display: block;
    border: 3px solid #f0f0f0;
}

/* Service Badge */
.service-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #8b5a8c;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

[dir="rtl"] .service-badge {
    right: auto;
    left: 15px;
}

/* Service Name */
.service-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* Service Method */
.service-method {
    font-size: 0.9rem;
    color: #666;
    text-transform: capitalize;
}

/* Error State */
.error-message {
    text-align: center;
    padding: 3rem;
    color: #e74c3c;
}

.retry-btn {
    background: #8b5a8c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #7a4f7b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 60px 15px 30px;
    }
    
    .page-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    [dir="rtl"] .language-switcher {
        right: auto;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    [dir="rtl"] .language-switcher {
        right: auto;
        left: 10px;
    }
}

/* Arabic Font Support */
[dir="rtl"] {
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
}

/* Hide elements initially */
.hidden {
    display: none !important;
}