/*
Theme Name: DubaiTrack News
Theme URI: https://www.dubaitrack.com/
Description: قالب إخباري عربي خفيف وسريع لموقع وجهات دبي، محسّن للأرشفة في الإمارات.
Version: 1.0.2
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: dubaitrack-news
*/

:root {
	--brand: #0b3c5d;
	--brand-2: #11648f;
	--accent: #c8102e;
	--text: #1c2430;
	--muted: #667085;
	--line: #e6e9ef;
	--bg: #f4f6f9;
	--card: #fff;
	--radius: 10px;
	--font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.75; color: var(--text); background: var(--bg); direction: rtl; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .5em; }
button, input { font: inherit; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -40px; right: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }

/* Top bar */
.topbar { background: var(--brand); color: #dbe7f0; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 12px; }
.top-nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.top-nav a:hover { color: #fff; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; }
.brand { margin: 0; font-size: inherit; }
.brand img { width: auto; max-height: 80px; }
.header-ad { flex: 1; max-width: 728px; }
.header-ad .ad { margin: 0; min-height: 90px; max-height: 110px; }

/* Nav */
.navbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, #0d4670, var(--brand)); box-shadow: 0 4px 14px rgba(11,60,93,.25); }
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .navbar { top: 0; } }
.nav-in { display: flex; align-items: stretch; gap: 4px; min-height: 54px; }
.nav-logo { display: none; align-items: center; padding-left: 14px; margin-left: 6px; border-left: 1px solid rgba(255,255,255,.15); }
.nav-logo img { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 2px 6px; }
.navbar.stuck .nav-logo { display: flex; }
.main-nav { flex: 1; display: flex; }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; }
.main-nav .menu > li { position: relative; display: flex; }
.main-nav .menu > li > a { display: flex; align-items: center; gap: 6px; padding: 0 16px; color: #fff; font-weight: 700; font-size: 15.5px; position: relative; transition: background .2s; }
.main-nav .menu > li > a::after { content: ""; position: absolute; right: 16px; left: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.main-nav .menu > li > a:hover, .main-nav .menu > li:focus-within > a { background: rgba(255,255,255,.08); color: #fff; }
.main-nav .menu > li > a:hover::after, .main-nav .menu > li.current-menu-item > a::after, .main-nav .menu > li.current-menu-ancestor > a::after, .main-nav .menu > li.current-category-ancestor > a::after, .main-nav .menu > li.current-post-ancestor > a::after { transform: scaleX(1); }
.main-nav .menu > li.current-menu-item > a, .main-nav .menu > li.current-post-ancestor > a, .main-nav .menu > li.current-category-ancestor > a { background: rgba(255,255,255,.1); }
.main-nav .menu-home > a { padding: 0 18px; background: var(--accent) !important; }
.main-nav .menu-home > a::after { display: none; }
.main-nav .menu-home .home-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.main-nav .menu-item-has-children > a::before { content: ""; order: 2; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); opacity: .8; }
.main-nav .sub-menu { list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; right: 0; min-width: 230px; background: #fff; box-shadow: 0 14px 34px rgba(16,24,40,.18); border-radius: 0 0 10px 10px; border-top: 3px solid var(--accent); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .18s; z-index: 60; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { display: block; padding: 9px 18px; font-weight: 600; font-size: 15px; color: var(--text); }
.main-nav .sub-menu a:hover { background: var(--bg); color: var(--accent); padding-right: 22px; transition: padding .15s; }
.nav-toggle, .search-toggle { background: none; border: 0; cursor: pointer; padding: 0 14px; color: #fff; display: flex; align-items: center; }
.search-toggle { margin-right: auto; border-right: 1px solid rgba(255,255,255,.15); }
.search-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 3px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.search-panel { border-top: 1px solid var(--line); padding: 12px 0; background: #fff; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.search-form button, .btn { background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; font-weight: 700; display: inline-block; }
.search-form button:hover, .btn:hover { background: var(--brand-2); color: #fff; }

/* Ticker */
.ticker { background: #fff; border-bottom: 1px solid var(--line); }
.ticker-in { display: flex; align-items: center; gap: 12px; min-height: 44px; overflow: hidden; }
.ticker-label { background: var(--accent); color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 4px; white-space: nowrap; }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(to left, transparent, #000 4%, #000 96%, transparent); }
.ticker-track ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 40px; white-space: nowrap; width: max-content; }
.ticker-track ul.run { animation: tick 60s linear infinite; }
.ticker-track:hover ul { animation-play-state: paused; }
.ticker-track li { font-size: 14px; font-weight: 600; }
.ticker-track li::before { content: "•"; color: var(--accent); margin-left: 8px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* Layout */
.site-main { padding: 22px 0 40px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.content { min-width: 0; }
.sidebar { position: sticky; top: 72px; display: grid; gap: 20px; }

/* Cards */
.thumb { display: block; overflow: hidden; border-radius: var(--radius); background: #dfe5ec; aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
article:hover .thumb img { transform: scale(1.04); }
.noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.cat-label { display: inline-block; background: var(--brand); color: #fff !important; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 4px; margin-bottom: 6px; }
.title { font-size: 17px; margin: 0 0 6px; }
.title a:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: 13px; }
.excerpt { color: #475467; font-size: 15px; margin: 0 0 6px; }

.post-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.06); display: flex; flex-direction: column; }
.post-card .thumb { border-radius: 0; }
.post-card .body { padding: 12px 14px 14px; }

.post-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row .thumb { aspect-ratio: 4 / 3; border-radius: 8px; }
.post-row .title { font-size: 15px; }
.post-row .cat-label { display: none; }

.post-mini { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 26px; }
.hero-main .post-hero { position: relative; height: 100%; border-radius: var(--radius); overflow: hidden; min-height: 420px; }
.post-hero .thumb { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.post-hero .body { position: absolute; inset: auto 0 0 0; padding: 60px 22px 20px; background: linear-gradient(to top, rgba(4,20,35,.92), rgba(4,20,35,0)); color: #fff; }
.post-hero .title { font-size: 26px; }
.post-hero .title a:hover { color: #ffd5db; }
.post-hero .excerpt { color: #d6e2ec; }
.post-hero .meta { color: #c3d3e0; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-side .excerpt { display: none; }
.hero-side .title { font-size: 15px; }

/* Sections */
.section-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.section-head h2 { font-size: 21px; margin: 0; padding-bottom: 8px; border-bottom: 3px solid var(--accent); margin-bottom: -2px; }
.section-head .more { font-size: 14px; font-weight: 700; color: var(--brand-2); }
.cat-block { background: #fff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cat-lead .post-card { box-shadow: none; }
.cat-lead .post-card .body { padding: 10px 0 0; }

/* Boxes / sidebar */
.box { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.box-title { font-size: 18px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.box-title span { display: inline-block; padding-bottom: 6px; border-bottom: 3px solid var(--accent); margin-bottom: -2px; }
.most-read { list-style: none; counter-reset: mr; margin: 0; padding: 0; }
.most-read li { counter-increment: mr; border-bottom: 1px solid var(--line); }
.most-read li:last-child { border: 0; }
.most-read a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px 0; }
.mr-thumb { position: relative; display: block; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #dfe5ec; }
.mr-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mr-thumb .noimg { width: 100%; height: 100%; }
.mr-thumb::after { content: counter(mr); position: absolute; top: 4px; right: 4px; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 2px #fff; }
.most-read a:hover img { transform: scale(1.08); }
.mr-text { display: flex; flex-direction: column; gap: 3px; }
.mr-title { font-weight: 700; font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.most-read a:hover .mr-title { color: var(--accent); }
.mr-views { font-size: 12px; color: var(--muted); }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { border-bottom: 1px solid var(--line); }
.latest-list li:last-child { border: 0; }
.latest-list a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px 0; }
.latest-list .mr-thumb::after { display: none; }
.latest-list a:hover .mr-title { color: var(--accent); }
.latest-list a:hover img { transform: scale(1.08); }
.footer-cats a { display: block; line-height: 1.6; font-size: 14.5px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.cat-list span { background: var(--bg); color: var(--muted); border-radius: 20px; padding: 0 10px; font-size: 13px; }

/* Ads */
.ad { margin: 20px auto; text-align: center; min-height: 120px; overflow: hidden; }
.ad-label { display: block; font-size: 11px; color: #98a2b3; margin-bottom: 4px; letter-spacing: .5px; }
.ad-sidebar { min-height: 250px; background: #fff; border-radius: var(--radius); padding: 8px; margin: 0; }
.ad-feed { background: #fff; border-radius: var(--radius); padding: 8px; }
.ad-article { margin: 26px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-ad { grid-column: 1 / -1; }

/* Archive */
.archive-head { background: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; border-right: 5px solid var(--accent); }
.archive-head h1 { font-size: 26px; margin: 0; }
.archive-head h1 span { color: var(--accent); }
.archive-desc { color: var(--muted); margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pagination { margin-top: 26px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { background: #fff; padding: 6px 14px; border-radius: 6px; font-weight: 700; border: 1px solid var(--line); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { background: #fff; border-radius: var(--radius); padding: 30px; text-align: center; }
.notfound h1 { font-size: 30px; }

/* Breadcrumbs */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "‹"; margin-right: 6px; }
.breadcrumbs a { color: var(--brand-2); }

/* Single */
.single { background: #fff; border-radius: var(--radius); padding: 24px 28px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.entry-title { font-size: 32px; line-height: 1.4; margin-bottom: 10px; }
.lead { font-size: 19px; color: #475467; margin: 0 0 12px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.entry-meta a { color: var(--brand-2); font-weight: 700; }
.entry-image { margin: 18px 0 10px; }
.entry-image img { width: 100%; border-radius: var(--radius); }
.entry-image figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.share a, .share button { color: #fff !important; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 6px; border: 0; cursor: pointer; }
.s-wa { background: #25d366; } .s-x { background: #111; } .s-fb { background: #1877f2; } .s-tg { background: #229ed9; } .s-copy { background: #667085; }
.entry-content { font-size: 18.5px; line-height: 2; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content h2 { font-size: 25px; margin: 1.4em 0 .5em; padding-right: 12px; border-right: 4px solid var(--accent); }
.entry-content h3 { font-size: 21px; margin: 1.2em 0 .4em; color: var(--brand); }
.entry-content a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 8px; margin: 14px auto; }
.entry-content ul, .entry-content ol { padding-right: 1.4em; padding-left: 0; }
.entry-content blockquote { margin: 1.2em 0; padding: 12px 18px; background: var(--bg); border-right: 4px solid var(--brand); border-radius: 6px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 16px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content th { background: var(--bg); }
.entry-content iframe { max-width: 100%; }
.wp-caption { max-width: 100%; } .wp-caption-text { font-size: 13px; color: var(--muted); text-align: center; }
.alignleft { float: left; margin: 0 16px 10px 0; } .alignright { float: right; margin: 0 0 10px 16px; } .aligncenter { margin-inline: auto; }
.tags { margin: 18px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tags a { background: var(--bg); padding: 3px 12px; border-radius: 20px; font-size: 13px; }
.related { margin-top: 26px; }
.related .post-card { box-shadow: none; border: 1px solid var(--line); }
.related .excerpt { display: none; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; font-weight: 700; font-size: 15px; }
.post-nav div:last-child { text-align: left; }
.comments { margin-top: 28px; }
.comment-list { list-style: none; padding: 0; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.comment-form .submit { background: var(--brand); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; cursor: pointer; }

/* Footer */
.site-footer { background: #071f31; color: #b9c7d3; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 40px 16px; }
.footer-about img { background: #fff; border-radius: 8px; padding: 6px; margin-bottom: 12px; width: auto; max-height: 64px; }
.footer-title { color: #fff; font-size: 17px; }
.footer-cats, .footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; font-size: 13px; text-align: center; }
.to-top { position: fixed; left: 18px; bottom: 90px; width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; font-size: 20px; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Responsive */
@media (max-width: 1024px) {
	.layout { grid-template-columns: 1fr; }
	.sidebar { position: static; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.header-in { flex-direction: column; min-height: 0; padding: 12px 16px; gap: 10px; }
	.header-ad { width: 100%; }
	.header-ad .ad { min-height: 60px; max-height: 120px; }
	.nav-toggle { display: flex; }
	.nav-logo { display: flex; border: 0; padding: 0 4px; margin: 0 auto 0 0; order: 2; }
	.navbar .nav-logo img { height: 30px; }
	.search-toggle { order: 3; margin: 0; border: 0; }
	.main-nav { position: absolute; top: 100%; right: 0; left: 0; background: #fff; box-shadow: 0 14px 24px rgba(0,0,0,.15); display: none; max-height: 75vh; overflow-y: auto; border-top: 3px solid var(--accent); }
	.main-nav.open { display: block; }
	.main-nav .menu { flex-direction: column; }
	.main-nav .menu > li { display: block; }
	.main-nav .menu > li > a { color: var(--text); padding: 13px 18px; border-bottom: 1px solid var(--line); justify-content: space-between; }
	.main-nav .menu > li > a::after { display: none; }
	.main-nav .menu > li > a:hover, .main-nav .menu > li.current-menu-item > a { background: var(--bg); color: var(--accent); }
	.main-nav .menu > li.menu-home > a { color: #fff !important; justify-content: flex-start; gap: 10px; }
	.main-nav .menu-home .home-txt { position: static; width: auto; height: auto; clip: auto; }
	.main-nav .sub-menu { position: static; box-shadow: none; display: none; padding: 0 14px 0 0; opacity: 1; visibility: visible; transform: none; border: 0; background: var(--bg); border-radius: 0; }
	.main-nav li.sub-open > .sub-menu { display: block; }
	.nav-in { position: relative; justify-content: space-between; }
	.hero { grid-template-columns: 1fr; }
	.hero-main .post-hero { min-height: 300px; }
	.post-hero .title { font-size: 21px; }
	.cat-grid { grid-template-columns: 1fr; }
	.single { padding: 18px 16px; }
	.entry-title { font-size: 25px; }
	.entry-content { font-size: 17.5px; }
	.footer-grid { grid-template-columns: 1fr; }
	.top-nav { display: none; }
}
@media (max-width: 560px) {
	body { font-size: 16px; }
	.grid, .grid-3 { grid-template-columns: 1fr; }
	.hero-side { grid-template-columns: 1fr 1fr; gap: 10px; }
	.hero-side .title { font-size: 14px; }
	.post-row { grid-template-columns: 100px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
