/* ==========================================================================
   Echo Theme Custom Style Overlay (RTL & Modern Layout)
   ========================================================================== */

body {
    background-color: #f4f5f7;
    font-family: 'Roboto', 'Open Sans', sans-serif, tahoma;
    direction: rtl;
    text-align: right;
}

.pm-main-container {
    padding-top: 25px;
    padding-bottom: 40px;
}

/* عناوين الأقسام / Section Titles */
.section-header {
    position: relative;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1b89ff;
    margin: 0;
    display: inline-block;
}

.section-title i {
    margin-left: 8px;
    color: #1b89ff;
}

/* شبكة كروت الفيديوهات / Video Cards Grid */
.pm-video-col {
    margin-bottom: 25px;
}

.pm-video-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eee;
}

.pm-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* الصورة المصغرة والمدة / Thumbnails & Duration */
.pm-video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* نسبة ابعاد 16:9 */
    background-color: #000;
    overflow: hidden;
}

.pm-video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.pm-video-card:hover .pm-video-thumb img {
    opacity: 0.9;
}

.pm-label-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    direction: ltr;
}

.label-new {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
}

/* تفاصيل وتفاصيل الفيديو / Details & Meta */
.pm-video-details {
    padding: 12px 14px;
}

.pm-video-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    margin: 0 0 10px 0;
}

.pm-video-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pm-video-title a:hover {
    color: #1b89ff;
}

.pm-video-meta {
    font-size: 12px;
    color: #777777;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f2f2f2;
    padding-top: 8px;
}

.pm-video-meta span {
    display: inline-block;
}

.pm-video-meta i {
    margin-left: 3px;
    color: #999;
}

/* زر عرض المزيد */
.btn-load-more {
    background-color: #1b89ff;
    border-color: #1b89ff;
    color: #ffffff;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 25px;
    transition: background 0.3s ease;
}

.btn-load-more:hover {
    background-color: #006bde;
    border-color: #006bde;
    color: #ffffff;
}
/* ==========================================================================
   Video Watch Page Custom Styles
   ========================================================================== */

.pm-video-watch-wrapper {
    background-color: #f4f5f7;
    padding-top: 20px;
    padding-bottom: 40px;
}

/* عنوان وتفاصيل الفيديو العلوية */
.pm-video-heading {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border: 1px solid #eee;
    border-bottom: none;
}

.pm-video-title-watch {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.pm-video-meta-top {
    font-size: 13px;
    color: #777;
    display: flex;
    gap: 15px;
    align-items: center;
}

.pm-video-meta-top span i {
    color: #1b89ff;
    margin-left: 5px;
}

/* حاوية مشغل الفيديو */
.pm-player-wrap {
    background: #000;
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.pm-player-wrap iframe,
.pm-player-wrap object,
.pm-player-wrap embed,
.pm-player-wrap video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* أزرار التفاعل والإبلاغ */
.pm-video-actions {
    background: #fff;
    padding: 12px 20px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #eee;
    border-top: none;
    margin: 0;
}

.pm-action-likes button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #444;
    margin-left: 8px;
    font-weight: bold;
    border-radius: 20px;
    padding: 6px 15px;
    transition: all 0.2s ease;
}

.pm-action-likes button:hover {
    background: #1b89ff;
    color: #fff;
    border-color: #1b89ff;
}

.pm-action-tools button {
    background: transparent;
    border: none;
    color: #777;
    font-size: 16px;
    margin-right: 10px;
}

.pm-action-tools button:hover {
    color: #e74c3c;
}

/* صندوق الوصف والوسوم */
.pm-video-description-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.pm-box-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 10px;
}

.pm-video-desc-content {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

.pm-video-tags {
    margin-top: 15px;
    font-size: 13px;
}

.pm-video-tags a {
    background: #f1f1f1;
    color: #555;
    padding: 3px 10px;
    border-radius: 15px;
    display: inline-block;
    margin-right: 5px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.pm-video-tags a:hover {
    background: #1b89ff;
    color: #fff;
}

/* القائمة الجانبية: الفيديوهات ذات الصلة */
.pm-watch-sidebar {
    padding-right: 25px; /* مسافة للغة العربية RTL */
}

.pm-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0 0 15px 0;
    border-right: 3px solid #1b89ff;
    padding-right: 10px;
}

.pm-related-item {
    display: flex;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: box-shadow 0.2s ease;
}

.pm-related-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.pm-related-thumb {
    width: 40%;
    position: relative;
    background: #000;
}

.pm-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-related-details {
    width: 60%;
    padding: 10px;
}

.pm-related-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 5px 0;
    height: 36px;
    overflow: hidden;
}

.pm-related-title a {
    color: #333;
    text-decoration: none;
}

.pm-related-title a:hover {
    color: #1b89ff;
}

.pm-related-meta {
    font-size: 11px;
    color: #888;
}

/* تخصيصات شاشات الجوال */
@media (max-width: 991px) {
    .pm-watch-sidebar {
        padding-right: 15px;
        margin-top: 30px;
    }
}
/* ==========================================================================
   Category Page Custom Styles
   ========================================================================== */

/* صندوق عنوان التصنيف */
.category-header {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.category-header .section-title {
    margin: 0;
    display: inline-block;
}

.pm-sorting-dropdown {
    margin-top: -2px;
}

.pm-sorting-dropdown .btn-default {
    background: #f8f9fa;
    border-color: #ddd;
    color: #444;
    border-radius: 4px;
    font-weight: 600;
}

.category-description {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 0;
    border-top: 1px dashed #eee;
    padding-top: 12px;
}

/* التصنيفات الفرعية */
.pm-subcategories ul {
    margin: 0;
    padding: 0;
}

.pm-subcategories .btn-outline-primary {
    background: transparent;
    border: 1px solid #1b89ff;
    color: #1b89ff;
    margin-bottom: 10px;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pm-subcategories .btn-outline-primary:hover {
    background: #1b89ff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(27, 137, 255, 0.2);
}

/* تنسيق أرقام الصفحات (Pagination) */
.pm-pagination {
    margin: 0;
}

.pm-pagination > li > a, 
.pm-pagination > li > span {
    color: #444;
    border: 1px solid #eee;
    margin: 0 3px;
    border-radius: 4px;
    font-weight: 600;
    padding: 8px 14px;
    transition: all 0.2s ease;
}

.pm-pagination > li > a:hover {
    background-color: #f4f5f7;
    border-color: #ddd;
    color: #1b89ff;
}

.pm-pagination > .active > a, 
.pm-pagination > .active > span, 
.pm-pagination > .active > a:hover, 
.pm-pagination > .active > span:hover, 
.pm-pagination > .active > a:focus, 
.pm-pagination > .active > span:focus {
    background-color: #1b89ff;
    border-color: #1b89ff;
    color: #fff;
    box-shadow: 0 2px 6px rgba(27, 137, 255, 0.3);
}
/* ==========================================================================
   Footer Custom Styles
   ========================================================================== */

.pm-footer {
    background-color: #ffffff;
    border-top: 1px solid #eaeaea;
    padding: 50px 0 20px;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.pm-footer-about .footer-logo img {
    max-width: 180px;
    margin-bottom: 15px;
}

.footer-desc {
    color: #777;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* أيقونات التواصل الاجتماعي */
.social-links {
    margin: 0;
    padding: 0;
}

.social-links li {
    margin-left: 10px;
}

.social-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    background: #f4f5f7;
    color: #555;
    text-align: center;
    border-radius: 50%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #1b89ff;
    color: #fff;
    transform: translateY(-3px);
}

/* عناوين أقسام الفوتر */
.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: #1b89ff;
    border-radius: 3px;
}

/* روابط الفوتر */
.pm-footer-links ul li, .pm-footer-pages ul li {
    margin-bottom: 12px;
}

.pm-footer-links ul li a, .pm-footer-pages ul li a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pm-footer-links ul li a:hover, .pm-footer-pages ul li a:hover {
    color: #1b89ff;
    padding-right: 5px; /* حركة خفيفة عند تمرير الماوس */
}

/* الجزء السفلي من الفوتر */
.pm-footer-bottom {
    border-top: 1px solid #f0f0f0;
    margin-top: 30px;
    padding-top: 20px;
    display: flex;
    align-items: center;
}

.copyright {
    color: #888;
    font-size: 13px;
    margin: 0;
}

.pm-lang-col {
    direction: ltr; /* لضبط القائمة المنسدلة للغة */
}

.pm-language a {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.pm-language a:hover {
    color: #1b89ff;
}

/* تخصيصات شاشات الجوال */
@media (max-width: 767px) {
    .pm-footer-links, .pm-footer-pages {
        margin-top: 30px;
    }
    .pm-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .pm-lang-col {
        margin-top: 15px;
        direction: rtl;
    }
    .pm-language.dropup {
        float: none !important;
        display: inline-block;
    }
}
/* ==========================================================================
   Header & Navbar Custom Styles (Echo Theme Style)
   ========================================================================== */

/* الترويسة الرئيسية */
.header-bg {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
    position: relative;
    z-index: 1000;
}

/* الشعار (Logo) */
.header-logo {
    display: inline-block;
    vertical-align: middle;
}

.header-logo h3 {
    margin: 0;
    line-height: 1;
}

.header-logo h3 a {
    color: #1b89ff; /* اللون الأزرق المميز */
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.header-logo img {
    max-height: 45px;
    width: auto;
}

/* زر القائمة الجانبية (للهواتف) */
#navslide-toggle {
    display: inline-block;
    vertical-align: middle;
    margin-left: 15px; /* RTL - مسافة من اليسار لأن الشعار يمين */
    color: #333;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

#navslide-toggle:hover {
    color: #1b89ff;
}

/* مربع البحث */
#pm-top-search {
    padding-top: 5px;
}

.pm-search-form .input-group {
    width: 100%;
}

.pm-search-form .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 25px 0 0 25px; /* RTL - تدوير الحواف من اليمين */
    box-shadow: none;
    padding: 8px 15px;
    height: 40px;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.pm-search-form .form-control:focus {
    background-color: #fff;
    border-color: #1b89ff;
}

.pm-search-form .btn-default {
    background-color: #1b89ff;
    border-color: #1b89ff;
    color: #fff;
    height: 40px;
    border-radius: 0 25px 25px 0; /* RTL - تدوير الحواف من اليسار */
    padding: 0 20px;
    transition: background 0.3s ease;
}

.pm-search-form .btn-default:hover {
    background-color: #006bde;
    border-color: #006bde;
}

/* قائمة المستخدم وأزرار تسجيل الدخول */
.navbar-pmuser {
    margin: 0;
    padding-top: 5px;
    text-align: left; /* لدفع العناصر لليسار في RTL */
}

.navbar-pmuser > li {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* زر تسجيل الدخول */
.navbar-pmuser .btn-primary {
    background-color: #1b89ff;
    border-color: #1b89ff;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.3s ease;
}

.navbar-pmuser .btn-primary:hover {
    background-color: #006bde;
}

/* صورة الأفاتار للمستخدم المسجل */
.header-avatar {
    border: 2px solid #eee;
    padding: 2px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.header-avatar:hover {
    border-color: #1b89ff;
}

/* القائمة المنسدلة للمستخدم */
.navbar-pmuser .dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 10px;
    right: auto;
    left: 0; /* لأننا في بيئة RTL ونريدها أن تفتح لليسار */
}

.navbar-pmuser .dropdown-menu > li > a {
    padding: 10px 20px;
    color: #555;
    font-weight: 500;
}

.navbar-pmuser .dropdown-menu > li > a:hover {
    background-color: #f4f5f7;
    color: #1b89ff;
}

/* أيقونة البحث للهواتف */
#pm-top-mobile-search-show {
    color: #555;
    font-size: 18px;
}

/* تخصيصات شاشات الجوال */
@media (max-width: 767px) {
    .header-logo h3 a {
        font-size: 20px;
    }
    .header-bg {
        padding: 10px 15px;
    }
    .navbar-pmuser {
        padding-top: 2px;
    }
}