/*
Theme Name: Roya Dark Theme
Description: قالب سريع ومظلم مهيأ لإعلانات جوجل أد مانجر
Version: 1.0
Text Domain: roya
*/

/* الإعدادات العامة (تلقائي حسب لغة ووردبريس) */
body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; background-color: #0f0f0f; margin: 0; padding: 0; color: #ffffff; text-align: start; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* شريط الـ Top Bar */
.top-bar { background: #d90429; color: #fff; text-align: center; padding: 12px; font-weight: 900; }

/* الهيدر */
.site-header { background-color: #161616; border-bottom: 1px solid #222; padding: 20px 0; text-align: center; }
.site-header h1 { margin: 0; font-size: 28px; color: #fbbc05; }

/* توسيط الإعلانات تلقائياً */
.ad-section { width: 100%; display: flex; justify-content: center; align-items: center; margin: 20px 0; flex-direction: column; }
.ad-section .widget { width: 100%; text-align: center; display: flex; justify-content: center; }

/* شبكة المقالات */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }

/* مربع المقالة */
.post-card { background: #161616; border-radius: 12px; border: 1px solid #222; overflow: hidden; position: relative; display: flex; flex-direction: column; transition: transform 0.2s; }
.post-card:hover { transform: scale(1.02); border-color: #444; }

/* الرابط السحري */
.full-box-link { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; }

/* صورة وتفاصيل المقالة */
.post-image { width: 100%; height: 200px; object-fit: cover; border-bottom: 1px solid #222; display: block; }
.no-image { width: 100%; height: 200px; background: #222; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #222; color: #888; }
.post-info { padding: 15px 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; text-align: center; }
.post-title { font-size: 16px; margin: 0 0 15px 0; font-weight: bold; line-height: 1.5; color: #fff; }
.enter-draw { color: #fbbc05; font-size: 14px; font-weight: bold; margin-top: auto; }

/* صفحة المقالة الداخلية */
.post-body-container { background: #161616; padding: 30px; border-radius: 12px; border: 1px solid #222; margin-top: 30px;}
.post-body-container h1 { font-size: 24px; border-bottom: 1px solid #333; padding-bottom: 15px; margin-top: 0; color: #fbbc05; }
.post-content { line-height: 1.8; color: #ddd; font-size: 16px; margin-top: 20px; position: relative; z-index: 20; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 15px 0; }

/* الإعلان المنبثق التلقائي */
#auto-ad-popup { position: fixed; bottom: 0; left: 0; width: 100%; z-index: 9999; display: none; justify-content: center; align-items: flex-end; pointer-events: none; }
.ad-popup-content { background: #1a1a1a; padding: 15px; border-top-left-radius: 15px; border-top-right-radius: 15px; border: 1px solid #444; border-bottom: none; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); pointer-events: auto; position: relative; text-align: center; min-width: 300px; margin-bottom: 0;}
.close-ad-btn { position: absolute; top: -12px; right: -12px; background: #fbbc05; color: #000; width: 28px; height: 28px; border-radius: 50%; font-weight: bold; cursor: pointer; display: flex; justify-content: center; align-items: center; border: 2px solid #1a1a1a; font-size: 14px; }

/* أزرار التنقل Pagination */
.pagination { text-align: center; margin-top: 40px; }
.pagination .page-numbers { display: inline-block; padding: 10px 20px; background: #161616; color: #fbbc05; border: 1px solid #222; border-radius: 8px; margin: 0 5px; font-weight: bold; transition: 0.3s; }
.pagination .page-numbers:hover, .pagination .current { background: #fbbc05; color: #0f0f0f; }