/* ============================================
   TOOLSIRO.COM - Main Stylesheet
   Modern, Bilingual (EN/AR), SEO-Optimized
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
    /* Colors */
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #A5B4FC;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --accent: #FFD93D;
    --accent-dark: #F59E0B;
    
    --bg: #FAFBFF;
    --bg-card: #FFFFFF;
    --bg-dark: #0F0F1A;
    --bg-section: #F1F3FB;
    
    --text: #1A1A2E;
    --text-secondary: #5A5A7A;
    --text-muted: #9498B3;
    --text-inverse: #FFFFFF;
    
    --border: #E2E5F1;
    --border-light: #F0F1F7;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Typography */
    --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', 'Fira Code', monospace;
    --font-arabic: 'Noto Kufi Arabic', 'DM Sans', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition: 0.3s var(--ease);
    
    /* Container */
    --container-width: 1280px;
    --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { 
    scroll-behavior: smooth; 
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Arabic body override */
body.lang-ar {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}

a { 
    color: inherit; 
    text-decoration: none; 
    transition: color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Skip Link (A11y) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* --- Icon Sizes --- */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 22px; height: 22px; }

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 100;
}
.announcement-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}
.announcement-close {
    color: rgba(255,255,255,0.7);
    transition: color var(--transition);
    display: flex;
    align-items: center;
}
.announcement-close:hover { color: #fff; }

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 251, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-xl);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
}
.logo-text { letter-spacing: -0.02em; }
.logo-accent { color: var(--primary); }

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.nav-link {
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-glow);
}

/* Mega Dropdown */
.has-dropdown { position: relative; }
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 680px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s var(--ease);
}
[dir="rtl"] .mega-dropdown { 
    left: auto; 
    right: 50%; 
    transform: translateX(50%) translateY(8px); 
}
.has-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}
[dir="rtl"] .has-dropdown:hover .mega-dropdown {
    transform: translateX(50%) translateY(0);
}
.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.mega-item:hover { background: var(--bg-section); }
.mega-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mega-icon i { width: 18px; height: 18px; }
.mega-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
}
.mega-info small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-btn:hover {
    background: var(--bg-section);
    color: var(--primary);
}
.nav-btn i { width: 20px; height: 20px; }

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-section);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.lang-switch:hover {
    background: var(--primary-glow);
    color: var(--primary);
}
.lang-switch i { width: 16px; height: 16px; }

.mobile-toggle { display: none; }

/* Search Overlay */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s var(--ease);
}
.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.search-form {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 640px;
    margin: 0 auto;
}
.search-icon { 
    color: var(--text-muted); 
    width: 22px; 
    height: 22px; 
    flex-shrink: 0; 
}
.search-input {
    flex: 1;
    font-size: 1.15rem;
    padding: var(--space-sm) 0;
    background: transparent;
    color: var(--text);
}
.search-input::placeholder { color: var(--text-muted); }
.search-close {
    color: var(--text-muted);
    display: flex;
    transition: color var(--transition);
}
.search-close:hover { color: var(--text); }
.search-close i { width: 22px; height: 22px; }

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 2000;
    transition: right 0.35s var(--ease);
    overflow-y: auto;
    padding: var(--space-4xl) var(--space-lg) var(--space-xl);
}
[dir="rtl"] .mobile-drawer { right: auto; left: -100%; }
.mobile-drawer.active { right: 0; }
[dir="rtl"] .mobile-drawer.active { left: 0; }
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav-links li a {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: color var(--transition);
}
.mobile-nav-links li a:hover { color: var(--primary); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    padding: var(--space-4xl) 0 var(--space-3xl);
    overflow: hidden;
    background: var(--bg);
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,217,61,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: var(--space-xl);
    border: 1px solid rgba(99,102,241,0.15);
    animation: fadeInDown 0.6s var(--ease) both;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-lg);
    animation: fadeInDown 0.6s 0.1s var(--ease) both;
}
.lang-ar .hero h1 { letter-spacing: 0; line-height: 1.4; }

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.18rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.8;
    animation: fadeInDown 0.6s 0.2s var(--ease) both;
}

.hero-search-box {
    display: flex;
    align-items: center;
    max-width: 560px;
    margin: 0 auto var(--space-2xl);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 6px 6px 6px 20px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    animation: fadeInUp 0.6s 0.3s var(--ease) both;
}
[dir="rtl"] .hero-search-box { padding: 6px 20px 6px 6px; }
.hero-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.hero-search-box i { 
    color: var(--text-muted); 
    width: 22px; 
    height: 22px; 
    flex-shrink: 0; 
}
.hero-search-box input {
    flex: 1;
    padding: 14px 14px;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
}
.hero-search-box input::placeholder { color: var(--text-muted); }
.hero-search-btn {
    padding: 12px 28px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: calc(var(--radius-xl) - 4px);
    white-space: nowrap;
    transition: all var(--transition);
}
.hero-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    animation: fadeInUp 0.6s 0.4s var(--ease) both;
}
.hero-stat {
    text-align: center;
}
.hero-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1.2;
}
.lang-ar .hero-stat-number { font-family: var(--font-arabic); }
.hero-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Floating shapes decoration */
.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.hero-shape {
    position: absolute;
    border-radius: var(--radius-md);
    opacity: 0.5;
}
.hero-shape:nth-child(1) {
    width: 60px; height: 60px;
    background: rgba(99,102,241,0.1);
    top: 15%; left: 8%;
    animation: float 8s ease-in-out infinite;
    transform: rotate(15deg);
}
.hero-shape:nth-child(2) {
    width: 40px; height: 40px;
    background: rgba(255,217,61,0.15);
    top: 25%; right: 12%;
    animation: float 10s ease-in-out 1s infinite;
    border-radius: 50%;
}
.hero-shape:nth-child(3) {
    width: 80px; height: 80px;
    background: rgba(16,185,129,0.06);
    bottom: 20%; left: 15%;
    animation: float 12s ease-in-out 2s infinite;
    border-radius: 50%;
}
.hero-shape:nth-child(4) {
    width: 30px; height: 30px;
    background: rgba(239,68,68,0.08);
    bottom: 30%; right: 10%;
    animation: float 9s ease-in-out 0.5s infinite;
    transform: rotate(45deg);
}

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

/* ============================================
   POPULAR TOOLS SECTION
   ============================================ */
.section {
    padding: var(--space-3xl) 0;
}
.section-alt {
    background: var(--bg-section);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}
.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}
.lang-ar .section-header h2 { letter-spacing: 0; }
.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: relative;
    overflow: hidden;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
[dir="rtl"] .tool-card::before { transform-origin: right; }
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.tool-card:hover::before { transform: scaleX(1); }

.tool-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg, var(--primary-glow));
    color: var(--icon-color, var(--primary));
}
.tool-card-icon i { width: 24px; height: 24px; }

.tool-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.tool-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}
.tool-card-badge {
    display: inline-flex;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--badge-bg, var(--bg-section));
    color: var(--badge-color, var(--text-muted));
    width: fit-content;
}
.tool-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap var(--transition);
}
.tool-card-link:hover { gap: 10px; }
.tool-card-link i { width: 16px; height: 16px; }

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: all 0.3s var(--ease);
    text-decoration: none;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-bounce);
}
.category-card:hover .category-icon {
    transform: scale(1.1) rotate(-3deg);
}
.category-icon i { width: 24px; height: 24px; }

.category-info { flex: 1; }
.category-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.category-info p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.category-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-section);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* ============================================
   FEATURES / WHY SECTION
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 1.8rem;
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-sm);
}
.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: var(--space-4xl) 0;
}
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 50%, #A855F7 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    inset: 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.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--space-md);
}
.cta-box p {
    color: rgba(255,255,255,0.85);
    font-size: 1.05rem;
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.cta-btn i { width: 20px; height: 20px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    position: relative;
    color: var(--text-inverse);
}
.footer-wave {
    color: var(--bg-dark);
    line-height: 0;
    margin-bottom: -1px;
}
.footer-wave svg {
    width: 100%;
    height: 80px;
}

.footer-main {
    background: var(--bg-dark);
    padding: var(--space-3xl) 0 var(--space-2xl);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--space-md);
}
.footer-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}
.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    transition: all var(--transition);
}
.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.footer-social a i { width: 18px; height: 18px; }

.footer-col h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lang-ar .footer-col h3 { text-transform: none; letter-spacing: 0; }
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul li a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    transition: all var(--transition);
}
.footer-col ul li a:hover {
    color: var(--primary-light);
    padding-inline-start: 4px;
}

.footer-lang-switch { margin-top: var(--space-xl); }
.lang-buttons {
    display: flex;
    gap: 8px;
    margin-top: var(--space-sm);
}
.lang-btn {
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    transition: all var(--transition);
}
.lang-btn:hover, .lang-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: var(--space-lg) 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
}
[dir="rtl"] .back-to-top { right: auto; left: 30px; }
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}
.back-to-top i { width: 20px; height: 20px; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .mega-grid { grid-template-columns: repeat(2, 1fr); }
    .mega-dropdown { width: 520px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}

@media (max-width: 768px) {
    :root { --header-height: 64px; }
    
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
    
    .hero { padding: var(--space-2xl) 0 var(--space-xl); }
    .hero h1 { font-size: 2rem; }
    
    .hero-stats { gap: var(--space-lg); }
    .hero-stat-number { font-size: 1.3rem; }
    
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .categories-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    
    .footer-grid { grid-template-columns: 1fr; }
    
    .hero-search-box {
        flex-direction: column;
        padding: var(--space-sm);
        border-radius: var(--radius-lg);
    }
    .hero-search-box input { text-align: center; }
    .hero-search-btn { width: 100%; text-align: center; justify-content: center; }
    
    .section { padding: var(--space-2xl) 0; }
    .cta-box { padding: var(--space-2xl) var(--space-lg); }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.65rem; }
    .hero-stats { flex-direction: column; gap: var(--space-md); }
    .features-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .announcement-bar { font-size: 0.78rem; }
}

/* ============================================
   RTL ADJUSTMENTS
   ============================================ */
[dir="rtl"] {
    .tool-card-link i { transform: rotate(180deg); }
    .nav-link i { transform: none; }
}
