/*
Theme Name: أسرار الغابة
Theme URI: https://youtube.com/@asraralghaba
Author: أسرار الغابة
Description: قالب الموقع الرسمي لأسرار الغابة. حلقات من يوتيوب (@asraralghaba)، شخصيات، شركاء، تكريم، استطلاعات، مسابقات، ومزامنة ساعية بدون مفتاح API.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: asrar-studio
*/

:root {
  --bg: #07110c;
  --bg-2: #0d1b14;
  --card: #122018;
  --line: rgba(232, 197, 107, 0.28);
  --gold: #e8c56b;
  --gold-2: #f3dd9a;
  --ink: #f6f1e6;
  --muted: #c9bea8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(232, 197, 107, 0.16), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  direction: rtl;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
img, iframe { max-width: 100%; display: block; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(820px, calc(100% - 32px)); margin-inline: auto; }
.screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 17, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-row { display: flex; align-items: center; gap: 18px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--gold-2); }
.brand img, .custom-logo { width: 48px; height: 48px; border-radius: 50%; }
.brand-inline { margin-bottom: 8px; font-size: 1rem; }
.site-nav { margin-inline-start: auto; }
.menu { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--muted); }
.menu a:hover, .menu .current-menu-item > a { color: #1a1408; background: var(--gold); }
.has-sub { position: relative; }
.has-sub ul {
  display: none; position: absolute; top: 100%; inset-inline-start: 0;
  background: #102017; border: 1px solid var(--line); border-radius: 16px;
  min-width: 210px; padding: 8px; list-style: none; box-shadow: var(--shadow);
}
.has-sub:hover ul, .has-sub:focus-within ul { display: block; }
.header-search { display: flex; gap: 6px; }
.header-search input, .stack-form input, .stack-form textarea {
  background: #0c1812; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 14px; font: inherit;
}
.stack-form textarea, .stack-form input { width: 100%; border-radius: 14px; }
.header-search button, .btn {
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 999px; padding: 10px 16px;
}
.btn-gold, .header-search button { background: linear-gradient(180deg, #f3dd9a, #d7b15a); color: #1a1408; }
.btn-line { background: transparent; color: var(--gold-2); border: 1px solid var(--line); }
.nav-toggle { display: none; background: transparent; color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

.hero { position: relative; min-height: 78vh; display: grid; align-items: end; padding: 72px 0 48px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,17,12,0.15), rgba(7,17,12,0.92)),
    radial-gradient(circle at 20% 30%, rgba(232,197,107,0.18), transparent 28%),
    radial-gradient(circle at 75% 40%, rgba(46, 120, 72, 0.35), transparent 32%),
    linear-gradient(160deg, #143024, #07110c 70%);
}
.hero-bg:after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(transparent, var(--bg));
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--gold); letter-spacing: 0; margin: 0 0 8px; font-weight: 700; }
.hero h1 { font-size: clamp(3rem, 8vw, 6.4rem); line-height: 1.05; margin: 0 0 12px; text-shadow: 0 10px 40px rgba(0,0,0,.45); }
.lede { max-width: 720px; font-size: 1.2rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.section { padding: 28px 0 10px; }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 8px; }
.stats { padding-top: 8px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat, .card, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 30%), var(--card);
  border: 1px solid rgba(232,197,107,0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.stat { padding: 22px 16px; text-align: center; }
.stat strong { display: block; color: var(--gold-2); font-size: 1.8rem; }
.stat span, .meta, .card p { color: var(--muted); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
.panel { padding: 28px; }
.packages { list-style: none; padding: 0; margin: 16px 0 20px; }
.packages li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.packages span { display: block; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; }
.section-head a { color: var(--gold); }
.card { overflow: hidden; color: inherit; display: flex; flex-direction: column; }
.card-body { padding: 16px 16px 18px; }
.card h3 { margin: 6px 0; font-size: 1.15rem; }
.episode-thumb { aspect-ratio: 16/9; background: #08140f; overflow: hidden; }
.episode-thumb img, .episode-thumb iframe, .char-img img { width: 100%; height: 100%; object-fit: cover; }
.episode-player { aspect-ratio: 16/9; }
.episode-player iframe { width: 100%; height: 100%; border: 0; }
.char-img { aspect-ratio: 1; background: #0c1812; }
.char-img.tall { aspect-ratio: 16/8; }
.meta { display: flex; gap: 10px; font-size: .9rem; }
.archive-head { padding: 48px 0 10px; }
.archive-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.content > *:first-child { margin-top: 0; }
.pagination-wrap { padding: 18px 0 36px; }
.pagination-wrap .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.page-numbers.current { background: var(--gold); color: #1a1408; }
.empty, .notice-bar { padding: 18px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); }
.notice-bar { width: min(1120px, calc(100% - 32px)); margin: 16px auto 0; color: var(--gold-2); }
.stack-form { display: grid; gap: 12px; margin-top: 16px; }
.choice { display: flex; gap: 8px; align-items: center; }
.choice em { margin-inline-start: auto; color: var(--gold); font-style: normal; }
.site-footer { margin-top: 48px; padding: 36px 0 18px; background: #06100c; border-top: 1px solid rgba(255,255,255,0.06); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 22px; }
.site-footer h3 { margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { margin-top: 22px; color: var(--muted); font-size: .92rem; }
.watch-out { margin-top: 14px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .split, .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-row { flex-wrap: wrap; padding: 10px 0; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .menu { flex-direction: column; align-items: stretch; }
  .has-sub ul { position: static; display: block; box-shadow: none; }
  .header-search { width: 100%; }
  .header-search input { flex: 1; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .split, .footer-grid { grid-template-columns: 1fr; }
}
