/* =====================================================================
   كونكورات تونسية — ملف التصميم الوحيد
   غيّر الألوان والخط من هنا فقط (القسم الأول)
   ===================================================================== */

/* ---------- الخط ---------- */
@font-face {
  font-family: "Zahir Arabic";
  src: url("assets/Zahir_Arabic.ttf") format("truetype");
  font-weight: 100 900;           /* الخط بوزن واحد، هذا يمنع المتصفح من تغليظه صناعياً */
  font-style: normal;
  font-display: block;
}

/* ---------- الألوان والمتغيرات ---------- */
:root {
  --font-main: "Zahir Arabic", sans-serif;   /* الخط الرئيسي لكل الموقع */

  --color-bg: #f5f6f8;          /* خلفية الصفحة */
  --color-surface: #ffffff;     /* خلفية البطاقات والهيدر والفوتر */
  --color-text: #15171a;        /* النص الأساسي والعناوين */
  --color-muted: #5f6670;       /* النص الثانوي (الوصف) */
  --color-border: #e6e8ec;      /* الحدود */
  --color-accent: #e30613;      /* اللون الرئيسي (الأحمر التونسي) */
  --color-accent-text: #ffffff; /* لون النص فوق اللون الرئيسي */

  --color-telegram: #229ed9;
  --color-whatsapp: #25d366;
  --color-facebook: #1877f2;

  --radius: 16px;
  --page-width: 780px;
}

/* ---------- الأساسيات ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
button, input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: 18px; }

/* ---------- الهيدر ---------- */
#site-header { min-height: 68px; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.gift-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-text);
  transition: opacity .15s ease;
}
.gift-btn:hover { opacity: .85; }
.gift-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-logo img { height: 44px; width: auto; }

/* ---------- أماكن الإعلانات ---------- */
.ad-slot { margin: 20px 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }   /* تختفي تلقائياً إذا كانت فارغة */

/* ---------- قائمة الأخبار ---------- */
.news-list { display: flex; flex-direction: column; gap: 14px; padding-block: 8px 20px; }

.news-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s ease;
}
.news-item:hover { border-color: var(--color-accent); }

.news-link { display: flex; align-items: center; gap: 20px; padding: 18px; }
.news-text { flex: 1; min-width: 0; }
.news-title { margin: 0 0 6px; font-size: 1.55rem; line-height: 1.5; font-weight: 500; }
.news-desc { margin: 0; font-size: 1rem; line-height: 1.8; color: var(--color-muted); }
.news-thumb {
  flex: 0 0 200px; width: 200px; height: 130px;
  object-fit: cover; border-radius: 12px;
  background: var(--color-bg);
}

/* ---------- صفحة الخبر ---------- */
.article { padding-block: 8px 24px; }
.back-link { display: inline-block; margin-block: 8px; color: var(--color-muted); font-size: 1rem; }
.back-link:hover { color: var(--color-accent); }
.article-title { margin: 8px 0 18px; font-size: 2.2rem; line-height: 1.5; font-weight: 500; }
.article-image { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; background: var(--color-surface); }
.article-body { font-size: 1.15rem; line-height: 2.05; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { margin: 26px 0 8px; font-size: 1.4rem; line-height: 1.6; font-weight: 500; }
.article-body ul { margin: 0 0 18px; padding-inline-start: 24px; }
.article-body li { margin-bottom: 8px; }
.btn {
  display: inline-block; margin-top: 8px; padding: 10px 26px;
  background: var(--color-accent); color: var(--color-accent-text);
  border-radius: 999px; font-size: 1.05rem; transition: opacity .15s ease;
}
.btn:hover { opacity: .88; }

/* ---------- الفوتر ---------- */
.site-footer {
  margin-top: 28px; padding-block: 30px 22px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-logo img { height: 42px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--color-text); }
.footer-links a:hover { color: var(--color-accent); }
.footer-links svg { width: 20px; height: 20px; flex: none; }
.ico-telegram { fill: var(--color-telegram); }
.ico-whatsapp { fill: var(--color-whatsapp); }
.ico-facebook { fill: var(--color-facebook); }
.footer-copy { margin: 0; font-size: .9rem; color: var(--color-muted); }

/* ---------- الهاتف ---------- */
@media (max-width: 620px) {
  body { font-size: 17px; }
  .news-link { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px; }
  .news-thumb { order: -1; flex: none; width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .news-title { font-size: 1.35rem; }
  .article-title { font-size: 1.7rem; }
  .header-logo img { height: 38px; }
}
