:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .10);

  --brand: #0b3a57;
  --brand2: #0e7490;

  --shadow: 0 14px 40px rgba(15, 23, 42, .10);
  --radius: 18px;
}

*{ box-sizing:border-box; }

html, body{
  margin:0; padding:0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(14,116,144,.14), transparent 60%),
    radial-gradient(1000px 500px at 85% 10%, rgba(11,58,87,.10), transparent 60%),
    var(--bg);

  /* ✅ يمنع أي تمرير أفقي (حل مشكلة الشريط بالعرض) */
  overflow-x: hidden;
}

a{ color: inherit; text-decoration:none; }

.container{
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(246,247,251,.78);
  border-bottom: 1px solid var(--line);
}

.topbar__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 0;

  /* ✅ احتياط لمنع أي تمدد أفقي */
  max-width: 100%;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand__logo{
  width:40px; height:40px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
  background: linear-gradient(135deg, var(--brand2), var(--brand));
  box-shadow: 0 12px 24px rgba(14,116,144,.22);
}
.brand__title{
  font-weight:900;
  letter-spacing:.2px;
  line-height:1.2;
}
.brand__sub{
  font-size:12px;
  color: var(--muted);
  margin-top:2px;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;

  /* ✅ احتياط لمنع أي تمدد أفقي */
  max-width: 100%;
}
.nav a{
  padding:8px 10px;
  border-radius:12px;
  border: 1px solid transparent;
  color: var(--muted);
}
.nav a:hover{
  background: rgba(15,23,42,.05);
  border-color: rgba(15,23,42,.08);
  color: var(--text);
}

/* ===== Social icons ===== */
.nav__social{
  display:flex;
  gap:8px;
  align-items:center;
  margin-inline-start: 6px;

  /* ✅ إذا كثرت الأيقونات يلف بدون ما يعمل سكرول */
  flex-wrap: wrap;
  max-width: 100%;
}
.iconbtn{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.82);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: .18s ease;
  padding: 0 !important;
}
.iconbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.98);
}
.iconbtn svg{
  width: 18px;
  height: 18px;
  fill: rgba(15,23,42,.72);
}

.main{
  padding: 22px 0 42px;
}

.layout{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
}
@media (max-width: 940px){
  .layout{ grid-template-columns: 1fr; }
}

.card{
  background: rgba(255,255,255,.86);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card__title{
  font-weight:900;
  font-size:18px;
  margin:0 0 10px;
}
.card__sub{
  color: var(--muted);
  font-size:13px;
  margin:0 0 12px;
  line-height:1.8;
}

.sidebar a{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border: 1px solid transparent;
  color: var(--text);
}
.sidebar a:hover{
  background: rgba(15,23,42,.05);
  border-color: rgba(15,23,42,.08);
}
.sidebar a.is-active{
  background: rgba(14,116,144,.10);
  border-color: rgba(14,116,144,.22);
}
.badge{
  font-size:12px;
  font-weight:800;
  color: var(--muted);
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
}

.postcard{
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
}
.postcard__img{
  width:100%;
  height:170px;
  object-fit:cover;
  display:block;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.postcard__body{
  padding: 12px 12px 14px;
}
.meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  color: var(--muted);
  font-size:12px;
  margin-bottom:6px;
}
.meta__pill{
  padding: 4px 10px;
  border-radius:999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(248,250,252,.9);
}
.postcard__title{
  margin:0 0 8px;
  font-weight:900;
  line-height:1.5;
}
.postcard__excerpt{
  margin:0;
  color: var(--muted);
  line-height:1.9;
  font-size:13px;
}
.postcard__more{
  margin-top:10px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-weight:900;
  color: var(--brand2);
}

.pager{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-top:14px;
}
.pager__info{
  color: var(--muted);
  font-size:13px;
  font-weight:900;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  cursor:pointer;
  font-weight:900;

  font-family: inherit; /* ✅ يخلي الأزرار تستخدم Cairo */
  font-size: 14px;      /* ✅ توحيد حجم الخط */
}
.btn:hover{
  background: rgba(255,255,255,.98);
}

.hero{
  padding: 12px 0 6px;
}
.hero h1{
  margin:0;
  font-size: 26px;
  font-weight: 900;
}
.hero p{
  margin:6px 0 0;
  color: var(--muted);
  line-height:1.9;
}

.footer{
  border-top:1px solid var(--line);
  background: rgba(255,255,255,.55);
  padding: 18px 0 26px;
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color: var(--muted);
  font-size: 13px;
}
.footer__muted{ opacity: .9; }
