/* =============================================
   TOPBAR
   ============================================= */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.topbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 58px; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff, #7c5cfc);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; flex-shrink: 0;
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--text); }

.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links li a {
  font-size: 13px; color: var(--muted); padding: 6px 11px;
  border-radius: 7px; transition: all 0.15s; display: block;
}
.nav-links li a:hover,
.nav-links .current-menu-item > a { color: var(--accent); background: var(--tag-bg); }

.topbar-controls { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 6px; border-radius: 7px; transition: all 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface2); }

.switch-wrap { display: flex; align-items: center; gap: 7px; }
.switch-label { font-size: 12px; color: var(--muted); }
.switch {
  width: 44px; height: 24px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; position: relative; transition: background 0.25s;
}
.switch.on { background: linear-gradient(90deg, #1e90ff, #7c5cfc); border-color: transparent; }
.switch-thumb {
  position: absolute; top: 3px; right: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch.on .switch-thumb { transform: translateX(-20px); }

.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.2s; display: block; }

.search-bar {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 0; animation: slideDown 0.2s ease;
}
.search-bar form { display: flex; gap: 8px; }
.search-bar input {
  flex: 1; border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); border-radius: 9px; padding: 9px 14px;
  font-size: 14px; font-family: 'Noto Kufi Arabic', sans-serif;
  direction: rtl; outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================
   TICKER
   ============================================= */
.ticker-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 9px 0;
}
.ticker-badge {
  font-size: 11px; font-weight: 600; color: white;
  background: linear-gradient(90deg, #1e90ff, #7c5cfc);
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
}
.ticker-track {
  display: flex; gap: 2rem;
  animation: ticker 25s linear infinite;
  white-space: nowrap;
}
.ticker-item { font-size: 12px; color: var(--muted); cursor: pointer; }
.ticker-item:hover { color: var(--accent); }
.ticker-sep { color: var(--border); }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  padding: 1.5rem 0 0;
}
.hero-main { cursor: pointer; }
.hero-img-link, .hero-img-link img { display: block; width: 100%; }
.hero-thumb { width: 100%; height: 240px; object-fit: cover; }
.hero-thumb-placeholder {
  width: 100%; height: 240px;
  background: linear-gradient(135deg, #0a1628, #1a1060);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700;
  background-clip: text; color: rgba(255,255,255,0.1);
}
.hero-body { padding: 1.25rem 1.5rem 1.5rem; }
.hero-title {
  font-size: 1.3rem; line-height: 1.5; margin: 0.5rem 0 0.75rem;
}
.hero-title a { color: var(--text); }
.hero-title a:hover { color: var(--accent); }
.hero-excerpt { font-size: 13px; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }

.hero-side { display: flex; flex-direction: column; gap: 0.75rem; }
.side-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 1rem; text-decoration: none;
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.side-card:hover { border-color: var(--accent); }
.side-icon {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(135deg, #0f1b3d, #1a2a6c);
}
.si-default { background: linear-gradient(135deg, #0f1b3d, #1a2a6c); }
.side-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.side-tag { font-size: 10px; color: var(--tag-color); font-weight: 500; margin-bottom: 4px; }
.side-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.55; }
.side-meta { font-size: 11px; color: var(--muted); margin-top: 5px; }

/* =============================================
   POSTS SECTION
   ============================================= */
.posts-section { padding: 2rem 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem;
}
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-tab {
  font-size: 12px; color: var(--muted); padding: 5px 12px;
  border-radius: 20px; border: 1px solid var(--border);
  transition: all 0.15s; background: var(--surface);
}
.cat-tab:hover { color: var(--accent); border-color: var(--accent); }
.cat-tab.active {
  color: white; border-color: transparent;
  background: linear-gradient(90deg, #1e90ff, #7c5cfc);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.article-card { cursor: pointer; }
.card-img-link, .card-img-link img { display: block; }
.card-thumb { width: 100%; height: 160px; object-fit: cover; }
.card-thumb-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, #0e1535, #1a2560);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.article-body { padding: 0.875rem; }
.article-tag {
  font-size: 10px; color: var(--tag-color); font-weight: 500;
  margin-bottom: 6px; display: block;
}
.article-title { font-size: 13px; font-weight: 500; line-height: 1.6; margin-bottom: 5px; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--accent); }
.article-meta { font-size: 11px; color: var(--muted); }

.load-more-wrap { text-align: center; margin-top: 2rem; }
.load-more-btn { min-width: 160px; }
.no-posts { text-align: center; color: var(--muted); padding: 3rem 0; grid-column: 1/-1; }

/* =============================================
   OPINION SECTION
   ============================================= */
.opinion-section { padding: 0 0 2rem; }
.opinion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.opinion-card {
  padding: 1.1rem 1.25rem; text-decoration: none;
  background: var(--surface); border-radius: 12px; border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.opinion-card:hover { border-color: var(--accent2); }
.opinion-quote {
  font-size: 30px; font-family: serif; line-height: 1; margin-bottom: 8px;
  background: linear-gradient(90deg, #1e90ff, #7c5cfc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.opinion-title {
  font-size: 13px; color: var(--text); line-height: 1.65;
  font-family: 'Noto Serif Arabic', serif; margin-bottom: 12px;
}
.opinion-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.av1 { background: linear-gradient(135deg, #0d2a5e, #1a4a9e); color: #7ab4ff; }
.av2 { background: linear-gradient(135deg, #2a0d5e, #4a1a9e); color: #b48aff; }
.opinion-author { font-size: 13px; font-weight: 500; color: var(--text); }
.opinion-role { font-size: 11px; color: var(--muted); }

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-section { padding-bottom: 2rem; }
.nl-inner {
  background: var(--surface); border-radius: 14px; border: 1px solid var(--border);
  padding: 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
  position: relative; overflow: hidden;
}
.nl-inner::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #1e90ff, #7c5cfc);
}
.nl-text h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; font-family: 'Noto Kufi Arabic', sans-serif; }
.nl-text p { font-size: 12px; color: var(--muted); margin: 0; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-input {
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); border-radius: 9px; padding: 9px 14px; font-size: 13px;
  font-family: 'Noto Kufi Arabic', sans-serif; width: 220px; direction: rtl; outline: none;
}
.nl-input:focus { border-color: var(--accent); }
.nl-input::placeholder { color: var(--muted); }

/* =============================================
   SINGLE POST
   ============================================= */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 1.5rem 0 2rem;
}
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.bc-sep { opacity: 0.5; }
.single-title { font-size: 1.8rem; line-height: 1.45; margin: 0.75rem 0 1rem; }
.single-meta { margin-bottom: 1.5rem; }
.author-avatar { width: 32px; height: 32px; border-radius: 50%; }
.author-name { font-weight: 500; }
.single-featured-img { border-radius: 12px; overflow: hidden; margin-bottom: 1.75rem; }
.featured-img { width: 100%; max-height: 420px; object-fit: cover; }
.single-content { font-size: 16px; line-height: 1.9; color: var(--text); }
.single-content h2 { font-size: 1.35rem; margin: 1.75rem 0 0.75rem; }
.single-content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.6rem; }
.single-content p { margin-bottom: 1.25rem; }
.single-content ul, .single-content ol { padding-right: 1.5rem; margin-bottom: 1.25rem; }
.single-content li { margin-bottom: 0.5rem; }
.single-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 0.75rem 1.25rem; margin: 1.5rem 0;
  background: var(--surface2); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--muted);
}
.single-content a { color: var(--accent); text-decoration: underline; }
.single-content img { border-radius: 8px; margin: 1rem 0; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 1.5rem 0; }
.share-bar { display: flex; align-items: center; gap: 10px; margin: 1.5rem 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.share-btn { padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 500; transition: opacity 0.2s; }
.share-twitter { background: #000; color: #fff; }
.share-facebook { background: #1877f2; color: #fff; }
.share-whatsapp { background: #25d366; color: #fff; }
.share-btn:hover { opacity: 0.85; color: #fff; }
.author-box { display: flex; gap: 1rem; align-items: flex-start; }
.author-box-avatar { border-radius: 50%; width: 64px; height: 64px; flex-shrink: 0; }
.author-box-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; color: var(--text); }
.author-box-bio { font-size: 13px; color: var(--muted); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.post-nav-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: 6px; transition: border-color 0.2s; }
.post-nav-item:hover { border-color: var(--accent); }
.nav-label { font-size: 11px; color: var(--muted); }
.nav-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.5; }
.related-section { margin: 2rem 0; }
.related-grid { grid-template-columns: repeat(3, 1fr); }

/* Sidebar */
.single-sidebar { padding-top: 1.5rem; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 2rem 0 1.5rem;
}
.footer-logo-wrap { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 0.75rem; }
.footer-logo-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #1e90ff, #7c5cfc);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: white;
}
.footer-logo-text { font-size: 15px; font-weight: 700; color: var(--text); }
.footer-tagline { font-size: 13px; color: var(--muted); margin: 0; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links li a { font-size: 13px; color: var(--muted); }
.footer-links li a:hover { color: var(--accent); }
.footer-widget-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 0.75rem; font-family: 'Noto Kufi Arabic', sans-serif; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-copy a { color: var(--muted); }
.footer-bottom-nav { display: flex; gap: 1rem; list-style: none; }
.footer-bottom-nav li a { font-size: 12px; color: var(--muted); }
.footer-bottom-nav li a:hover { color: var(--accent); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side { grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); }
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { display: none; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.open { display: block; position: absolute; top: 58px; right: 0; left: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem; z-index: 100; }
  .site-nav.open .nav-links { flex-direction: column; }
  .hamburger { display: flex; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
  .switch-label { display: none; }
}

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
  .opinion-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .nl-inner { flex-direction: column; align-items: flex-start; }
  .nl-form { width: 100%; }
  .nl-input { width: 100%; }
}
