/*
Theme Name: Semsemm Lab
Theme URI: https://semsemm.com/
Author: محمد سعدي سلامة
Description: قالب عربي خفيف لموقع سمسم لاب المتخصص في حلول ووردبريس المجربة.
Version: 1.1.3
Requires at least: 7.1
Requires PHP: 8.1
Text Domain: semsemm-lab
*/

:root {
	--smsm-bg: #f7f8f5;
	--smsm-surface: #ffffff;
	--smsm-ink: #17231f;
	--smsm-muted: #596862;
	--smsm-line: #dce4df;
	--smsm-brand: #087b60;
	--smsm-brand-dark: #075c49;
	--smsm-accent: #f4b942;
	--smsm-radius: 16px;
	--smsm-width: 1120px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--smsm-bg);
	color: var(--smsm-ink);
	font-family: Tahoma, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.85;
	text-rendering: optimizeLegibility;
}

a {
	color: var(--smsm-brand-dark);
	text-underline-offset: 4px;
}

a:hover {
	color: var(--smsm-brand);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--smsm-accent);
	outline-offset: 3px;
}

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

video,
iframe {
	max-width: 100%;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 12px;
	right: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 10px 16px;
	clip: auto;
	background: var(--smsm-surface);
	color: var(--smsm-ink);
}

.site-shell {
	width: min(calc(100% - 32px), var(--smsm-width));
	margin-inline: auto;
}

.site-header {
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--smsm-line);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 82px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.site-mark {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--smsm-brand);
	color: #fff;
	font-weight: 800;
	font-size: 19px;
}

.site-title-wrap {
	display: grid;
	line-height: 1.35;
}

.site-name {
	color: var(--smsm-ink);
	font-size: 21px;
	font-weight: 800;
}

.site-tagline {
	color: var(--smsm-muted);
	font-size: 12px;
}

.primary-menu,
.footer-menu {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-menu a,
.footer-menu a {
	color: var(--smsm-ink);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.primary-menu a:hover,
.footer-menu a:hover {
	color: var(--smsm-brand);
}

.site-main {
	min-height: 60vh;
}

.hero {
	padding: 78px 0 64px;
	background: linear-gradient(135deg, #e7f4ee 0%, #f7f8f5 62%, #fff6df 100%);
	border-bottom: 1px solid var(--smsm-line);
}

.hero-inner {
	max-width: 820px;
}

.eyebrow {
	display: inline-block;
	margin-bottom: 12px;
	color: var(--smsm-brand-dark);
	font-size: 14px;
	font-weight: 800;
}

.hero h1,
.page-header h1,
.entry-header h1 {
	margin: 0;
	font-size: clamp(34px, 6vw, 62px);
	line-height: 1.22;
	letter-spacing: -0.035em;
}

.hero p {
	max-width: 720px;
	margin: 22px 0 30px;
	color: #374a43;
	font-size: clamp(18px, 2.4vw, 23px);
}

.button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 22px;
	border-radius: 999px;
	background: var(--smsm-brand);
	color: #fff;
	font-weight: 800;
	text-decoration: none;
}

.button-link:hover {
	background: var(--smsm-brand-dark);
	color: #fff;
}

.section-block {
	padding: 58px 0;
}

.section-block + .section-block {
	border-top: 1px solid var(--smsm-line);
}

.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 26px;
}

.section-heading h2 {
	margin: 0;
	font-size: clamp(27px, 4vw, 38px);
	line-height: 1.35;
}

.section-heading p {
	max-width: 560px;
	margin: 0;
	color: var(--smsm-muted);
}

.article-list,
.topic-list {
	padding: 0;
	margin: 0;
	list-style: none;
	border-top: 1px solid var(--smsm-line);
}

.home-article-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.topic-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.topic-grid li {
	min-width: 0;
}

.topic-grid a {
	display: flex;
	min-height: 260px;
	height: 100%;
	flex-direction: column;
	padding: 24px;
	border: 1px solid var(--smsm-line);
	border-radius: 18px;
	background: linear-gradient(145deg, #fff 0%, #f8fbf9 100%);
	box-shadow: 0 9px 28px rgba(23, 35, 31, 0.055);
	color: var(--smsm-ink);
	text-decoration: none;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.topic-grid a:hover {
	transform: translateY(-4px);
	border-color: #9fc9ba;
	box-shadow: 0 17px 36px rgba(23, 35, 31, 0.1);
	color: var(--smsm-ink);
}

.topic-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.topic-card-icon {
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	border-radius: 14px;
	background: #e3f3ed;
	color: var(--smsm-brand-dark);
	font: 800 18px/1 Tahoma, Arial, sans-serif;
}

.topic-grid li:nth-child(2n) .topic-card-icon {
	background: #fff1cf;
	color: #805900;
}

.topic-grid li:nth-child(3n) .topic-card-icon {
	background: #e8eefc;
	color: #294b91;
}

.topic-card-count {
	padding: 5px 10px;
	border-radius: 999px;
	background: #f0f3f1;
	color: var(--smsm-muted);
	font-size: 12px;
	font-weight: 700;
}

.topic-grid strong {
	font-size: 22px;
	line-height: 1.5;
}

.topic-grid p {
	margin: 10px 0 22px;
	color: var(--smsm-muted);
	font-size: 14px;
	line-height: 1.8;
}

.topic-card-action {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--smsm-line);
	color: var(--smsm-brand-dark);
	font-size: 13px;
	font-weight: 800;
}

.topic-card-action span {
	font-size: 18px;
	transition: transform 180ms ease;
}

.topic-grid a:hover .topic-card-action span {
	transform: translateX(-4px);
}

.article-card {
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--smsm-line);
	border-radius: 18px;
	background: var(--smsm-surface);
	box-shadow: 0 10px 30px rgba(23, 35, 31, 0.06);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.article-card:hover {
	transform: translateY(-4px);
	border-color: #b8d4ca;
	box-shadow: 0 18px 38px rgba(23, 35, 31, 0.11);
}

.article-card > a {
	display: flex;
	height: 100%;
	flex-direction: column;
	color: var(--smsm-ink);
	text-decoration: none;
}

.article-card-media {
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #eaf2ee;
}

.article-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 260ms ease;
}

.article-card:hover .article-card-media img {
	transform: scale(1.025);
}

.article-card-placeholder {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
	color: var(--smsm-brand-dark);
	font-weight: 800;
}

.article-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 20px 18px;
}

.article-card-category {
	margin-bottom: 8px;
	color: var(--smsm-brand-dark);
	font-size: 13px;
	font-weight: 800;
}

.article-card h3 {
	margin: 0;
	font-size: 20px;
	line-height: 1.55;
}

.article-card p {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	margin: 12px 0 18px;
	color: var(--smsm-muted);
	font-size: 14px;
	line-height: 1.75;
}

.article-card-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 14px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--smsm-line);
	color: var(--smsm-muted);
	font-size: 12px;
}

.article-row,
.topic-list li {
	border-bottom: 1px solid var(--smsm-line);
}

.article-row a,
.topic-list a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 24px;
	align-items: center;
	padding: 24px 4px;
	color: var(--smsm-ink);
	text-decoration: none;
}

.article-row a:hover,
.topic-list a:hover {
	color: var(--smsm-brand);
}

.article-row h3,
.topic-list strong {
	margin: 0 0 6px;
	font-size: 21px;
	line-height: 1.55;
}

.article-row p {
	margin: 0;
	color: var(--smsm-muted);
	font-size: 15px;
}

.row-meta {
	color: var(--smsm-muted);
	font-size: 13px;
	white-space: nowrap;
}

.method-strip {
	position: relative;
	overflow: hidden;
	padding: 76px 0;
	background:
		radial-gradient(circle at 92% 10%, rgba(30, 166, 127, 0.22), transparent 28%),
		radial-gradient(circle at 8% 95%, rgba(244, 185, 66, 0.12), transparent 24%),
		linear-gradient(145deg, #10231d 0%, #142b24 100%);
	color: #fff;
}

.method-intro {
	max-width: 760px;
	margin: 0 auto 38px;
	text-align: center;
}

.method-intro .eyebrow {
	margin-bottom: 10px;
	color: #72d6b5;
}

.method-intro h2 {
	margin: 0;
	font-size: clamp(32px, 4.5vw, 48px);
	line-height: 1.35;
}

.method-intro p {
	max-width: 680px;
	margin: 16px auto 0;
	color: #c9ded6;
	font-size: 17px;
	line-height: 1.9;
}

.method-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	counter-reset: method-step;
	padding: 0;
	margin: 0;
	list-style: none;
}

.method-steps li {
	position: relative;
	min-height: 210px;
	padding: 72px 24px 26px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.055);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.method-steps li:hover {
	transform: translateY(-4px);
	border-color: rgba(114, 214, 181, 0.45);
	background: rgba(255, 255, 255, 0.085);
}

.method-steps li::before {
	position: absolute;
	top: 22px;
	right: 24px;
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border: 1px solid rgba(114, 214, 181, 0.48);
	border-radius: 50%;
	background: rgba(8, 123, 96, 0.26);
	color: #9ce8cf;
	font-size: 14px;
	font-weight: 800;
	counter-increment: method-step;
	content: counter(method-step);
}

.method-steps strong {
	display: block;
	margin-bottom: 10px;
	color: #fff;
	font-size: 21px;
	line-height: 1.5;
}

.method-steps span {
	display: block;
	color: #bfd4cc;
	font-size: 15px;
	line-height: 1.85;
}

.content-wrap {
	display: grid;
	grid-template-columns: minmax(0, 760px) minmax(220px, 1fr);
	gap: 54px;
	align-items: start;
	padding: 58px 0 76px;
}

.content-wrap > * {
	min-width: 0;
}

.article-content-wrap {
	grid-template-columns: minmax(0, 820px);
	justify-content: center;
}

.article-content-wrap > div {
	padding: clamp(24px, 4vw, 48px);
	border: 1px solid var(--smsm-line);
	border-radius: 20px;
	background: var(--smsm-surface);
	box-shadow: 0 14px 44px rgba(23, 35, 31, 0.06);
}

.entry-header,
.page-header {
	margin-bottom: 30px;
}

.entry-header h1,
.page-header h1 {
	font-size: clamp(32px, 5vw, 52px);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin-top: 16px;
	color: var(--smsm-muted);
	font-size: 14px;
}

.entry-content {
	font-size: 18px;
	line-height: 2;
}

.entry-content > * {
	max-width: 100%;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2em;
	line-height: 1.45;
}

.entry-content h2 {
	padding-bottom: 10px;
	border-bottom: 1px solid var(--smsm-line);
	font-size: 30px;
}

.entry-content h3 {
	font-size: 23px;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin-top: 0;
	margin-bottom: 1.35em;
}

.entry-content ul,
.entry-content ol {
	padding-right: 1.35em;
}

.entry-content li + li {
	margin-top: 8px;
}

.entry-content pre,
.entry-content code {
	direction: ltr;
	unicode-bidi: isolate;
	font-family: Consolas, Monaco, monospace;
}

.entry-content code {
	overflow-wrap: anywhere;
}

.entry-content pre {
	overflow: auto;
	padding: 18px;
	border-radius: 10px;
	background: #101915;
	color: #eef8f4;
}

.entry-content blockquote {
	margin: 28px 0;
	padding: 6px 22px;
	border-right: 4px solid var(--smsm-brand);
	color: #354840;
}

.entry-content figure {
	margin: 38px 0;
	overflow: hidden;
	border: 1px solid var(--smsm-line);
	border-radius: 16px;
	background: #f4f7f5;
}

.entry-content figure img,
.entry-content figure video {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

.entry-content .wp-block-video video {
	aspect-ratio: 16 / 9;
	background: #0b1210;
	object-fit: contain;
}

.entry-content figcaption {
	margin: 0;
	padding: 11px 16px 13px;
	border-top: 1px solid var(--smsm-line);
	background: var(--smsm-surface);
	color: var(--smsm-muted);
	font-size: 14px;
	text-align: center;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 42px;
	padding-top: 24px;
	border-top: 1px solid var(--smsm-line);
	font-size: 14px;
}

.entry-tags span {
	display: inline-flex;
}

.entry-tags a {
	padding: 6px 11px;
	border-radius: 999px;
	background: #eef6f1;
	color: var(--smsm-brand-dark);
	text-decoration: none;
}

.entry-author {
	margin-top: 26px;
	padding: 22px 24px;
	border-right: 3px solid var(--smsm-brand);
	background: #f7faf8;
}

.entry-author strong {
	display: block;
	margin-bottom: 8px;
}

.entry-author p {
	margin: 0;
	color: var(--smsm-muted);
}

.related-posts {
	margin-top: 34px;
	padding-top: 30px;
	border-top: 1px solid var(--smsm-line);
}

.related-posts-heading {
	margin-bottom: 18px;
}

.related-posts-heading h2 {
	margin: 5px 0 0;
	font-size: 27px;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.related-grid .article-card-body {
	padding: 15px;
}

.related-grid .article-card h3 {
	font-size: 16px;
	line-height: 1.65;
}

.entry-aside {
	position: sticky;
	top: 24px;
	padding-right: 22px;
	border-right: 3px solid var(--smsm-accent);
	color: var(--smsm-muted);
	font-size: 14px;
}

.entry-aside strong {
	display: block;
	margin-bottom: 8px;
	color: var(--smsm-ink);
	font-size: 16px;
}

.empty-state {
	padding: 26px 0;
	border-block: 1px solid var(--smsm-line);
	color: var(--smsm-muted);
}

.pagination {
	margin-top: 34px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--smsm-line);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--smsm-brand);
	color: #fff;
}

.site-footer {
	padding: 42px 0;
	border-top: 1px solid var(--smsm-line);
	background: var(--smsm-surface);
}

.footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.footer-note {
	margin: 0;
	color: var(--smsm-muted);
	font-size: 14px;
}

@media (max-width: 820px) {
	.header-inner,
	.section-heading,
	.footer-inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.header-inner {
		padding: 16px 0;
	}

	.primary-menu,
	.footer-menu {
		flex-wrap: wrap;
		gap: 10px 18px;
	}

	.method-steps,
	.content-wrap {
		grid-template-columns: minmax(0, 1fr);
	}

	.method-steps li {
		min-height: 0;
	}

	.home-article-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.topic-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.entry-aside {
		position: static;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}

	.site-shell {
		width: min(calc(100% - 22px), var(--smsm-width));
	}

	.home-article-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.topic-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.related-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.topic-grid a {
		min-height: 0;
	}

	.article-content-wrap > div {
		padding: 22px 17px;
		border-radius: 14px;
	}

	.entry-content {
		font-size: 17px;
	}

	.entry-content h2 {
		font-size: 25px;
	}

	.hero {
		padding: 52px 0 44px;
	}

	.article-row a,
	.topic-list a {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.row-meta {
		white-space: normal;
	}
}
