/* Project: National Quality Assurance Center - Royal Theme
    Author: Gemini AI Collaboration
    Version: 1.0
*/

:root {
    --royal-olive: #1b3022;
    --olive-light: #2c5f2d;
    --olive-gradient: linear-gradient(135deg, #2c5f2d 0%, #1b3022 100%);
    --gold-accent: #c5a059;
    --gold-hover: #e0b96d;
    --soft-white: #f4f7f5;
    --pure-white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- التحسينات العامة --- */
body {
    background-color: var(--soft-white);
    color: var(--royal-olive);
    line-height: 1.8;
    overflow-x: hidden;
}
/* تنسيق الجدول الإداري المطور */
.royal-table {
    width: 100%;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.royal-table th {
    background-color: var(--royal-olive);
    color: var(--gold-accent);
    padding: 13px 15px;
    text-align: center;
        font-weight: 700;
    font-size: 1.2rem;
}


.royal-table td {
    padding: 15px;
    background: white;
    border-bottom: 1px solid #f1f4f8;
    transition: var(--transition);
}

.royal-table tr:hover td {
    background-color: #f5f3f0;/* تلميح ذهبي خفيف عند المرور */
}
        .action-btn-gold {
        width: 35px;
        height: 35px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: 0.3s;
        border: 1px solid #eee;
        background: white;
        color: var(--royal-olive);
        text-decoration: none !important;
    }
    .action-btn-gold:hover {
        background: var(--royal-gold);
        color: var(--royal-gold);
        transform: translateY(-3px);
        border-color: var(--royal-gold);
    }


/* --- تنسيق الأخبار (Cards) --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.news-card {
    background: var(--pure-white);
    border-radius: 20px;
    padding: 0; /* لإعطاء الصورة المساحة الكاملة */
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.news-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 25px;
}

/* --- الأزرار الملكية --- */
.btn-header {
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-fill {
    background: var(--olive-gradient);
    color: var(--pure-white) !important;
}

.btn-fill:hover {
    box-shadow: 0 8px 20px rgba(27, 48, 34, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--royal-olive);
    color: var(--royal-olive) !important;
    background: transparent;
}

.btn-outline:hover {
    background: var(--royal-olive);
    color: var(--gold-accent) !important;
}

/* --- تنسيق الجداول الإدارية (Admin Tables) --- */
.admin-table-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead tr {
    background-color: var(--royal-olive);
    color:var(--royal-olive);
    text-align: center;
    background-color: #2daa56;
}

table th {
    padding: 18px 15px;
    font-weight: 700;
    font-size: 1.2rem;
}

table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #f8f9fa;
    color: #444;
}

table tbody tr:hover {
    background-color: #fcfdfc;
}
/* --- التنبيهات (Badges) --- */
.platform-badge {
    background: rgba(197, 160, 89, 0.12);
    color: var(--royal-olive);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

/* --- تفاصيل الخبر --- */
.post-detail-header {
    border-right: 6px solid var(--gold-accent);
    padding-right: 20px;
    margin-bottom: 30px;
}

.post-content-body {
    font-size: 1.2rem;
    color: #444;
    text-align: justify;
}

/* --- الترقيم (Pagination) --- */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: white;
    color: var(--royal-olive);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #eee;
    transition: var(--transition);
}

.page-link.active, .page-link:hover {
    background: var(--olive-gradient);
    color: var(--gold-accent);
    border-color: var(--royal-olive);
}
.royal-search-wrapper {
    margin-bottom: 5px;
    display: flex;
    justify-content: flex-end; /* لمحاذاة البحث جهة اليسار في الواجهة العربية */
    direction: rtl;
    
}

.search-inner {
    position: relative;
    
    border: 1px solid #c5a059;
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    width: 400px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.search-inner:focus-within {
    width: 500px;
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.2);
    transform: translateY(-2px);
    border-color: #1b3022;
}

.search-icon {
    color: #c5a059;
    font-size: 1.1rem;
    margin-left: 15px;
}

#royalSearchInput {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Almarai', sans-serif;
    color: wheat;
    font-size: 1rem;
}

.search-divider {
    width: 1.5px;
    height: 25px;
    background: #c5a059;
    margin: 0 15px;
    opacity: 0.4;
}

.results-count {
    font-family: 'Almarai', sans-serif;
    font-size: 0.8rem;
    color: #c5a059;
    white-space: nowrap;
    font-weight: 700;
}
/* الفواصل الملكية */
.royal-divider {
    height: 3px;
    width: 80px;
    background: #c5a059;
    border-radius: 10px;
}

/* الكرت الرئيسي */
.royal-news-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    max-width: 850px;
    margin: 0 auto;
}

/* رأس الكرت */
.news-header-royal {
    background: #1b3022;
    color: #c5a059;
}

.bg-dark-royal {
    background: rgba(197, 160, 89, 0.2);
    border: 1px solid #c5a059;
    color: #c5a059;
}

/* دائرة الأيقونة */
.news-icon-circle-royal {
    width: 100px;
    height: 100px;
    background: #fff5f5;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #f56565;
}

.icon-inner {
    width: 80px;
    height: 80px;
    background: #f56565;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(245, 101, 101, 0.3);
}

/* صندوق المعاينة */
.news-preview-box-royal {
    background: #fcfaf5;
    border-right: 5px solid #c5a059;
    border-radius: 10px;
    text-align: right;
}

.news-title-display {
    color: #1b3022;
    font-weight: 700;
    font-size: 1.25rem;
}

/* التنبيه */
.alert-royal-danger {
    background: #fff5f5;
    color: #c53030;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid #feb2b2;
}

/* الأزرار الملكية */
.btn-royal-delete-final {
    background: #c53030;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-royal-delete-final:hover {
    background: #9b2222;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 48, 48, 0.3);
}

.btn-royal-cancel-outline {
    border: 2px solid #1b3022;
    color: #1b3022;
    padding: 11px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-royal-cancel-outline:hover {
    background: #1b3022;
    color: #c5a059;
}

.footer-royal {
    background: #f8f9fa;
    color: #a0aec0;
    font-family: 'Almarai', sans-serif;
}