/*
 * تخصيصات WordPress الإضافية
 * Additional WordPress Customizations
 */

/* إصلاح حجم الشعار - Fix Logo Size */
.navbar-brand .logo,
.navbar-brand .custom-logo,
.custom-logo-link img {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
    object-fit: contain;
}

.navbar-brand .custom-logo-link {
    display: inline-block;
    line-height: 1;
}

/* التأكد من عدم تأثير WordPress على تنسيق القائمة */
.navbar-nav {
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.navbar-nav .nav-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #FFFFFF !important;
}

/* التأكد من padding الـ navbar وعدم وجود خلفية خضراء */
.navbar,
nav.navbar {
    padding: 15px 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* التأكد من خلفية header - يجب أن تكون gradient dark فقط */
.main-header {
    background: linear-gradient(135deg, #3A3A3A 0%, #2A2A2A 100%) !important;
}

/* التأكد من عدم وجود خلفية في navbar-collapse */
.navbar-collapse {
    background: transparent !important;
    background-color: transparent !important;
}

/* إزالة أي خلفية من ul القائمة */
ul.navbar-nav {
    background: transparent !important;
    background-color: transparent !important;
}

/* إزالة أي خلفية من li القائمة */
li.nav-item {
    background: transparent !important;
    background-color: transparent !important;
}

/* التأكد من حجم الشعار وتأثير hover */
.navbar-brand .logo {
    transition: transform 0.3s ease !important;
}

.navbar-brand:hover .logo {
    transform: scale(1.05) !important;
}

/* إزالة أي تنسيقات WordPress افتراضية من الروابط */
.navbar-nav .nav-link {
    text-decoration: none !important;
    display: inline-block;
}

/* تأكيد الألوان والخط من CSS الأصلي - القاعدة الأساسية */
.navbar-nav .nav-link,
a.nav-link {
    color: #FFFFFF !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    margin: 0 5px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    /* الخلفية شفافة افتراضياً */
    background: transparent !important;
    background-color: transparent !important;
}

/* فقط عند hover يظهر الأخضر */
.navbar-nav .nav-link:hover,
a.nav-link:hover {
    background-color: #5CB85C !important;
}

/* فقط الصفحة النشطة تحصل على الأخضر */
.navbar-nav li.current-menu-item > a.nav-link,
.navbar-nav li.current_page_item > a.nav-link,
.navbar-nav a.nav-link.active {
    background-color: #5CB85C !important;
}

/* التأكد من أن nav-item ليس لها خلفية */
.navbar-nav .nav-item {
    background: transparent !important;
    background-color: transparent !important;
}

/* إصلاح لون الأيقونات في القائمة */
.navbar-nav .nav-link i {
    color: #FFFFFF !important;
}

.navbar-nav .nav-link:hover i,
.navbar-nav .nav-link.active i {
    color: #FFFFFF !important;
}

/* إصلاح تنسيق الروابط الاجتماعية - من CSS الأصلي */
.social-links a {
    display: inline-block !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    text-align: center !important;
    background: #5CB85C !important;
    color: #FFFFFF !important;
    border-radius: 50% !important;
    margin-left: 8px !important;
    transition: all 0.3s ease !important;
}

.social-links a:hover {
    background: #4A9D4A !important;
    transform: translateY(-2px) !important;
}

.social-links a i {
    color: #FFFFFF !important;
}

/* إصلاح تنسيق أيقونة التاريخ - من CSS الأصلي */
.header-date {
    color: #CCCCCC !important;
}

.header-date i {
    color: #5CB85C !important;
    margin-left: 5px !important;
}

/* إصلاح top-bar */
.top-bar {
    background: rgba(0, 0, 0, 0.2) !important;
    padding: 10px 0 !important;
    font-size: 14px !important;
    color: #CCCCCC !important;
}

/* إصلاح تنسيق البحث - من CSS الأصلي */
.header-search {
    margin-right: 15px !important;
    position: relative !important;
}

.search-toggle {
    background: #5CB85C !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.search-toggle:hover {
    background: #4A9D4A !important;
    transform: scale(1.1) !important;
}

.search-toggle i {
    color: #FFFFFF !important;
}

/* إصلاح التذييل */
.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
}

/* WordPress Alignment Classes */
.alignleft {
    float: right;
    margin: 0 0 1em 1em;
}

.alignright {
    float: left;
    margin: 0 1em 1em 0;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 5px;
    color: #333;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #5CB85C;
    color: white;
}

/* Search Results Styling */
.search-results-section {
    padding: 50px 0;
    min-height: 60vh;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #3A3A3A 0%, #2A2A2A 100%);
    border-radius: 15px;
    color: white;
}

.search-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
}

.search-header h1 i {
    color: #5CB85C;
    margin-left: 10px;
}

.search-header .search-query {
    color: #5CB85C;
    font-weight: bold;
}

.search-header .search-count {
    color: #CCCCCC;
    margin: 0;
    font-size: 1.1rem;
}

/* Search Result Card */
.search-result {
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-result:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.search-result .news-image {
    height: 100%;
    overflow: hidden;
}

.search-result .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result:hover .news-image img {
    transform: scale(1.1);
}

.search-result .news-content {
    padding: 20px;
}

.search-result .news-category {
    background: #5CB85C;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 10px;
}

.search-result h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.search-result h4 a {
    color: #2A2A2A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result h4 a:hover {
    color: #5CB85C;
}

.search-result p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.search-result .news-meta {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 0.9rem;
}

.search-result .news-meta i {
    color: #5CB85C;
    margin-left: 5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-results i {
    font-size: 80px;
    color: #CCCCCC;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 2rem;
    color: #2A2A2A;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
}

/* Search Form in No Results */
.search-form-wrapper {
    max-width: 600px;
    margin: 30px auto 0;
}

.search-form-wrapper .search-form {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 50px;
}

.search-form-wrapper .search-input {
    flex: 1;
    border: none;
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.search-form-wrapper .search-submit {
    background: #5CB85C;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-form-wrapper .search-submit:hover {
    background: #4A9D4A;
    transform: scale(1.05);
}

.search-form-wrapper .search-submit i {
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-header h1 {
        font-size: 1.5rem;
    }

    .search-result .news-image {
        height: 200px;
    }

    .no-results i {
        font-size: 60px;
    }

    .no-results h3 {
        font-size: 1.5rem;
    }

    .search-form-wrapper .search-form {
        flex-direction: column;
        border-radius: 15px;
    }

    .search-form-wrapper .search-input {
        border-radius: 10px;
    }

    .search-form-wrapper .search-submit {
        border-radius: 10px;
    }
}
