/*
Theme Name: قالب أسعار الذهب في البحرين
Theme URI: https://example.com
Author: مصمم القالب
Description: قالب ووردبريس عصري ومتقدم لعرض أسعار الذهب في البحرين مع حاسبة ذكية متكاملة وشريط علوي فخم.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: bahrain-gold-theme
*/

body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #0f172a;
    direction: rtl;
}

/* 1. تنسيق الهيدر الكحلي الفخم */
.site-header {
    background: #060b13 !important; /* لون كحلي داكن جداً نفس الصورة */
    padding: 12px 0 !important;
    border-bottom: 2px solid #d4af37 !important; /* خط ذهبي سفلي نحيف ومميز */
    display: block !important;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2. تنسيق وتلوين الشعار */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.txt-white {
    color: #ffffff; /* كلمة ذهب باللون الأبيض */
    margin-left: 5px;
}

.txt-gold {
    color: #d4af37; /* كلمة البحرين باللون الذهبي الفخم */
}

.gold-coins-icon {
    width: 28px;
    height: 28px;
}

/* 3. كبسولة آخر تحديث في المنتصف */
.update-time-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-text {
    color: #94a3b8;
    font-size: 13px;
}

.green-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981; /* نقطة خضراء حية */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981; /* تأثير توهج للنقطة الخضراء */
}

/* 4. قائمة أزرار التنقل */
.gold-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    gap: 20px;
}

.gold-menu-list a {
    color: #94a3b8; /* اللون الرمادي للأزرار العادية */
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.gold-menu-list .active a,
.gold-menu-list a:hover {
    color: #d4af37 !important; /* اللون الذهبي للزر النشط وعند تمرير الماوس */
}

/* 5. باقي تنسيقات الصفحة الرئيسية والأدوات */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.gold-dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .gold-dashboard {
        grid-template-columns: 1fr;
    }
}

.gold-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
}

.gold-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.gold-table th {
    background: #f1f5f9;
    color: #475569;
    padding: 14px;
}

.gold-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calculator-form input, .calculator-form select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.calc-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
}

.calc-result {
    margin-top: 20px;
    background: #fffdf5;
    border: 1px solid #fef3c7;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.site-footer {
    background: #060b13;
    color: #94a3b8;
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}
/* ==========================================
   أكواد تلوين الجدول التلقائية الثابتة حسب السوق 
   ========================================== */

/* 1. في حال صعود السوق تلقائياً: تلوين الجدول بالكامل بالثابت الأخضر */
.trend-up {
    background-color: #f0fdf4 !important; /* خلفية خضراء خفيفة وثابتة تملأ الصف */
    border-bottom: 1px solid #bbf7d0 !important; /* حدود خضراء بين الصفوف */
}

.trend-up .price-bhd {
    color: #10b981 !important; /* تلوين السعر بالدينار باللون الأخضر المالي الثابت */
    font-weight: bold;
}

.trend-up .karat-badge {
    color: #166534 !important; /* تلوين اسم العيار بدرجة أخضر متناسقة */
}


/* 2. في حال هبوط السوق تلقائياً: تلوين الجدول بالكامل بالثابت الأحمر */
.trend-down {
    background-color: #fef2f2 !important; /* خلفية حمراء خفيفة وثابتة تملأ الصف */
    border-bottom: 1px solid #fecaca !important; /* حدود حمراء بين الصفوف */
}

.trend-down .price-bhd {
    color: #ef4444 !important; /* تلوين السعر بالدينار باللون الأحمر المالي الثابت */
    font-weight: bold;
}

.trend-down .karat-badge {
    color: #991b1b !important; /* تلوين اسم العيار بدرجة أحمر متناسقة */
}

/* تأثير حركي خفيف جداً عند تمرير الماوس فوق الصفوف الملونة لزيادة الجمالية */
.gold-row:hover {
    filter: brightness(0.95); /* إعتام خفيف جداً يوضح للزائر أين يقف بالماوس */
    cursor: pointer;
}

/* تنسيق أزرار الحالة في أعلى الجدول */
.trend-badge-main {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}
.trend-badge-main.up {
    background: #10b981;
    color: #ffffff;
}
.trend-badge-main.down {
    background: #ef4444;
    color: #ffffff;
}
