/* Premium Dark Theme - Inspired by Al Ahli FC */
:root {
    --primary-green: #009045; /* أخضر نادي الإمارات */
    --primary-gold: #cfa856;  /* ذهبي فاخر */
    --dark-bg: #121212;       /* خلفية سوداء ناعمة */
    --card-bg: #1e1e1e;       /* لون البطاقات */
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --font-main: 'Tajawal', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* 1. Navbar - ترويسة شفافة عائمة */
.navbar {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
}

.nav-link {
    color: var(--text-white) !important;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 10px;
    text-transform: uppercase;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gold) !important;
}

/* 2. Hero Section - واجهة سينمائية */
.hero-section {
    position: relative;
    height: 85vh; /* شاشة شبه كاملة */
    overflow: hidden;
}

.hero-slide {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* طبقة تدرج لوني لدمج الصورة مع الخلفية */
.hero-overlay {
    background: linear-gradient(to top, var(--dark-bg) 5%, transparent 100%),
                linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 50%);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.hero-content {
    position: absolute;
    bottom: 80px;
    right: 50px; /* في العربية */
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 30px;
}

/* 3. Section Titles - عناوين الأقسام */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -21px; /* لدمجها مع الخط السفلي */
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-green);
}

/* 4. Match Center - شريط المباريات */
.match-center {
    background: var(--card-bg);
    margin-top: -60px; /* تداخل مع الهيرو */
    position: relative;
    z-index: 10;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.match-card-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-right: 4px solid var(--primary-gold);
}

.team-logo-sm { width: 50px; height: 50px; object-fit: contain; }

/* 5. News Cards - بطاقات الأخبار الفخمة */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.news-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,144,69,0.1); /* توهج أخضر خفيف */
    border-color: var(--primary-green);
}

.news-img {
    height: 240px;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: 0.4s;
}

.news-item:hover .news-img {
    filter: brightness(1);
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    position: relative;
}

.news-date {
    color: var(--primary-gold);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
    color: white;
}

/* 6. Buttons */
.btn-gold {
    background: var(--primary-gold);
    color: #000;
    padding: 12px 30px;
    font-weight: 800;
    border-radius: 0; /* حواف حادة مثل المواقع الحديثة */
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-gold:hover {
    background: #fff;
    color: #000;
}

.btn-link-more {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.btn-link-more:hover { color: var(--primary-green); }

/* --- Ahli FC Style Header --- */

/* خلفية الهيدر بلون أخضر غامق ملكي */
.ahli-navbar {
    background-color: #004d26; /* أو استخدمي var(--primary-dark) */
    padding: 0; /* إلغاء الحواف لملء المساحة */
    height: 80px; /* ارتفاع ثابت للهيدر */
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* الشعار العائم في المنتصف */
.logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    z-index: 1001;
    background-color: #004d26; /* نفس لون الخلفية لدمج الحواف */
    padding: 10px 15px 15px 15px;
    border-radius: 0 0 50px 50px; /* شكل نصف دائري من الأسفل */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.logo-center img {
    height: 90px; /* حجم كبير للشعار */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-center:hover {
    padding-top: 15px; /* حركة بسيطة عند التحويم */
}

/* روابط القائمة */
.ahli-nav-link {
    color: white !important;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 20px !important;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.ahli-nav-link:hover {
    color: var(--primary-gold) !important;
}

/* الخط الفاصل بين الروابط (اختياري) */
.ahli-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 15px;
    width: 1px;
    background-color: rgba(255,255,255,0.2);
}
/* إخفاء الخط عن العنصر الأول */
.nav-item:first-child .ahli-nav-link::after { display: none; }


/* زر اللغة والأدوات */
.tools-area .btn-lang {
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    padding: 5px 15px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.tools-area .btn-lang:hover {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
    color: black;
}

/* تحسينات للموبايل */
@media (max-width: 991px) {
    .ahli-navbar { height: auto; padding: 10px 0; }
    .logo-center {
        position: static;
        transform: none;
        background: transparent;
        padding: 0;
        box-shadow: none;
        text-align: center;
        margin-bottom: 10px;
    }
    .logo-center img { height: 60px; }
    /* إخفاء الخطوط الفاصلة في الموبايل */
    .ahli-nav-link::after { display: none; }
}

/* --- News Archive Page Styles --- */

.news-archive-grid {
    display: grid;
    /* هذا السطر يضمن أن تكون الأعمدة متجاوبة: 3 أعمدة في الشاشات الكبيرة، و1 في الموبايل */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 30px;
    margin-top: 30px;
}

.news-card-archive {
    background-color: #1e1e1e; /* لون البطاقة */
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* لضمان تساوي طول البطاقات */
}

.news-card-archive:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 144, 69, 0.15); /* ظل أخضر خفيف */
    border-color: var(--primary-green);
}

.news-card-img-container {
    height: 250px; /* ارتفاع ثابت للصورة لتوحيد الشكل */
    overflow: hidden;
    position: relative;
}

.news-card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* قص الصورة لتملأ المكان دون تمطيط */
    transition: transform 0.5s ease;
}

.news-card-archive:hover .news-card-img-container img {
    transform: scale(1.05); /* تكبير بسيط للصورة عند التحويم */
}

.news-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.85rem;
    color: var(--primary-gold);
    margin-bottom: 10px;
    font-weight: bold;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-card-title a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.news-card-title a:hover {
    color: var(--primary-green);
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: #b0b0b0;
    margin-bottom: 20px;
    flex-grow: 1; /* لدفع الزر للأسفل */
}

/* --- Ahli Style Footer Refined --- */
.ahli-footer {
    background-color: #004d26;
    color: #ffffff;
    padding-top: 70px;
    font-family: 'Tajawal', sans-serif;
    position: relative;
    border-top: 5px solid #cfa856;
    overflow: hidden; /* لقص الشعار الخلفي */
}

/* الشعار الخلفي الكبير */
.footer-bg-logo {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.05; /* شفافية خفيفة جداً */
    width: 300px;
    pointer-events: none; /* لا يؤثر على النقرات */
    filter: grayscale(100%);
}

.footer-col-title {
    color: #cfa856;
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

/* خط صغير تحت العناوين لزيادة الترتيب */
.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* يبدأ من اليمين في العربية */
    width: 50px;
    height: 2px;
    background-color: rgba(255,255,255,0.2);
}

/* ضبط الروابط */
.footer-link-item {
    display: block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-bottom: 15px; /* زيادة المسافة بين الأسطر */
    transition: all 0.3s;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

.footer-link-item:hover {
    color: #cfa856;
    transform: translateX(-5px); /* حركة لليسار عند التحويم */
}

/* ضبط عناصر الاتصال (أيقونة + نص) */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.9);
}

.contact-item i {
    color: #cfa856;
    font-size: 1.2rem;
    margin-left: 15px; /* مسافة يسار الأيقونة (للنص العربي) */
    width: 25px; /* عرض ثابت للأيقونة لضمان المحاذاة */
    text-align: center;
}

/* المنطقة الوسطى */
.footer-center-brand {
    text-align: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.social-icons-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.social-circle {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
    background: rgba(0,0,0,0.1);
}

.social-circle:hover {
    background-color: #cfa856;
    border-color: #cfa856;
    color: #004d26;
    transform: translateY(-5px);
}

.footer-copyright {
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    background: #00361a; /* لون أغمق */
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* تحسينات الاتجاه للغة الإنجليزية */
html[dir="ltr"] .footer-col-title::after { right: auto; left: 0; }
html[dir="ltr"] .contact-item i { margin-left: 0; margin-right: 15px; }
html[dir="ltr"] .footer-link-item:hover { transform: translateX(5px); }

/* --- إصلاح تصميم صفحة الخبر (Cinematic Style Fixed) --- */

/* 1. خلفية الصفحة بالكامل */
body.news-details-page {
    background-color: #ffffff !important; /* إجبار الخلفية تكون بيضاء */
}

/* 2. منطقة الهيرو (الصورة العلوية) */
.news-hero-section {
    position: relative;
    height: 70vh; /* جعلنا الصورة أطول وأفخم */
    min-height: 500px;
    background-size: cover; /* تغطية كاملة للصورة */
    background-position: center center; /* توسيط الصورة */
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0; /* ألغينا المسافة لكي تلتحم الموجة */
}

/* طبقة التعتيم (أسود شفاف) */
.news-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* محتوى الهيرو (العنوان) */
.news-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    padding-bottom: 80px; /* رفع النص فوق الموجة */
}

.news-hero-title {
    color: #ffffff !important;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0,0,0,0.6);
    line-height: 1.4;
    margin-top: 15px;
}

/* 3. الموجة (Wave) - اللون الأبيض */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: -1px; /* لإخفاء أي خط رفيع */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px; /* ارتفاع الموجة */
}

.custom-shape-divider-bottom .shape-fill {
    fill: #FFFFFF !important; /* لون الموجة أبيض */
}

/* 4. جسم الخبر (أبيض) */
.news-body-container {
    background-color: #ffffff !important;
    position: relative;
    z-index: 4;
    padding-top: 40px;
    padding-bottom: 80px;
}

/* النصوص داخل الخبر (أسود) */
.news-article-content {
    color: #333333 !important; /* النص أسود */
    font-size: 1.2rem;
    line-height: 2;
    font-weight: 500;
}

.news-article-content p, 
.news-article-content h1, 
.news-article-content h2, 
.news-article-content h3 {
    color: #333333 !important;
}

/* بيانات الميتا */
.news-meta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 77, 38, 0.8); /* خلفية خضراء نصف شفافة */
    padding: 8px 25px;
    border-radius: 50px;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 0.9rem;
}