/* === FORCE LOGO SIZE SITEWIDE === */
header.main-header .logo-title-container{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
}
header.main-header .container .navbar .logo-title-container img.site-logo{
  height: 96px !important;
  width: auto !important;
  max-height: none !important;
  display:block !important;
}
header.main-header .navbar{ min-height: 96px !important; }
header.main-header .site-title{
  font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem) !important;
  line-height: 1.1 !important;
}
@media (max-width: 768px){
  header.main-header .container .navbar .logo-title-container img.site-logo{ height: 72px !important; }
  header.main-header .navbar{ min-height: 72px !important; }
}


/* --- MYPDFTOOLS Brand Style --- */
.site-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800 !important; /* خط عريض جداً */
    font-size: 1.5rem !important;
    text-transform: uppercase; /* حروف كبيرة */
    letter-spacing: 1px; /* تباعد بين الحروف */
    
    /* تأثير اللمعان المتحرك */
    background: linear-gradient(to right, #ffffff 0%, #93c5fd 50%, #ffffff 100%);
    background-size: 200% auto;
    color: #fff; /* لون احتياطي */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    
    /* ظل خفيف للقراءة */
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* حركة اللمعان */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* تحسين ظهور الشعار */
.logo-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}
.logo-title-container:hover {
    transform: scale(1.02); /* تكبير بسيط عند المرور */
}

/* =========================================
   DARK MODE STYLES (FIXED & POLISHED)
   ========================================= */

/* زر التبديل */
.theme-toggle-btn {
    position: fixed; bottom: 20px; left: 20px; width: 50px; height: 50px;
    background: #2563eb; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999; border: 2px solid #fff; transition: transform 0.3s;
}
.theme-toggle-btn:hover { transform: scale(1.1); background: #1d4ed8; }

/* --- الألوان الأساسية للوضع المظلم --- */
body.dark-mode {
    background-color: #0f172a !important; /* لون موحد للصفحة */
    color: #e2e8f0 !important;
}

/* إصلاح منطقة الهيرو (Hero Section) */
body.dark-mode .hero {
    /* تدرج أزرق غامق جداً بدلاً من الأبيض */
    background: linear-gradient(180deg, #0f172a 0%, #1e3a8a 100%) !important;
    border-bottom: 1px solid #1e293b;
}
body.dark-mode .hero h1 {
    background: linear-gradient(to right, #60a5fa, #93c5fd) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* توحيد خلفيات الأقسام لإزالة الأشرطة */
body.dark-mode .pro-tool-section,
body.dark-mode .featured-tools,
body.dark-mode .all-tools,
body.dark-mode .features,
body.dark-mode section {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

/* البطاقات (Cards) */
body.dark-mode .tool-card,
body.dark-mode .feature-card,
body.dark-mode .related-card,
body.dark-mode .tool-card-sm {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2) !important;
}

/* إزالة الشريط الداكن (الحدود) */
body.dark-mode .tool-category h3 {
    border-bottom-color: #334155 !important; /* جعل الخط بلون هادئ */
    color: #f8fafc !important;
}

/* النصوص */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4,
body.dark-mode .section-title {
    color: #f8fafc !important;
}
body.dark-mode p {
    color: #cbd5e1 !important;
}

/* أيقونات الأدوات في الوضع المظلم */
body.dark-mode .tool-icon {
    background-color: #334155 !important;
}
body.dark-mode .tool-icon i {
    color: #60a5fa !important; /* أزرق فاتح للأيقونات */
}

/* الفوتر */
body.dark-mode .main-footer {
    background-color: #020617 !important;
    border-top: 1px solid #1e293b;
}

/* مربع البحث */
body.dark-mode .search-box input {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #fff !important;
}

/* =========================================
   FIX: CLEANER ICONS & REMOVE DARK BARS
   ========================================= */

/* 1. إزالة الخط (الشريط) الموجود تحت عناوين الأقسام */
body.dark-mode .tool-category h3 {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* 2. جعل خلفية الأيقونة شفافة تماماً (بدون دائرة داكنة) */
body.dark-mode .tool-icon,
body.dark-mode .related-icon,
body.dark-mode .step-num {
    background-color: transparent !important;
    /* إضافة إطار خفيف جداً وجميل بدلاً من الخلفية المصمتة */
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

/* 3. جعل لون الأيقونة مضيئاً ليعوض غياب الخلفية */
body.dark-mode .tool-icon i,
body.dark-mode .related-icon i {
    color: #60a5fa !important; /* أزرق سماوي مشع */
    filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.3)); /* توهج خفيف */
}

/* 4. إزالة أي حدود داكنة قاسية من البطاقات */
body.dark-mode .tool-card,
body.dark-mode .related-card {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* ==================================================
   FINAL FIX: Remove Icon Rectangles & Borders
   ================================================== */

body.dark-mode .tool-icon,
body.dark-mode .related-icon,
body.dark-mode .step-num,
body.dark-mode .step-icon {
    background: transparent !important; /* إزالة الخلفية */
    border: none !important;            /* إزالة المستطيل (الإطار) */
    box-shadow: none !important;        /* إزالة الظل */
}

/* تكبير الأيقونة قليلاً لتعويض غياب الخلفية وجعلها تلمع */
body.dark-mode .tool-icon i,
body.dark-mode .related-icon i,
body.dark-mode .step-icon {
    font-size: 2.5rem !important;
    color: #60a5fa !important;
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.6)); /* توهج نيون */
}

/* إزالة الخطوط الفاصلة تحت العناوين في الوضع المظلم */
body.dark-mode .tool-category h3 {
    border-bottom: none !important;
}

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: -200px; /* مخفي في البداية */
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid #e2e8f0;
    z-index: 10000; /* أعلى من كل شيء */
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* حالة الظهور */
.cookie-banner.show {
    bottom: 20px;
}

.cookie-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.cookie-text a {
    color: #2563eb;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.cookie-accept {
    background: #2563eb;
    color: white;
}
.cookie-accept:hover { background: #1d4ed8; }

.cookie-close {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.cookie-close:hover { background: #f1f5f9; }

/* --- دعم الوضع المظلم --- */
body.dark-mode .cookie-banner {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .cookie-text { color: #cbd5e1; }
body.dark-mode .cookie-close {
    border-color: #475569;
    color: #cbd5e1;
}
body.dark-mode .cookie-close:hover { background: #334155; }

/* --- Blog Styles --- */
.blog-section { padding: 80px 0; background: #f8fafc; min-height: 80vh; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

.blog-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; transition: 0.3s; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: #2563eb; }

.blog-thumb { height: 200px; background: #e0f2fe; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-thumb i { font-size: 4rem; color: #2563eb; opacity: 0.8; }
.blog-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.85rem; color: #64748b; margin-bottom: 10px; display: block; }
.blog-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; line-height: 1.4; }
.blog-excerpt { color: #475569; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.read-more { color: #2563eb; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.read-more:hover { gap: 8px; }

/* Single Article Styles */
.article-container { max-width: 800px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 5px 25px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.article-header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid #f1f5f9; padding-bottom: 30px; }
.article-header h1 { font-size: 2.5rem; color: #1e293b; margin-bottom: 15px; line-height: 1.3; }
.article-body { font-size: 1.1rem; line-height: 1.8; color: #334155; }
.article-body h2 { font-size: 1.8rem; color: #1e293b; margin-top: 40px; margin-bottom: 15px; }
.article-body p { margin-bottom: 20px; }
.article-body ul { margin-bottom: 20px; padding-left: 20px; }
.article-body li { margin-bottom: 10px; }

/* CTA Box inside Article */
.tool-cta { background: #eff6ff; border: 2px dashed #2563eb; padding: 30px; border-radius: 15px; text-align: center; margin: 40px 0; }
.tool-cta h3 { color: #1e40af; margin-bottom: 10px; }
.cta-button { background: #2563eb; color: white; padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; display: inline-block; transition: 0.2s; }
.cta-button:hover { background: #1d4ed8; transform: translateY(-2px); }

/* Dark Mode */
body.dark-mode .blog-section { background: #0f172a; }
body.dark-mode .blog-card, body.dark-mode .article-container { background: #1e293b; border-color: #334155; }
body.dark-mode .blog-title, body.dark-mode .article-header h1, body.dark-mode .article-body h2 { color: #f8fafc; }
body.dark-mode .blog-excerpt, body.dark-mode .article-body { color: #cbd5e1; }
body.dark-mode .blog-thumb { background: #172554; }
body.dark-mode .tool-cta { background: #172554; border-color: #60a5fa; }
body.dark-mode .tool-cta h3 { color: #bfdbfe; }

/* --- Blog Styles --- */
.blog-section { padding: 80px 0; background: #f8fafc; min-height: 80vh; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

.blog-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; transition: 0.3s; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: #2563eb; }

.blog-thumb { height: 200px; background: #e0f2fe; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-thumb i { font-size: 4rem; color: #2563eb; opacity: 0.8; }
.blog-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.85rem; color: #64748b; margin-bottom: 10px; display: block; }
.blog-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; line-height: 1.4; }
.blog-excerpt { color: #475569; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.read-more { color: #2563eb; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.read-more:hover { gap: 8px; }

/* Single Article Styles */
.article-container { max-width: 800px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 5px 25px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.article-header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid #f1f5f9; padding-bottom: 30px; }
.article-header h1 { font-size: 2.5rem; color: #1e293b; margin-bottom: 15px; line-height: 1.3; }
.article-body { font-size: 1.1rem; line-height: 1.8; color: #334155; }
.article-body h2 { font-size: 1.8rem; color: #1e293b; margin-top: 40px; margin-bottom: 15px; }
.article-body p { margin-bottom: 20px; }
.article-body ul { margin-bottom: 20px; padding-left: 20px; }
.article-body li { margin-bottom: 10px; }

/* CTA Box inside Article */
.tool-cta { background: #eff6ff; border: 2px dashed #2563eb; padding: 30px; border-radius: 15px; text-align: center; margin: 40px 0; }
.tool-cta h3 { color: #1e40af; margin-bottom: 10px; }
.cta-button { background: #2563eb; color: white; padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; display: inline-block; transition: 0.2s; }
.cta-button:hover { background: #1d4ed8; transform: translateY(-2px); }

/* Dark Mode */
body.dark-mode .blog-section { background: #0f172a; }
body.dark-mode .blog-card, body.dark-mode .article-container { background: #1e293b; border-color: #334155; }
body.dark-mode .blog-title, body.dark-mode .article-header h1, body.dark-mode .article-body h2 { color: #f8fafc; }
body.dark-mode .blog-excerpt, body.dark-mode .article-body { color: #cbd5e1; }
body.dark-mode .blog-thumb { background: #172554; }
body.dark-mode .tool-cta { background: #172554; border-color: #60a5fa; }
body.dark-mode .tool-cta h3 { color: #bfdbfe; }


/* --- Blog Styles --- */
.blog-section { padding: 80px 0; background: #f8fafc; min-height: 80vh; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }

.blog-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; transition: 0.3s; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: #2563eb; }

.blog-thumb { height: 200px; background: #e0f2fe; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.blog-thumb i { font-size: 4rem; color: #2563eb; opacity: 0.8; }
.blog-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.85rem; color: #64748b; margin-bottom: 10px; display: block; }
.blog-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 10px; line-height: 1.4; }
.blog-excerpt { color: #475569; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.read-more { color: #2563eb; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.read-more:hover { gap: 8px; }

/* Single Article Styles */
.article-container { max-width: 800px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 20px; box-shadow: 0 5px 25px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
.article-header { text-align: center; margin-bottom: 40px; border-bottom: 1px solid #f1f5f9; padding-bottom: 30px; }
.article-header h1 { font-size: 2.5rem; color: #1e293b; margin-bottom: 15px; line-height: 1.3; }
.article-body { font-size: 1.1rem; line-height: 1.8; color: #334155; }
.article-body h2 { font-size: 1.8rem; color: #1e293b; margin-top: 40px; margin-bottom: 15px; }
.article-body p { margin-bottom: 20px; }
.article-body ul { margin-bottom: 20px; padding-left: 20px; }
.article-body li { margin-bottom: 10px; }

/* CTA Box inside Article */
.tool-cta { background: #eff6ff; border: 2px dashed #2563eb; padding: 30px; border-radius: 15px; text-align: center; margin: 40px 0; }
.tool-cta h3 { color: #1e40af; margin-bottom: 10px; }
.cta-button { background: #2563eb; color: white; padding: 12px 30px; border-radius: 30px; text-decoration: none; font-weight: 600; display: inline-block; transition: 0.2s; }
.cta-button:hover { background: #1d4ed8; transform: translateY(-2px); }

/* =========================================
   MAGIC SHARE SECTION (Animated)
   ========================================= */
.share-magic-box {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0; 
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.5s; 
}
.share-magic-box:hover { border-color: #3b82f6; box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1); transform: translateY(-5px); }

.share-header { font-size: 1.4rem; font-weight: 800; color: #1e293b; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.heart-beat { color: #ef4444; animation: heartBeat 1.5s infinite; font-size: 1.5rem; }

.share-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

.social-pill {
    display: flex; align-items: center; gap: 8px; padding: 10px 25px; border-radius: 50px;
    color: white !important; font-weight: 600; text-decoration: none; font-size: 1rem;
    transition: all 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.social-pill:hover { transform: scale(1.1); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

.bg-fb { background: #1877f2; }
.bg-wa { background: #25d366; }
.bg-tw { background: #000000; }
.bg-in { background: #0077b5; }
.bg-copy { background: #475569; cursor: pointer; }

@keyframes heartBeat {
    0% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); }
    42% { transform: scale(1.3); } 70% { transform: scale(1); }
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* =========================================
   COOKIE CONSENT BANNER
   ========================================= */
.cookie-banner {
    position: fixed; bottom: -200px; left: 20px; right: 20px; max-width: 500px;
    background: #ffffff; padding: 20px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border: 1px solid #e2e8f0; z-index: 10000; display: flex; flex-direction: column; gap: 15px;
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.cookie-banner.show { bottom: 20px; }
.cookie-text { font-size: 0.9rem; color: #334155; line-height: 1.5; }
.cookie-text a { color: #2563eb; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-btn { padding: 8px 20px; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none; transition: 0.2s; }
.cookie-accept { background: #2563eb; color: white; }
.cookie-accept:hover { background: #1d4ed8; }
.cookie-close { background: transparent; color: #64748b; border: 1px solid #cbd5e1; }
.cookie-close:hover { background: #f1f5f9; }

/* Dark Mode */
body.dark-mode .share-magic-box { background: #1e293b; border-color: #334155; }
body.dark-mode .share-header { color: #fff; }
body.dark-mode .cookie-banner { background: #1e293b; border-color: #334155; }
body.dark-mode .cookie-text { color: #cbd5e1; }
body.dark-mode .cookie-close { border-color: #475569; color: #cbd5e1; }
body.dark-mode .cookie-close:hover { background: #334155; }
/* Brand Title Shine */
.site-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.5rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff 0%, #93c5fd 50%, #ffffff 100%);
    background-size: 200% auto;
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
@keyframes shine { to { background-position: 200% center; } }
.logo-title-container { display: flex; align-items: center; gap: 10px; transition: transform 0.3s; }
.logo-title-container:hover { transform: scale(1.02); }
