/* ========================================
   قسم المقالات - Blog Section
   الملف: public/web/css/blog.css
======================================== */

.blog-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    overflow: hidden;
}

.blog-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.03;
    pointer-events: none;
}

/* رأس القسم */
.blog-section .section-header {
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.blog-section .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffd700;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(26, 26, 46, 0.2);
}

.blog-section .section-badge i {
    font-size: 16px;
}

.blog-section .section-title {
    font-size: 48px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 15px;
    position: relative;
}

.blog-section .section-description {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.8;
}

.title-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-decoration .line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    border-radius: 3px;
}

.title-decoration i {
    color: #ffd700;
    font-size: 20px;
}

/* بطاقات المقالات */
.blog-grid-container {
    position: relative;
    z-index: 2;
}

.blog-card {
    position: relative;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.blog-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.blog-card:hover .card-glow {
    opacity: 1;
}

/* تأثير التوهج */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* صورة المقال */
.blog-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 46, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-card:hover .image-overlay {
    opacity: 1;
}

/* تاريخ المقال */
.blog-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    color: #1a1a2e;
    padding: 12px 15px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    z-index: 2;
}

.blog-date .day {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.blog-date .month {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 3px;
}

/* التصنيف */
.blog-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.blog-category i {
    color: #ffd700;
    font-size: 11px;
}

/* محتوى البطاقة */
.blog-card-content {
    padding: 25px;
}

/* معلومات المقال */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #888;
}

.meta-item i {
    color: #ffd700;
    font-size: 12px;
}

/* عنوان المقال */
.blog-title {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
}

.blog-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-title a:hover {
    color: #ffd700;
}

/* مقتطف المقال */
.blog-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* تذييل البطاقة */
.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* زر اقرأ المزيد */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 30px;
    transition: all 0.4s ease;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffd700;
    transform: translateX(-5px);
    box-shadow: 0 10px 25px rgba(26, 26, 46, 0.3);
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(-5px);
}

/* أزرار المشاركة */
.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn:nth-child(1):hover {
    background: #1da1f2;
    color: #fff;
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.4);
}

.share-btn:nth-child(2):hover {
    background: #4267b2;
    color: #fff;
    box-shadow: 0 8px 20px rgba(66, 103, 178, 0.4);
}

.share-btn:nth-child(3):hover {
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* زر عرض الكل */
.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 15px 40px rgba(26, 26, 46, 0.3);
    position: relative;
    overflow: hidden;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.view-all-btn:hover::before {
    left: 100%;
}

.view-all-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(26, 26, 46, 0.4);
    color: #ffd700;
}

.view-all-btn i {
    font-size: 18px;
}

/* الزخارف */
.blog-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.decoration-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: floatDecoration 20s infinite;
}

.decoration-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(26, 26, 46, 0.05) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation: floatDecoration 15s infinite reverse;
}

.decoration-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    top: 50%;
    right: 5%;
    animation: floatDecoration 12s infinite;
}

@keyframes floatDecoration {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, 20px); }
    50% { transform: translate(0, 40px); }
    75% { transform: translate(-20px, 20px); }
}

/* تأثير الحدود المتدرجة */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #00d4ff, #ffd700);
    background-size: 300% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 10;
}

.blog-card:hover::before {
    opacity: 1;
    animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* التجاوب */
@media (max-width: 1199px) {
    .blog-section .section-title {
        font-size: 40px;
    }
}

@media (max-width: 991px) {
    .blog-section {
        padding: 70px 0;
    }
    
    .blog-section .section-title {
        font-size: 34px;
    }
    
    .blog-card-image {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .blog-section {
        padding: 50px 0;
    }
    
    .blog-section .section-title {
        font-size: 28px;
    }
    
    .blog-section .section-description {
        font-size: 15px;
    }
    
    .blog-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .blog-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .read-more-btn {
        width: 100%;
        justify-content: center;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .view-all-btn {
        padding: 15px 30px;
        font-size: 14px;
    }
}

@media (max-width: 575px) {
    .blog-card-image {
        height: 180px;
    }
    
    .blog-title {
        font-size: 18px;
    }
    
    .blog-date {
        padding: 10px 12px;
    }
    
    .blog-date .day {
        font-size: 20px;
    }
}