/* 🐱 مدونة كات شوب - ملف التنسيقات المخصص */

/* ===== متغيرات الألوان ===== */
:root {
    --blog-primary: #f97316;
    --blog-primary-dark: #ea580c;
    --blog-secondary: #fb923c;
    --blog-accent: #fbbf24;
    --blog-text: #1f2937;
    --blog-text-light: #6b7280;
    --blog-bg: #f9fafb;
    --blog-card: #ffffff;
    --blog-border: #e5e7eb;
    --blog-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --blog-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===== تنسيقات البنر الاحترافي ===== */
.professional-banner {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ضمان ظهور الصورة كاملة */
.professional-banner .absolute.inset-0 {
    overflow: hidden;
}

/* تحسين ظهور الصورة */
.professional-banner .absolute.inset-0 img {
    transition: all 0.3s ease;
    will-change: transform, filter;
}

/* تحسين الصورة عند التحميل */
.professional-banner .absolute.inset-0 img:hover {
    transform: scale(1.0);
    filter: brightness(1.3) contrast(1.4);
}

.professional-banner .absolute.inset-0 img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    max-height: none;
    transform: scale(0.95); /* تصغير الصورة لتظهر كاملة */
    filter: brightness(1.2) contrast(1.3) saturate(1.1); /* تحسين السطوع والتباين والتشبع */
    image-rendering: -webkit-optimize-contrast; /* تحسين الجودة في المتصفحات */
    image-rendering: crisp-edges;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.banner-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 100vh;
}

/* ضمان ظهور الصورة بشكل كامل */
.professional-banner .absolute.inset-0 img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    max-height: none;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.banner-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #fbbf24 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-subtitle {
    font-size: clamp(1.125rem, 3vw, 2rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.banner-btn-primary {
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-primary-dark));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6);
}

.banner-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.banner-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--blog-primary);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.banner-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4rem;
    background: linear-gradient(to top, white, transparent);
    z-index: 1;
}

/* ===== تنسيقات متجاوبة للبنر ===== */
@media (max-width: 768px) {
    .professional-banner {
        min-height: 70vh;
    }
    
    .banner-content {
        padding: 0 1rem;
    }
    
    .banner-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .banner-btn-primary,
    .banner-btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .banner-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .professional-banner {
        min-height: 60vh;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .banner-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ===== تنسيقات عامة للمدونة ===== */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-section {
    padding: 3rem 0;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--blog-text);
    margin-bottom: 1rem;
    text-align: center;
}

.blog-subtitle {
    font-size: 1.25rem;
    color: var(--blog-text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== تنسيقات البطاقات ===== */
.blog-card {
    background: var(--blog-card);
    border-radius: 1rem;
    box-shadow: var(--blog-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--blog-border);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-lg);
    border-color: var(--blog-primary);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    color: var(--blog-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--blog-text-light);
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-category {
    background: var(--blog-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== تنسيقات الشبكة ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-featured {
    grid-column: span 2;
}

.blog-featured .blog-card-image {
    height: 300px;
}

.blog-featured .blog-card-title {
    font-size: 1.5rem;
}

/* ===== تنسيقات الشريط الجانبي ===== */
.blog-sidebar {
    background: var(--blog-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--blog-border);
}

.blog-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blog-primary);
}

.blog-categories {
    list-style: none;
    padding: 0;
}

.blog-categories li {
    margin-bottom: 0.5rem;
}

.blog-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--blog-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.blog-categories a:hover {
    background: var(--blog-primary);
    color: white;
    transform: translateX(5px);
}

.blog-categories .count {
    background: var(--blog-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== تنسيقات البحث ===== */
.blog-search {
    position: relative;
    margin-bottom: 2rem;
}

.blog-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 2px solid var(--blog-border);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.blog-search button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blog-primary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search button:hover {
    background: var(--blog-primary-dark);
}

/* ===== تنسيقات التصنيفات ===== */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-tag {
    background: var(--blog-bg);
    color: var(--blog-text);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--blog-border);
}

.blog-tag:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* ===== تنسيقات الترقيم ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-pagination a {
    background: var(--blog-card);
    color: var(--blog-text);
    border: 1px solid var(--blog-border);
}

.blog-pagination a:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

.blog-pagination .current {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* ===== تنسيقات المقالة المفردة ===== */
.blog-single {
    max-width: 800px;
    margin: 0 auto;
}

.blog-single-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-single-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--blog-text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-single-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: var(--blog-text-light);
    font-size: 0.875rem;
}

.blog-single-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.blog-single-content {
    line-height: 1.8;
    color: var(--blog-text);
    font-size: 1.125rem;
}

.blog-single-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--blog-text);
    margin: 2rem 0 1rem 0;
}

.blog-single-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--blog-text);
    margin: 1.5rem 0 1rem 0;
}

.blog-single-content p {
    margin-bottom: 1.5rem;
}

.blog-single-content ul,
.blog-single-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.blog-single-content li {
    margin-bottom: 0.5rem;
}

.blog-single-content blockquote {
    border-right: 4px solid var(--blog-primary);
    padding-right: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--blog-text-light);
    background: var(--blog-bg);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* ===== تنسيقات التعليقات ===== */
.blog-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--blog-border);
}

.blog-comment {
    background: var(--blog-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--blog-border);
}

.blog-comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-comment-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--blog-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.blog-comment-author {
    font-weight: 600;
    color: var(--blog-text);
}

.blog-comment-date {
    font-size: 0.875rem;
    color: var(--blog-text-light);
}

.blog-comment-content {
    color: var(--blog-text);
    line-height: 1.6;
}

/* ===== تنسيقات النموذج ===== */
.blog-comment-form {
    background: var(--blog-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--blog-border);
    margin-top: 2rem;
}

.blog-comment-form h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 1.5rem;
}

.blog-form-group {
    margin-bottom: 1.5rem;
}

.blog-form-group label {
    display: block;
    font-weight: 600;
    color: var(--blog-text);
    margin-bottom: 0.5rem;
}

.blog-form-group input,
.blog-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--blog-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-form-group input:focus,
.blog-form-group textarea:focus {
    outline: none;
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.blog-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.blog-submit-btn {
    background: var(--blog-primary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-submit-btn:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
}

/* ===== تنسيقات متجاوبة ===== */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-featured {
        grid-column: span 1;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-single-title {
        font-size: 2rem;
    }
    
    .blog-single-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 0 0.5rem;
    }
    
    .blog-card-content {
        padding: 1rem;
    }
    
    .blog-single-content {
        font-size: 1rem;
    }
}

/* ===== تنسيقات الحركة ===== */
.blog-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== تنسيقات خاصة بالمدونة ===== */
.blog-hero {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-secondary) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

/* ===== تنسيقات التصنيفات ===== */
.category-card {
    background: var(--blog-card);
    border-radius: 1.25rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blog-primary), var(--blog-secondary));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--blog-shadow-lg);
    border-color: var(--blog-primary);
}

.category-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 0.875rem;
    transition: color 0.3s ease;
}

.category-card:hover .category-title {
    color: var(--blog-primary);
}

.category-description {
    color: var(--blog-text-light);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-count {
    background: var(--blog-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.category-posts {
    color: var(--blog-text-light);
    font-size: 0.8rem;
    font-style: italic;
}

/* ===== تنسيقات المقالات المميزة ===== */
.featured-article {
    background: var(--blog-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.featured-article .article-image {
    height: 350px;
    overflow: hidden;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-lg);
    border-color: var(--blog-primary);
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    transition: transform 0.3s ease;
    height: 400px !important;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.featured-article:hover .article-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--blog-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blog-text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.featured-article:hover .article-title {
    color: var(--blog-primary);
}

.article-excerpt {
    color: var(--blog-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--blog-text-light);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== تنسيقات متجاوبة للتصنيفات ===== */
@media (max-width: 1024px) and (min-width: 768px) {
    /* الأيباد - عرض كل اثنتين بجانب بعضهما */
    .category-card {
        padding: 1.25rem;
    }
    
    .category-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1rem;
    }
    
    .category-title {
        font-size: 1.125rem;
    }
    
    .category-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) and (min-width: 481px) {
    /* الأجهزة المحمولة المتوسطة - عرض كل اثنتين بجانب بعضهما */
    .category-card {
        padding: 1.25rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.875rem;
    }
    
    .category-title {
        font-size: 1rem;
    }
    
    .category-description {
        font-size: 0.8rem;
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 480px) {
    /* الأجهزة المحمولة الصغيرة - عرض كل واحدة في سطر منفصل */
    .category-card {
        padding: 0.875rem;
    }
    
    .category-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.75rem;
    }
    
    .category-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .category-description {
        font-size: 0.8rem;
        margin-bottom: 0.875rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
}

/* ===== تأثيرات حركية إضافية ===== */
.category-card {
    animation: fadeInUp 0.8s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

.featured-article {
    animation: slideInRight 0.8s ease-out;
}

.featured-article:nth-child(1) { animation-delay: 0.1s; }
.featured-article:nth-child(2) { animation-delay: 0.2s; }
.featured-article:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== تأثيرات التحميل ===== */
.category-card.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== تحسينات إضافية للتصميم ===== */
.category-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.featured-article {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* ===== تأثيرات الظل المتقدمة ===== */
.category-card:hover {
    box-shadow: 
        0 20px 40px rgba(249, 115, 22, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05);
}

.featured-article:hover {
    box-shadow: 
        0 15px 30px rgba(249, 115, 22, 0.1),
        0 8px 15px rgba(0, 0, 0, 0.05);
}

/* ===== تنسيقات الرسائل ===== */
.category-message,
.article-message {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--blog-border);
    z-index: 1000;
    animation: slideInLeft 0.5s ease-out;
    max-width: 300px;
}

.article-message {
    top: 160px;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--blog-text);
}

.message-content i {
    font-size: 1.25rem;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== تحسينات إضافية للتفاعل ===== */
.category-card:active {
    transform: scale(0.98);
}

.featured-article:active {
    transform: scale(0.98);
}

/* ===== تأثيرات التركيز ===== */
.category-card:focus-within {
    outline: 2px solid var(--blog-primary);
    outline-offset: 2px;
}

.featured-article:focus-within {
    outline: 2px solid var(--blog-primary);
    outline-offset: 2px;
}

/* ===== تنسيقات المقالات الكاملة ===== */
.full-article {
    background: var(--blog-card);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
    transition: all 0.4s ease;
}

.full-article:hover {
    transform: translateY(-8px);
    box-shadow: var(--blog-shadow-lg);
    border-color: var(--blog-primary);
}

.article-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-secondary) 100%);
    color: white;
}

.article-main-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.article-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ===== تنسيقات الصور المتحركة ===== */
.image-carousel {
    position: relative;
    overflow: hidden;
    height: 500px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.05);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== أزرار التنقل ===== */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blog-primary);
    font-size: 1.2rem;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-nav.prev {
    left: 1rem;
}

.carousel-nav.next {
    right: 1rem;
}

/* ===== مؤشرات الصور ===== */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ===== محتوى المقال ===== */
.article-content {
    padding: 2rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--blog-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
}

.article-excerpt {
    color: var(--blog-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--blog-text-light);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: var(--blog-primary);
}

.read-full-btn {
    background: var(--blog-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.read-full-btn:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
}

.read-full-btn i {
    transition: transform 0.3s ease;
}

.read-full-btn:hover i {
    transform: translateX(-5px);
}

/* ===== تأثيرات حركية للصور المتحركة ===== */
.carousel-slide {
    animation: fadeInOut 0.8s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* ===== تحسينات متجاوبة ===== */
@media (max-width: 768px) {
    .full-article {
        margin-bottom: 2rem;
    }
    
    .article-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .article-main-title {
        font-size: 1.5rem;
    }
    
    .image-carousel {
        height: 450px;
    }
    
    .article-image img {
        height: 350px !important;
    }
    
    .featured-article .article-image {
        height: 300px;
    }
    
    .carousel-nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    .article-main-title {
        font-size: 1.25rem;
    }
    
    .image-carousel {
        height: 400px;
    }
    
    .article-image img {
        height: 250px !important;
    }
    
    .featured-article .article-image {
        height: 250px;
    }
    
    .carousel-nav {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
    
    .carousel-nav.prev {
        left: 0.5rem;
    }
    
    .carousel-nav.next {
        right: 0.5rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .read-full-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ===== تنسيقات البحث المتقدم ===== */
.advanced-search-form {
    position: relative;
}

.search-main input {
    padding-right: 4rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-main input:focus {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}

.search-filters {
    border-top: 1px solid var(--blog-border);
    padding-top: 2rem;
}

.filter-group label {
    color: var(--blog-text);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.filter-group select {
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    transform: translateY(-1px);
}

.filter-group select:hover {
    border-color: var(--blog-primary);
}

/* ===== تنسيقات الكلمات المفتاحية ===== */
.tags-container {
    min-height: 3rem;
}

.tag-filter {
    background: var(--blog-bg);
    color: var(--blog-text);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--blog-border);
    user-select: none;
}

.tag-filter:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.tag-filter.active {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.tag-filter.selected {
    background: var(--blog-secondary);
    color: white;
    border-color: var(--blog-secondary);
    transform: scale(1.05);
}

/* ===== أزرار البحث ===== */
.search-actions button {
    min-width: 160px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-actions button:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-actions button:active {
    transform: scale(0.98);
}

/* ===== ملخص نتائج البحث ===== */
.search-results-summary {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.active-filter {
    background: var(--blog-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.active-filter .remove-filter {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.active-filter .remove-filter:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.2);
}

/* ===== تحسينات متجاوبة للبحث ===== */
@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .search-main input {
        font-size: 1rem;
        padding: 1rem 4rem 1rem 1rem;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button {
        width: 100%;
        min-width: auto;
    }
    
    .tags-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .advanced-search-form {
        padding: 1.5rem;
    }
    
    .search-main input {
        padding: 0.75rem 3.5rem 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .filter-group select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .tag-filter {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ===== تأثيرات إضافية للبحث ===== */
.search-main input::placeholder {
    color: var(--blog-text-light);
    transition: color 0.3s ease;
}

.search-main input:focus::placeholder {
    color: var(--blog-primary);
    opacity: 0.7;
}

.filter-group select option {
    padding: 0.5rem;
    transition: background-color 0.3s ease;
}

.filter-group select option:hover {
    background-color: var(--blog-primary);
    color: white;
}

/* ===== حالة التحميل ===== */
.search-loading {
    position: relative;
    pointer-events: none;
}

.search-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.search-loading::before {
    content: 'جاري البحث...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--blog-primary);
    font-weight: 600;
    z-index: 10;
}

/* ===== تنسيقات النافذة المنبثقة ===== */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.article-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.article-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-secondary) 100%);
    color: white;
    padding: 2rem;
    border-radius: 1.5rem 1.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
    line-height: 1.8;
    color: var(--blog-text);
}

.modal-body h2 {
    color: var(--blog-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid var(--blog-primary);
    padding-bottom: 0.5rem;
}

.modal-body h2:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.modal-footer {
    padding: 2rem;
    border-top: 1px solid var(--blog-border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.share-btn {
    background: var(--blog-secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    background: var(--blog-primary);
    transform: translateY(-2px);
}

.close-modal-btn {
    background: var(--blog-text-light);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: var(--blog-text);
    transform: translateY(-2px);
}

/* ===== تحسينات متجاوبة للنافذة المنبثقة ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1.5rem;
        flex-direction: column;
    }
    
    .share-btn,
    .close-modal-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body h2 {
        font-size: 1.25rem;
    }
    
    .modal-body p {
        font-size: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.blog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.blog-stat {
    text-align: center;
    padding: 2rem;
    background: var(--blog-card);
    border-radius: 1rem;
    box-shadow: var(--blog-shadow);
    border: 1px solid var(--blog-border);
}

.blog-stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--blog-primary);
    margin-bottom: 0.5rem;
}

.blog-stat-label {
    color: var(--blog-text-light);
    font-weight: 600;
}

/* ===== تنسيقات إضافية للمدونة ===== */
.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--blog-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.blog-read-more:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-lg);
}

.blog-card-image-container {
    position: relative;
    overflow: hidden;
}

.blog-back-btn {
    background: var(--blog-primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-back-btn:hover {
    background: var(--blog-primary-dark);
    transform: translateY(-2px);
}

.blog-single-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--blog-border);
    text-align: center;
}

/* ===== تنسيقات الشريط الجانبي ===== */
.blog-sidebar-container {
    margin-top: 2rem;
}

.blog-search-container,
.blog-categories-container,
.blog-pagination-container,
.blog-stats-container {
    margin-bottom: 2rem;
}

/* ===== تنسيقات متجاوبة إضافية ===== */
@media (min-width: 1024px) {
    .blog-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 3rem;
        align-items: start;
    }
    
    .blog-sidebar-container {
        margin-top: 0;
        position: sticky;
        top: 2rem;
    }
}

/* ===== تنسيقات شبكة التصنيفات ===== */
.categories-grid {
    display: grid;
    gap: 1.5rem;
}

/* تنسيقات الشبكة المتجاوبة */
@media (min-width: 640px) and (max-width: 1023px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 639px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== تنسيقات الحركة الإضافية ===== */
.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card:hover {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ===== تنسيقات التحميل ===== */
.blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.blog-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--blog-border);
    border-top: 3px solid var(--blog-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
