/**
 * AlJazeera Smart — main stylesheet
 * Brand main color: #002E70 — rgb(0, 46, 112)
 * Hover / deep tones keep the same blue hue, darkened.
 */

:root {
	--ajs-primary: #002e70;
	--ajs-primary-rgb: 0, 46, 112;
	--ajs-primary-hover: rgb(0, 37, 90);
	--ajs-primary-deep: rgb(0, 30, 73);
	--ajs-font: "Outfit", system-ui, sans-serif;
	--ajs-font-ar: "IBM Plex Sans Arabic", "Outfit", system-ui, sans-serif;
}

/* Light (default) — cool blue-tinted neutrals so the site reads clearly “blue brand” */
html {
	color-scheme: light;
	--ajs-bg: #e8eef7;
	--ajs-bg-elevated: #ffffff;
	--ajs-surface: #ffffff;
	--ajs-text: #0c1629;
	--ajs-text-muted: #4a5a72;
	--ajs-border: rgba(0, 46, 112, 0.14);
	--ajs-hero-overlay: linear-gradient(
		135deg,
		rgba(0, 46, 112, 0.18) 0%,
		rgba(232, 238, 247, 0.97) 52%,
		rgba(255, 255, 255, 0.85) 100%
	);
	--ajs-shadow: 0 18px 50px rgba(10, 22, 45, 0.1);
	--ajs-header-bg: rgba(232, 238, 247, 0.94);
}

html[data-theme="dark"] {
	color-scheme: dark;
	--ajs-bg: #0a0e14;
	--ajs-bg-elevated: #121820;
	--ajs-surface: #151d28;
	--ajs-text: #eef2f8;
	--ajs-text-muted: #a8b4c8;
	--ajs-border: rgba(180, 200, 230, 0.12);
	--ajs-hero-overlay: linear-gradient(
		135deg,
		rgba(0, 46, 112, 0.4) 0%,
		rgba(10, 14, 20, 0.92) 60%
	);
	--ajs-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	--ajs-header-bg: rgba(10, 14, 20, 0.88);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--ajs-font);
	background: var(--ajs-bg);
	color: var(--ajs-text);
	line-height: 1.6;
	font-size: 1.0625rem;
}

[dir="rtl"] body {
	font-family: var(--ajs-font-ar);
	word-break: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
}

/* RTL: clip stray horizontal overflow without breaking sticky (avoid overflow on html/body) */
html[dir="rtl"] .site-header,
html[dir="rtl"] .site-main {
	overflow-x: hidden;
	max-width: 100%;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--ajs-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--ajs-primary-hover);
}

.container {
	width: 100%;
	max-width: 1120px;
	margin-inline: auto;
	box-sizing: border-box;
	padding-inline-start: max(1rem, env(safe-area-inset-left, 0px));
	padding-inline-end: max(1rem, env(safe-area-inset-right, 0px));
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ajs-header-bg);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--ajs-border);
	border-top: 4px solid #002e70;
}

.header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	min-height: 4.25rem;
	min-width: 0;
}

.header__inner > * {
	min-width: 0;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	font-size: 1.125rem;
	letter-spacing: -0.02em;
	min-width: 0;
}

/* Full logo image (icon + wordmark in one file) — no box frame */
.site-brand__logo {
	display: block;
	height: 2.5rem;
	width: auto;
	max-width: min(16rem, 52vw);
	object-fit: contain;
}

.site-brand__name {
	display: block;
	line-height: 1.2;
}

.primary-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
}

[dir="rtl"] .primary-nav__list {
	gap: 0.35rem 0.85rem;
}

@media (min-width: 901px) {
	[dir="rtl"] .primary-nav a {
		font-size: 0.875rem;
	}
}

.primary-nav a {
	color: var(--ajs-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
}

.primary-nav a:hover {
	color: var(--ajs-primary);
}

.header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.lang-switch {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
}

.lang-switch__link {
	color: var(--ajs-text-muted);
	text-decoration: none;
	font-weight: 500;
}

.lang-switch__link.is-active {
	color: var(--ajs-primary);
}

.lang-switch__sep {
	color: var(--ajs-border);
	opacity: 0.8;
}

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	border: 1px solid var(--ajs-border);
	background: var(--ajs-surface);
	color: var(--ajs-text);
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
	border-color: var(--ajs-primary);
}

.theme-toggle__icon--moon {
	display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
	display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
	display: inline;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--ajs-border);
	border-radius: 0.5rem;
	background: var(--ajs-surface);
	cursor: pointer;
	padding: 0;
}

.nav-toggle__bar {
	display: block;
	width: 1.25rem;
	height: 2px;
	background: var(--ajs-text);
	margin-inline: auto;
}

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

	.primary-nav {
		position: fixed;
		inset: 4.25rem 0 auto 0;
		background: var(--ajs-bg-elevated);
		border-bottom: 1px solid var(--ajs-border);
		padding: 1rem 1.5rem 1.25rem;
		transform: translateY(-120%);
		opacity: 0;
		pointer-events: none;
		transition: transform 0.25s ease, opacity 0.25s ease;
	}

	.primary-nav.is-open {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	.primary-nav__list {
		flex-direction: column;
		gap: 0.75rem;
	}
}

/* Hero */
.hero {
	position: relative;
	padding: clamp(3.5rem, 10vw, 6rem) 0;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(0, 46, 112, 0.06) 0%, transparent 42%);
}

[dir="rtl"] .hero {
	padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.hero__bg {
	position: absolute;
	inset: 0;
	background: var(--ajs-hero-overlay);
	pointer-events: none;
}

.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(
		circle at 75% 15%,
		rgba(0, 46, 112, 0.35) 0%,
		rgba(0, 46, 112, 0.08) 40%,
		transparent 65%
	);
}

.hero__inner {
	position: relative;
	max-width: 44rem;
}

.hero__kicker {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: rgba(var(--ajs-primary-rgb), 0.1);
	color: var(--ajs-primary);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hero__title {
	margin: 0 0 1rem;
	font-size: clamp(1.85rem, 4.5vw, 2.75rem);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.hero__sub {
	margin: 0 0 2rem;
	color: var(--ajs-text-muted);
	font-size: 1.05rem;
	max-width: 38rem;
}

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.35rem;
	border-radius: 0.6rem;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
	background: var(--ajs-primary);
	color: #fff;
	border-color: var(--ajs-primary);
}

.btn--primary:hover {
	background: var(--ajs-primary-hover);
	color: #fff;
	border-color: var(--ajs-primary-hover);
}

.btn--ghost {
	background: transparent;
	color: var(--ajs-text);
	border-color: var(--ajs-border);
}

.btn--ghost:hover {
	border-color: var(--ajs-primary);
	color: var(--ajs-primary);
}

.btn--block {
	width: 100%;
}

/* Sections */
.section {
	padding: clamp(3rem, 8vw, 5rem) 0;
}

[dir="rtl"] .section {
	padding-block: clamp(2.25rem, 5.5vw, 3.75rem);
}

.section--testimonials {
	background: var(--ajs-bg-elevated);
	border-block: 1px solid var(--ajs-border);
}

.section--callback {
	background: linear-gradient(
		180deg,
		rgba(var(--ajs-primary-rgb), 0.06) 0%,
		transparent 100%
	);
}

.section__header {
	text-align: center;
	max-width: 40rem;
	margin-inline: auto;
	margin-bottom: 2.5rem;
}

.section__kicker {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ajs-primary);
}

.section__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.section__sub,
.section__lead {
	margin: 0;
	color: var(--ajs-text-muted);
}

.section__lead {
	font-size: 1.05rem;
}

.section--simple {
	padding: 3rem 0 4rem;
}

/* Testimonials */
.testimonial-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

@media (max-width: 900px) {
	.testimonial-grid {
		grid-template-columns: 1fr;
	}
}

.testimonial-card {
	margin: 0;
	padding: 1.5rem;
	border-radius: 1rem;
	background: var(--ajs-surface);
	border: 1px solid var(--ajs-border);
	box-shadow: var(--ajs-shadow);
}

.testimonial-card__quote {
	margin: 0 0 1.25rem;
	font-size: 1rem;
	font-style: normal;
	line-height: 1.65;
}

.testimonial-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: 0.875rem;
	color: var(--ajs-text-muted);
}

.testimonial-card__meta strong {
	color: var(--ajs-text);
	font-weight: 600;
}

/* Sectors */
.sector-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem;
}

.sector-card {
	padding: 1.35rem;
	border-radius: 0.85rem;
	background: var(--ajs-surface);
	border: 1px solid var(--ajs-border);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.sector-card:hover {
	border-color: rgba(var(--ajs-primary-rgb), 0.35);
	box-shadow: var(--ajs-shadow);
}

.sector-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
	color: var(--ajs-primary);
}

.sector-card__desc {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ajs-text-muted);
}

/* Callback */
.callback__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 900px) {
	.callback__layout {
		grid-template-columns: 1fr;
	}
}

.callback__intro .section__title {
	text-align: start;
}

[dir="rtl"] .callback__intro .section__title {
	text-align: right;
}

.callback-form {
	padding: 1.75rem;
	border-radius: 1rem;
	background: var(--ajs-surface);
	border: 1px solid var(--ajs-border);
	box-shadow: var(--ajs-shadow);
}

.form-row {
	margin-bottom: 1rem;
}

.form-row label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.875rem;
	font-weight: 500;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border-radius: 0.5rem;
	border: 1px solid var(--ajs-border);
	background: var(--ajs-bg);
	color: var(--ajs-text);
	font: inherit;
}

.form-row textarea {
	resize: vertical;
	min-height: 4rem;
}

/* intl-tel-input: keep numbers LTR; contain width in RTL layouts */
.form-row--phone {
	max-width: 100%;
	overflow: hidden;
}

.form-row--phone .iti {
	width: 100%;
	max-width: 100%;
	direction: ltr;
}

.form-row--phone input[type="tel"] {
	direction: ltr;
	text-align: left;
	max-width: 100%;
}

.form-status {
	min-height: 1.25rem;
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
}

.form-status.is-error {
	color: #b42318;
}

html[data-theme="dark"] .form-status.is-error {
	color: #f97066;
}

.form-status.is-success {
	color: #067647;
}

html[data-theme="dark"] .form-status.is-success {
	color: #75e0a7;
}

/* Honeypot: do not use large negative inset — it widens scroll width in RTL */
.ajs-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
	inset-inline-start: 0;
	top: 0;
}

/* FAQ */
.faq-accordion {
	max-width: 720px;
	margin-inline: auto;
	border: 1px solid var(--ajs-border);
	border-radius: 1rem;
	overflow: hidden;
	background: var(--ajs-surface);
}

.faq-item + .faq-item {
	border-top: 1px solid var(--ajs-border);
}

.faq-item__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.25rem;
	border: none;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-align: start;
	cursor: pointer;
	overflow-wrap: anywhere;
	word-break: break-word;
	min-width: 0;
}

.faq-item__trigger span:first-child {
	min-width: 0;
	flex: 1 1 auto;
}

.faq-item__trigger:hover {
	background: rgba(var(--ajs-primary-rgb), 0.06);
}

.faq-item__icon {
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--ajs-primary);
	transition: transform 0.2s;
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon {
	transform: rotate(45deg);
}

.faq-item__panel {
	padding: 0 1.25rem 1.15rem;
	color: var(--ajs-text-muted);
	font-size: 0.95rem;
}

.faq-item__panel[hidden] {
	display: none;
}

/* Footer */
.site-footer {
	padding: 3rem 0 1.5rem;
	background: var(--ajs-bg-elevated);
	border-top: 1px solid var(--ajs-border);
}

.footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

@media (max-width: 768px) {
	.footer__grid {
		grid-template-columns: 1fr;
	}
}

.footer__logo-img {
	display: block;
	height: 2.75rem;
	width: auto;
	max-width: min(14rem, 70vw);
	object-fit: contain;
	margin-bottom: 0.75rem;
}

.footer__site-name {
	margin: 0 0 0.75rem;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--ajs-text);
}

.footer__tagline {
	margin: 0;
	color: var(--ajs-text-muted);
	font-size: 0.95rem;
	max-width: 22rem;
}

.footer__heading {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ajs-text-muted);
}

.footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.footer__links a {
	color: var(--ajs-text);
	text-decoration: none;
}

.footer__links a:hover {
	color: var(--ajs-primary);
}

.footer__email a {
	color: var(--ajs-primary);
	font-weight: 600;
	text-decoration: none;
}

.footer__note {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	color: var(--ajs-text-muted);
}

.footer__bottom {
	padding-top: 1.5rem;
	border-top: 1px solid var(--ajs-border);
	font-size: 0.875rem;
	color: var(--ajs-text-muted);
}

.footer__bottom p {
	margin: 0;
}

/* Entry */
.entry__title {
	margin-top: 0;
}

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

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	left: 0.5rem;
	top: 0.5rem;
	z-index: 9999;
	padding: 0.75rem 1rem;
	background: var(--ajs-primary);
	color: #fff;
	text-decoration: none;
	border-radius: 0.35rem;
}
