/* =========================================
   تنسيقات صفحة أخبار الأندية (Redesigned)
   ========================================= */

.clubs-main {
    /* 120px تحت ضرورية جداً عشان البار السفلي ما يغطي الكروت */
    padding: 20px 20px 120px 20px; 
}

/* ================== شريط البحث (Modern) ================== */
.search-section {
    margin-bottom: 25px;
}

.modern-search {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.modern-search:focus-within {
    border-color: var(--primary-text);
    box-shadow: 0 4px 20px rgba(124, 16, 145, 0.15);
}

.modern-search i {
    color: var(--text-light);
    font-size: 18px;
    margin-left: 10px;
}

.modern-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    color: var(--text-dark);
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.modern-search input:focus {
    outline: none;
}

/* ================== شريط الفلاتر (Pills) ================== */
.filters-section {
    margin-bottom: 25px;
}

.filters-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filters-container::-webkit-scrollbar { display: none; }

.filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 8px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn span {
    color: var(--text-dark);
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 13px;
}

.filter-icon, .club-filter-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s ease;
}

/* حالة الزر النشط */
.filter-btn.active {
    background-color: var(--primary-text);
    border-color: var(--primary-text);
    box-shadow: 0 2px 12px rgba(130, 16, 145, 0.226);
}

.filter-btn.active span { color: #ffffff; }
.filter-btn.active .filter-icon { color: var(--primary-text); background-color: #ffffff; }

/* ================== كروت الأخبار (The Big Fix) ================== */
.news-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.modern-news-card {
    background-color: var(--surface-color);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px var(--shadow-color);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modern-news-card:active {
    transform: scale(0.97);
}

/* صورة الغلاف */
.card-cover {
    position: relative;
    width: 100%;
    height: 200px; /* كبرنا الصورة شوي لتطلع أفخم */
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* التاقات اللي فوق الصورة */
.card-badges {
    position: absolute;
    bottom: 15px; /* نزلناها تحت عشان ما تغطي وجيه الناس بالصور */
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   تصميم التاقات الجديد (حسب رسمة مدخل)
   ========================================= */

/* 1. تاق اسم النادي (يمين فوق الصورة) */
.badge-club-top-right {
    position: absolute;
    top: 15px;
    right: 15px; /* يمين */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.4);
}

/* 2. تاق الفئة المستهدفة (يسار فوق الصورة) */
.badge-gender-top-left {
    position: absolute;
    top: 15px;
    left: 15px; /* يسار */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.4);
}

.badge-gender-top-left i { font-size: 13px; font-weight: 900; }
.icon-male { color: #3b82f6; }   
.icon-female { color: #ec4899; } 
.gender-text { font-size: 11px; font-weight: 800; font-family: 'Tajawal', sans-serif; }

/* 3. تاق التاريخ (فوق العنوان داخل الكرت الأبيض) */
.date-above-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 10px; /* مسافة بين التاريخ والعنوان */
    background-color: rgba(16, 96, 145, 0.08); /* لون خفيف زي اللي بالصورة */
    padding: 4px 10px;
    border-radius: 8px;
    width: fit-content; /* عشان ما ياخذ العرض كامل ويصير مرتب */
}

/* منطقة النصوص (انحلت مشكلة القص هنا) */
.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.5;
}

.news-excerpt {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    /* يكتفي بسطرين ويحط نقاط... بدون ما يقص الكلام بشكل بشع */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   تنسيقات صفحة قراءة الخبر (Article Page)
   ========================================= */

/* منع التمرير الأفقي بالصفحة */
.article-page {
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* الهيدر العائم (أزرار الرجوع والمشاركة) */
.article-header {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
}

.glass-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.glass-btn:active {
    transform: scale(0.9);
}

/* صورة الغلاف */
.article-hero {
    width: 100%;
    height: 350px; /* صورة طويلة لفخامة أكثر */
    position: relative;
    z-index: 1;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* صندوق المحتوى (Overlap Effect) */
.article-content-box {
    position: relative;
    z-index: 10;
    background-color: var(--bg-color);
    border-radius: 35px 35px 0 0; /* حواف دائرية كبيرة من فوق فقط */
    margin-top: -40px; /* السر هنا: يركب فوق الصورة بـ 40 بكسل */
    padding: 35px 25px 50px 25px;
    min-height: calc(100vh - 310px);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
}

/* التاقات داخل المقال */
.article-meta-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.article-club-tag {
    background-color: rgba(115, 16, 145, 0.1); /* لون مدخل شفاف */
    color: var(--primary-text);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.article-date-tag {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* عنوان المقال */
.article-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0 0 20px 0;
}

/* جسم المقال (النصوص والقوائم) */
.article-body p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.article-body h3 {
    font-size: 17px;
    color: var(--text-dark);
    margin: 25px 0 10px 0;
}

.article-body ul {
    padding-right: 20px;
    margin-bottom: 20px;
}

.article-body ul li {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.6;
}

/* زر الإجراء (Call to action) */
.article-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-color);
    color: #ffffff;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    margin-top: 30px;
    box-shadow: 0 8px 20px rgba(134, 16, 145, 0.3);
    transition: transform 0.2s;
}

.article-action-btn:active {
    transform: scale(0.98);
}

.fade-in { animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   تنسيقات تفاصيل الخبر (النسخة المريحة)
   ========================================= */

/* توحيد شكل البادجات (النادي، الفئة، التاريخ) */
.article-meta-tags {
    display: flex;
    flex-wrap: wrap; /* عشان لو الشاشة صغيرة تنزل سطر وما تنعجن */
    gap: 8px;
    margin-bottom: 15px;
}

.unified-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* الخط الفاصل بين العنوان والتفاصيل */
.title-divider {
    height: 1px;
    background: linear-gradient(to left, transparent, var(--border-color), transparent);
    margin: 20px 0;
    opacity: 0.7;
}

/* إصلاح مشكلة المسافات الشاسعة في النص */
.article-body p {
    white-space: pre-line; /* السحر هنا: يقرأ النزول بسطر طبيعي بدون مسافات دبل */
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 15px;
    color: var(--text-light);
}

/* =========================================
   زر الروابط التلقائي داخل نص الخبر
   ========================================= */
.inline-action-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background-color:#821091;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 14px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(16, 49, 145, 0.2);
    transition: transform 0.2s, background-color 0.2s;
    width: fit-content;
}

.inline-action-btn:active {
    transform: scale(0.95);
    background-color: #6b0c6e;
}