:root{
  --pr:#0f4c81;--prl:#1a6bb5;--prd:#0a3057;
  --ac:#d4a017;--ac2:#e74c3c;
  --bg:#eef2f7;--card:#ffffff;--txt:#1a1a2e;
  --muted:#6b7280;--border:#dde3ea;
  --r:10px;
  --sh:0 2px 14px rgba(15,76,129,.09);
  --shh:0 6px 26px rgba(15,76,129,.18);
  --font:'Cairo',Tahoma,sans-serif;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;width:100%;max-width:100%}
body{font-family:var(--font);background:var(--bg);color:var(--txt);direction:rtl;font-size:15px;line-height:1.7;overflow-x:hidden;overflow-y:auto;width:100%;max-width:100%;min-width:0}
a{text-decoration:none;color:inherit}
img{max-width:100%;height:auto;display:block}
ul{list-style:none}
::-webkit-scrollbar{width:5px}
::-webkit-scrollbar-thumb{background:var(--prl);border-radius:3px}
.wrap{max-width:1200px;margin:0 auto;padding:0 14px}

/* إلغاء عروض قديمة */
#mynews,#body,#news,#left,
div[style*="width: 705px"],div[style*="width: 290px"],
div[style*="width:705px"],div[style*="width:290px"],
div[style*="width: 950px"],div[style*="width:950px"],.dir{
  width:100%!important;max-width:100%!important;
  float:none!important;box-sizing:border-box!important;
}
table[width]{width:100%!important;max-width:100%!important;}
td[width]{width:auto!important;}
body,#mynews,#body,#news,#left{
  overflow-x:hidden!important;max-width:100%!important;
}
html{max-width:100%!important}

/* ===================================================
   شريط الأخبار العاجلة / آخر الأخبار
   =================================================== */
#breaking-bar{
  background:var(--prd);
  border-bottom:2px solid var(--ac);
  padding:0;
  overflow:hidden;
}
#breaking-bar .bb-inner{
  display:flex;
  align-items:stretch;
  height:36px;
}
#breaking-bar .bb-label{
  background:var(--ac);
  color:#fff;
  font-size:12px;
  font-weight:900;
  padding:0 16px;
  display:flex;
  align-items:center;
  white-space:nowrap;
  flex-shrink:0;
  gap:5px;
  clip-path:polygon(0 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,0 100%);
  padding-left:22px;
}
#breaking-bar .bb-ticker{
  flex:1;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
}
/* شريط خبر واحد يظهر ويختفي */
#breaking-bar .bb-ticker{
  flex:1;
  overflow:hidden;
  position:relative;
  display:flex;
  align-items:center;
  min-height:36px;
}
#breaking-bar .bb-track{
  display:none; /* مخفي — JS يتحكم */
}
/* العنصر النشط */
#bb-current{
  color:rgba(255,255,255,.92);
  font-size:13px;
  font-weight:600;
  padding:0 16px;
  display:block;
  width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-decoration:none;
  transition:opacity .5s ease, transform .5s ease;
}
#bb-current:hover{ color:var(--ac); }
#bb-current.fade-out{
  opacity:0;
  transform:translateX(30px);
}
#bb-current.fade-in{
  opacity:1;
  transform:translateX(0);
}

/* TOPBAR */
#topbar{background:var(--prd);color:rgba(255,255,255,.7);font-size:12px;padding:5px 0;border-bottom:2px solid var(--ac)}
#topbar .wrap{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
#topbar a{color:rgba(255,255,255,.7);transition:color .2s}
#topbar a:hover{color:var(--ac)}
/* بحث التوب بار */
.topbar-search{display:flex;align-items:center;flex:1;max-width:320px;}
.topbar-search input{
  flex:1;padding:4px 10px;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.1);
  color:#fff;border-radius:20px 0 0 20px;
  font-family:var(--font);font-size:12px;
  outline:none;transition:background .2s;
}
.topbar-search input::placeholder{color:rgba(255,255,255,.5)}
.topbar-search input:focus{background:rgba(255,255,255,.2)}
.topbar-search button{
  padding:4px 12px;background:var(--ac);color:#fff;
  border:none;border-radius:0 20px 20px 0;
  font-family:var(--font);font-size:12px;font-weight:700;
  cursor:pointer;transition:background .2s;white-space:nowrap;
}
.topbar-search button:hover{background:#b8880f}

/* إخفاء هيدر قديم */
#hed,#hedmenu,#hedmenu li,#navbar,#navbar ul,#navbar li,
#search,#newnews,#newnews ul,.date,#hed br,#hed .clear{
  display:none!important;height:0!important;overflow:hidden!important;
  margin:0!important;padding:0!important;border:0!important;
}
#header{display:flex!important;align-items:center!important;justify-content:center!important;background:transparent!important;padding:0!important;margin:0!important;width:100%!important;max-height:180px!important;overflow:hidden!important;}
#header table{width:100%!important;height:auto!important;display:block!important;}
#header table tr,#header table td{display:block!important;width:100%!important;height:auto!important;}
#header > img,#header img:first-of-type{
  max-width:100%!important;max-height:180px!important;width:auto!important;height:auto!important;
  object-fit:contain!important;display:block!important;margin:0 auto!important;
}

/* HEADER */
#site-header{
  background:linear-gradient(135deg,var(--prd) 0%,var(--pr) 60%,var(--prl) 100%);
  padding:10px 0;box-shadow:0 4px 20px rgba(0,0,0,.25);position:relative;
}
#site-header::after{
  content:'';position:absolute;bottom:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--ac),rgba(255,255,255,.2),var(--ac));
}

/* NAV */
#site-nav{
  background:var(--pr)!important;position:sticky!important;top:0!important;
  z-index:9000!important;box-shadow:0 3px 12px rgba(0,0,0,.25)!important;
  padding:0!important;margin:0!important;width:100%!important;
  border:none!important;float:none!important;clear:both!important;
}
.nav-wrap{
  display:flex!important;align-items:center!important;
  justify-content:space-between!important;position:relative!important;
  flex-wrap:nowrap!important;padding:0!important;margin:0!important;
}
#nav-toggle{
  display:none!important;align-items:center;justify-content:center;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);
  border-radius:6px;color:#fff;font-size:20px;width:40px;height:36px;
  margin:7px 12px;cursor:pointer;flex-shrink:0;transition:background .2s;line-height:1;
}
#nav-toggle:hover{background:rgba(255,255,255,.22)!important}
#nav-list{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none!important;
  list-style:none!important;padding:0!important;margin:0!important;
  background:transparent!important;width:auto!important;flex:1!important;
  float:none!important;position:static!important;height:auto!important;
}
#nav-list::-webkit-scrollbar{display:none!important}
#nav-list li,#nav-list > li{
  display:block!important;float:none!important;padding:0!important;margin:0!important;
  border:none!important;background:transparent!important;
  list-style:none!important;width:auto!important;height:auto!important;
}
#nav-list li a,#nav-list > li > a{
  display:block!important;padding:13px 14px!important;
  color:rgba(255,255,255,.88)!important;font-size:13px!important;
  font-weight:700!important;font-family:var(--font)!important;
  white-space:nowrap!important;border-bottom:3px solid transparent!important;
  border-top:none!important;border-right:none!important;border-left:none!important;
  background:transparent!important;text-decoration:none!important;
  transition:background .2s,color .2s,border-color .2s!important;line-height:1.4!important;
}
#nav-list li a:hover,#nav-list li a.active{
  background:rgba(255,255,255,.12)!important;color:var(--ac)!important;
  border-bottom-color:var(--ac)!important;
}
/* nav-search removed - moved to topbar */

/* PAGE GRID */
#page-main{padding:22px 0 48px}
.page-grid{display:grid;grid-template-columns:1fr 295px;gap:22px;align-items:start}

/* CARD */
.card{
  background:var(--card);border-radius:var(--r);box-shadow:var(--sh);
  overflow:hidden;margin-bottom:22px;border:1px solid var(--border);transition:box-shadow .25s;
}
.card:hover{box-shadow:var(--shh)}
.card-body{padding:16px}

/* SEC HEAD — مع زر المزيد */
.sec-head{
  display:flex;align-items:center;gap:8px;
  padding:10px 14px;
  background:linear-gradient(135deg,var(--pr),var(--prl));
  color:#fff;position:relative;
}
.sec-head::before{
  content:'';position:absolute;right:0;top:0;bottom:0;width:4px;
  background:var(--ac);border-radius:0 4px 4px 0;
}
.sec-head h2,.sec-head h3{font-size:14px;font-weight:800;margin:0}
.sec-head .ico{font-size:15px}
.sec-head .more-link{
  margin-right:auto;
  font-size:11px;
  color:rgba(255,255,255,.8);
  background:rgba(255,255,255,.15);
  padding:3px 10px;
  border-radius:20px;
  text-decoration:none;
  transition:background .2s;
  white-space:nowrap;
}
.sec-head .more-link:hover{background:rgba(255,255,255,.3);color:#fff;}

/* TABS */
.tabs1{display:flex;border-bottom:2px solid var(--border);background:#f7f9fc}
.tabs1 li{flex:1;text-align:center}
.tabs1 li a{
  display:block;padding:10px 6px;font-size:13px;font-weight:700;
  color:var(--muted);border-bottom:3px solid transparent;
  transition:color .2s,border-color .2s;cursor:pointer;
}
.tabs1 li.active a,.tabs1 li a:hover{
  color:var(--pr);border-bottom-color:var(--pr);background:rgba(15,76,129,.05);
}

/* SIDEBAR */
.sb-block{
  background:var(--card);border-radius:var(--r);box-shadow:var(--sh);
  overflow:hidden;margin-bottom:18px;border:1px solid var(--border);transition:box-shadow .25s;
}
.sb-block:hover{box-shadow:var(--shh)}
.sb-body{padding:13px}

/* NEWS LIST */
.newsmenu li{border-bottom:1px solid var(--border);transition:background .2s}
.newsmenu li:last-child{border-bottom:none}
.newsmenu li:hover{background:rgba(15,76,129,.06)}
.newsmenu li a{display:flex;gap:9px;padding:9px 11px;align-items:flex-start;color:var(--txt)}
.imgcat{width:50px;height:50px;object-fit:cover;border-radius:6px;flex-shrink:0}
.news-txt{font-size:12.5px;font-weight:600;color:var(--txt);line-height:1.5}
.news-views{display:block;font-size:11px;color:var(--muted);margin-top:3px}

/* VISITOR BOX */
.vbox{
  background:linear-gradient(135deg,var(--prd),var(--pr));
  color:#fff;text-align:center;padding:18px 12px;border-radius:8px;
}
.vbox .vnum{display:block;font-size:30px;font-weight:900;color:var(--ac);line-height:1.1;margin:6px 0 4px}
.vbox .vlbl{font-size:12px;opacity:.75}

.clk-box{text-align:center;padding:14px}
#Baghdad_z407{font-size:28px!important;color:var(--pr)!important;font-weight:900}

.site-closed{
  max-width:560px;margin:80px auto;padding:40px;text-align:center;
  background:var(--card);border-radius:var(--r);box-shadow:var(--sh);
  border-top:4px solid var(--ac2);
}

/* FOOTER */
#site-footer{
  background:linear-gradient(135deg,#071d2e,var(--pr));
  color:rgba(255,255,255,.72);padding:26px 0 14px;border-top:3px solid var(--ac);
}
.footer-copy{
  text-align:center;font-size:12px;margin-top:14px;
  border-top:1px solid rgba(255,255,255,.1);padding-top:14px;opacity:.6;
}

/* إصلاحات عامة */
.slideshow,.slider,.slides,[class*="slide"],[id*="slide"],[class*="carousel"],[id*="carousel"]{
  max-width:100%!important;overflow:hidden!important;
}
img{max-width:100%!important;height:auto!important;}
iframe{max-width:100%!important;}
[style*="width:"]{max-width:100%!important;}
.card-body table,.sb-body table{width:100%!important;max-width:100%!important;display:block!important;overflow-x:auto!important;}
#js-news,#js-news li{display:none!important;}

/* RESPONSIVE */
@media(max-width:960px){
  .page-grid{grid-template-columns:1fr}
  #sidebar{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
  #sidebar .sb-block{margin-bottom:0}
}
@media(max-width:640px){
  #nav-toggle{display:flex!important}
  #nav-list{
    display:none!important;flex-direction:column!important;
    position:absolute!important;top:100%!important;right:0!important;left:0!important;
    background:var(--prd)!important;box-shadow:0 8px 24px rgba(0,0,0,.35)!important;
    border-top:2px solid var(--ac)!important;z-index:8999!important;
    max-height:70vh!important;overflow-y:auto!important;overflow-x:hidden!important;width:100%!important;
  }
  #nav-list.open{display:flex!important;}
  #nav-list li,#nav-list > li{width:100%!important;border-bottom:1px solid rgba(255,255,255,.08)!important;}
  #nav-list li a,#nav-list > li > a{padding:13px 20px!important;font-size:14px!important;border-bottom:none!important;width:100%!important;}
  #nav-list li a:hover{background:rgba(255,255,255,.1)!important;padding-right:28px!important;}
  #sidebar{grid-template-columns:1fr!important}
  .vbox .vnum{font-size:24px}
  .wrap{padding:0 10px;width:100%;max-width:100%;box-sizing:border-box}
  #header img{max-width:100%!important;max-height:140px!important;width:auto!important;height:auto!important;object-fit:contain!important;}
  #breaking-bar .bb-label span.bb-lbl-txt{display:none}
  #topbar .wrap{flex-direction:column;align-items:stretch;gap:8px}
  .topbar-search{max-width:100%;width:100%;flex:none}
  #page-main{padding:14px 0 64px}
  .page-grid,#main-col,.card,.card-body{width:100%;max-width:100%;min-width:0}
  .list_carousel,.list_carousel ul,#foo1{width:100%!important;max-width:100%!important}
}
@media(max-width:380px){
  .sec-head h2,.sec-head h3{font-size:12px}
  #nav-list li a{font-size:13px!important;padding:11px 14px!important;}
}

/* صفحات داخلية */
.minpage-banner{width:100%;max-height:240px;object-fit:cover;border-radius:var(--r);margin-bottom:16px}
.article-title{font-size:22px;font-weight:900;color:var(--txt);line-height:1.5;margin:0 0 8px}
.article-meta{color:var(--muted);font-size:13px;margin-bottom:16px}
.article-cover{width:100%;border-radius:var(--r);margin:8px 0 18px;object-fit:cover;max-height:420px}
.article-body{font-size:16px;line-height:1.9;color:var(--txt)}
.article-body img{border-radius:8px;margin:10px 0}
.news-row{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.news-row img{width:150px;height:100px;object-fit:cover;border-radius:8px;flex-shrink:0}
.news-row h3{font-size:15px;margin:0 0 6px;color:var(--txt)}
.news-row h3 a{color:var(--txt);font-weight:800}
.crumb{font-size:13px;color:var(--muted);margin-bottom:14px}
.crumb a{color:var(--pr);font-weight:700}
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.photo-grid a img{width:100%;height:140px;object-fit:cover;border-radius:8px}
.minpage-item{display:flex;gap:10px;align-items:center;padding:9px 11px;border-bottom:1px solid var(--border)}
.minpage-item:last-child{border-bottom:none}
.minpage-item img{width:52px;height:52px;object-fit:cover;border-radius:8px}
.minpage-item span{font-size:13px;font-weight:700;color:var(--txt)}
.minpage-nav{display:flex;gap:8px;margin:0 0 16px;flex-wrap:wrap}
.minpage-nav a{
  background:var(--pr);color:#fff;padding:8px 14px;border-radius:8px;
  font-size:13px;font-weight:700
}
.minpage-nav a:hover,.minpage-nav a.active{background:var(--prd);color:var(--ac)}
.feat-hero{position:relative;border-radius:var(--r);overflow:hidden;margin-bottom:12px}
.feat-hero img{width:100%;height:320px;object-fit:cover}
.feat-hero .feat-cap{
  position:absolute;bottom:0;left:0;right:0;padding:18px 16px 14px;
  background:linear-gradient(transparent,rgba(10,48,87,.94));color:#fff
}
.feat-hero .feat-cap h2{font-size:18px;margin:0;font-weight:800;line-height:1.5}
.feat-hero .feat-cap h2 a{color:#fff}
.feat-thumbs{display:flex;gap:8px;margin-bottom:18px;overflow-x:auto}
.feat-thumbs a{flex:0 0 92px}
.feat-thumbs img{width:92px;height:62px;object-fit:cover;border-radius:6px;opacity:.65}
.feat-thumbs a.active img,.feat-thumbs a:hover img{opacity:1;outline:2px solid var(--ac)}
.article-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:8px}
.date-badge{
  background:linear-gradient(180deg,#e74c3c,#c0392b);color:#fff;border-radius:8px;
  text-align:center;min-width:68px;padding:8px 6px;flex-shrink:0
}
.date-badge .d{font-size:22px;font-weight:900;line-height:1.1}
.date-badge .m,.date-badge .y{font-size:11px}
.btn-more{
  display:block;margin:16px auto 0;background:var(--pr);color:#fff;border:0;
  padding:10px 22px;border-radius:8px;cursor:pointer;font-family:inherit;font-weight:700
}
.btn-more:hover{background:var(--prd)}
.related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.related-grid a{display:block;background:#f7f9fc;border-radius:8px;overflow:hidden;border:1px solid var(--border)}
.related-grid img{width:100%;height:110px;object-fit:cover}
.related-grid span{display:block;padding:8px 10px;font-size:13px;font-weight:700;color:var(--prd)}
.attach-list img{width:100%;border-radius:8px;margin:8px 0}
@media(max-width:640px){
  .photo-grid{grid-template-columns:repeat(2,1fr)}
  .news-row{flex-direction:column}
  .news-row img{width:100%;height:180px}
  .article-title{font-size:18px}
  .feat-hero img{height:220px}
  .related-grid{grid-template-columns:1fr}
}
