@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

:root {
  /* Royal Palette */
  --royal-navy: #0f172a;
  --royal-navy-light: #1e293b;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  
  /* Icon Themes - Vibrant & Diverse */
  --theme-emerald: #10b981;
  --theme-blue: #3b82f6;
  --theme-amber: #f59e0b;
  --theme-rose: #f43f5e;
  --theme-violet: #8b5cf6;
  --theme-pink: #ec4899;
  --theme-sky: #0ea5e9;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0,0,0,0.06);
  
  /* High-End Depth */
  --shadow-royal: 0 20px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* Layout Evolution */
.app-wrapper { display: flex; min-height: 100vh; }

/* Royal Sidebar - High Contrast */
.desktop-sidebar {
    width: 300px;
    background: var(--royal-navy);
    color: #f1f5f9;
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: none;
    flex-direction: column;
    z-index: 100;
    box-shadow: 10px 0 40px rgba(0,0,0,0.1);
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-logo i { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
    transform: translateX(-5px);
}
.nav-link.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}
.nav-link i { font-size: 1.25rem; width: 24px; text-align: center; }

.main-content { flex: 1; min-width: 0; }

.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-main);
    min-height: 100vh;
    padding-bottom: 100px;
}

@media (min-width: 1024px) {
    .desktop-sidebar { display: flex; }
    .mobile-container {
        max-width: 1100px;
        margin: 2.5rem auto;
        padding-bottom: 2.5rem;
        border-radius: 3.5rem;
        box-shadow: var(--shadow-royal);
        height: calc(100vh - 5rem);
        overflow-y: auto;
        background: white;
        border: 1px solid rgba(255,255,255,0.1);
    }
    .bottom-nav { display: none !important; }
}

/* Glass Header Evolution */
.glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Category Grid Evolution - 2 Columns */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
}

/* Vibrant Icons & Diverse Themed Gradients */
.cat-icon { 
    width: 65px; 
    height: 65px; 
    border-radius: 1.75rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.75rem; 
    transition: 0.4s;
    background: #f8fafc;
    color: var(--royal-navy-light);
    box-shadow: var(--shadow-inner);
}

/* Diverse Themed Colors */
.t-1 .cat-icon, .t-1.avatar, .t-1 .detail-avatar-v3 { background: rgba(16, 185, 129, 0.1); color: var(--theme-emerald); }
.t-2 .cat-icon, .t-2.avatar, .t-2 .detail-avatar-v3 { background: rgba(59, 130, 246, 0.1); color: var(--theme-blue); }
.t-3 .cat-icon, .t-3.avatar, .t-3 .detail-avatar-v3 { background: rgba(244, 63, 94, 0.1); color: var(--theme-rose); }
.t-4 .cat-icon, .t-4.avatar, .t-4 .detail-avatar-v3 { background: rgba(245, 158, 11, 0.1); color: var(--theme-amber); }
.t-5 .cat-icon, .t-5.avatar, .t-5 .detail-avatar-v3 { background: rgba(139, 92, 246, 0.1); color: var(--theme-violet); }
.t-6 .cat-icon, .t-6.avatar, .t-6 .detail-avatar-v3 { background: rgba(236, 72, 153, 0.1); color: var(--theme-pink); }

/* Category Cards - Optimized for 2-Column */
.cat-card {
    background: white; 
    padding: 1.5rem 0.75rem; 
    border-radius: 2rem;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); 
    border: 1px solid var(--border); 
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.cat-card:hover { 
    transform: translateY(-12px); 
    box-shadow: var(--shadow-royal); 
}
.cat-card:hover .cat-icon { 
    transform: scale(1.1) rotate(5deg); 
    filter: drop-shadow(0 0 15px currentColor);
}

/* Provider Cards Evolution */
.provider-card {
    background: white; 
    border-radius: 2.5rem; 
    padding: 1.75rem;
    display: flex; 
    gap: 1.75rem; 
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
    margin-bottom: 1.75rem; 
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
@media (max-width: 480px) {
    .provider-card {
        padding: 1.25rem 1rem;
        gap: 1rem;
        border-radius: 1.75rem;
    }
    .avatar {
        width: 65px;
        height: 65px;
        font-size: 1.75rem;
    }
    .name-v3 {
        font-size: 1.1rem;
    }
}
.provider-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(to left, rgba(59, 130, 246, 0.03), transparent);
    opacity: 0; transition: 0.3s;
}
.provider-card:hover { transform: scale(1.01) translateX(-8px); border-color: var(--accent); box-shadow: var(--shadow-royal); }
.provider-card:hover::before { opacity: 1; }

.avatar { 
    width: 85px; 
    height: 85px; 
    border-radius: 2rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 2.5rem; 
    flex-shrink: 0;
    box-shadow: var(--shadow-inner);
}

/* Premium Buttons */
.btn-royal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    border-radius: 1.5rem;
    font-weight: 800;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.5);
    white-space: nowrap;
}
@media (max-width: 480px) {
    .btn-royal {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        gap: 0.75rem;
        width: 100%;
        max-width: 140px;
    }
}
.btn-royal:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.6); 
}

/* Breadcrumbs Royal */
.breadcrumb {
    padding: 1.5rem 2.5rem;
    background: rgba(248, 250, 252, 0.5);
    margin-bottom: 2rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); transition: 0.3s; }
.breadcrumb a:hover { color: var(--royal-navy); }
.breadcrumb i { font-size: 0.65rem; opacity: 0.4; margin: 0 0.5rem; }

/* Elite Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 2rem;
    left: 1.5rem;
    right: 1.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 2rem;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.08);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-item i { font-size: 1.25rem; }
.nav-item span { font-size: 0.75rem; font-weight: 800; }
.nav-item.active { color: white; transform: translateY(-3px); }
.nav-item.active i { color: var(--accent); filter: drop-shadow(0 0 8px var(--accent-glow)); }

/* Skeleton Loading */
.skeleton {
    background: #e2e8f0;
    background-image: linear-gradient(to right, #e2e8f0 0%, #cbd5e1 20%, #e2e8f0 40%, #e2e8f0 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    animation: shimmer 2s infinite linear;
}
@keyframes shimmer { 0% { background-position: -468px 0; } 100% { background-position: 468px 0; } }

/* Elite Badge - Blue Rounded Bubble */
.badge-royal {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 900;
    display: inline-block;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Advanced Search Bar Styling */
.search-container-v6 {
    background: white;
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-royal);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
    transition: 0.3s;
}
.search-container-v6:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.search-input-v6 { font-family: 'Cairo'; width: 100%; border: none; outline: none; font-size: 1rem; font-weight: 700; color: var(--royal-navy); }

/* Social Buttons */
.s-btn-fb { background: #1877F2 !important; box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3) !important; }

/* Animations */
.animate-in { animation: slideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
