﻿/* ===== ??????? CSS ??????? ===== */
:root {
    --blog-primary-color: #FEC800;
    --blog-primary-dark: #E6B300;
    --blog-primary-light: #FFD700;
    --blog-secondary-color: #007ACC;
    --blog-accent-color: #17A2B8;
    --blog-dark-color: #1a1a1a;
    --blog-light-color: #ffffff;
    --blog-text-primary: #333333;
    --blog-text-secondary: #666666;
    --blog-text-light: #999999;
    --blog-bg-light: #f8f9fa;
    --blog-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
    --blog-shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
    --blog-shadow-heavy: 0 15px 45px rgba(0, 0, 0, 0.2);
    --blog-gradient-primary: linear-gradient(135deg, var(--blog-primary-color) 0%, var(--blog-primary-light) 100%);
    --blog-gradient-hero: linear-gradient(135deg, #6F42C1 0%, #007ACC 100%);
    --blog-border-radius: 15px;
    --blog-transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== ????? ??? ?????? ===== */
.blog-page {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--blog-text-primary);
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ???? ????? ??????? ===== */
.blog-hero {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('/images/hero1.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    padding: 120px 0 80px;
    color: white;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="blogDots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23blogDots)"/></svg>');
    animation: blogFloatingPattern 20s linear infinite;
}

@keyframes blogFloatingPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-20px) translateY(-20px); }
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-subtitle {
    font-size: 1.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: blogFadeInUp 0.8s ease forwards;
}

.blog-hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 0%, var(--blog-primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: blogFadeInUp 0.8s ease 0.2s forwards;
}

.blog-hero-description {
    font-size: 1.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: blogFadeInUp 0.8s ease 0.4s forwards;
}

.blog-hero-search {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    opacity: 0;
    transform: translateY(30px);
    animation: blogFadeInUp 0.8s ease 0.6s forwards;
}

.blog-search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blog-text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.blog-search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(254, 200, 0, 0.3);
}

.blog-search-btn {
    background: var(--blog-gradient-primary);
    color: var(--blog-dark-color);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.blog-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 200, 0, 0.4);
}

@keyframes blogFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ??? ???????? ===== */
.blog-articles-section {
    padding: 80px 0;
    background: var(--blog-bg-light);
}

.blog-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--blog-text-primary);
    margin-bottom: 20px;
    position: relative;
}

.blog-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--blog-gradient-primary);
    border-radius: 2px;
}

.blog-section-subtitle {
    font-size: 1.8rem;
    color: var(--blog-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== ????? ???????? ===== */
.blog-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 15px;
}

.blog-filter-btn {
    background: white;
    color: var(--blog-text-secondary);
    border: 2px solid transparent;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--blog-transition);
    white-space: nowrap;
}

.blog-filter-btn.active,
.blog-filter-btn:hover {
    background: var(--blog-gradient-primary);
    color: var(--blog-dark-color);
    border-color: var(--blog-primary-color);
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-light);
}

/* ===== ???? ???????? ===== */
.blog-articles-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* دائماً 3 أعمدة */
    gap: 30px;
    margin-bottom: 60px;
    /* تأكد من أن العناصر تبقى في حجمها الطبيعي حتى لو كان هناك عنصر واحد */
    justify-items: start; /* العناصر تبدأ من اليمين */
}

.blog-article-card {
    background: white;
    border-radius: var(--blog-border-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow-light);
    transition: var(--blog-transition);
    transform: translateY(0);
    opacity: 1; /* مرئي دائماً */
    display: block; /* ظاهر دائماً */
    visibility: visible; /* مرئي دائماً */
    animation: none; /* لا رسوم متحركة تمنع الظهور */
    width: 100% !important;
    max-width: 400px !important;
    position: relative; /* وضع طبيعي */
}

.blog-article-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--blog-shadow-heavy);
}

.blog-article-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

.blog-article-card[style*="display: block"] {
    opacity: 1;
    transform: scale(1);
}

@keyframes blogCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--blog-transition);
}

.blog-article-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(111, 66, 193, 0.85),
        rgba(254, 200, 0, 0.85)
    );
    opacity: 0;
    transition: var(--blog-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-article-card:hover .blog-card-overlay {
    opacity: 1;
}

.blog-read-more-btn {
    background: white;
    color: var(--blog-primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.4rem;
    transition: var(--blog-transition);
    transform: translateY(20px);
    box-shadow: var(--blog-shadow-medium);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-article-card:hover .blog-read-more-btn {
    transform: translateY(0);
}

.blog-read-more-btn:hover {
    background: var(--blog-primary-color);
    color: white;
    transform: scale(1.05);
}

.blog-category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blog-text-primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.blog-card-content {
    padding: 25px;
}

.blog-article-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blog-text-primary);
    margin-bottom: 15px;
    line-height: 1.4;
    height: 70px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-article-title a:hover {
    color: var(--blog-primary-color);
}

.blog-article-excerpt {
    color: var(--blog-text-secondary);
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 65px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.blog-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 1.3rem;
    color: var(--blog-text-light);
}

.blog-article-date,
.blog-article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-article-meta i {
    font-size: 1.6rem;
    color: var(--blog-primary-color);
}

/* ===== ?????? (Pagination) ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.blog-pagination-btn {
    background: white;
    color: var(--blog-text-secondary);
    border: 2px solid #e0e0e0;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--blog-transition);
    min-width: 45px;
    text-align: center;
}

.blog-pagination-btn.active,
.blog-pagination-btn:hover {
    background: var(--blog-gradient-primary);
    color: var(--blog-dark-color);
    border-color: var(--blog-primary-color);
    transform: translateY(-2px);
}

/* ===== ?????? ???????? ===== */
.blog-newsletter-section {
    background: var(--blog-dark-color);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="newsletterPattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="rgba(254,200,0,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23newsletterPattern)"/></svg>');
    opacity: 0.5;
}

.blog-newsletter-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.blog-newsletter-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, white 0%, var(--blog-primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-newsletter-description {
    font-size: 1.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
}

.blog-newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 450px;
    margin: 0 auto;
}

.blog-newsletter-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blog-text-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.blog-newsletter-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(254, 200, 0, 0.3);
}

.blog-newsletter-btn {
    background: var(--blog-gradient-primary);
    color: var(--blog-dark-color);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.blog-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 200, 0, 0.4);
}

/* ===== ??????? ??????? ???????? ===== */
@media (max-width: 1024px) {
    .blog-articles-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* عمودين للشاشات المتوسطة */
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 0 60px;
        min-height: 50vh;
    }

    .blog-hero-search {
        flex-direction: column;
        gap: 15px;
    }

    .blog-search-input,
    .blog-search-btn {
        width: 100%;
    }

    .blog-articles-grid {
        grid-template-columns: 1fr !important; /* عمود واحد للشاشات الصغيرة */
        gap: 25px;
        justify-items: center; /* توسيط العناصر في الشاشات الصغيرة */
    }

    .blog-article-card {
        margin-bottom: 20px;
        max-width: none !important; /* إلغاء الحد الأقصى للعرض في الشاشات الصغيرة */
        width: 100% !important;
    }

    .blog-card-content {
        padding: 20px;
    }

    .blog-article-title {
        font-size: 1.6rem;
        height: auto;
        -webkit-line-clamp: unset;
    }

    .blog-article-excerpt {
        height: auto;
        -webkit-line-clamp: unset;
    }

    .blog-article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .blog-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .blog-newsletter-form {
        flex-direction: column;
        gap: 15px;
    }

    .blog-newsletter-input,
    .blog-newsletter-btn {
        width: 100%;
    }

    .blog-pagination {
        gap: 8px;
    }

    .blog-pagination-btn {
        padding: 10px 14px;
        font-size: 1.3rem;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 80px 0 50px;
    }

    .blog-articles-section {
        padding: 60px 0;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-article-title {
        font-size: 1.5rem;
    }

    .blog-article-excerpt {
        font-size: 1.3rem;
    }

    .blog-container {
        padding: 0 15px;
    }

    .blog-newsletter-section {
        padding: 60px 0;
    }
}

/* ===== ??????? ?????? ===== */
.blog-article-card:nth-child(even) {
    animation-delay: 0.1s;
}

.blog-article-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* ????? ??????? */
.blog-loading {
    opacity: 0.6;
    pointer-events: none;
}

.blog-loading .blog-article-card {
    animation: blogPulse 1.5s ease-in-out infinite;
}

@keyframes blogPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* تحسينات إضافية للفلترة */
.blog-article-card {
    transition: var(--blog-transition), opacity 0.3s ease, transform 0.3s ease;
}

.blog-article-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

.blog-article-card[style*="display: block"] {
    opacity: 1;
    transform: scale(1);
}

/* ضمان أن العناصر المخفية لا تؤثر على layout */
.blog-articles-grid .blog-article-card:not([style*="display: block"]):not([style*="display: inline"]):not([style=""]) {
    display: none !important;
}

/* إضافة خصائص أمان إضافية لمنع التمدد */
.blog-articles-grid {
    align-items: start;
    justify-content: start;
}

.blog-article-card {
    min-width: 0; /* منع overflow في flex/grid */
    flex-shrink: 0;
    box-sizing: border-box;
}

/* تأكد من ظهور المقالات عند تحميل الصفحة */
.blog-articles-grid .blog-article-card {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    position: relative !important;
}

/* تأكد من ظهور المقالات عند تحميل الصفحة - بروتوكول أمان */
.blog-page .blog-articles-grid .blog-article-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    position: relative !important;
}

/* إزالة أي خصائص CSS قد تخفي العناصر */
.blog-articles-grid > * {
    display: block !important;
    visibility: visible !important;
}

/* حماية إضافية للمقالات */
article.blog-article-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* إزالة أي animations افتراضية قد تخفي العناصر */
.blog-article-card:not(.filtered) {
    animation: none !important;
    opacity: 1 !important;
    display: block !important;
}

/* حماية من أي selectors أخرى */
.blog-articles-section .blog-article-card,
.blog-container .blog-article-card,
main .blog-article-card {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* إعادة تعريف أي خصائص قد تخفي العناصر */
.blog-article-card {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
}

/* فقط عند الفلترة نطبق الإخفاء */
.blog-article-card.hidden-by-filter {
    display: none !important;
}

.blog-article-card:not(.hidden-by-filter) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== زر عرض المقال الجديد ===== */
.blog-article-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* استايل الزر المتطابق مع باقي الموقع */
.kdn-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    flex: 1;
    justify-content: center;
}

.kdn-btn-primary {
    background: linear-gradient(135deg, #FEC800, #ffd12d);
    color: white;
    box-shadow: 0 4px 15px rgba(254, 200, 0, 0.3);
}

.kdn-btn-primary:hover {
    background: linear-gradient(135deg, #ffd12d, #FFE55C);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 200, 0, 0.4);
    text-decoration: none;
}

.kdn-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(254, 200, 0, 0.3);
}

/* زر ثانوي لنسخ الرابط */
.kdn-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.kdn-btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #6c757d);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
    text-decoration: none;
}

.kdn-btn.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.kdn-btn.disabled:hover {
    background: #ccc;
    color: #666;
    transform: none;
    box-shadow: none;
}

.kdn-btn i {
    font-size: 1.1em;
}

/* تحسين تصميم بطاقة المقال */
.blog-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(254, 200, 0, 0.2);
}

.blog-card-content {
    padding: 24px;
}

.blog-article-title a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-article-title a:hover {
    color: #FEC800;
    text-decoration: none;
}

.blog-article-excerpt {
    color: #666;
    line-height: 1.6;
    margin: 12px 0 16px;
}

.blog-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0;
}

.blog-article-date,
.blog-article-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* تحسين overlay الخاص بـ hover */
.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card-image:hover .blog-card-overlay {
    opacity: 1;
}

.blog-read-more-btn {
    background: #FEC800;
    color: #1a1a1a;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.blog-read-more-btn:hover {
    background: #ffd12d;
    color: #1a1a1a;
    text-decoration: none;
    transform: scale(1.05);
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .blog-article-actions {
        margin-top: 15px;
        padding-top: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .kdn-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .kdn-btn {
        padding: 8px 16px;
        font-size: 1rem;
    }
    
    .blog-card-content {
        padding: 16px;
    }
    
    .blog-article-actions {
        margin-top: 12px;
        padding-top: 10px;
    }
}










/* موبايل فقط */
/* وصولية */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0
}

/* الوضع الافتراضي: الدِسك توب */
.filters-desktop {
    display: flex
}

.blog-filters-dropdown {
    display: none
}

/* ستايل الـ Dropdown (مربع + النص بالمنتصف) */
.blog-filter-select {
    direction: rtl;
    width: 100%;
    max-width: 420px;
    padding: 12px 16px;
    border: 2px solid var(--blog-primary-color, #FEC800);
    border-radius: 12px;
    background: #fff;
    color: var(--blog-text-secondary, #666);
    font-size: 1.4rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    text-align-last: center;
    -moz-text-align-last: center;
    appearance: none;
    -webkit-appearance: none;
    /* سهم لليمين */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23FEC800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) 50%;
    background-size: 22px;
}

    .blog-filter-select:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(254,200,0,.25)
    }

/* الموبايل: أخفِ الأزرار وأظهر dropdown */
@media (max-width:768px) {
    .blog-filters, .filters-desktop {
        display: none !important;
    }

    .blog-filters-dropdown {
        display: flex !important;
        justify-content: center;
        margin-top: -8px;
        margin-bottom: 22px;
    }
}

/* فلترة "قوية" تتغلب على أي !important قديم */
.blog-article-card.hidden-by-filter {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}