/*
Theme Name: Ro2ya
Theme URI: https://ro2ya.ncdt.ngo
Description: ثيم رؤية (Ro2ya) - منصة NCDT الإخبارية والتحليلية، مبني فوق Astra بدعم كامل للعربي و RTL.
Author: NCDT
Template: astra
Version: 1.0.8
Text Domain: ro2ya-child
*/

:root {
	--ro2ya-accent: #8C1D2B;
	--ro2ya-accent-2: #2E6B7A;
	--ro2ya-ink: #221C19;
	--ro2ya-ink-muted: #4A4038;
	--ro2ya-bg: #FBF9F6;
	--ro2ya-surface: #FFFFFF;
	--ro2ya-line: #E7DFD4;
	--ro2ya-placeholder: linear-gradient(135deg, #EDE6DC, #E2D5C4);
}

body {
	direction: rtl;
	font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif !important;
	background: var(--ro2ya-bg) !important;
	color: var(--ro2ya-ink) !important;
}

h1, h2, h3, h4, h5, h6,
.ro2ya-logo, .ro2ya-headline {
	font-family: 'Cairo', 'Tajawal', sans-serif;
	font-weight: 800;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--ro2ya-accent); }

.ro2ya-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px;
}

/* Utility bar */
.ro2ya-utility-bar {
	background: var(--ro2ya-ink);
	color: #F1EAE0;
	font-size: 13px;
}
.ro2ya-utility-bar .ro2ya-container {
	padding-top: 8px;
	padding-bottom: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}
.ro2ya-utility-widgets {
	display: flex;
	align-items: center;
	gap: 22px;
}
.ro2ya-utility-widgets span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	opacity: .9;
}

/* Ticker */
.ro2ya-ticker {
	background: var(--ro2ya-surface);
	border-bottom: 1px solid var(--ro2ya-line);
}
.ro2ya-ticker .ro2ya-container {
	padding-top: 10px;
	padding-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 18px;
}
.ro2ya-ticker-badge {
	flex-shrink: 0;
	background: var(--ro2ya-accent);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 5px 12px;
	border-radius: 3px;
}
.ro2ya-ticker-viewport {
	overflow: hidden;
	flex: 1;
	min-width: 0;
}
.ro2ya-ticker-track {
	display: flex;
	width: max-content;
	animation: ro2ya-ticker-scroll 45s linear infinite;
}
.ro2ya-ticker-items {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-left: 14px;
	font-size: 13.5px;
	color: var(--ro2ya-ink-muted);
	white-space: nowrap;
	flex-shrink: 0;
}
.ro2ya-ticker-items span.sep { opacity: .4; }

/* News enters from the left and travels right, toward the reading direction. */
@keyframes ro2ya-ticker-scroll {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0%); }
}
.ro2ya-ticker-track:hover { animation-play-state: paused; }

/* Header */
.ro2ya-header {
	background: var(--ro2ya-surface);
	border-bottom: 1px solid var(--ro2ya-line);
}
.ro2ya-header .ro2ya-container {
	padding-top: 22px;
	padding-bottom: 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}
.ro2ya-ncdt-link {
	font-size: 11.5px;
	color: var(--ro2ya-ink-muted);
	display: block;
	margin-bottom: 6px;
}
.ro2ya-ncdt-link strong { color: var(--ro2ya-ink); }
.ro2ya-logo {
	font-size: 38px;
	color: var(--ro2ya-accent);
	line-height: 1;
}
.ro2ya-logo img {
	display: block;
	height: 64px;
	width: auto;
	max-width: 100%;
}
.ro2ya-tagline {
	font-size: 12.5px;
	color: var(--ro2ya-ink-muted);
	margin-top: 4px;
}
.ro2ya-chairman {
	text-align: center;
}
.ro2ya-chairman-spaced {
	margin-top: 14px;
}
.ro2ya-chairman-title {
	font-size: 11.5px;
	color: var(--ro2ya-ink-muted);
	margin-bottom: 4px;
}
.ro2ya-chairman-name {
	font-family: 'Cairo', 'Tajawal', sans-serif;
	font-weight: 800;
	font-size: 16px;
	color: var(--ro2ya-ink);
}

/* Nav */
.ro2ya-nav { background: var(--ro2ya-ink); }
.ro2ya-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 14px;
	color: #EFE8DE;
	font-weight: 500;
}
.ro2ya-nav li { position: relative; padding: 15px 2px; }
.ro2ya-nav li.current-cat::after,
.ro2ya-nav li:hover::after {
	content: "";
	position: absolute;
	right: 0; left: 0; bottom: 0;
	height: 3px;
	background: var(--ro2ya-accent-2);
	border-radius: 2px 2px 0 0;
}
.ro2ya-nav a:hover { color: #fff; }

/* Cards / placeholders */
.ro2ya-thumb {
	background: var(--ro2ya-placeholder);
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.ro2ya-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.ro2ya-thumb-feature { aspect-ratio: 16/9; max-height: 520px; }
.ro2ya-eyebrow {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--ro2ya-accent);
}
.ro2ya-eyebrow.alt { color: var(--ro2ya-accent-2); }
.ro2ya-card-title {
	font-family: 'Cairo', sans-serif;
	font-weight: 700;
	line-height: 1.5;
}
.ro2ya-card-title a:hover { color: var(--ro2ya-accent); }
.ro2ya-meta { font-size: 12px; color: var(--ro2ya-ink-muted); }

.ro2ya-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 2px solid var(--ro2ya-ink);
	padding-bottom: 12px;
	margin-bottom: 22px;
}
.ro2ya-section-title h2 { font-size: 20px; margin: 0; }
.ro2ya-section-title a {
	font-size: 13.5px;
	color: var(--ro2ya-ink-muted);
	font-weight: 600;
}

.ro2ya-empty {
	background: var(--ro2ya-surface);
	border: 1px dashed var(--ro2ya-line);
	border-radius: 6px;
	padding: 28px;
	text-align: center;
	color: var(--ro2ya-ink-muted);
	font-size: 14px;
}

/* Footer */
.ro2ya-footer { background: var(--ro2ya-ink); color: #EFE8DE; }
.ro2ya-footer-logo img { height: 64px; width: auto; display: block; }
.ro2ya-footer a:hover { color: #fff; }
.ro2ya-footer .ro2ya-container {
	padding-top: 44px;
	padding-bottom: 28px;
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 32px;
}
.ro2ya-footer h3 { font-size: 13px; font-weight: 800; margin: 0 0 14px; opacity: .9; color: #fff; }
.ro2ya-footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 13px; opacity: .65; }
.ro2ya-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.ro2ya-footer-bottom .ro2ya-container {
	padding-top: 16px; padding-bottom: 16px;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
	font-size: 12px; opacity: .55;
}

/* Article content */
.ro2ya-article-content {
	font-size: 17px;
	line-height: 2;
	color: var(--ro2ya-ink);
}
.ro2ya-article-content p { margin: 0 0 22px; }
.ro2ya-article-content h2 { font-size: 22px; margin: 36px 0 16px; }
.ro2ya-article-content h3 { font-size: 19px; margin: 28px 0 14px; }
.ro2ya-article-content img { max-width: 100%; height: auto; border-radius: 5px; }
.ro2ya-article-content blockquote {
	margin: 24px 0;
	padding: 4px 22px;
	border-right: 3px solid var(--ro2ya-accent);
	color: var(--ro2ya-ink-muted);
	font-size: 18px;
}
.ro2ya-article-content a { color: var(--ro2ya-accent); text-decoration: underline; }

/* Single article author sidebar */
.ro2ya-author-sidebar {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: var(--ro2ya-surface);
	border: 1px solid var(--ro2ya-line);
	border-radius: 8px;
	padding: 24px;
}
.ro2ya-author-sidebar img { margin-bottom: 14px; }
.ro2ya-author-sidebar-name { font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 17px; }
.ro2ya-author-sidebar-bio { font-size: 13px; color: var(--ro2ya-ink-muted); line-height: 1.8; margin: 10px 0 14px; }

/* Avatar / author card */
.ro2ya-avatar { border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.ro2ya-author-card {
	display: flex;
	gap: 16px;
	background: var(--ro2ya-surface);
	border: 1px solid var(--ro2ya-line);
	border-radius: 6px;
	padding: 22px;
}
.ro2ya-author-card-name { font-weight: 700; font-size: 15.5px; }
.ro2ya-author-card-bio { font-size: 13.5px; color: var(--ro2ya-ink-muted); line-height: 1.8; margin: 8px 0 10px; }
.ro2ya-link-more { font-size: 13px; font-weight: 700; color: var(--ro2ya-accent); }

/* Pagination */
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--ro2ya-line);
	border-radius: 4px;
	font-size: 13.5px;
	color: var(--ro2ya-ink);
}
.page-numbers.current { background: var(--ro2ya-ink); color: #fff; border-color: var(--ro2ya-ink); }

@media (max-width: 900px) {
	.ro2ya-nav ul { gap: 14px; overflow-x: auto; }
	.ro2ya-footer .ro2ya-container { grid-template-columns: 1fr; }
	main[style*="grid-template-columns:2fr 1fr"],
	main div[style*="grid-template-columns:2fr 1fr"],
	main div[style*="grid-template-columns:repeat(3,1fr)"],
	main div[style*="grid-template-columns:repeat(4,1fr)"],
	.ro2ya-single-layout {
		grid-template-columns: 1fr !important;
	}
	.ro2ya-author-sidebar {
		position: static;
		flex-direction: row;
		align-items: center;
		text-align: right;
	}
	.ro2ya-author-sidebar img { margin-bottom: 0; margin-left: 14px; width: 64px !important; height: 64px !important; }
	.ro2ya-tasleya-grid { grid-template-columns: 1fr !important; }
}

/* ---------------------------------------------------------------- */
/* صفحة التسلية — print-newspaper puzzle page                        */
/* ---------------------------------------------------------------- */
.ro2ya-tasleya-masthead {
	text-align: center;
	padding-bottom: 18px;
	margin-bottom: 28px;
	border-top: 4px double var(--ro2ya-ink);
	border-bottom: 4px double var(--ro2ya-ink);
	padding-top: 14px;
}
.ro2ya-tasleya-masthead h1 {
	font-size: 30px;
	margin: 0;
	letter-spacing: 1px;
}
.ro2ya-tasleya-date {
	font-size: 13px;
	color: var(--ro2ya-ink-muted);
	margin-top: 6px;
}

.ro2ya-tasleya-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr 1fr;
	gap: 0;
	border: 1px solid var(--ro2ya-ink);
}
.ro2ya-tasleya-box {
	padding: 22px;
	border-right: 1px solid var(--ro2ya-line);
}
.ro2ya-tasleya-box:last-child { border-right: none; }
.ro2ya-tasleya-box h2 {
	font-size: 16px;
	text-align: center;
	padding-bottom: 12px;
	margin: 0 0 18px;
	border-bottom: 2px solid var(--ro2ya-ink);
}

.ro2ya-tasleya-horoscope-list { display: flex; flex-direction: column; gap: 14px; }
.ro2ya-tasleya-horoscope-item { display: flex; gap: 10px; align-items: flex-start; }
.ro2ya-tasleya-zodiac {
	flex-shrink: 0;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: var(--ro2ya-bg);
	color: var(--ro2ya-accent);
	display: flex; align-items: center; justify-content: center;
	font-size: 14px;
}
.ro2ya-tasleya-horoscope-item strong { font-size: 13.5px; }
.ro2ya-tasleya-horoscope-item p { font-size: 11.5px; color: var(--ro2ya-ink-muted); line-height: 1.6; margin: 4px 0 0; }
.ro2ya-tasleya-empty { font-size: 13px; color: var(--ro2ya-ink-muted); }

.ro2ya-sudoku-grid {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	max-width: 320px;
	margin: 0 auto;
	border: 2px solid var(--ro2ya-ink);
}
.ro2ya-sudoku-cell {
	width: 100%;
	aspect-ratio: 1;
	text-align: center;
	font-size: 15px;
	border: 1px solid var(--ro2ya-line);
	border-radius: 0;
	background: var(--ro2ya-surface);
	color: var(--ro2ya-ink);
	font-family: 'Tajawal', sans-serif;
}
.ro2ya-sudoku-cell.ro2ya-sudoku-border-r { border-right: 2px solid var(--ro2ya-ink); }
.ro2ya-sudoku-cell.ro2ya-sudoku-border-t { border-top: 2px solid var(--ro2ya-ink); }
.ro2ya-sudoku-cell.ro2ya-sudoku-fixed { background: var(--ro2ya-bg); font-weight: 700; color: var(--ro2ya-ink); }
.ro2ya-sudoku-cell:focus { outline: 2px solid var(--ro2ya-accent); position: relative; z-index: 1; }
.ro2ya-sudoku-cell.ro2ya-sudoku-wrong { background: #FBE4E4; color: var(--ro2ya-accent); font-weight: 700; }
.ro2ya-sudoku-cell.ro2ya-sudoku-hint { background: #EAF3EC; color: #2E7D32; font-weight: 700; }

.ro2ya-tasleya-hint-btn {
	width: 34px;
	height: 34px;
	border-radius: 4px;
	border: 1px solid var(--ro2ya-ink);
	background: transparent;
	color: var(--ro2ya-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.ro2ya-tasleya-hint-btn:hover { background: var(--ro2ya-bg); }
.ro2ya-tasleya-hint-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.ro2ya-tasleya-otd-list { display: flex; flex-direction: column; gap: 14px; }
.ro2ya-tasleya-otd-item { padding-bottom: 12px; border-bottom: 1px solid var(--ro2ya-line); }
.ro2ya-tasleya-otd-item:last-child { border-bottom: none; }
.ro2ya-tasleya-otd-year { font-family: 'Cairo', sans-serif; font-weight: 800; color: var(--ro2ya-accent); font-size: 13.5px; }
.ro2ya-tasleya-otd-item p { font-size: 12.5px; color: var(--ro2ya-ink-muted); line-height: 1.7; margin: 4px 0 0; }

.ro2ya-tasleya-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.ro2ya-tasleya-btn {
	font-family: 'Tajawal', sans-serif;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 18px;
	border-radius: 4px;
	border: 1px solid var(--ro2ya-ink);
	background: var(--ro2ya-ink);
	color: #fff;
	cursor: pointer;
}
.ro2ya-tasleya-btn-ghost { background: transparent; color: var(--ro2ya-ink); }
.ro2ya-tasleya-msg { text-align: center; font-size: 13px; font-weight: 700; margin-top: 12px; min-height: 18px; }
.ro2ya-tasleya-msg-ok { color: #2E7D32; }
.ro2ya-tasleya-msg-bad { color: var(--ro2ya-accent); }

.ro2ya-numerology { margin-top: 28px; padding-top: 22px; border-top: 2px solid var(--ro2ya-ink); }
.ro2ya-numerology h2 { font-size: 15.5px; text-align: center; margin: 0 0 16px; }
.ro2ya-numerology-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ro2ya-numerology-input {
	font-family: 'Tajawal', sans-serif;
	font-size: 13px;
	padding: 8px 12px;
	border: 1px solid var(--ro2ya-ink);
	border-radius: 4px;
	background: var(--ro2ya-surface);
	color: var(--ro2ya-ink);
}
.ro2ya-numerology-result { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.ro2ya-numerology-card {
	background: var(--ro2ya-bg);
	border: 1px solid var(--ro2ya-line);
	border-radius: 6px;
	padding: 14px 16px;
}
.ro2ya-numerology-card strong { font-family: 'Cairo', sans-serif; font-size: 13.5px; color: var(--ro2ya-accent); }
.ro2ya-numerology-card p { font-size: 12.5px; color: var(--ro2ya-ink-muted); line-height: 1.7; margin: 6px 0 0; }

/* Mobile hamburger nav */
.ro2ya-nav-toggle {
display: none;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
width: 34px;
height: 34px;
padding: 0;
background: transparent;
border: 1px solid rgba(239,232,222,.4);
border-radius: 4px;
cursor: pointer;
}
.ro2ya-nav-toggle span {
display: block;
width: 18px;
height: 2px;
background: #EFE8DE;
border-radius: 2px;
transition: transform .2s ease, opacity .2s ease;
}
.ro2ya-nav-toggle.ro2ya-nav-toggle-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ro2ya-nav-toggle.ro2ya-nav-toggle-active span:nth-child(2) { opacity: 0; }
.ro2ya-nav-toggle.ro2ya-nav-toggle-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
.ro2ya-nav .ro2ya-container {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
padding-top: 10px;
padding-bottom: 10px;
}
.ro2ya-nav-toggle { display: flex; }
.ro2ya-nav ul {
display: none;
width: 100%;
flex: 0 0 100%;
flex-direction: column;
flex-wrap: nowrap;
align-items: stretch;
gap: 0;
overflow-x: visible;
}
.ro2ya-nav ul.ro2ya-nav-open { display: flex; }
.ro2ya-nav li {
width: 100%;
padding: 12px 4px;
border-top: 1px solid rgba(239,232,222,.15);
}
.ro2ya-nav li:first-child { border-top: none; }
}

/* Hamburger button: force override parent theme's default button styling */
.ro2ya-nav .ro2ya-nav-toggle {
display: none !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
gap: 5px !important;
width: 34px !important;
height: 34px !important;
min-width: 34px !important;
padding: 0 !important;
background: transparent !important;
border: 1px solid rgba(239,232,222,.4) !important;
border-radius: 4px !important;
cursor: pointer !important;
box-shadow: none !important;
}
.ro2ya-nav .ro2ya-nav-toggle span {
display: block !important;
width: 18px !important;
height: 2px !important;
background: #EFE8DE !important;
border-radius: 2px !important;
margin: 0 !important;
padding: 0 !important;
}
@media (max-width: 900px) {
.ro2ya-nav .ro2ya-nav-toggle { display: flex !important; }
}

/* Responsive fix: masthead (logo/quote/chairman) and utility-bar calendar extras on small screens */
@media (max-width: 782px) {
.ro2ya-header .ro2ya-container {
flex-wrap: wrap !important;
justify-content: center !important;
row-gap: 14px !important;
}
.ro2ya-header .ro2ya-container > div:not(.ro2ya-quote-block) {
flex: 1 1 auto !important;
}
.ro2ya-quote-block {
order: 3;
flex: 1 1 100% !important;
width: 100% !important;
padding: 10px 0 0 !important;
border-top: 1px solid var(--ro2ya-line);
}
.ro2ya-calendar-extra {
display: block !important;
margin-right: 0 !important;
margin-top: 4px !important;
}
}
@media (max-width: 480px) {
.ro2ya-calendar-extra { display: none !important; }
}
