/*
Theme Name: Arabeum Terminal
Theme URI: https://arabeum.net
Author: Arabeum
Description: قالب إخباري داكن وخفيف لموقع عربيوم: شريط أسعار حي، آخر الأخبار، أقسام حسب التصنيف، بدون أي منشئ صفحات أو jQuery.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arabeum
*/

:root {
  --accent: #F5B301;
  --bg: #0B0F14;
  --bg-deep: #080B0F;
  --panel: #121820;
  --line: #1F2933;
  --text: #E6EDF3;
  --soft: #A9B4C0;
  --muted: #8B98A5;
  --head: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); margin: 0; }
p { margin: 0; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--accent); color: var(--bg); padding: 8px 16px; z-index: 10; }
.skip-link:focus { inset-inline-start: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; direction: ltr; unicode-bidi: isolate; }

/* Price ticker */
.ticker { background: var(--bg-deep); border-bottom: 1px solid var(--line); }
.ticker-in { min-height: 44px; display: flex; align-items: center; gap: 28px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.ticker-in::-webkit-scrollbar { display: none; }
.ticker-label { color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ticker-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.coin { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.coin b { font-weight: 500; }
.coin .price { color: var(--soft); }
.coin .up { color: #6FE3A6; }
.coin .down { color: #FF8F8F; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-in { padding-block: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--head); font-weight: 700; font-size: 26px; }
.brand-mark { width: 34px; height: 34px; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.brand img { max-height: 44px; width: auto; }
.main-nav { flex: 1 1 520px; }
.main-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.main-nav a, .footer-nav a { min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 500; }
.main-nav .current-menu-item > a, .main-nav .current-cat > a { color: var(--accent); }
.main-nav ul ul { display: none; }
.menu-toggle { display: none; width: 44px; height: 44px; background: var(--panel); border: 1px solid var(--line); color: var(--text); align-items: center; justify-content: center; cursor: pointer; }
.search-box { position: relative; }

/* Phones and small tablets: the menu hides behind the three-line button.
   Without JavaScript the menu simply stays visible. */
@media (max-width: 860px) {
  .brand { order: 1; margin-inline-end: auto; }
  .search-box { order: 2; }
  .js .menu-toggle { display: flex; order: 3; }
  .main-nav { order: 4; flex: 1 1 100%; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { min-height: 48px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .header-in { gap: 12px; }
}
.search-box summary { list-style: none; width: 44px; height: 44px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.search-box summary::-webkit-details-marker { display: none; }
.search-box form { position: absolute; inset-inline-end: 0; top: 52px; z-index: 5; display: flex; background: var(--panel); border: 1px solid var(--line); padding: 8px; gap: 8px; width: min(340px, 86vw); }
.search-field, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { flex: 1; min-width: 0; width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); font: inherit; padding: 8px 12px; min-height: 44px; }
.search-submit, .comment-form input[type="submit"], .btn { background: var(--accent); color: var(--bg); border: 0; font: inherit; font-weight: 700; padding: 0 20px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; }
.btn:hover, .btn:focus-visible { color: var(--bg); filter: brightness(1.08); }

/* Layout */
.site-main { padding-top: 32px; display: flex; flex-direction: column; gap: 56px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; }
.sec-head h1, .sec-head h2 { font-size: 22px; font-weight: 600; }
.more { color: var(--accent); font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px; }

/* Thumbnails */
.thumb { display: block; background: var(--panel); border: 1px solid var(--line); aspect-ratio: 16 / 9; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--head); font-size: 28px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 32px; }
.lead { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lead h1, .lead h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.35; font-weight: 700; text-wrap: balance; }
.lead .excerpt { color: var(--soft); font-size: 17px; max-width: 62ch; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.tag { background: var(--accent); color: var(--bg); padding: 2px 10px; font-weight: 600; }
.tag:hover, .tag:focus-visible { color: var(--bg); filter: brightness(1.08); }
.feed { flex: 1 1 320px; min-width: 0; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.feed-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.feed-head h2 { font-size: 17px; font-weight: 600; }
.feed-head span { color: var(--muted); font-size: 13px; }
.feed-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.feed-row time { color: var(--accent); font-size: 13px; }
.feed-row span { font-size: 15px; line-height: 1.6; font-weight: 500; }
.feed .more { padding-inline: 18px; }

/* Cards */
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-family: var(--body); font-size: 17px; line-height: 1.6; font-weight: 600; }
.card .cat { color: var(--accent); font-size: 13px; font-weight: 600; }
.card time { color: var(--muted); font-size: 13px; }
.card-panel { background: var(--panel); border: 1px solid var(--line); gap: 0; }
.card-panel .thumb { border: 0; border-bottom: 1px solid var(--line); }
.card-panel .card-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-panel h3 { font-size: 18px; line-height: 1.55; }
.card-panel p { color: var(--muted); font-size: 14px; }

/* Lists */
.rows { display: flex; flex-direction: column; }
.row { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row .thumb { width: 96px; flex-shrink: 0; }
.row .thumb-empty { font-size: 18px; }
.row-title { font-size: 16px; font-weight: 500; line-height: 1.6; }

/* Telegram call to action */
.cta { background: var(--panel); border: 1px solid var(--line); padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta h2 { font-size: 24px; font-weight: 600; }
.cta p { color: var(--soft); }
.cta .btn { min-height: 48px; padding-inline: 28px; }

/* Single post and pages */
.article { max-width: 780px; margin-inline: auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.article-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.35; font-weight: 700; text-wrap: balance; }
.entry { font-size: 18px; line-height: 1.95; color: #DCE3EA; overflow-wrap: break-word; }
.entry > * { margin-block: 0 1.2em; }
.entry h2 { font-size: 26px; line-height: 1.5; margin-top: 1.6em; color: var(--text); }
.entry h3 { font-size: 21px; line-height: 1.5; margin-top: 1.4em; color: var(--text); }
.entry a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry ul, .entry ol { padding-inline-start: 1.4em; }
.entry blockquote { margin-inline: 0; padding: 12px 20px; background: var(--panel); border: 1px solid var(--line); }
.entry figure { margin-inline: 0; }
.entry figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.entry table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry th, .entry td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; }
.entry pre { background: var(--panel); border: 1px solid var(--line); padding: 16px; overflow-x: auto; direction: ltr; }
.entry iframe { max-width: 100%; }
.notice { background: var(--panel); border: 1px solid var(--line); color: var(--soft); font-size: 14px; padding: 14px 18px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.post-tags a { border: 1px solid var(--line); padding: 4px 12px; min-height: 36px; display: inline-flex; align-items: center; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--accent); }

/* Binance referral ad */
.ad-box { background: var(--panel); border: 1px solid var(--accent); padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.ad-copy { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.ad-label { align-self: flex-start; font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 0 8px; }
.ad-title { font-family: var(--head); font-size: 20px; font-weight: 600; line-height: 1.5; }
.ad-text { color: var(--soft); font-size: 15px; }
.ad-box .btn { min-height: 48px; padding-inline: 24px; }

/* Comments */
.comments { max-width: 780px; margin-inline: auto; width: 100%; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-inline-start: 24px; }
.comment-body { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; margin-block: 4px 8px; }
.comment-metadata a { color: var(--muted); }
.reply a { color: var(--accent); font-size: 14px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.comment-form p { display: flex; flex-direction: column; gap: 6px; }
.comment-form .comment-form-cookies-consent { flex-direction: row; align-items: center; gap: 10px; }
.comment-reply-title { font-size: 20px; margin-top: 24px; }

/* Pagination */
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers { min-width: 44px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel); }
.page-numbers.current { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; }
.footer-in { padding-block: 32px 40px; display: flex; flex-direction: column; gap: 18px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.footer-brand { font-family: var(--head); font-weight: 700; font-size: 20px; }
.footer-nav a { font-size: 14px; }
.disclaimer { color: var(--muted); font-size: 13px; max-width: 90ch; }

@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .site-main { gap: 40px; padding-top: 24px; }
  .cta { padding: 24px 18px; }
  .entry { font-size: 17px; }
}
