/*
Theme Name: Muntaqa
Theme URI: https://sknas.com/
Author: Muntaqa Engineering
Author URI: https://sknas.com/
Description: Custom native WordPress block theme for مُنتقى — an Arabic RTL product-discovery, buying-guide, review and comparison platform. Built from scratch for this project only; not derived from a stock WordPress theme, page builder, or any third-party marketplace theme.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: muntaqa
Tags: block-theme, custom-theme, rtl-language-support, full-site-editing
License: GPLv3 or later (theme code)
License URI: https://www.gnu.org/licenses/gpl-3.0.html

This theme bundles the Cairo variable typeface (SIL Open Font License 1.1 —
see assets/fonts/OFL.txt) as its only web font, self-hosted locally.
*/

/* ==========================================================================
   Muntaqa supplementary CSS
   Everything expressible in theme.json (color, type, spacing, presets) lives
   there. This file only covers component-level rules theme.json has no
   vocabulary for. Written with CSS logical properties throughout so RTL (the
   site's actual, permanent direction) and any future LTR use both work
   without a separate stylesheet.
   ========================================================================== */

/* --- Base / safety ------------------------------------------------------ */

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

/* Any wide content (tables, code, embeds) scrolls in its own box instead of
   pushing the page into horizontal scroll — required at every breakpoint. */
.muntaqa-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table {
	max-width: 100%;
}

/* --- Accessibility -------------------------------------------------------*/

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	inset-inline-start: 0.5rem;
	top: -3rem;
	z-index: 100000;
	background: var(--wp--preset--color--navy-900);
	color: var(--wp--preset--color--white);
	padding: 0.75rem 1.25rem;
	border-radius: var(--wp--custom--radius--sm);
	transition: top 0.15s ease;
}

.skip-link:focus {
	top: 0.5rem;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber-500);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Minimum comfortable touch target for interactive controls on small screens. */
a,
button,
.wp-block-button__link,
input[type="submit"] {
	min-height: 44px;
}

.muntaqa-icon-link,
.muntaqa-nav-toggle {
	min-width: 44px;
}

/* --- Site header & mobile navigation ------------------------------------ */

.muntaqa-header {
	background: var(--wp--preset--color--white);
	border-block-end: 1px solid var(--wp--preset--color--gray-200);
	position: sticky;
	top: 0;
	z-index: 40;
}

.muntaqa-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: nowrap;
}

.muntaqa-brand {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--lg);
	color: var(--wp--preset--color--navy-900);
	text-decoration: none;
	line-height: 1.2;
}

.muntaqa-brand:hover {
	color: var(--wp--preset--color--teal-700);
}

.muntaqa-tagline {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	color: var(--wp--preset--color--gray-600);
}

.muntaqa-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--wp--preset--color--gray-200);
	border-radius: var(--wp--custom--radius--sm);
	padding: 0.5rem;
	cursor: pointer;
}

.muntaqa-nav-toggle svg {
	width: 24px;
	height: 24px;
}

#muntaqa-primary-nav ul {
	display: flex;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

#muntaqa-primary-nav a {
	color: var(--wp--preset--color--navy-900);
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
}

#muntaqa-primary-nav a:hover {
	color: var(--wp--preset--color--teal-700);
}

@media (max-width: 781px) {
	.muntaqa-nav-toggle {
		display: inline-flex;
	}

	#muntaqa-primary-nav {
		display: none;
		position: fixed;
		inset-inline: 0;
		top: var(--muntaqa-header-h, 64px);
		bottom: 0;
		background: var(--wp--preset--color--white);
		padding: 1.5rem;
		overflow-y: auto;
	}

	#muntaqa-primary-nav ul {
		flex-direction: column;
		gap: 0;
	}

	#muntaqa-primary-nav a {
		display: flex;
		width: 100%;
		padding: 1rem 0;
		border-block-end: 1px solid var(--wp--preset--color--gray-100);
	}

	body.muntaqa-nav-open #muntaqa-primary-nav {
		display: block;
	}

	body.muntaqa-nav-open {
		overflow: hidden;
	}
}

/* --- Editorial score badge ("تقييم مُنتقى التحريري") --------------------- */

.muntaqa-score-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--wp--preset--color--navy-900);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.4rem 0.9rem 0.4rem 0.6rem;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
}

.muntaqa-score-badge .muntaqa-score-value {
	background: var(--wp--preset--color--amber-500);
	color: var(--wp--preset--color--navy-900);
	border-radius: var(--wp--custom--radius--pill);
	min-width: 1.75rem;
	height: 1.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
}

.muntaqa-score-caption {
	color: var(--wp--preset--color--gray-600);
	font-size: var(--wp--preset--font-size--sm);
}

/* --- Cards (product / buying-guide / comparison) ------------------------ */

.muntaqa-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--gray-200);
	border-radius: var(--wp--custom--radius--lg);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	height: 100%;
}

.muntaqa-card:hover,
.muntaqa-card:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--raised);
}

.muntaqa-card .muntaqa-card-body {
	padding: 1.25rem;
}

.muntaqa-card figure {
	margin: 0;
	background: var(--wp--preset--color--gray-50);
	aspect-ratio: 3 / 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.muntaqa-placeholder-media {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--gray-400);
	font-size: var(--wp--preset--font-size--sm);
	background: repeating-linear-gradient(
		45deg,
		var(--wp--preset--color--gray-50),
		var(--wp--preset--color--gray-50) 10px,
		var(--wp--preset--color--gray-100) 10px,
		var(--wp--preset--color--gray-100) 20px
	);
}

/* --- Comparison table ----------------------------------------------------*/

.muntaqa-comparison-table table {
	border-collapse: collapse;
	width: 100%;
	min-width: 560px;
}

.muntaqa-comparison-table th,
.muntaqa-comparison-table td {
	padding: 0.9rem 1rem;
	text-align: start;
	border-block-end: 1px solid var(--wp--preset--color--gray-200);
	vertical-align: top;
}

.muntaqa-comparison-table thead th {
	background: var(--wp--preset--color--navy-900);
	color: var(--wp--preset--color--white);
	position: sticky;
	top: 0;
}

.muntaqa-comparison-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--gray-50);
}

.muntaqa-comparison-table td:first-child,
.muntaqa-comparison-table th:first-child {
	font-weight: 700;
	color: var(--wp--preset--color--navy-900);
}

/* --- Pros & cons ----------------------------------------------------------*/

.muntaqa-pros-cons {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 600px) {
	.muntaqa-pros-cons {
		grid-template-columns: 1fr 1fr;
	}
}

.muntaqa-pros,
.muntaqa-cons {
	border-radius: var(--wp--custom--radius--md);
	padding: 1.25rem;
}

.muntaqa-pros {
	background: color-mix(in srgb, var(--wp--preset--color--teal-600) 8%, white);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--teal-600) 30%, white);
}

.muntaqa-cons {
	background: var(--wp--preset--color--gray-50);
	border: 1px solid var(--wp--preset--color--gray-200);
}

.muntaqa-pros ul,
.muntaqa-cons ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.muntaqa-pros li,
.muntaqa-cons li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
}

.muntaqa-pros li::before {
	content: "";
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--teal-600);
}

.muntaqa-cons li::before {
	content: "";
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--gray-400);
}

/* --- FAQ (native core/details) --------------------------------------------*/

.muntaqa-faq details {
	border-block-end: 1px solid var(--wp--preset--color--gray-200);
	padding: 1rem 0;
}

.muntaqa-faq summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--navy-900);
}

.muntaqa-faq summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--amber-500);
	outline-offset: 3px;
}

/* --- Disclosure & trust components -----------------------------------------*/

.muntaqa-disclosure {
	background: var(--wp--preset--color--gray-50);
	border-inline-start: 4px solid var(--wp--preset--color--amber-500);
	border-radius: var(--wp--custom--radius--sm);
	padding: 1rem 1.25rem;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--gray-600);
}

.muntaqa-trust-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.muntaqa-trust-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.muntaqa-trust-item svg {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	color: var(--wp--preset--color--teal-600);
}

/* --- Newsletter -------------------------------------------------------------*/

.muntaqa-newsletter {
	background: var(--wp--preset--color--navy-900);
	color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--lg);
	padding: 2.5rem;
}

.muntaqa-newsletter input[type="email"] {
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: var(--wp--custom--radius--sm);
	border: 1px solid var(--wp--preset--color--gray-200);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--base);
}

/* --- Footer ------------------------------------------------------------------*/

.muntaqa-footer {
	background: var(--wp--preset--color--navy-900);
	color: var(--wp--preset--color--gray-200);
}

.muntaqa-footer a {
	color: var(--wp--preset--color--white);
}

.muntaqa-footer a:hover {
	color: var(--wp--preset--color--amber-500);
}

/* --- Breadcrumbs ----------------------------------------------------------*/

.muntaqa-breadcrumbs,
.rank-math-breadcrumb {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--gray-600);
}

.rank-math-breadcrumb a {
	color: var(--wp--preset--color--gray-600);
	text-decoration: underline;
}

/* --- Author box & review methodology ---------------------------------------*/

.muntaqa-author-box {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background: var(--wp--preset--color--gray-50);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.25rem;
}

.muntaqa-author-box img {
	border-radius: 50%;
	width: 56px;
	height: 56px;
	flex: 0 0 auto;
}

.muntaqa-methodology {
	border: 1px solid var(--wp--preset--color--gray-200);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.25rem;
}

/* --- Product details shortcode (muntaqa-product-core plugin output) -------*/

.muntaqa-product-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-block: 1.5rem;
}

.muntaqa-fit-summary {
	background: var(--wp--preset--color--gray-50);
	border-radius: var(--wp--custom--radius--md);
	padding: 1rem 1.25rem;
}

.muntaqa-fit-summary p {
	margin: 0;
}

.muntaqa-fit-summary p + p {
	margin-top: 0.5rem;
}

.muntaqa-specs-table {
	width: 100%;
	min-width: 420px;
	border-collapse: collapse;
}

.muntaqa-specs-table th,
.muntaqa-specs-table td {
	text-align: start;
	padding: 0.6rem 0.9rem;
	border-block-end: 1px solid var(--wp--preset--color--gray-200);
}

.muntaqa-specs-table th {
	color: var(--wp--preset--color--gray-600);
	font-weight: 600;
	width: 40%;
}

.muntaqa-product-cta {
	background: var(--wp--preset--color--gray-50);
	border-radius: var(--wp--custom--radius--md);
	padding: 1.25rem;
	text-align: center;
}

.muntaqa-amazon-cta {
	display: inline-block;
}

.muntaqa-price-note {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--gray-600);
}

.muntaqa-freshness-note {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--gray-600);
}

/* --- Empty states / search / 404 -------------------------------------------*/

.muntaqa-empty-state {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--wp--preset--color--gray-600);
}

.muntaqa-empty-state svg {
	width: 64px;
	height: 64px;
	color: var(--wp--preset--color--gray-400);
	margin-bottom: 1rem;
}

