/* ============================== */
/* الأساسيات العامة               */
/* ============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  color: #222;
}

/* الحاوية العامة */
.container {
  width: 92%;
  max-width: 1080px;
  margin: 0 auto;
}

/* ============================== */
/* الهيدر                         */
/* ============================== */

/* القائمة */



/* ============================== */
/* الإعلان أعلى الهيدر           */
/* ============================== */

.ad-leaderboard {
  background: #fafafa;
  border-top: 1px dashed #ddd;
  border-bottom: 1px dashed #ddd;
  padding: 0.5rem 0;
  margin-top: 0.8rem;
}

.ad-inner {
  text-align: center;
  font-size: 0.85rem;
  color: #555;
}

.ad-label {
  font-weight: 700;
}

/* ============================== */
/* صفحة التقويم                   */
/* ============================== */

.page-calendar .calendar-shell {
  max-width: 720px;
  margin: 0 auto;
}

.calendar-month-bar {
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 0 0 1px #ddd, 0 6px 15px rgba(0,0,0,0.05);
  text-align: center;
}

.calendar-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.cal-nav-btn {
  border: none;
  background: #22c55e;
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.85rem;
  white-space: nowrap;
}

.cal-nav-btn:hover {
  background: #16a34a;
}

.calendar-main-title {
  flex: 1;
  background: #f3f4f6;
  color: #111827;
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.calendar-main-title span {
  display: block;
}

.calendar-today-fixed {
  margin-top: 0.8rem;
  background: #111827;
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
}

/* الشبكة */

.calendar-grid {
  margin-top: 1rem;
  background: #fff;
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 0 0 1px #ddd;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.cal-cell {
  min-height: 65px;
  border-radius: 10px;
  background: #f9fafb;
  box-shadow: 0 0 0 1px #e5e5e5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cal-cell .cal-h {
  font-weight: 700;
}

.cal-cell .cal-g {
  font-size: 0.8rem;
  color: #6b7280;
}

.cal-cell.is-today {
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 2px #22c55e;
  font-weight: 800;
}

/* ============================== */
/* فوتر الموقع                    */
/* ============================== */

.main-footer {
  background: #fff;
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #555;
  margin-top: 2rem;
}

.footer-links a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

/* ============================== */
/* تحسينات للجوال                */
/* ============================== */

@media (max-width: 768px) {
.calendar-nav-row {
    flex-direction: column;
  }

  .cal-cell {
    min-height: 58px;
  }
}

/* ============================== */
/* Header + Nav (NEW, unified)    */
/* ============================== */

.site-header{
  background:#fff;
  border-bottom:1px solid #e5e7eb;
  box-shadow:0 2px 10px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0.9rem 0;
}

.site-logo{
  text-decoration:none;
  color:#111827;
  display:flex;
  flex-direction:column;
  gap:0.2rem;
}

.site-logo__title{
  font-size:1.7rem;
  font-weight:800;
  letter-spacing:0.3px;
}

.site-logo__tagline{
  font-size:0.9rem;
  color:#6b7280;
}

/* Desktop nav */
.site-nav{
  display:flex;
  align-items:center;
  gap:0.4rem;
  flex-wrap:wrap;
}

.site-nav a{
  text-decoration:none;
  color:#111827;
  font-weight:700;
  font-size:0.95rem;
  padding:0.45rem 0.85rem;
  border-radius:999px;
  transition:0.2s;
  background:transparent;
}

.site-nav a:hover{
  background:#f3f4f6;
}

/* Active state (auto if page adds class active on link; fallback via body classes not handled) */
.site-nav a.active{
  background:#111827;
  color:#fff;
}

/* Hamburger button */
.nav-toggle{
  display:none;
  width:42px;
  height:42px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  position:relative;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after{
  content:"";
  display:block;
  width:20px;
  height:2px;
  background:#111827;
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  transition:0.2s;
}

.nav-toggle__bars{ top:50%; }
.nav-toggle__bars::before{ top:-6px; }
.nav-toggle__bars::after{ top:6px; }

/* Drawer overlay */
.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  z-index:999;
  opacity:0;
  transition:0.2s;
}

.drawer-overlay.show{ opacity:1; }

/* Mobile drawer */
.mobile-drawer{
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:min(86vw, 340px);
  background:#fff;
  z-index:1000;
  transform:translateX(100%);
  transition:0.25s ease;
  box-shadow:-8px 0 20px rgba(0,0,0,0.08);
  display:flex;
  flex-direction:column;
}

.mobile-drawer.open{ transform:translateX(0); }

.mobile-drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1rem 1rem 0.8rem;
  border-bottom:1px solid #f0f0f0;
}

.mobile-drawer__title{
  font-weight:800;
  font-size:1.1rem;
}

.drawer-close{
  background:#f3f4f6;
  border:0;
  width:36px;
  height:36px;
  border-radius:10px;
  cursor:pointer;
  font-size:1.1rem;
}

/* Mobile nav links */
.mobile-nav{
  padding:0.6rem 0.8rem;
  display:flex;
  flex-direction:column;
  gap:0.2rem;
}

.mobile-nav a{
  text-decoration:none;
  color:#111827;
  font-weight:700;
  font-size:1rem;
  padding:0.8rem 0.7rem;
  border-radius:12px;
  transition:0.2s;
}

.mobile-nav a:hover{
  background:#f3f4f6;
}

.mobile-nav a.active{
  background:#111827;
  color:#fff;
}

/* lock scroll when drawer open */
.no-scroll{ overflow:hidden; }

/* Responsive rules */
@media (max-width: 768px){
  .site-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .site-logo__title{ font-size:1.45rem; }
  .site-logo__tagline{ font-size:0.8rem; }
}
sor:pointer;
  font-size:1.1rem;
}

/* Mobile nav links */
.mobile-nav{
  padding:0.6rem 0.8rem;
  display:flex;
  flex-direction:column;
  gap:0.2rem;
}

.mobile-nav a{
  text-decoration:none;
  color:#111827;
  font-weight:700;
  font-size:1rem;
  padding:0.8rem 0.7rem;
  border-radius:12px;
  transition:0.2s;
}

.mobile-nav a:hover{
  background:#f3f4f6;
}

.mobile-nav a.active{
  background:#111827;
  color:#fff;
}

/* lock scroll when drawer open */
.no-scroll{ overflow:hidden; }

/* Responsive rules */
@media (max-width: 768px){
  .site-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .site-logo__title{ font-size:1.45rem; }
  .site-logo__tagline{ font-size:0.8rem; }
}
