/* ===== تنسيقات صفحة المدونة ===== */
:root {
    --blog-primary: var(--primary-color);
    --blog-secondary: var(--secondary-color);
    --blog-accent: var(--accent-color);
    --blog-light-bg: #f9fafb;
    --blog-card-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --blog-transition: all 0.3s ease;
}

/* ===== تنسيق المدونة ===== */

/* تنسيق عام */
.blog-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

/* تحسين قسم العنوان */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color), var(--primary-light));
    padding: 120px 0 80px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 5px solid rgba(255, 255, 255, 0.1);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><circle cx="10" cy="10" r="3" fill="white" opacity="0.1"/></svg>');
    background-size: 40px 40px;
    animation: backgroundMove 30s linear infinite;
    z-index: 1;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--secondary-light));
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(255, 87, 34, 0.3);
}

.page-header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 30px auto 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.header-cta {
    margin-top: 35px;
}

.header-cta .btn {
    padding: 14px 35px;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-cta .btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.header-cta .btn:hover i {
    transform: translateX(-5px);
}

.header-cta .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.header-cta .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.header-cta .btn:hover::before {
    left: 100%;
}

/* تنسيق قسم التصفية */
.blog-filter-section {
    background-color: #fff;
    padding: 30px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
    margin-top: -30px;
    border-radius: 10px 10px 0 0;
}

.blog-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group label {
    font-weight: 600;
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.search-group {
    flex-grow: 0;
}

.search-box {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:hover, .search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.1);
}

.search-box input {
    border: none;
    padding: 10px 15px;
    width: 100%;
    min-width: 200px;
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* تنسيق قسم المقالات المميزة */
.featured-posts-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f9fcff 0%, #f6f9ff 100%);
    position: relative;
}

.featured-posts-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05), transparent 70%);
    top: -100px;
    left: -100px;
    z-index: 0;
}

.featured-posts-section::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.05), transparent 70%);
    bottom: -80px;
    right: -80px;
    z-index: 0;
}

.featured-posts-slider {
    position: relative;
    margin-top: 50px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s ease;
}

.featured-posts-slider:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.featured-post {
    display: flex;
    flex-direction: row;
}

.featured-post-image {
    flex: 1;
    position: relative;
    max-width: 500px;
    min-height: 400px;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-posts-slider:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
}

.featured-post-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.featured-post-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.4;
}

.featured-post-content p {
    margin-bottom: 30px;
    line-height: 1.8;
    color: var(--text-color);
    flex-grow: 1;
}

.featured-post-content .btn {
    align-self: flex-start;
}

.featured-posts-controls {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid var(--border-color);
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.control-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.dot:hover {
    background-color: var(--primary-light);
}

/* تنسيق قسم جميع المقالات */
.blog-posts-section {
    padding: 80px 0;
    background-color: #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.blog-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.blog-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.blog-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

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

.blog-category {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 6px 15px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-category {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
}

.blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--primary-dark);
}

.blog-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.blog-meta i {
    color: var(--primary-color);
    margin-left: 5px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.read-more::after {
    content: "←";
    margin-right: 8px;
    transition: margin 0.3s ease;
}

.read-more:hover {
    border-bottom-color: var(--secondary-color);
    color: var(--secondary-color);
}

.read-more:hover::after {
    margin-right: 12px;
}

/* تنسيق الترقيم */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 8px;
}

.page-link, .page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--dark-color);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.page-link:hover, .page-nav:hover, .page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
}

.page-dots {
    margin: 0 5px;
    color: var(--dark-gray);
}

/* تنسيق الصفحات الصغيرة */
@media (max-width: 992px) {
    .featured-post {
        flex-direction: column;
    }
    
    .featured-post-image {
        max-width: 100%;
        min-height: 300px;
    }
    
    .featured-post-content {
        padding: 30px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 70px;
    }
    
    .page-header h2 {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    .blog-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-group {
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-post-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 80px 0 60px;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* رسالة عدم وجود نتائج */
.no-results-message {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    border: 1px dashed var(--border-color);
}

.no-results-message h3 {
    margin: 15px 0;
    color: var(--primary-color);
}

.no-results-message p {
    max-width: 500px;
    margin: 0 auto;
}

/* تعديلات AOS */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* حالات إخفاء المقالات */
.blog-card.filter-hidden,
.blog-card.search-hidden,
.blog-card.page-hidden {
    display: none !important;
}

/* تنسيقات إضافية للمقالات المميزة */
.featured-posts-content {
    position: relative;
}

.featured-post.hidden {
    display: none;
}

.featured-post.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

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

@keyframes backgroundMove {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
} 