/*
Theme Name: Namaab Portfolio
Description: ثيم بورتفوليو عربي (RTL) بنمط الستارة المقوّسة والخطوط الطولية. أربع صفحات: نبذة عني، أعمالي (صفحتين)، الخدمات.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nm-portfolio
Tags: rtl-language-support, portfolio, one-column
*/

:root {
	--cream: #f5f5f0;
	--burgundy: #5a0a17;
	--burgundy-dark: #35060c;
	--sky: #c8dde8;
	--steel: #9db0ba;
	--rose: #a07c80;
	--header-h: 84px;
	--scallop-w: 76px;
	--scallop-h: 34px;

	--stripes-hero: repeating-linear-gradient(90deg, #f7f7f4 0 30px, #c8dde8 30px 50px, #55091a 50px 92px, #c8dde8 92px 108px);
	--stripes-frame: repeating-linear-gradient(90deg, #4c0a12 0 9px, #9db0ba 9px 26px, #4c0a12 26px 35px, #b9b8b4 35px 62px);
	--stripes-footer: repeating-linear-gradient(90deg, #35060c 0 16px, #7c8d96 16px 40px, #35060c 40px 52px, #928f8a 52px 92px);
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--cream);
	color: var(--burgundy);
	font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
	font-size: 17px;
	line-height: 1.9;
	direction: rtl;
	text-align: right;
}

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

.nm-main { flex: 1; display: flex; flex-direction: column; }

/* ---------- الهيدر + الستارة المقوّسة ---------- */
.nm-header {
	position: relative;
	z-index: 10;
	background: var(--cream);
	filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.16));
}
.nm-header::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: var(--scallop-h);
	background: radial-gradient(ellipse calc(var(--scallop-w) / 2) var(--scallop-h) at 50% 0, var(--cream) 98%, transparent 100%) 0 0 / var(--scallop-w) var(--scallop-h) repeat-x;
	pointer-events: none;
}
.nm-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: var(--header-h);
	padding: 0 clamp(20px, 5vw, 64px);
}

.nm-nav { justify-self: start; }
.nm-nav ul { display: flex; gap: clamp(22px, 5vw, 64px); list-style: none; margin: 0; padding: 0; }
.nm-nav a {
	color: var(--burgundy);
	text-decoration: underline;
	text-underline-offset: 6px;
	font-size: 18px;
}
.nm-nav .current-menu-item > a { font-weight: 700; }

.nm-star { display: block; line-height: 0; }
.nm-star svg { width: 46px; height: 46px; fill: var(--burgundy); }

.nm-logo {
	justify-self: end;
	direction: ltr;
	display: flex;
	align-items: baseline;
	gap: 8px;
	color: var(--burgundy);
	text-decoration: none;
	white-space: nowrap;
}
.nm-logo__en { font-family: Arial, Helvetica, sans-serif; font-size: 24px; }
.nm-logo__sep { font-family: Arial, Helvetica, sans-serif; font-size: 20px; }
.nm-logo__ar { direction: rtl; font-size: 17px; }

/* ---------- الصفحة الأولى: نبذة عني ---------- */
.nm-hero {
	flex: 1;
	min-height: calc(100vh - var(--header-h));
	display: grid;
	place-items: center;
	padding: calc(var(--scallop-h) + 40px) 20px 70px;
	background: var(--stripes-hero);
}
.nm-card {
	width: min(100%, 590px);
	background: var(--cream);
	padding: 38px clamp(22px, 5vw, 44px);
	text-align: center;
	box-shadow: -6px 8px 18px rgba(50, 60, 80, 0.35);
	border-radius: 2px;
}
.nm-card p { margin: 0; font-size: 17px; line-height: 2.1; }
.nm-card__star { width: 74px; height: 74px; fill: var(--rose); margin: 14px auto; display: block; }

/* ---------- صفحات الأعمال ---------- */
.nm-works {
	flex: 1;
	min-height: calc(100vh - var(--header-h));
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 44px;
	padding: calc(var(--scallop-h) + 50px) 20px 70px;
}

.nm-frames {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	width: min(100%, 1120px);
}
.nm-frame {
	background: var(--stripes-frame);
	border-radius: 16px;
	padding: 12px 24px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.nm-frame--vertical {
	width: min(100%, 540px);
	padding: 24px clamp(26px, 15vw, 92px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(18px, 6vw, 38px);
	border-radius: 8px;
}

/* مكان الفيديو */
.nm-slot {
	position: relative;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}
.nm-slot--vertical { aspect-ratio: 9 / 16; border-radius: 10px; background: #e9eef2; }
.nm-slot__media { position: absolute; inset: 0; }
.nm-slot__media > * { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.nm-slot.is-playing .nm-slot__media > video { object-fit: contain; background: #000; }

.nm-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(50, 50, 56, 0.8);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease;
}
.nm-play svg { width: 30px; height: 30px; fill: #fff; margin-left: 3px; }
.nm-slot:not(.is-empty) .nm-play:hover { transform: translate(-50%, -50%) scale(1.07); background: rgba(50, 50, 56, 0.92); }
.nm-slot.is-empty .nm-play { cursor: default; }
.nm-slot.is-playing .nm-play { display: none; }

/* التنقل بين صفحتي الأعمال */
.nm-pager { display: flex; gap: 14px; justify-content: center; }
.nm-pager__dot {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1.5px solid var(--burgundy);
	color: var(--burgundy);
	display: grid;
	place-items: center;
	text-decoration: none;
	font-size: 15px;
	line-height: 1;
}
.nm-pager__dot.is-current { background: var(--burgundy); color: var(--cream); }

/* ---------- الخدمات ---------- */
.nm-services {
	width: min(100%, 1200px);
	margin: 0 auto;
	padding: calc(var(--scallop-h) + clamp(50px, 9vw, 120px)) 24px clamp(60px, 9vw, 110px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px clamp(32px, 8vw, 110px);
}
.nm-service {
	background: var(--sky);
	border-radius: 8px;
	min-height: 100px;
	display: flex;
	align-items: center;
	padding: 0 clamp(28px, 5vw, 64px);
	font-size: clamp(22px, 3vw, 32px);
	color: var(--burgundy);
}

/* ---------- الفوتر (بيانات التواصل) ---------- */
.nm-footer {
	background: var(--stripes-footer);
	color: #fff;
	padding: 36px clamp(24px, 6vw, 64px);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.nm-footer__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}
.nm-tagline { display: flex; align-items: center; gap: 14px; font-size: 22px; }
.nm-tagline svg { width: 30px; height: 30px; fill: #fff; flex: none; }
.nm-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; direction: ltr; }
.nm-contact li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.nm-contact svg { width: 24px; height: 24px; fill: #fff; flex: none; }
.nm-contact a { color: #fff; }
.nm-contact .is-link { text-decoration: underline; }

/* ---------- الصفحات العادية / الاحتياطية ---------- */
.nm-page { width: min(100%, 800px); margin: 0 auto; padding: calc(var(--scallop-h) + 50px) 24px 80px; }
.nm-page h1 { font-weight: 500; }

/* ---------- الجوال ---------- */
@media (max-width: 760px) {
	:root { --scallop-w: 56px; --scallop-h: 26px; --header-h: 100px; }
	.nm-header__inner { grid-template-columns: 1fr; justify-items: center; row-gap: 6px; padding-top: 12px; padding-bottom: 12px; }
	.nm-logo { order: -1; justify-self: center; }
	.nm-nav { justify-self: center; }
	.nm-star { display: none; }
	.nm-frames { grid-template-columns: 1fr; }
	.nm-services { grid-template-columns: 1fr; gap: 20px; }
	.nm-footer__inner { flex-direction: column; align-items: flex-start; }
}
