/* =========================================
   ملف التصميم الشامل والمصحح - OutilsFlash
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* الخطوط الافتراضية */
body { background-color: #f4f7f6; color: #333; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; -webkit-tap-highlight-color: transparent; }
[dir="rtl"] body { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }

/* ================= HEADER ================= */
header { background-color: #2c3e50; color: white; padding: 12px 2vw; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 24px; font-weight: bold; color: #f1c40f; white-space: nowrap; }
.logo span { color: white; }
.menu-toggle { display: none; font-size: 28px; cursor: pointer; color: white; user-select: none; }

nav { transition: all 0.3s ease; }
nav ul { list-style: none; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
nav ul li a { color: white; font-weight: 500; padding: 7px 9px; border-radius: 6px; transition: background 0.3s; font-size: 13.5px; display: block; white-space: nowrap; }
nav ul li a:hover, nav ul li a.active { background-color: #34495e; }
nav ul li i { margin-right: 5px; }
[dir="rtl"] nav ul li i { margin-left: 5px; margin-right: 0; }

.lang-switch { background-color: #f1c40f; color: #2c3e50 !important; font-weight: bold !important; }
.lang-switch:hover { background-color: #d4ac0d !important; }

/* إضافة ذكية لشاشات اللابتوب المتوسطة (iPad Pro وغيرها) */
@media (max-width: 1200px) and (min-width: 769px) {
    header { flex-direction: column; justify-content: center; padding: 15px 2vw; gap: 15px; }
}
/* ================= الصفحة الرئيسية (Home) ================= */
.hero { text-align: center; padding: 50px 20px; background: white; border-bottom: 1px solid #eaeaea; }
.hero h1 { color: #2c3e50; margin-bottom: 15px; font-size: clamp(24px, 5vw, 36px); font-weight: 800;}
.hero p { color: #7f8c8d; font-size: clamp(15px, 3vw, 18px); max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* حاوية الصفحة الرئيسية (بدون خلفية بيضاء) */
.container { max-width: 1200px; margin: 40px auto; padding: 0 15px; }

.category-section { margin-bottom: 50px; scroll-margin-top: 80px; }
.section-title { margin-bottom: 20px; color: #2c3e50; border-bottom: 3px solid #3498db; padding-bottom: 8px; display: inline-block; font-size: 22px; font-weight: bold;}
.section-title i { margin-right: 8px; }
[dir="rtl"] .section-title i { margin-left: 8px; margin-right: 0; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.card { background: white; padding: 25px 20px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s; border-top: 4px solid #3498db; display: flex; flex-direction: column; text-align: center; }
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.card-icon { font-size: 38px; margin-bottom: 15px; }
.card h3 { color: #2c3e50; margin-bottom: 10px; font-size: 19px; font-weight: bold;}
.card p { color: #7f8c8d; font-size: 14px; margin-bottom: 20px; line-height: 1.5; flex-grow: 1; }

/* ================= صفحات الأدوات الفردية (Tools Pages) ================= */
/* هذه الحاوية مخصصة لصفحات الأدوات لتعطيها المربع الأبيض الكبير */
.tool-container { max-width: 800px; margin: 50px auto; padding: 30px; background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; }
.tool-container .tool-icon { font-size: 50px; margin-bottom: 15px; }
.tool-container h1 { color: #2c3e50; font-size: 24px; margin-bottom: 10px; font-weight: bold;}
.tool-container p.desc { color: #7f8c8d; font-size: 15px; margin-bottom: 25px; }

/* أزرار الأدوات */
.btn { background: #3498db; color: white; padding: 12px 15px; border-radius: 8px; font-weight: bold; transition: background 0.3s; font-size: 15px; width: 100%; display: block; text-align: center; border: none; cursor: pointer; }
.btn:hover { filter: brightness(90%); }

.ad-space { background: #f8f9fa; border: 1px solid #ddd; color: #aaa; padding: 20px; margin-bottom: 25px; font-size: 14px; border-radius: 8px; text-align: center; }

/* ================= SEO FAQ ================= */
.seo-content { max-width: 800px; margin: 40px auto; padding: 30px; background: white; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: left; }
[dir="rtl"] .seo-content { text-align: right; border-right: 5px solid; border-left: none !important; }
.seo-content h2 { color: #2c3e50; font-size: 22px; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; font-weight: bold;}
.faq-item { margin-bottom: 20px; }
.faq-item h3 { color: #34495e; font-size: 17px; margin-bottom: 8px; font-weight: bold;}
.faq-item p { color: #7f8c8d; font-size: 15px; line-height: 1.6; }

/* ================= FOOTER ================= */
footer { text-align: center; padding: 40px 20px 20px; background: #2c3e50; color: white; margin-top: 50px; }
.social-share { margin-bottom: 30px; }
.social-share p { color: #bdc3c7; margin-bottom: 15px; font-size: 15px; font-weight: bold; }
.social-icons { display: flex; justify-content: center; gap: 15px; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: white; text-decoration: none; font-size: 18px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.social-icon:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); color: white;}
.tiktok { background-color: #000000; }
.youtube { background-color: #FF0000; }
.facebook { background-color: #1877F2; }
.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.footer-links { display: flex; justify-content: center; gap: 25px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: #bdc3c7; font-size: 14px; font-weight: 500;}
.footer-links a:hover { color: #3498db; text-decoration: underline; }
.footer-copy { font-size: 13px; color: #7f8c8d; border-top: 1px solid #34495e; padding-top: 15px; }

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px) {
    header { padding: 15px 20px; }
    .menu-toggle { display: block; }
    nav { width: 100%; display: none; margin-top: 15px; }
    nav.active { display: block; }
    nav ul { flex-direction: column; gap: 5px; align-items: stretch; }
    nav ul li a { background-color: #34495e; text-align: center; }
    .tools-grid { grid-template-columns: 1fr; }
    .hero { padding: 40px 15px; }
    .tool-container, .seo-content { margin: 20px; padding: 20px; }
}