/*
Theme Name: SudanDesk
Theme URI: https://sudandesk.com
Author: SudanDesk Team
Description: قالب إخباري احترافي لموقع SudanDesk - منصة إخبارية سودانية مستقلة
Version: 1.0
Text Domain: sudandesk
*/

:root {
  --red: #E30613;
  --red-dark: #b00010;
  --black: #0D0D0D;
  --dark: #1A1A1A;
  --light: #F2F2F2;
  --white: #ffffff;
  --green: #00A651;
  --border: #e8e8e8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Cairo', sans-serif; background: var(--light); color: var(--black); direction: rtl; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ── TOP BAR ── */
.topbar { background: var(--black); color: #aaa; font-size: 12px; padding: 6px 0; border-bottom: 2px solid var(--red); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.topbar-date { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-live { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.live-dot { width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: blink 1.2s ease-in-out infinite; display: inline-block; }
@keyframes blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.8)} }
.topbar-social { display: flex; gap: 8px; }
.topbar-social a { color: #888; font-size: 13px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: all .2s; }
.topbar-social a:hover { color: #fff; background: var(--red); }

/* ── TICKER ── */
.ticker-bar { background: var(--dark); display: flex; align-items: stretch; overflow: hidden; height: 44px; border-bottom: 1px solid #2a2a2a; }
.ticker-label { background: var(--red); color: #fff; font-weight: 900; font-size: 13px; padding: 0 22px 0 28px; display: flex; align-items: center; gap: 7px; white-space: nowrap; flex-shrink: 0; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.ticker-label-ar { background: #222; color: #ccc; font-weight: 700; font-size: 12px; padding: 0 14px; display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; border-right: 2px solid var(--red); }
.ticker-content { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; white-space: nowrap; animation: ticker-move 40s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-move { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.ticker-item { color: #fff; font-size: 13.5px; font-weight: 500; padding-left: 48px; display: inline-flex; align-items: center; gap: 7px; }
.ticker-item::before { content: '◆'; color: var(--red); font-size: 7px; }
.ticker-item a { color: #fff; transition: color .2s; }
.ticker-item a:hover { color: #ffb3b3; }
.ticker-empty { color: #888; font-size: 13px; padding: 0 16px; }

/* ── HEADER ── */
.site-header { background: #fff; border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 20px rgba(0,0,0,.12); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-logo { display: flex; align-items: center; gap: 10px; }
.logo-main { font-size: 30px; font-weight: 900; line-height: 1; }
.logo-main span { color: var(--red); }
.logo-sub { font-size: 11px; color: #888; font-weight: 500; margin-top: 3px; }
.header-search { flex: 1; max-width: 360px; position: relative; }
.header-search input { width: 100%; padding: 10px 16px 10px 42px; border: 2px solid var(--border); border-radius: 6px; font-family: 'Cairo',sans-serif; font-size: 13px; outline: none; transition: border .2s; background: #fafafa; }
.header-search input:focus { border-color: var(--red); background: #fff; }
.header-search input::placeholder { color: #bbb; }
.search-btn { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #aaa; cursor: pointer; font-size: 15px; }
.search-btn:hover { color: var(--red); }
.btn-subscribe { background: var(--red); color: #fff; border: none; padding: 9px 18px; border-radius: 6px; font-family: 'Cairo',sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; transition: background .2s; }
.btn-subscribe:hover { background: var(--red-dark); }

/* ── NAV ── */
.main-nav { background: var(--black); border-bottom: 2px solid #222; }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item { color: #bbb; font-size: 13.5px; font-weight: 600; padding: 0 16px; height: 46px; display: flex; align-items: center; white-space: nowrap; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; }
.nav-item:hover, .nav-item.current-menu-item, .nav-item.current-cat { color: #fff; border-bottom-color: var(--red); }
.nav-item-now { background: var(--red); color: #fff !important; border-radius: 4px 4px 0 0; margin: 4px 4px 0; padding: 0 14px !important; height: 42px !important; border-bottom: none !important; font-weight: 900; animation: pulse-nav 2s ease-in-out infinite; }
@keyframes pulse-nav { 0%,100%{background:var(--red)} 50%{background:var(--red-dark)} }
.nav-divider { width: 1px; background: #2a2a2a; margin: 10px 0; flex-shrink: 0; }

/* ── HERO ── */
.hero-section { max-width: 1280px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.hero-main { border-radius: 8px; overflow: hidden; position: relative; }
.hero-img-wrap { height: 420px; position: relative; background: #111; overflow: hidden; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-placeholder { position: absolute; inset: 0; background: linear-gradient(160deg,#0d0d0d 0%,#1a0000 40%,#2a0000 70%,#1a1a1a 100%); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.96) 0%,rgba(0,0,0,.5) 55%,rgba(0,0,0,.1) 100%); z-index: 2; }
.hero-tags { position: absolute; top: 16px; right: 16px; z-index: 3; display: flex; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 4px; font-size: 11px; font-weight: 800; }
.tag-urgent { background: var(--red); color: #fff; animation: pulse-tag 1.5s ease-in-out infinite; }
.tag-cat { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2); }
@keyframes pulse-tag { 0%,100%{box-shadow:0 0 0 0 rgba(227,6,19,.6)} 50%{box-shadow:0 0 0 6px rgba(227,6,19,0)} }
.hero-body { position: absolute; bottom: 0; right: 0; left: 0; z-index: 3; padding: 20px 24px 24px; }
.hero-title { color: #fff; font-size: 26px; font-weight: 900; line-height: 1.5; margin-bottom: 10px; }
.hero-meta { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.7); font-size: 12px; }
.hero-meta .sep { color: rgba(255,255,255,.3); }
.hero-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { background: #fff; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 110px 1fr; border: 1px solid var(--border); transition: box-shadow .2s; }
.side-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.side-card-img { background: #2a2a2a; aspect-ratio: 1; overflow: hidden; position: relative; }
.side-card-img img { width: 100%; height: 100%; object-fit: cover; }
.side-card-body { padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; }
.side-card-tag { font-size: 10px; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.side-card-title { font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--dark); }
.side-card-time { font-size: 11px; color: #aaa; margin-top: 5px; }

/* ── CONTENT ── */
.content-area { max-width: 1280px; margin: 24px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 3px solid var(--red); }
.section-title { font-size: 19px; font-weight: 900; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 20px; background: var(--red); border-radius: 2px; }
.section-more { font-size: 12px; color: var(--red); font-weight: 700; }
.section-more:hover { text-decoration: underline; }
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 30px; }
.news-card { background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); transition: all .25s; }
.news-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.1); transform: translateY(-3px); }
.nc-img { aspect-ratio: 16/9; position: relative; background: #1a1a1a; overflow: hidden; }
.nc-img img { width: 100%; height: 100%; object-fit: cover; }
.nc-img-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; opacity: .1; }
.nc-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.6) 0%,transparent 50%); }
.nc-tag { position: absolute; bottom: 10px; right: 10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 3px; }
.nc-body { padding: 13px; }
.nc-title { font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--dark); margin-bottom: 8px; }
.nc-meta { display: flex; gap: 10px; font-size: 11px; color: #aaa; }
.section-gap { height: 28px; }

/* ── SINGLE POST ── */
.single-wrap { max-width: 1280px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.single-content { background: #fff; border-radius: 8px; border: 1px solid var(--border); padding: 30px; }
.single-cat-tag { display: inline-flex; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 4px; margin-bottom: 14px; }
.single-title { font-size: 28px; font-weight: 900; line-height: 1.5; color: var(--dark); margin-bottom: 14px; }
.single-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #999; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.single-meta span { display: flex; align-items: center; gap: 4px; }
.single-featured-img { width: 100%; border-radius: 8px; margin-bottom: 24px; max-height: 420px; object-fit: cover; }
.single-body { font-size: 16px; line-height: 1.9; color: #333; }
.single-body p { margin-bottom: 18px; }
.single-body h2 { font-size: 22px; font-weight: 800; color: var(--dark); margin: 28px 0 14px; }
.single-body h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin: 20px 0 10px; }
.single-body blockquote { border-right: 4px solid var(--red); padding: 12px 20px; background: #fafafa; margin: 20px 0; font-style: italic; color: #555; }
.single-body a { color: var(--red); }

/* ── SIDEBAR ── */
.sidebar-box { background: #fff; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 20px; }
.sidebar-header { background: var(--dark); color: #fff; font-weight: 800; font-size: 13.5px; padding: 12px 14px; display: flex; align-items: center; gap: 7px; }
.sidebar-header .sh-ico { color: var(--red); }
.si-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f5f5f5; transition: background .15s; }
.si-item:last-child { border-bottom: none; }
.si-item:hover { background: #fafafa; }
.si-num { min-width: 22px; height: 22px; background: var(--red); color: #fff; border-radius: 4px; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.si-text { font-size: 13px; font-weight: 600; color: var(--dark); line-height: 1.5; }
.si-text a { color: var(--dark); }
.si-text a:hover { color: var(--red); }
.si-time { font-size: 11px; color: #bbb; margin-top: 3px; }
.li-item { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f5f5f5; transition: background .15s; }
.li-item:last-child { border-bottom: none; }
.li-item:hover { background: #fafafa; }
.li-img { border-radius: 5px; aspect-ratio: 4/3; background: #e0e0e0; overflow: hidden; }
.li-img img { width: 100%; height: 100%; object-fit: cover; }
.li-title { font-size: 13px; font-weight: 700; line-height: 1.5; color: var(--dark); margin-bottom: 4px; }
.li-title a { color: var(--dark); }
.li-title a:hover { color: var(--red); }
.li-time { font-size: 11px; color: #bbb; }

/* ── ARCHIVE ── */
.archive-wrap { max-width: 1280px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.archive-header { background: var(--red); color: #fff; padding: 14px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.archive-header h1 { font-size: 20px; font-weight: 900; }
.archive-header span { font-size: 13px; opacity: .8; }
.archive-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-bottom: 24px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; font-size: 13px; font-weight: 700; border: 2px solid var(--border); transition: all .2s; }
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* ── 404 ── */
.not-found { max-width: 600px; margin: 80px auto; text-align: center; padding: 0 20px; }
.not-found h1 { font-size: 100px; font-weight: 900; color: var(--red); line-height: 1; }
.not-found h2 { font-size: 24px; font-weight: 800; color: var(--dark); margin: 10px 0; }
.not-found p { color: #888; font-size: 14px; margin-bottom: 24px; }
.btn-home { display: inline-flex; background: var(--red); color: #fff; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 14px; }

/* ── FOOTER ── */
.site-footer { background: var(--black); color: #888; margin-top: 40px; border-top: 3px solid var(--red); }
.footer-top { max-width: 1280px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: 260px 1fr 1fr 1fr; gap: 40px; }
.footer-brand .logo-main { font-size: 24px; color: #fff; }
.footer-brand p { font-size: 13px; color: #777; line-height: 1.7; margin: 10px 0 14px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 32px; height: 32px; background: #222; color: #777; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .2s; }
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 800; margin-bottom: 14px; padding-bottom: 7px; border-bottom: 2px solid var(--red); display: inline-block; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { color: #777; font-size: 13px; transition: color .2s; display: flex; align-items: center; gap: 5px; }
.footer-col ul li a:hover { color: var(--red); }
.footer-col ul li a::before { content: '›'; color: var(--red); font-size: 15px; }
.footer-bottom { border-top: 1px solid #1a1a1a; padding: 14px 20px; max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #444; }
.footer-bottom a { color: #666; }
.footer-bottom a:hover { color: var(--red); }

/* ── WIDGETS ── */
.widget { margin-bottom: 20px; }
.widget-title { background: var(--dark); color: #fff; font-weight: 800; font-size: 13.5px; padding: 12px 14px; }

/* ── NEWSLETTER WIDGET ── */
.newsletter-box { background: linear-gradient(135deg,var(--black),var(--dark)); padding: 20px; text-align: center; }
.newsletter-box h3 { color: #fff; font-size: 15px; margin-bottom: 6px; }
.newsletter-box p { color: #777; font-size: 12px; margin-bottom: 14px; line-height: 1.6; }
.newsletter-box input { width: 100%; padding: 9px 12px; border: 2px solid #333; background: #111; color: #fff; border-radius: 6px; font-family: Cairo,sans-serif; font-size: 13px; outline: none; margin-bottom: 9px; direction: rtl; }
.newsletter-box button { width: 100%; background: var(--red); color: #fff; border: none; padding: 10px; border-radius: 6px; font-family: Cairo,sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; }
.newsletter-box button:hover { background: var(--red-dark); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side-card { min-width: 230px; }
  .content-area, .single-wrap, .archive-wrap { grid-template-columns: 1fr; }
  .news-grid, .archive-grid { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 600px) {
  .header-search { display: none; }
  .logo-main { font-size: 24px; }
  .hero-title { font-size: 19px; }
  .news-grid, .archive-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .single-title { font-size: 20px; }
}
