/*
Theme Name: FastNews Pro
Theme URI: https://fastnews.pro
Description: قالب إخباري احترافي سريع - متوافق PHP 8.4 - FlyingPress Ready - Google News & Discover
Version: 2.0.0
Author: FastNews Team
Author URI: https://fastnews.pro
License: GPL v2
Text Domain: fastnews-pro
Requires PHP: 8.4
*/

:root {
  --primary: #1a73e8;
  --secondary: #34a853;
  --dark: #202124;
  --gray: #5f6368;
  --light: #f8f9fa;
  --border: #dadce0;
  --white: #fff;
  --spacing: 1rem;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
}

body.rtl { font-family: "Noto Sans Arabic", -apple-system, sans-serif; direction: rtl; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 var(--spacing); }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary); }

img { max-width: 100%; height: auto; display: block; }

.header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 2rem; }
.logo img { max-height: 60px; }
.nav ul { display: flex; list-style: none; gap: 2rem; }
.nav a { font-weight: 500; padding: 0.5rem 1rem; border-radius: var(--radius); }
.nav a:hover { background: var(--light); }

.main { padding: 2rem 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }

.card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { position: relative; padding-bottom: 56.25%; background: var(--light); overflow: hidden; }
.card-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.card:hover .card-img img { transform: scale(1.05); }
.card-content { padding: 1.5rem; }
.card-cat { font-size: 0.75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; margin-bottom: 0.5rem; }
.card-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card-title a { color: var(--dark); }
.card-excerpt { color: var(--gray); font-size: 0.95rem; margin-bottom: 1rem; }
.card-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--gray); }

.single-post { max-width: 900px; margin: 0 auto; }
.post-header { margin-bottom: 2rem; }
.post-cat { font-size: 0.85rem; font-weight: 600; color: var(--primary); text-transform: uppercase; margin-bottom: 0.5rem; }
.post-title { font-size: 2.5rem; margin-bottom: 1rem; }
.post-meta { display: flex; gap: 2rem; color: var(--gray); margin-bottom: 2rem; }
.post-img { margin-bottom: 2rem; border-radius: var(--radius); overflow: hidden; }
.post-content { font-size: 1.1rem; line-height: 1.8; }
.post-content p { margin-bottom: 1.5rem; }
.post-content img { margin: 2rem 0; border-radius: var(--radius); }
.post-content h2 { font-size: 1.8rem; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.4rem; margin: 1.5rem 0 1rem; }

.ad { margin: 2rem auto; text-align: center; min-height: 280px; display: flex; align-items: center; justify-content: center; background: var(--light); border-radius: var(--radius); }
.ad-label { font-size: 0.7rem; color: var(--gray); text-transform: uppercase; margin-bottom: 0.5rem; }

.footer { background: var(--dark); color: var(--white); padding: 2rem 0; margin-top: 4rem; }
.footer-inner { text-align: center; }

.btn { display: inline-block; padding: 0.75rem 1.5rem; background: var(--primary); color: var(--white); border-radius: var(--radius); font-weight: 500; transition: var(--transition); }
.btn:hover { background: var(--secondary); transform: translateY(-2px); }

.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 3rem 0; }
.pagination a, .pagination span { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 1rem; }
  .nav ul { flex-wrap: wrap; justify-content: center; }
  .post-title { font-size: 1.8rem; }
}
