/* ==========================================================================
   الهنداوي للتكييف - تنسيقات صفحة المقالات والدليل الفني (blog.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. الهيدر الشفاف الفريد فوق سكشن الهيرو (Transparent Header)
   -------------------------------------------------------------------------- */
.blog-page .site-layout {
    position: relative;
}

.blog-transparent-header-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 850;
    pointer-events: none;
}

.blog-transparent-header-wrap > * {
    pointer-events: auto;
}

.blog-page .top-contact-bar {
    position: relative;
    z-index: 900;
    background-color: var(--color-dark, #000000);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-page .main-header.transparent-header {
    width: 100%;
    background-color: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
    padding: 16px 32px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .blog-page .main-header.transparent-header {
        padding: 12px 20px;
    }
}

/* عناصر الهيدر الشفاف في وضعه الأولي (ألوان ناصعة فوق صورة الهيرو) */
.blog-page .main-header.transparent-header .brand-logo-img {
    filter: none;
}

.blog-page .main-header.transparent-header .nav-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: none;
    font-weight: 600;
    transform-origin: center center;
    transition: color 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.blog-page .main-header.transparent-header .nav-link:hover {
    color: #ffffff;
    text-shadow: none;
    transform: scale(1.07);
}

.blog-page .main-header.transparent-header .nav-link.active {
    color: #ffffff;
    text-shadow: none;
}

.blog-page .main-header.transparent-header .nav-link.active:hover {
    transform: scale(1.07);
}

.blog-page .main-header.transparent-header .btn-book-service {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.blog-page .main-header.transparent-header .btn-book-service:hover {
    background: #ffffff;
    color: var(--color-dark);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.blog-page .main-header.transparent-header .nav-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.blog-page .main-header.transparent-header .nav-toggle-btn span {
    background-color: #ffffff;
}

/* --------------------------------------------------------------------------
   الهيدر عند التمرير لأسفل (Header Scrolled State)
   يتحول إلى لون الهيدر المفضل #E6EBF0 مع بلور وظل أنيق وثابت
   -------------------------------------------------------------------------- */
.blog-page .main-header.transparent-header.header-scrolled {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 950;
    background-color: #E6EBF0 !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 32px;
}

@media (max-width: 768px) {
    .blog-page .main-header.transparent-header.header-scrolled {
        padding: 10px 20px;
    }
}

.blog-page .main-header.transparent-header.header-scrolled .brand-logo-img {
    filter: none;
}

.blog-page .main-header.transparent-header.header-scrolled .nav-link {
    color: #45403c;
    text-shadow: none;
}

.blog-page .main-header.transparent-header.header-scrolled .nav-link:hover {
    color: var(--color-dark);
    text-shadow: none;
    transform: scale(1.07);
}

.blog-page .main-header.transparent-header.header-scrolled .nav-link.active {
    color: var(--color-dark);
    text-shadow: none;
}

.blog-page .main-header.transparent-header.header-scrolled .nav-link.active:hover {
    transform: scale(1.07);
}

.blog-page .main-header.transparent-header.header-scrolled .btn-book-service {
    background: var(--color-dark);
    color: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.blog-page .main-header.transparent-header.header-scrolled .btn-book-service:hover {
    background: var(--color-dark-hover);
    color: #ffffff;
}

.blog-page .main-header.transparent-header.header-scrolled .nav-toggle-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

.blog-page .main-header.transparent-header.header-scrolled .nav-toggle-btn span {
    background-color: var(--color-dark);
}


/* --------------------------------------------------------------------------
   2. سكشن الهيرو (Hero Section) - عرض كامل ونصف الشاشة
   -------------------------------------------------------------------------- */
.blog-hero-section {
    position: relative;
    width: 100%;
    min-height: 50vh;
    min-height: 50dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-dark, #000000);
    padding-top: 110px; /* تعويض ارتفاع الهيدر الشفاف */
    padding-bottom: 40px;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .blog-hero-section {
        min-height: 62vh;
        min-height: 62dvh;
        padding-top: 135px;
        padding-bottom: 65px;
    }
}

@media (min-width: 1400px) {
    .blog-hero-section {
        min-height: 65vh;
        min-height: 65dvh;
        padding-top: 150px;
        padding-bottom: 80px;
    }
}

@media (max-width: 768px) {
    .blog-hero-section {
        min-height: 48vh;
        min-height: 48dvh;
        padding-top: 95px;
        padding-bottom: 30px;
    }
}

/* طبقة صورة الخلفية وتأثير الزوم البطيء الهادئ */
.blog-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blog-hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    filter: brightness(0.86) contrast(1.06);
    transform: scale(1.02);
    transition: transform 12s ease;
}

.blog-hero-section:hover .blog-hero-bg-img {
    transform: scale(1.06);
}

/* طبقات تظليل سينمائية شفافة خفيفة تبرز تفاصيل الخلفية بوضوح مع إبقاء النصوص فائقة الوضوح */
.blog-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.70) 100%),
                radial-gradient(circle at center, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

/* محتوى الهيرو */
.blog-hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* الشارة العلوية - متطابقة 100% مع شارات ونقاط الصفحة الرئيسية */
.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    margin-bottom: 4px;
}

/* النقطة باللون الأزرق الملكي المعتمد للموقع الرئيسي بالكامل */
.blog-hero-badge .tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-royal-blue, #1705A5);
    display: inline-block;
    box-shadow: 0 0 8px rgba(23, 5, 165, 0.8), 0 0 14px rgba(23, 5, 165, 0.5);
}

/* عنوان الصفحة الرئيسي */
.blog-hero-title {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: clamp(2rem, 4.2vw, 3.25rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.25;
    margin: 0;
    text-shadow: none;
}

/* مسار التنقل (Breadcrumbs): الرئيسية - المقالات تحت العنوان */
.blog-breadcrumbs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 14.5px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    margin-top: 24px;
}

.blog-breadcrumbs a.breadcrumb-link {
    color: #6b635c; /* رمادي وأسود خفيف للصفحة السابقة التي يمكن العودة لها */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    transition: color 0.22s ease, transform 0.22s ease;
}

.blog-breadcrumbs a.breadcrumb-link:hover {
    color: var(--color-dark, #000000);
    transform: translateY(-1px);
}

.blog-breadcrumbs .breadcrumb-separator {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

/* نص الصفحة الحالية باللون الأسود الداكن المعتمد وليس الأزرق */
.blog-breadcrumbs .breadcrumb-current {
    color: var(--color-dark, #000000);
    font-weight: 800;
}

/* حركات الظهور الانسيابية */
@keyframes fadeInBlurDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeInBlurUp {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}


/* --------------------------------------------------------------------------
   3. سكشن المقالات الرئيسي (Main Articles Section)
   -------------------------------------------------------------------------- */
.blog-main-section {
    width: 100%;
    padding: 70px 24px 90px;
    background-color: var(--bg-warm);
    position: relative;
}

.blog-main-container {
    max-width: var(--container-max-width, 1400px);
    margin: 0 auto;
}

/* شريط البحث الفاخر والتحكم في المقالات */
.blog-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 45px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-search-wrap {
    flex: 1;
    max-width: 580px;
    min-width: 280px;
}

@media (max-width: 768px) {
    .blog-search-wrap {
        max-width: 100%;
    }

    .blog-control-actions-group {
        width: 100%;
        justify-content: space-between;
    }
}

.blog-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    padding: 4px 18px 4px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-search-box:focus-within {
    border-color: var(--color-royal-blue, #1705A5);
    box-shadow: 0 0 0 4px rgba(23, 5, 165, 0.12), 0 6px 20px rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

.blog-search-box .search-icon {
    font-size: 16px;
    color: var(--color-royal-blue, #1705A5);
    margin-left: 12px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.blog-search-box:focus-within .search-icon {
    transform: scale(1.1);
}

.blog-search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-dark, #000000);
    padding: 10px 0;
}

.blog-search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
    font-size: 14px;
}

.blog-search-clear {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.blog-search-clear:hover {
    background: var(--color-dark, #000000);
    color: #ffffff;
    transform: scale(1.08);
}

/* مجموعة أدوات التحكم الجانبية: الترتيب والإحصائية */
.blog-control-actions-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* صندوق اختيار ترتيب المقالات */
.blog-sort-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    padding: 7px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.blog-sort-box:focus-within {
    border-color: var(--color-royal-blue, #1705A5);
    box-shadow: 0 0 0 3px rgba(23, 5, 165, 0.12);
}

.blog-sort-box .sort-icon {
    color: var(--color-royal-blue, #1705A5);
    font-size: 13.5px;
}

.blog-sort-box .sort-label-text {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.blog-sort-select {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--color-dark, #000000);
    cursor: pointer;
    padding-left: 4px;
}

.blog-sort-select option {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-weight: 700;
    color: var(--color-dark, #000000);
    background: #ffffff;
}

.blog-stats-counter-info {
    font-size: 14.5px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-stats-counter-info strong {
    color: var(--color-dark);
    font-weight: 800;
}

/* حالة عدم وجود نتائج بحث */
.blog-empty-search-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px dashed rgba(0, 0, 0, 0.18);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.blog-empty-search-icon {
    font-size: 46px;
    color: #94a3b8;
    margin-bottom: 18px;
}

.blog-empty-search-title {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-dark, #000000);
    margin: 0 0 10px;
}

.blog-empty-search-desc {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 24px;
}

.btn-reset-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-royal-blue, #1705A5);
    color: #ffffff;
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(23, 5, 165, 0.25);
    transition: all 0.2s ease;
}

.btn-reset-search:hover {
    background: #110375;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(23, 5, 165, 0.35);
}


/* --------------------------------------------------------------------------
   4. شبكة المقالات (Articles 3-Column Grid)
   -------------------------------------------------------------------------- */
.articles-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 1080px) {
    .articles-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 680px) {
    .articles-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* كارت المقال الفاخر (Article Card) */
.article-card-box {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    cursor: pointer;
}

.article-card-box:focus-visible {
    outline: 2px solid var(--color-royal-blue, #1705A5);
    outline-offset: 4px;
}

.article-card-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.11);
    border-color: rgba(0, 0, 0, 0.18);
}

/* صورة المقال وحاويتها */
.article-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #000000;
}

.article-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.article-card-box:hover .article-thumb-img {
    transform: scale(1.07);
}

/* شارة التصنيف فوق الصورة */
.article-category-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

/* زمن القراءة فوق الصورة على اليسار */
.article-read-time {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.article-read-time i {
    color: var(--color-royal-blue, #1705A5);
    font-size: 11px;
}

/* محتوى المقال الداخلي */
.article-content-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.article-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.article-meta-date i {
    color: #94a3b8;
}

/* عنوان المقال */
.article-heading-title {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 18.5px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--color-dark);
    margin: 0 0 10px;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-box:hover .article-heading-title {
    color: var(--color-dark);
}

/* نبذة المقال المختصرة */
.article-excerpt-text {
    font-size: 14.5px;
    color: #55524e;
    line-height: 1.65;
    margin: 0 0 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ذيل الكارت وزر قراءة المقال */
.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto;
}

.article-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-dark);
    transition: all 0.2s ease;
}

.article-read-more-btn i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.article-card-box:hover .article-read-more-btn {
    color: var(--color-royal-blue, #1705A5);
}

.article-card-box:hover .article-read-more-btn i {
    transform: translateX(-4px);
}

.article-author-tag {
    font-size: 12px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}


/* --------------------------------------------------------------------------
   5. نظام الترقيم التفاعلي (Interactive Pagination Controls)
   -------------------------------------------------------------------------- */
.pagination-container-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 20px;
}

.pagination-controls-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 6px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 40px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.pagination-item {
    display: inline-block;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 30px;
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #45403c;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-dark);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--color-brand-blue, #1A479C);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--color-brand-blue-glow, rgba(26, 71, 156, 0.28));
    cursor: default;
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info-text {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 600;
}

/* أنيميشن تبديل المقالات بالبلور السلس */
.articles-cards-grid.animating {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
}

.articles-cards-grid.animated-in {
    animation: fadeCardsIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeCardsIn {
    from {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* سكشن دعوة الاتصال السريع أسفل المقالات (CTA banner) */
.blog-cta-banner {
    position: relative;
    margin-top: 70px;
    border-radius: 22px;
    overflow: hidden;
    padding: 48px 46px;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #0d1117;
}

/* طبقة صورة الخلفية وتأثير التكبير الانسيابي عند التحويم */
.blog-cta-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blog-cta-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    filter: brightness(0.92) contrast(1.06);
    transform: scale(1.01);
    transition: transform 10s ease;
}

.blog-cta-banner:hover .blog-cta-bg-img {
    transform: scale(1.05);
}

/* تدرج لوني غامق سينمائي متدرج من اليمين إلى اليسار بحيث تظهر الخلفية بوضوح في الشمال */
.blog-cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to left,
        rgba(13, 17, 23, 0.98) 0%,
        rgba(13, 17, 23, 0.94) 42%,
        rgba(13, 17, 23, 0.65) 68%,
        rgba(13, 17, 23, 0.18) 88%,
        rgba(13, 17, 23, 0.06) 100%
    );
    pointer-events: none;
}

/* محتوى السكشن: موضوع على اليمين فوق التعتيم */
.blog-cta-content {
    position: relative;
    z-index: 10;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* العنوان مقسم لسطرين أنيقين */
.blog-cta-title {
    font-family: 'Cairo', 'Almarai', sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 14px;
    color: #ffffff;
    line-height: 1.45;
}

.blog-cta-title span {
    display: block;
}

/* النص مقسم لسطرين */
.blog-cta-desc {
    font-size: 15.5px;
    color: #e2e8f0;
    margin: 0 0 26px;
    line-height: 1.7;
}

.blog-cta-desc span {
    display: block;
}

/* الزران موضوعان تحت العنوان والنص مباشرة */
.blog-cta-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-blog-call {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: var(--color-dark, #000000);
    font-weight: 800;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.btn-blog-call i {
    color: var(--color-royal-blue, #1705A5);
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-blog-call:hover {
    background: #f8fafc;
    color: var(--color-royal-blue, #1705A5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.30);
}

.btn-blog-call:hover i {
    transform: scale(1.15);
}

.btn-blog-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.22s ease;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}

.btn-blog-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.38);
}

/* التجاوب مع شاشات الموبايل والتابلت */
@media (max-width: 768px) {
    .blog-cta-banner {
        padding: 36px 22px;
        border-radius: 18px;
        margin-top: 50px;
    }

    .blog-cta-bg-img {
        object-position: center bottom;
    }

    .blog-cta-overlay {
        background: linear-gradient(
            to bottom,
            rgba(13, 17, 23, 0.98) 0%,
            rgba(13, 17, 23, 0.93) 60%,
            rgba(13, 17, 23, 0.45) 100%
        );
    }

    .blog-cta-title {
        font-size: 21px;
        margin-bottom: 12px;
    }

    .blog-cta-desc {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 22px;
    }

    .blog-cta-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-blog-call,
    .btn-blog-whatsapp {
        justify-content: center;
        width: 100%;
        padding: 12px 20px;
    }
}

/* ==========================================================================
   ظهور محتوى صفحة المقالات بالتتالي بطريقة البلور بعد التحميل (Blog Sequential Blur-In)
   ========================================================================== */
.blog-blur-item {
    opacity: 0;
    filter: blur(22px);
    -webkit-filter: blur(22px);
    transform: translateY(32px);
    transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-filter 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, filter, transform;
}

.blog-hero-badge.blog-blur-item {
    transform: translateY(-18px);
}

/* اكتمال الظهور عند تفعيل blog-revealed بالتتابع الزمني الملحوظ */
.blog-revealed .blog-blur-item {
    opacity: 1;
    filter: blur(0px);
    -webkit-filter: blur(0px);
    transform: translateY(0);
}

/* 1. الشارة العلوية */
.blog-revealed .blog-hero-badge.blog-blur-item {
    transition-delay: 0.12s;
}

/* 2. عنوان الصفحة الرئيسي (ظهور بارز ببلور سلس) */
.blog-revealed .blog-hero-title.blog-blur-item {
    transition-delay: 0.42s;
}

/* 3. أسماء الصفحات ومسار التنقل أسفل العنوان (الرئيسية - المقالات) */
.blog-revealed .blog-breadcrumbs.blog-blur-item {
    transition-delay: 0.76s;
}

/* 4. شريط البحث والتحكم */
.blog-revealed .blog-control-bar.blog-blur-item {
    transition-delay: 1.05s;
}

/* 5. ترقيم الصفحات */
.blog-revealed .pagination-container-wrap.blog-blur-item {
    transition-delay: 1.45s;
}

/* كروت المقالات بالتتالي بطريقة البلور */
.blog-blur-card {
    opacity: 0;
    filter: blur(16px);
    -webkit-filter: blur(16px);
    transform: translateY(26px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--cards-base-delay, 0.52s) + var(--card-index, 0) * 0.08s);
    will-change: opacity, filter, transform;
}

.blog-revealed .blog-blur-card,
.cards-revealed .blog-blur-card {
    opacity: 1;
    filter: blur(0px);
    -webkit-filter: blur(0px);
    transform: translateY(0);
}

/* إزالة الفلتر تماماً بعد انتهاء الحركات للحفاظ على النقاء التام للخطوط وتأثيرات التحويم */
.blog-animation-complete .blog-blur-item,
.blog-animation-complete .blog-blur-card {
    filter: none !important;
    -webkit-filter: none !important;
    will-change: auto !important;
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .blog-blur-item,
    .blog-blur-card {
        opacity: 1 !important;
        filter: none !important;
        -webkit-filter: none !important;
        transform: none !important;
        transition: none !important;
    }
}

