/*
Theme Name: Rm Gamer
Theme URI: https://rmgamer.com
Author: Rm Gamer
Author URI: https://rmgamer.com
Description: موقع متخصص في أخبار وتقييمات الألعاب الإلكترونية
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rmgamer
Tags: gaming, arabic, rtl, blog
*/

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #F5A623;
  --gold-dark: #E09510;
  --blue: #3A5BCC;
  --blue-card: #4A6ADB;
  --dark: #1a1a2e;
  --black: #111;
  --white: #fff;
  --footer-bg: #111827;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: #f5f5f5;
  color: #222;
  direction: rtl;
}

a { text-decoration: none; color: inherit; }

/* ===== TOPBAR ===== */
.topbar {
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  padding: 4px 16px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.topbar-links a { color: #555; margin-left: 12px; font-size: 12px; }
.topbar-links a:hover { color: var(--gold); }
.topbar-promo { color: var(--gold-dark); font-weight: 700; font-size: 12px; }

/* ===== HEADER ===== */
header {
  background: var(--dark);
  padding: 0;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 1px;
}
.site-logo span { color: var(--gold); }
.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-bar input {
  width: 100%;
  border-radius: 30px;
  border: none;
  padding: 10px 20px 10px 44px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  background: #2a2a4a;
  color: #fff;
  outline: none;
  direction: rtl;
}
.search-bar input::placeholder { color: #aaa; }
.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 16px;
}
.header-home-btn {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 18px;
  cursor: pointer;
}
.header-home-btn:hover { background: var(--gold-dark); }

/* ===== MAIN NAV ===== */
nav.main-nav {
  background: var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  gap: 4px;
  cursor: pointer;
  border-left: 1px solid rgba(0,0,0,0.1);
  transition: background 0.2s;
  flex: 1;
  max-width: 200px;
  text-align: center;
}
.nav-item:last-child { border-left: none; }
.nav-item:hover { background: rgba(0,0,0,0.08); }
.nav-item .nav-icon { font-size: 26px; color: #111; }
.nav-item .nav-label { font-size: 11px; font-weight: 700; color: #111; }
.nav-item .nav-label-en { font-size: 10px; color: #333; }

/* ===== LAYOUT ===== */
.main-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.sidebar-btn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  text-align: center;
  background: var(--gold);
  color: #000;
}
.sidebar-search-inner {
  display: flex;
  gap: 6px;
  padding: 8px;
}
.sidebar-search-inner input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  direction: rtl;
  outline: none;
}
.sidebar-search-inner button {
  background: var(--gold);
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-link {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--blue);
  font-weight: 600;
  border-top: 1px solid #f0f0f0;
}
.sidebar-link:hover { background: #f9f9f9; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  transition: filter 0.2s;
}
.social-btn:hover { filter: brightness(0.9); color: #fff; }
.btn-tiktok { background: #000; }
.btn-facebook { background: #1877F2; }
.btn-youtube { background: #FF0000; }
.btn-whatsapp-btn { background: #25D366; }

/* ===== CONTENT ===== */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  color: #222;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}
.section-title .icon { color: var(--gold); font-size: 20px; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.post-thumb {
  background: var(--blue-card);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .thumb-icon { font-size: 42px; color: rgba(255,255,255,0.4); }
.post-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gold);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 8px;
}
.post-body { padding: 10px 10px 6px; flex: 1; display: flex; flex-direction: column; }
.post-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #222;
  line-height: 1.5;
  margin-bottom: 6px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta { font-size: 10px; color: #888; margin-bottom: 6px; }
.post-footer { padding: 0 10px 10px; }
.read-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gold);
  color: #000;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}
.read-btn:hover { background: var(--gold-dark); }
.read-btn span { font-size: 10px; color: #555; }

/* ===== FOOTER ===== */
footer {
  background: var(--footer-bg);
  color: #ccc;
  margin-top: 40px;
  padding: 40px 16px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 24px;
}
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col p { font-size: 13px; color: #bbb; line-height: 1.7; }
.footer-col a { display: block; font-size: 13px; color: #bbb; margin-bottom: 6px; transition: color 0.15s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid #2a2a3a; padding-top: 14px; text-align: center; font-size: 12px; color: #666; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.whatsapp-float a {
  background: #25D366;
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 18px rgba(37,211,102,0.45);
  animation: wapulse 2.2s infinite;
  transition: transform 0.2s;
}
.whatsapp-float a:hover { transform: scale(1.1); animation: none; }
.wa-label { background: #25D366; color: #fff; font-size: 10px; font-weight: 700; border-radius: 12px; padding: 2px 10px; font-family: 'Cairo', sans-serif; }
@keyframes wapulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gold);
  color: #000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 9998;
  border: none;
}
.scroll-top:hover { background: var(--gold-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .main-container { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .nav-item { padding: 8px 10px; }
  .header-inner { flex-wrap: wrap; }
  .search-bar { order: 3; width: 100%; max-width: 100%; flex: 0 0 100%; }
}
@media (max-width: 400px) {
  .posts-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
