/* memotheme 2.2 — content.css (المقالات والصفحات) */

/* الهيرو */
.custom-page-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 360px;
	color: var(--c-white);
	background: linear-gradient(135deg, var(--c-navy), var(--c-navy-deep));
	overflow: hidden;
}
.custom-page-hero.no-image { min-height: 0; }
.custom-page-hero .hero-background {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(5, 15, 34, .35) 0%, rgba(5, 15, 34, .88) 100%);
}
.no-image .hero-overlay { background: none; }
.hero-inner { position: relative; padding: 40px 15px 32px; width: 100%; }
.hero-breadcrumb { margin-bottom: 14px; font-size: 14px; }
.hero-breadcrumb a { color: var(--c-white); }
.page-h1 {
	color: var(--c-white);
	font-size: clamp(24px, 3.4vw, 38px);
	line-height: 1.35;
	margin: 0 0 12px;
	max-width: 960px;
}
.hero-lead { font-size: 17px; opacity: .95; max-width: 720px; margin: 0 0 14px; }
.page-meta {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 14px;
}
.page-meta li { display: inline-flex; align-items: center; gap: 6px; }
.page-meta a { color: var(--c-white); }
.custom-page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* منطقة المحتوى */
.page-content-area { background: var(--c-bg); padding: 36px 0 44px; }
.page-content-inner { max-width: 900px; margin: 0 auto; padding: 0 15px; }

/* جدول المحتويات */
.memo-toc { margin: 0 0 26px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: 14px; overflow: hidden; }
.memo-toc-btn {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	text-align: right;
	font-weight: 800;
	color: var(--c-navy);
}
.memo-toc-btn > span { flex: 1; }
.memo-toc-chevron { transition: transform .25s ease; }
.memo-toc-btn[aria-expanded="true"] .memo-toc-chevron { transform: rotate(180deg); }
.memo-toc-nav { padding: 0 18px 16px; }
.memo-toc-list { margin: 0; padding: 0 22px 0 0; }
.memo-toc-list li { margin: 6px 0; font-size: 15px; }
.memo-toc-list a { color: var(--c-navy-soft); font-weight: 700; text-decoration: none; }
.memo-toc-list a:hover { color: var(--c-gold-dark); text-decoration: underline; }
.memo-toc-sub { list-style: disc; margin: 4px 0 0; padding-right: 20px; }
.memo-toc-sub a { font-weight: 600; font-size: 14px; }

/* نص المقال */
.entry-content {
	background: var(--c-white);
	border-radius: 16px;
	padding: 28px;
	box-shadow: var(--shadow);
	font-size: 17px;
	line-height: 1.95;
	overflow-wrap: break-word;
}
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 {
	font-size: 26px;
	margin: 1.6em 0 .6em;
	padding-right: 14px;
	border-right: 5px solid var(--c-gold);
	line-height: 1.4;
}
.entry-content h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.entry-content h4 { font-size: 18px; margin: 1.2em 0 .5em; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-right: 28px; padding-left: 0; }
.entry-content li { margin-bottom: .4em; }
.entry-content a { color: var(--c-navy-soft); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--c-gold-dark); }
.entry-content .btn, .entry-content .btn:hover { text-decoration: none; }
.entry-content .btn-gold { color: var(--c-navy); }
.entry-content .btn-gold:hover, .entry-content .btn-wa { color: var(--c-white); }
.entry-content .memo-cta-block { margin-top: 28px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry-content figure { margin: 1.2em 0; max-width: 100%; }
.entry-content figcaption, .wp-caption-text { font-size: 14px; color: var(--c-muted); text-align: center; margin-top: 6px; }
.entry-content blockquote {
	margin: 1.4em 0;
	padding: 16px 20px;
	border-right: 5px solid var(--c-gold);
	background: var(--c-gold-soft);
	border-radius: 10px;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: right; vertical-align: top; }
.entry-content th { background: var(--c-navy); color: var(--c-white); }
.entry-content tbody tr:nth-child(even) td { background: var(--c-bg); }
.wp-block-table { overflow-x: auto; }
.wp-block-table table { margin: 0; }
@media (max-width: 640px) {
	.entry-content table { display: block; overflow-x: auto; }
}
.alignleft { float: left; margin: 0 0 1em 1em; }
.alignright { float: right; margin: 0 1em 1em 0; }
.aligncenter { display: block; margin: 0 auto 1em; }
.alignwide, .alignfull { max-width: 100%; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 20px; margin: 1.2em 0; }
.wp-block-column { flex: 1 1 220px; min-width: 0; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0; }
.wp-block-button__link {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 10px;
	background: var(--c-navy);
	color: var(--c-white) !important;
	text-decoration: none !important;
	font-weight: 700;
}
.wp-block-image { margin: 1.2em 0; }
.wp-block-image img { display: block; }
.wp-block-group { margin: 1em 0; }
.wp-block-embed iframe, .wp-block-embed video, .wp-video video { max-width: 100%; }
.wp-block-details summary { cursor: pointer; font-weight: 700; }
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.page-links { margin: 1em 0 0; font-weight: 800; }
.page-links a, .page-links span { display: inline-block; margin-left: 6px; }

/* الوسوم والمشاركة */
.post-tags { margin: 24px 0 0; font-size: 14px; }
.post-tags-title { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--c-muted); }
.post-tags a {
	display: inline-block;
	background: var(--c-white);
	border: 1px solid var(--c-line);
	border-radius: 999px;
	padding: 4px 12px;
	margin: 4px 0 0 6px;
	color: var(--c-navy);
	font-weight: 700;
	text-decoration: none;
}
.post-tags a:hover { background: var(--c-navy); color: var(--c-white); }
.post-share { margin: 26px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.post-share-title { font-weight: 800; color: var(--c-navy); }
.post-share-links { display: flex; gap: 8px; }
.post-share-links a {
	width: 42px; height: 42px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--c-white);
	text-decoration: none;
}
.post-share-links a:hover { color: var(--c-white); transform: translateY(-2px); }
.share-whatsapp { background: var(--c-wa); }
.share-facebook { background: #1877F2; }
.share-x { background: #111; }
.share-telegram { background: #229ED9; }

/* صفحات ومقالات ذات صلة */
.related-pages-section, .related-posts-section { padding: 44px 0; background: var(--c-white); }
.related-posts-section { background: var(--c-bg); }
.related-pages-title { text-align: center; font-size: 26px; margin: 0 0 8px; }
.related-pages-subtitle { text-align: center; color: var(--c-muted); margin: 0 0 24px; }
.related-pages-section .chips { justify-content: center; }
.related-pages-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}
.related-page-card {
	display: flex;
	flex-direction: column;
	background: var(--c-bg);
	border: 1px solid var(--c-line);
	border-radius: 16px;
	overflow: hidden;
	color: var(--c-navy);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.related-page-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--c-navy); }
.related-page-image { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--c-navy); }
.related-page-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-page-title { padding: 14px 16px; font-weight: 800; font-size: 16px; line-height: 1.5; }
.parent-page-link { text-align: center; margin: 26px 0 0; }
.parent-page-link a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	border: 2px solid var(--c-navy);
	border-radius: 999px;
	color: var(--c-navy);
	font-weight: 800;
	text-decoration: none;
}
.parent-page-link a:hover { background: var(--c-navy); color: var(--c-white); }

/* التعليقات */
.comments-wrap { padding: 0 0 50px; background: var(--c-bg); }
.comments-area {
	max-width: 900px;
	margin: 0 auto;
	background: var(--c-white);
	border-radius: 16px;
	padding: 26px;
	box-shadow: var(--shadow);
}
.comments-title, .comment-reply-title { font-size: 22px; margin: 0 0 18px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-right: 40px; }
.comment-body { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.comment-avatar img { width: 44px; height: 44px; border-radius: 50%; }
.comment-block { flex: 1; min-width: 0; }
.comment-by { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.comment-date { font-size: 13px; color: var(--c-muted); }
.comment-text p { margin: 0 0 .6em; font-size: 15.5px; }
.comment-reply a { font-size: 14px; font-weight: 700; color: var(--c-gold-dark); }
.comment-awaiting { font-size: 14px; color: #b45309; }
.comment-navigation { display: flex; justify-content: space-between; margin: 12px 0; font-weight: 700; }
.comment-respond { margin-top: 24px; }
.comment-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	border: 1px solid var(--c-line);
	border-radius: 10px;
	padding: 12px 14px;
	background: var(--c-bg);
	margin-bottom: 14px;
}
.comment-form textarea { min-height: 140px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 14px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 600; }
.form-submit .submit {
	background: var(--c-navy);
	color: var(--c-white);
	border: 0;
	border-radius: 10px;
	padding: 12px 24px;
	font-weight: 800;
	cursor: pointer;
}
.form-submit .submit:hover { background: var(--c-navy-soft); }

@media (max-width: 640px) {
	.custom-page-hero { min-height: 280px; }
	.hero-inner { padding: 28px 15px 24px; }
	.entry-content { padding: 20px 16px; font-size: 16px; }
	.entry-content h2 { font-size: 22px; }
	.entry-content h3 { font-size: 19px; }
	.comments-area { padding: 18px 14px; }
	.comment-list .children { padding-right: 18px; }
}
