/* تحسينات قسم المدونة - Enhanced Blog Styles
   تنسيقات مخصصة لصفحة المدونة وعرضها بشكل أكثر جاذبية
*/

/* قسم المدونة */
.blog-section {
    padding: 60px 0;
    position: relative;
}

/* شبكة المدونة */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* بطاقة المقال */
.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(10, 58, 120, 0.1);
}

/* صورة المقال */
.blog-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.blog-card:hover .blog-image::before {
    opacity: 1;
}

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

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

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #0a3a78 0%, #1a5baa 100%);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(10, 58, 120, 0.2);
}

/* محتوى المقال */
.blog-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.blog-date i {
    margin-left: 5px;
    color: #0a3a78;
}

.blog-content h3 {
    font-size: 20px;
    color: #0a3a78;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-author-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
}

.blog-author-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-author-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.blog-comments {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.blog-comments i {
    color: #0a3a78;
}

/* قسم المقال المميز */
.featured-post {
    margin-bottom: 50px;
}

.featured-post-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.featured-post-image {
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

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

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

.featured-label {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #0a3a78 0%, #1a5baa 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.featured-post-content h3 {
    font-size: 28px;
    color: #0a3a78;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.featured-post-content p {
    color: #555;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
}

.featured-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* جانب المدونة */
.blog-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-title {
    font-size: 20px;
    color: #0a3a78;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #0a3a78 0%, #1a5baa 100%);
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    padding-left: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #0a3a78;
    box-shadow: 0 0 0 3px rgba(10, 58, 120, 0.1);
    outline: none;
}

.search-button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #0a3a78;
    font-size: 18px;
    cursor: pointer;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 12px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.category-list a:hover {
    color: #0a3a78;
    padding-right: 5px;
}

.category-count {
    background: rgba(10, 58, 120, 0.1);
    color: #0a3a78;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.recent-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex-grow: 1;
}

.recent-post-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: #0a3a78;
}

.recent-post-date {
    font-size: 12px;
    color: #777;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    color: #555;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tag:hover {
    background: #0a3a78;
    color: #fff;
    transform: translateY(-3px);
}

/* تأثيرات الانتقال */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* تأخير الظهور بالتدريج */
.blog-grid .blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-grid .blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-grid .blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.blog-grid .blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

.blog-grid .blog-card:nth-child(5) {
    animation-delay: 0.5s;
}

.blog-grid .blog-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* تنسيقات للشاشات الصغيرة */
@media (max-width: 992px) {
    .featured-post-card {
        grid-template-columns: 1fr;
    }
    
    .featured-post-image {
        height: 300px;
    }
    
    .featured-post-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-post-content h3 {
        font-size: 24px;
    }
    
    .blog-sidebar {
        margin-top: 40px;
    }
}
