/*
Theme Name: Sports Pro - سبورتس برو
Theme URI: https://example.com/sports-pro
Author: Sports Pro Team
Author URI: https://example.com
Description: قالب ووردبريس رياضي احترافي فائق السرعة، مصمم ومبرمج بالكامل من الصفر لدعم السيو المتقدم وجوجل ديسكفري وأخبار جوجل، متوافق كلياً مع Rank Math، يتضمن نظام روابط قصيرة مدمج، أزرار مشاركة سريعة بدون مكتبات ثقيلة، لوحة تحكم إدارية متقدمة، أماكن إعلانات أدسنس عالية العائد (High CTR)، وتجاوب تام 100% بدون أي خروج للصفحات خارج الإطار في شاشات الهواتف الذكية.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sports-pro
Tags: sports, news, blog, rtl-language-support, grid-layout, two-columns, custom-menu, featured-images, translation-ready, seo-friendly
*/

/* ==========================================================================
   CSS Variables & Sports Palette
   ========================================================================== */
:root {
  --sp-primary: #059669;         /* أخضر ملاعب رياضي حيوي */
  --sp-primary-dark: #047857;
  --sp-primary-light: #10b981;
  --sp-accent: #e11d48;          /* أحمر الإثارة والأهداف */
  --sp-accent-hover: #be123c;
  --sp-dark: #0f172a;            /* كحلي رياضي داكن */
  --sp-dark-surface: #1e293b;
  --sp-dark-card: #334155;
  --sp-light-bg: #f8fafc;
  --sp-white: #ffffff;
  --sp-gray-50: #f8fafc;
  --sp-gray-100: #f1f5f9;
  --sp-gray-200: #e2e8f0;
  --sp-gray-300: #cbd5e1;
  --sp-gray-600: #475569;
  --sp-gray-700: #334155;
  --sp-gray-900: #0f172a;
  --sp-font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Arabic', sans-serif;
  --sp-radius-sm: 6px;
  --sp-radius-md: 10px;
  --sp-radius-lg: 16px;
  --sp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --sp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --sp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --sp-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --sp-container-width: 1200px;
}

/* ==========================================================================
   Zero Horizontal Overflow & Strict Mobile Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--sp-font-family);
  background-color: var(--sp-light-bg);
  color: var(--sp-gray-900);
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* منع أي محتوى من كسر الشاشة أو الخروج عن الإطار */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  max-width: 100%;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--sp-transition);
}

a:hover {
  color: var(--sp-primary);
}

ul, ol {
  padding-right: 1.25rem;
  padding-left: 0;
  margin: 0 0 1.25rem 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--sp-dark);
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

/* Container */
.sp-container {
  width: 100%;
  max-width: var(--sp-container-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

/* ==========================================================================
   Header & Sports Ticker
   ========================================================================== */
.sp-top-bar {
  background-color: var(--sp-dark);
  color: var(--sp-gray-300);
  font-size: 0.825rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sp-top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sp-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-social-top a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  margin-left: 0.35rem;
}

.sp-social-top a:hover {
  background: var(--sp-primary);
}

/* Breaking News Ticker */
.sp-ticker-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--sp-gray-200);
  padding: 0.35rem 0;
  font-size: 0.875rem;
}

.sp-ticker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.sp-ticker-badge {
  background: var(--sp-accent);
  color: #fff;
  padding: 0.2rem 0.65rem;
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: var(--sp-radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.sp-ticker-content {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.sp-ticker-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-rtl 25s linear infinite;
}

.sp-ticker-marquee:hover {
  animation-play-state: paused;
}

.sp-ticker-item {
  display: inline-block;
  margin-left: 2rem;
  font-weight: 600;
  color: var(--sp-gray-700);
}

.sp-ticker-item:hover {
  color: var(--sp-accent);
}

@keyframes marquee-rtl {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Main Header */
.sp-main-header {
  background: #ffffff;
  box-shadow: var(--sp-shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}

.sp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.sp-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--sp-dark);
}

.sp-logo-ball {
  color: var(--sp-primary);
  display: inline-flex;
}

.sp-logo span.highlight {
  color: var(--sp-primary);
}

/* Navigation */
.sp-desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sp-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.25rem;
}

.sp-nav-menu li {
  position: relative;
}

.sp-nav-menu a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sp-gray-700);
  padding: 0.5rem 0;
  display: inline-block;
}

.sp-nav-menu a:hover,
.sp-nav-menu .current-menu-item > a {
  color: var(--sp-primary);
}

.sp-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--sp-dark);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* Mobile Drawer */
.sp-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85%;
  height: 100vh;
  background: #ffffff;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  z-index: 9999;
  transition: right 0.3s ease-in-out;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.sp-mobile-drawer.active {
  right: 0;
}

.sp-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--sp-gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.sp-close-drawer {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--sp-gray-600);
}

.sp-drawer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sp-drawer-menu li {
  border-bottom: 1px solid var(--sp-gray-100);
}

.sp-drawer-menu a {
  display: block;
  padding: 0.75rem 0;
  font-weight: 700;
  color: var(--sp-gray-900);
}

.sp-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
  display: none;
}

.sp-drawer-overlay.active {
  display: block;
}

/* ==========================================================================
   AdSense Placement Wrappers (High CTR)
   ========================================================================== */
.sp-ad-wrapper {
  margin: 1.25rem auto;
  text-align: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  clear: both;
}

.sp-ad-wrapper::before {
  content: 'إعلان';
  display: block;
  font-size: 0.65rem;
  color: var(--sp-gray-300);
  text-align: center;
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.sp-ad-header {
  max-width: 728px;
  min-height: 90px;
}

.sp-ad-inpost {
  margin: 2rem 0;
  background: var(--sp-gray-50);
  padding: 0.5rem;
  border-radius: var(--sp-radius-sm);
  border: 1px dashed var(--sp-gray-200);
}

.sp-ad-sidebar {
  margin-bottom: 1.5rem;
  min-height: 250px;
}

.sp-ad-mobile-anchor {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 9990;
  text-align: center;
  padding: 4px 0;
}

/* ==========================================================================
   Home Hero & Match Center Banner
   ========================================================================== */
.sp-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.sp-featured-main {
  position: relative;
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  height: 420px;
  background-color: var(--sp-dark);
  box-shadow: var(--sp-shadow-md);
}

.sp-featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sp-featured-main:hover img {
  transform: scale(1.03);
}

.sp-featured-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 1.75rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 60%, transparent 100%);
  color: #ffffff;
}

.sp-badge {
  display: inline-block;
  background: var(--sp-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--sp-radius-sm);
  margin-bottom: 0.5rem;
}

.sp-badge-accent {
  background: var(--sp-accent);
}

.sp-featured-title {
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.sp-featured-side-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sp-side-item {
  position: relative;
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  height: 198px;
  background: var(--sp-dark);
  box-shadow: var(--sp-shadow-md);
}

.sp-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sp-side-item:hover img {
  transform: scale(1.04);
}

.sp-side-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 70%, transparent 100%);
  color: #fff;
}

.sp-side-title {
  font-size: 1rem;
  color: #ffffff;
  margin: 0.25rem 0 0 0;
  line-height: 1.35;
}

/* ==========================================================================
   Main Content Layout & Sports Card Grid
   ========================================================================== */
.sp-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-bottom: 3rem;
}

.sp-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--sp-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.sp-section-heading h2 {
  font-size: 1.35rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.sp-post-card {
  background: #ffffff;
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  box-shadow: var(--sp-shadow-sm);
  border: 1px solid var(--sp-gray-200);
  transition: var(--sp-transition);
  display: flex;
  flex-direction: column;
}

.sp-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sp-shadow-md);
  border-color: var(--sp-gray-300);
}

.sp-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--sp-gray-100);
  overflow: hidden;
}

.sp-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sp-post-card:hover .sp-card-thumb img {
  transform: scale(1.04);
}

.sp-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.sp-card-title {
  font-size: 1.125rem;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}

.sp-card-excerpt {
  color: var(--sp-gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.sp-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--sp-gray-600);
  border-top: 1px solid var(--sp-gray-100);
  padding-top: 0.75rem;
}

/* ==========================================================================
   Single Article Page & Google Discover Enhancements
   ========================================================================== */
.sp-article-container {
  background: #ffffff;
  border-radius: var(--sp-radius-md);
  padding: 2rem;
  box-shadow: var(--sp-shadow-sm);
  border: 1px solid var(--sp-gray-200);
}

/* Breadcrumbs (Supports Rank Math) */
.sp-breadcrumbs {
  font-size: 0.85rem;
  color: var(--sp-gray-600);
  margin-bottom: 1rem;
}

.sp-breadcrumbs a:hover {
  color: var(--sp-primary);
}

.sp-article-header {
  margin-bottom: 1.5rem;
}

.sp-article-title {
  font-size: 2.1rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--sp-dark);
  margin-bottom: 1rem;
}

.sp-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--sp-gray-600);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sp-gray-200);
}

.sp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sp-meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

/* Single Featured Image - Strict 16:9 large display for Google Discover */
.sp-article-featured-image {
  margin: 1.5rem 0 2rem 0;
  border-radius: var(--sp-radius-md);
  overflow: hidden;
  position: relative;
  background-color: var(--sp-gray-100);
  aspect-ratio: 16 / 9;
}

.sp-article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-article-featured-image figcaption {
  font-size: 0.8rem;
  color: var(--sp-gray-600);
  padding: 0.4rem 0.75rem;
  background: var(--sp-gray-50);
  border-top: 1px solid var(--sp-gray-200);
  text-align: center;
}

/* Article Content Typography & Media */
.sp-article-content {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #1e293b;
  word-break: break-word;
}

.sp-article-content p {
  margin-bottom: 1.5rem;
}

.sp-article-content h2 {
  font-size: 1.55rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-right: 0.75rem;
  border-right: 4px solid var(--sp-primary);
}

.sp-article-content h3 {
  font-size: 1.3rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.sp-article-content blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--sp-gray-50);
  border-right: 4px solid var(--sp-accent);
  border-radius: 0 var(--sp-radius-md) var(--sp-radius-md) 0;
  font-style: italic;
  color: var(--sp-gray-700);
}

.sp-article-content img {
  border-radius: var(--sp-radius-sm);
  margin: 1.5rem auto;
}

/* ==========================================================================
   Shortlink Box & Social Share Buttons
   ========================================================================== */
.sp-article-footer-tools {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--sp-gray-200);
}

/* Short Link Box */
.sp-shortlink-box {
  background: var(--sp-gray-50);
  border: 1px solid var(--sp-gray-200);
  border-radius: var(--sp-radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sp-shortlink-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sp-gray-700);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sp-shortlink-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
  max-width: 480px;
}

.sp-shortlink-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: monospace;
  direction: ltr;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--sp-gray-300);
  border-radius: var(--sp-radius-sm);
  outline: none;
}

.sp-shortlink-input:focus {
  border-color: var(--sp-primary);
}

.sp-btn-copy-shortlink {
  background: var(--sp-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--sp-radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--sp-transition);
}

.sp-btn-copy-shortlink:hover {
  background: var(--sp-primary-dark);
}

.sp-btn-copy-shortlink.copied {
  background: #16a34a;
}

/* Social Share Bar */
.sp-share-container {
  margin: 1.5rem 0;
}

.sp-share-heading {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sp-gray-700);
  margin-bottom: 0.75rem;
}

.sp-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--sp-radius-sm);
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sp-share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.sp-share-whatsapp { background-color: #25D366; }
.sp-share-telegram { background-color: #229ED9; }
.sp-share-x { background-color: #000000; }
.sp-share-facebook { background-color: #1877F2; }
.sp-share-linkedin { background-color: #0A66C2; }
.sp-share-copy { background-color: var(--sp-dark); cursor: pointer; border: none; }

/* Author Bio Box */
.sp-author-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--sp-gray-50);
  border: 1px solid var(--sp-gray-200);
  border-radius: var(--sp-radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.sp-author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--sp-primary);
  flex-shrink: 0;
}

.sp-author-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.sp-author-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--sp-gray-600);
}

/* Related Posts */
.sp-related-posts {
  margin-top: 2.5rem;
}

.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sp-related-card {
  background: #ffffff;
  border: 1px solid var(--sp-gray-200);
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  transition: var(--sp-transition);
}

.sp-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow-md);
}

.sp-related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.sp-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-related-title {
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 0.75rem;
  margin: 0;
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */
.sp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sp-widget {
  background: #ffffff;
  border-radius: var(--sp-radius-md);
  padding: 1.25rem;
  border: 1px solid var(--sp-gray-200);
  box-shadow: var(--sp-shadow-sm);
}

.sp-widget-title {
  font-size: 1.15rem;
  border-bottom: 2px solid var(--sp-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sp-widget-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sp-widget-post-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.sp-widget-post-thumb {
  width: 75px;
  height: 55px;
  border-radius: var(--sp-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.sp-widget-post-title {
  font-size: 0.875rem;
  line-height: 1.3;
  margin: 0;
  font-weight: 600;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.sp-pagination {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.sp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: var(--sp-radius-sm);
  background: #ffffff;
  border: 1px solid var(--sp-gray-200);
  font-weight: 700;
  font-size: 0.9rem;
}

.sp-pagination .page-numbers.current {
  background: var(--sp-primary);
  color: #ffffff;
  border-color: var(--sp-primary);
}

.sp-pagination .page-numbers:hover:not(.current) {
  background: var(--sp-gray-100);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.sp-footer {
  background: var(--sp-dark);
  color: var(--sp-gray-300);
  margin-top: 4rem;
  border-top: 4px solid var(--sp-primary);
}

.sp-footer-widgets {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.sp-footer-widget h3 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.sp-footer-bottom {
  background: #090d16;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
}

.sp-footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 991px) {
  .sp-desktop-nav {
    display: none;
  }
  
  .sp-mobile-toggle {
    display: block;
  }
  
  .sp-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .sp-hero-grid {
    grid-template-columns: 1fr;
  }
  
  .sp-featured-main {
    height: 320px;
  }
  
  .sp-featured-side-list {
    flex-direction: row;
  }
  
  .sp-side-item {
    flex: 1;
    height: 180px;
  }
  
  .sp-footer-widgets {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 767px) {
  html {
    font-size: 15px;
  }

  .sp-container {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .sp-featured-main {
    height: 260px;
  }

  .sp-featured-title {
    font-size: 1.25rem;
  }

  .sp-featured-side-list {
    flex-direction: column;
  }

  .sp-posts-grid {
    grid-template-columns: 1fr;
  }

  .sp-article-container {
    padding: 1.25rem 1rem;
  }

  .sp-article-title {
    font-size: 1.5rem;
  }

  .sp-related-grid {
    grid-template-columns: 1fr;
  }

  .sp-author-box {
    flex-direction: column;
    text-align: center;
  }

  .sp-shortlink-box {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-shortlink-input-group {
    max-width: 100%;
  }

  .sp-btn-copy-shortlink {
    justify-content: center;
  }

  .sp-ad-mobile-anchor {
    display: block;
  }

  body {
    padding-bottom: 60px; /* مسافة للإعلان السفلي الثابت للجوال */
  }
}


/* ==========================================================================
   Footer Social Buttons (No overlap, clean responsive layout)
   ========================================================================== */
.sp-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

.sp-footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--sp-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--sp-transition);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.sp-footer-social-btn svg {
  flex-shrink: 0;
}

.sp-footer-social-btn:hover {
  background: var(--sp-primary);
  border-color: var(--sp-primary);
  transform: translateY(-2px);
}

.sp-footer-social-btn.sp-social-x:hover {
  background: #000000;
}

.sp-footer-social-btn.sp-social-telegram:hover {
  background: #229ED9;
}

.sp-footer-social-btn.sp-social-facebook:hover {
  background: #1877F2;
}

/* منع تكرار الصورة البارزة في محتوى المقال */
.sp-article-content .wp-block-post-featured-image {
  display: none !important;
}
