/*
Theme Name: Al-Fiqh
Theme URI: https://example.com/alfiqh
Author: Samir
Author URI: https://example.com
Description: قالب إسلامي أنيق لمواقع الدروس والمحاضرات الصوتية، بتصميم عربي RTL بألوان ذهبية وزمردية.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alfiqh
Tags: rtl-language-support, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* ===== الأساسيات ===== */
:root {
  --bg: hsl(40, 33%, 95%);
  --card: hsl(40, 40%, 98%);
  --ink: hsl(165, 30%, 12%);
  --ink-deep: hsl(165, 50%, 9%);
  --emerald: hsl(165, 45%, 18%);
  --emerald-light: hsl(165, 35%, 30%);
  --gold: hsl(38, 62%, 48%);
  --gold-light: hsl(40, 70%, 58%);
  --muted: hsl(165, 10%, 38%);
  --border: hsl(38, 22%, 82%);
  --radius: 14px;
  --shadow: 0 20px 50px -20px hsla(165, 50%, 9%, 0.35);
  --shadow-gold: 0 10px 30px -10px hsla(38, 62%, 48%, 0.4);
}

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

html { direction: rtl; }

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
  font-size: 17px;
}

a { color: var(--emerald); text-decoration: none; transition: color .25s; }
a:hover { color: var(--gold); }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: "Amiri", "Tajawal", serif; line-height: 1.4; }

/* ===== الترويسة ===== */
.site-header {
  background: var(--emerald);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 20px; flex-wrap: wrap;
}
.site-branding .site-title {
  font-size: 28px; font-weight: 700; color: var(--gold-light);
}
.site-branding .site-title a { color: var(--gold-light); }
.site-branding .site-description { font-size: 13px; opacity: .85; }

.main-navigation ul {
  list-style: none; display: flex; gap: 6px; flex-wrap: wrap;
}
.main-navigation a {
  color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 500;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: rgba(255,255,255,.12); color: var(--gold-light);
}

.header-search form { display: flex; }
.header-search input[type="search"] {
  padding: 8px 14px; border: none; border-radius: 8px 0 0 8px;
  font-family: inherit; width: 180px; background: rgba(255,255,255,.15); color: #fff;
}
.header-search input[type="search"]::placeholder { color: rgba(255,255,255,.7); }
.header-search button {
  padding: 8px 14px; border: none; border-radius: 0 8px 8px 0;
  background: var(--gold); color: var(--ink-deep); cursor: pointer; font-weight: 700;
}

/* ===== القسم البطولي ===== */
.hero {
  background: radial-gradient(ellipse at top, hsl(165,40%,16%), hsl(165,50%,7%));
  color: #fff; text-align: center; padding: 90px 20px;
}
.hero .bismillah { color: var(--gold-light); font-size: 22px; margin-bottom: 18px; }
.hero h1 { font-size: 46px; margin-bottom: 16px; color: #fff; }
.hero p { max-width: 640px; margin: 0 auto 30px; opacity: .9; font-size: 19px; }
.hero .btn {
  display: inline-block; background: linear-gradient(135deg, var(--gold-light), hsl(34,60%,42%));
  color: var(--ink-deep); padding: 14px 36px; border-radius: 50px;
  font-weight: 700; font-size: 18px; box-shadow: var(--shadow-gold);
}
.hero .btn:hover { transform: translateY(-2px); color: var(--ink-deep); }

/* ===== الأقسام ===== */
.section { padding: 70px 0; }
.section-title {
  text-align: center; font-size: 34px; color: var(--emerald); margin-bottom: 10px;
}
.section-subtitle { text-align: center; color: var(--muted); margin-bottom: 45px; }

/* ===== شبكة البطاقات ===== */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px;
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.06); transition: all .3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--emerald-light); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card .card-cat {
  display: inline-block; background: hsla(38,62%,48%,.15); color: var(--gold);
  font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 20px;
  margin-bottom: 10px; width: fit-content;
}
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--gold); }
.card .card-meta { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.card .card-excerpt { color: var(--muted); font-size: 15px; flex: 1; }
.card .card-link {
  margin-top: 16px; font-weight: 700; color: var(--emerald);
}
.card .card-link::after { content: " ←"; }

/* ===== التصنيفات ===== */
.cats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px;
}
.cat-box {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
  color: #fff; text-align: center; padding: 30px 16px; border-radius: var(--radius);
  transition: all .3s;
}
.cat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: #fff; }
.cat-box .cat-name { font-size: 19px; font-weight: 700; font-family: "Amiri", serif; }
.cat-box .cat-count { font-size: 13px; opacity: .85; color: var(--gold-light); }

/* ===== صفحة المقال ===== */
.single-post { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.single-post h1 { font-size: 36px; color: var(--emerald); margin-bottom: 14px; }
.single-post .post-meta { color: var(--muted); margin-bottom: 30px; font-size: 15px; }
.single-post .post-content { font-size: 18px; }
.single-post .post-content p { margin-bottom: 20px; }

/* ===== التذييل ===== */
.site-footer {
  background: var(--ink-deep); color: hsl(40,40%,85%);
  padding: 50px 0 25px; margin-top: 60px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 35px; margin-bottom: 35px;
}
.site-footer h4 { color: var(--gold-light); margin-bottom: 14px; font-size: 19px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: hsl(40,40%,85%); }
.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
  text-align: center; font-size: 14px; opacity: .7;
}

/* ===== ترقيم الصفحات ===== */
.pagination { text-align: center; margin: 45px 0; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 16px; margin: 0 4px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.pagination .page-numbers.current { background: var(--emerald); color: #fff; }

/* ===== تجاوب ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .site-header .container { justify-content: center; text-align: center; }
  .main-navigation ul { justify-content: center; }
}
