/*
Theme Name: تفاصيل 24
Theme URI: https://tafasil24.com
Author: Zamzamy
Description: قالب عربي مخصص لموقع مقالات الإعلامي والكاتب وليد الحمادي — هوية تجمع الإمارات والمغرب، اتجاه RTL كامل، قراءة مريحة، ومشاركة احترافية على منصات التواصل.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: tafasil24
Tags: rtl-language-support, blog, news, custom-menu, featured-images
*/

/* =========================================================
   1. Tokens
   ========================================================= */
:root {
	--paper: #f7f2e9;
	--paper-2: #efe6d6;
	--card: #fffdf9;
	--ink: #1b211e;
	--ink-2: #444c47;
	--muted: #7d817c;
	--line: #e3d8c5;
	--green: #1e5b45;
	--green-deep: #11362a;
	--terra: #b4452e;
	--terra-soft: #f3dfd6;
	--gold: #a8844b;

	--font-head: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
	--font-body: "Noto Naskh Arabic", "Amiri", "Times New Roman", serif;

	--wrap: 1200px;
	--gutter: 20px;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(27, 33, 30, .05), 0 8px 24px -12px rgba(27, 33, 30, .18);

	--zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23a8844b' stroke-width='1'%3E%3Cpath d='M32 10l6.4 15.6L54 32l-15.6 6.4L32 54l-6.4-15.6L10 32l15.6-6.4z'/%3E%3Cpath d='M17.5 17.5h29v29h-29z'/%3E%3Cpath d='M32 0v6M32 58v6M0 32h6M58 32h6'/%3E%3Cpath d='M0 0l8 8M64 0l-8 8M0 64l8-8M64 64l-8-8'/%3E%3C/g%3E%3C/svg%3E");
	--zellige-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Cpath d='M32 10l6.4 15.6L54 32l-15.6 6.4L32 54l-6.4-15.6L10 32l15.6-6.4z'/%3E%3Cpath d='M17.5 17.5h29v29h-29z'/%3E%3Cpath d='M32 0v6M32 58v6M0 32h6M58 32h6'/%3E%3Cpath d='M0 0l8 8M64 0l-8 8M0 64l8-8M64 64l-8-8'/%3E%3C/g%3E%3C/svg%3E");
}

/* =========================================================
   2. Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.85;
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--terra); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.45; margin: 0 0 .5em; color: var(--ink); font-weight: 700; }
p { margin: 0 0 1.1em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--terra); color: #fff; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; right: 8px; z-index: 999; background: var(--ink); color: #fff; padding: 8px 14px; width: auto; height: auto; clip: auto; border-radius: 8px; }

.icon { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* =========================================================
   3. Top bar + Header
   ========================================================= */
.topbar {
	background: var(--green-deep);
	color: rgba(255, 255, 255, .82);
	font-family: var(--font-head);
	font-size: 12.5px;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.topbar .socials a { color: rgba(255, 255, 255, .8); }
.topbar .socials a:hover { color: #fff; }
.topbar .icon { width: 15px; height: 15px; }

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(247, 242, 233, .94);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
	display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 12px;
	background: var(--green); color: #fff;
	font-family: var(--font-head); font-weight: 800; font-size: 19px;
	position: relative; overflow: hidden;
}
.brand-mark::after { content: ""; position: absolute; inset: 0; background: var(--zellige-light); background-size: 32px; opacity: .14; }
.brand-mark span { position: relative; z-index: 1; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 22px; letter-spacing: -.2px; }
.brand-name em { font-style: normal; color: var(--terra); }
.brand-tag { font-family: var(--font-head); font-size: 12px; color: var(--muted); }
.custom-logo { max-height: 52px; width: auto; }

.main-nav { margin-inline-start: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
	display: block; padding: 8px 14px; border-radius: 999px;
	font-family: var(--font-head); font-size: 14.5px; font-weight: 500; color: var(--ink-2);
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-cat > a { background: var(--paper-2); color: var(--ink); }
.main-nav .sub-menu { display: none; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
	display: grid; place-items: center; width: 42px; height: 42px;
	border: 1px solid var(--line); background: var(--card); border-radius: 999px;
	cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.menu-toggle { display: none; }

.search-panel { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.search-panel.is-open { display: block; }
.search-panel .wrap { padding-block: 16px; }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--card); font-family: var(--font-head); font-size: 15px;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--green); }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
	font-family: var(--font-head); font-size: 14.5px; font-weight: 700; cursor: pointer;
	background: var(--ink); color: #fff; transition: transform .15s ease, background .2s ease;
}
.btn:hover { background: var(--terra); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.reading-progress { position: fixed; top: 0; right: 0; height: 3px; width: 0; background: var(--terra); z-index: 100; }

/* =========================================================
   4. Hero (front page)
   ========================================================= */
.hero { position: relative; padding-block: 56px 72px; overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: 0; background: var(--zellige); background-size: 64px; opacity: .14;
	-webkit-mask-image: linear-gradient(to left, #000 0%, transparent 70%);
	mask-image: linear-gradient(to left, #000 0%, transparent 70%);
	pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-head); font-size: 13.5px; font-weight: 700; color: var(--green);
	margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--terra); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; line-height: 1.2; margin-bottom: 18px; letter-spacing: -.5px; }
.hero-bio { font-size: 19px; line-height: 1.95; color: var(--ink-2); max-width: 60ch; margin-bottom: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.stat {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
}
.stat strong { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--terra); line-height: 1; }
.stat span { font-family: var(--font-head); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.flags { display: inline-flex; gap: 4px; }
.flag { width: 26px; height: 18px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.socials-lg a {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
	background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.socials-lg a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.hero-portrait { position: relative; margin: 0; justify-self: center; width: min(100%, 400px); }
.hero-portrait .arch {
	position: relative; z-index: 2; aspect-ratio: 4 / 5; overflow: hidden;
	border-radius: 999px 999px 20px 20px; background: #fff;
	box-shadow: 0 30px 60px -30px rgba(17, 54, 42, .45);
}
.hero-portrait .arch img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-portrait::before {
	content: ""; position: absolute; z-index: 1; inset: 18px -18px -18px 18px;
	border-radius: 999px 999px 20px 20px; border: 2px solid var(--terra);
}
.hero-portrait::after {
	content: ""; position: absolute; z-index: 0; inset: auto -40px -40px auto; width: 70%; height: 55%;
	background-color: var(--green); background-image: var(--zellige-light); background-size: 48px;
	border-radius: 20px; opacity: .95;
}
.hero-portrait figcaption {
	position: absolute; z-index: 3; bottom: 22px; right: -22px;
	background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
	padding: 10px 16px; font-family: var(--font-head); font-size: 13px; line-height: 1.5;
}
.hero-portrait figcaption b { display: block; font-size: 15px; color: var(--ink); }
.hero-portrait figcaption span { color: var(--muted); }

/* =========================================================
   5. Sections + cards
   ========================================================= */
.section { padding-block: 56px; }
.section + .section { padding-top: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.section-head h2 { font-size: 26px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 12px; }
.section-head h2::before { content: ""; width: 10px; height: 10px; background: var(--terra); transform: rotate(45deg); }
.more-link { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.more-link .icon { width: 16px; height: 16px; }

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

.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--green); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.6; margin: 0; }
.card-title a:hover { color: var(--terra); }
.card-excerpt { font-size: 16px; line-height: 1.8; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 6px; }

.placeholder-media {
	position: absolute; inset: 0; display: grid; place-items: center;
	background-color: var(--green); background-image: var(--zellige-light); background-size: 52px;
	color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 26px;
}
.placeholder-media span { background: rgba(17, 54, 42, .55); padding: 6px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.placeholder-media.alt { background-color: var(--terra); }
.placeholder-media.alt2 { background-color: var(--gold); }

.chip {
	display: inline-block; align-self: flex-start;
	padding: 3px 12px; border-radius: 999px; background: var(--terra-soft); color: var(--terra);
	font-family: var(--font-head); font-size: 12.5px; font-weight: 700;
}
.chip:hover { background: var(--terra); color: #fff; }
.card-media .chip { position: absolute; top: 14px; right: 14px; background: rgba(255,253,249,.95); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-family: var(--font-head); font-size: 12.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 14px; height: 14px; }

/* Featured block */
.featured { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; }
.feature-main { position: relative; display: block; min-height: 460px; border-radius: 20px; overflow: hidden; background: var(--green-deep); color: #fff; }
.feature-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.feature-main:hover img { transform: scale(1.03); }
.feature-main .placeholder-media > span { display: none; }
.feature-main .placeholder-media { background-size: 72px; opacity: .45; }
.feature-main .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 30, 23, .92) 0%, rgba(10, 30, 23, .35) 55%, rgba(10, 30, 23, .05) 100%); }
.feature-main .content { position: absolute; inset: auto 0 0 0; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.feature-main h3 { color: #fff; font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.45; margin: 0; }
.feature-main p { color: rgba(255,255,255,.85); margin: 0; font-size: 17px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature-main .meta { color: rgba(255,255,255,.75); }
.feature-main:hover, .feature-main:hover h3 { color: #fff; }
.label-new { align-self: flex-start; background: var(--terra); color: #fff; padding: 4px 14px; border-radius: 999px; font-family: var(--font-head); font-size: 12.5px; font-weight: 700; }

.feature-list { display: flex; flex-direction: column; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: fl; }
.feature-list li { counter-increment: fl; display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature-list li:first-child { padding-top: 0; }
.feature-list li::before {
	content: counter(fl, decimal-leading-zero); font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1;
	color: transparent; -webkit-text-stroke: 1.2px var(--terra);
}
.feature-list h4 { font-size: 17.5px; line-height: 1.6; margin: 6px 0 8px; }

/* Bridge banner */
.bridge {
	position: relative; overflow: hidden; border-radius: 24px; padding: 56px 48px;
	background: var(--green-deep); color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.bridge::before { content: ""; position: absolute; inset: 0; background: var(--zellige-light); background-size: 64px; opacity: .08; }
.bridge > * { position: relative; }
.bridge .eyebrow { color: #e9c99a; }
.bridge blockquote { margin: 0; font-family: var(--font-head); font-size: clamp(22px, 3vw, 32px); font-weight: 700; line-height: 1.7; }
.bridge .flags .flag { width: 54px; height: 36px; border-radius: 6px; }
.bridge .flags { gap: 10px; flex-direction: column; }

/* =========================================================
   6. Archive / page headers
   ========================================================= */
.page-hero { position: relative; padding-block: 48px 40px; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--zellige); background-size: 64px; opacity: .12; pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; margin: 0 0 8px; }
.page-hero p { color: var(--ink-2); max-width: 70ch; margin: 0; }
.page-hero .count { font-family: var(--font-head); font-size: 13.5px; color: var(--muted); margin-top: 10px; }

.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px;
	background: var(--card); border: 1px solid var(--line); font-family: var(--font-head); font-size: 14px; font-weight: 700;
}
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty-state { text-align: center; padding: 64px 20px; }
.empty-state h2 { font-size: 26px; }
.empty-state .search-form { max-width: 520px; margin: 22px auto 0; }

/* =========================================================
   7. Single article
   ========================================================= */
.article-head { padding-block: 48px 28px; }
.article-head .wrap { max-width: 860px; }
.article-head .chip { margin-bottom: 16px; }
.article-head h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; line-height: 1.45; margin-bottom: 16px; }
.article-lead { font-size: 21px; color: var(--ink-2); line-height: 1.9; margin-bottom: 26px; }
.byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.byline-author { display: flex; align-items: center; gap: 12px; }
.avatar-img { width: 50px; height: 50px; border-radius: 999px; object-fit: cover; background: #fff; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.byline-author b { display: block; font-family: var(--font-head); font-size: 15px; }
.byline-author .meta { font-size: 12.5px; }

.article-figure { margin: 0 auto 40px; max-width: 1060px; padding-inline: var(--gutter); }
.article-figure img { width: 100%; border-radius: 18px; aspect-ratio: 16 / 9; object-fit: cover; }
.article-figure figcaption { font-family: var(--font-head); font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

.article-layout { max-width: 860px; margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 32px; }
.share-rail { position: sticky; top: 100px; align-self: start; display: flex; flex-direction: column; gap: 8px; }
.share-btn {
	display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; cursor: pointer;
	background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.share-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.share-btn.copied { background: var(--green); border-color: var(--green); color: #fff; }
.share-rail .label { font-family: var(--font-head); font-size: 11.5px; color: var(--muted); text-align: center; }

.entry-content { font-size: 20px; line-height: 2.05; color: #222925; }
.entry-content > * + * { margin-top: 0; }
.entry-content p { margin-bottom: 1.35em; }
.entry-content h2 { font-size: 28px; margin-top: 1.6em; }
.entry-content h3 { font-size: 23px; margin-top: 1.4em; }
.entry-content a { color: var(--green); text-decoration: underline; text-decoration-color: rgba(30, 91, 69, .35); text-underline-offset: 4px; }
.entry-content a:hover { color: var(--terra); text-decoration-color: currentColor; }
.entry-content blockquote, .entry-content .wp-block-quote {
	margin: 2em 0; padding: 8px 28px 8px 0; border: 0; border-inline-start: 4px solid var(--terra);
	font-family: var(--font-head); font-size: 23px; font-weight: 700; line-height: 1.85; color: var(--ink);
}
.entry-content blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--muted); font-style: normal; }
.entry-content .wp-block-pullquote { border-block: 2px solid var(--ink); padding: 28px 0; text-align: center; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; margin-bottom: 1.35em; }
.entry-content li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--terra); }
.entry-content img, .entry-content figure img { border-radius: 14px; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { font-family: var(--font-head); font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content hr { border: 0; height: 18px; margin: 2.4em 0; background: var(--zellige) center / 18px repeat-x; opacity: .7; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; }
.entry-content .wp-block-embed iframe { aspect-ratio: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; }
.alignwide { margin-inline: -60px; }
.alignfull { margin-inline: calc(50% - 50vw); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; }
.tags a { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-family: var(--font-head); font-size: 13px; color: var(--ink-2); }
.tags a:hover { border-color: var(--ink); color: var(--ink); }

.share-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 36px; padding: 20px 22px; border-radius: 16px; background: var(--paper-2); }
.share-bottom strong { font-family: var(--font-head); font-size: 15px; margin-inline-end: auto; }

.author-box {
	position: relative; overflow: hidden; display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center;
	margin-top: 40px; padding: 26px; border-radius: 20px; background: var(--green-deep); color: rgba(255,255,255,.88);
}
.author-box::before { content: ""; position: absolute; inset: 0; background: var(--zellige-light); background-size: 56px; opacity: .07; }
.author-box > * { position: relative; }
.author-box img { width: 96px; height: 96px; border-radius: 999px; object-fit: cover; background: #fff; border: 3px solid rgba(255,255,255,.9); }
.author-box h3 { color: #fff; font-size: 20px; margin: 0 0 2px; }
.author-box .role { font-family: var(--font-head); font-size: 13px; color: #e9c99a; margin-bottom: 8px; display: block; }
.author-box p { font-size: 16px; line-height: 1.85; margin: 0 0 12px; }
.author-box .socials a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; }
.author-box .socials a:hover { background: #fff; color: var(--green-deep); }
.author-box .socials .icon { width: 16px; height: 16px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-nav a { display: block; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.post-nav a:hover { border-color: var(--ink); color: var(--ink); }
.post-nav small { display: block; font-family: var(--font-head); font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.post-nav b { font-family: var(--font-head); font-size: 15.5px; line-height: 1.6; }
.post-nav .next { text-align: left; }

/* =========================================================
   8. Pages (about / contact)
   ========================================================= */
.page-content { max-width: 860px; margin-inline: auto; padding: 44px var(--gutter) 24px; }
.about-intro { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; margin-bottom: 32px; }
.about-intro .hero-portrait { width: 100%; }
.about-intro .hero-portrait::after { inset: auto -16px -16px auto; }
.about-intro .hero-portrait::before { inset: 10px -10px -10px 10px; }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 32px; }
.contact-card {
	display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px;
	background: var(--card); border: 1px solid var(--line);
}
.contact-card:hover { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow); }
.contact-card .ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--paper-2); }
.contact-card b { display: block; font-family: var(--font-head); font-size: 15px; }
.contact-card b, .contact-card .ic { color: var(--ink); }
.contact-card span span { font-family: var(--font-head); font-size: 13px; color: var(--muted); direction: ltr; unicode-bidi: isolate; }

/* Forms (Contact Form 7 / WPForms friendly) */
.page-content input[type="text"], .page-content input[type="email"], .page-content input[type="tel"], .page-content textarea, .page-content select {
	width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-family: var(--font-head); font-size: 15px;
}
.page-content input[type="submit"], .page-content button[type="submit"] { background: var(--ink); color: #fff; border: 0; padding: 12px 28px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; cursor: pointer; }

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer { position: relative; margin-top: 72px; background: var(--ink); color: rgba(255,255,255,.72); overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background-color: var(--terra); background-image: var(--zellige-light); background-size: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 56px 36px; }
.site-footer h3 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand-tag { color: rgba(255,255,255,.6); }
.site-footer p { font-size: 16px; line-height: 1.9; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-family: var(--font-head); font-size: 14px; }
.footer-links a:hover { color: #fff; }
.site-footer .socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; }
.site-footer .socials a:hover { background: var(--terra); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 18px; font-family: var(--font-head); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* =========================================================
   10. Responsive
   ========================================================= */
@media (max-width: 1024px) {
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero .wrap { gap: 40px; }
	.featured { grid-template-columns: 1fr; }
	.alignwide { margin-inline: 0; }
}

@media (max-width: 860px) {
	body { font-size: 17px; }
	.menu-toggle { display: grid; }
	.main-nav {
		position: fixed; inset: 0 0 0 auto; width: min(86vw, 340px); z-index: 120;
		background: var(--paper); padding: 84px 20px 24px; transform: translateX(100%);
		transition: transform .3s ease, visibility .3s; overflow-y: auto; visibility: hidden;
	}
	.main-nav.is-open { transform: none; visibility: visible; box-shadow: -20px 0 40px -20px rgba(0,0,0,.3); }
	.main-nav ul { flex-direction: column; gap: 2px; }
	.main-nav a { font-size: 17px; padding: 12px 16px; border-radius: 12px; }
	.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
	.nav-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(17, 22, 20, .45); display: none; }
	.nav-backdrop.is-open { display: block; }
	.nav-close { position: absolute; top: 20px; left: 20px; }
	.header-actions { margin-inline-start: auto; }
	.site-header .wrap { min-height: 66px; gap: 12px; }

	.hero { padding-block: 32px 56px; }
	.hero .wrap { grid-template-columns: 1fr; }
	.hero-portrait { order: -1; width: min(72%, 300px); margin-bottom: 18px; }
	.hero-portrait figcaption { right: auto; left: -10px; bottom: 14px; }
	.hero-bio { font-size: 17.5px; }

	.bridge { grid-template-columns: 1fr; padding: 40px 26px; }
	.bridge .flags { flex-direction: row; }

	.article-layout { grid-template-columns: 1fr; gap: 0; }
	.share-rail { display: none; }
	.entry-content { font-size: 18.5px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-grid > :first-child { grid-column: 1 / -1; }
	.about-intro { grid-template-columns: 1fr; }
	.about-intro .hero-portrait { width: 220px; margin-inline: auto; }
}

@media (max-width: 600px) {
	:root { --gutter: 16px; }
	.topbar .date { display: none; }
	.topbar .wrap { justify-content: center; }
	.brand-name { font-size: 19px; }
	.brand-mark { width: 40px; height: 40px; font-size: 16px; }
	.brand-tag { font-size: 11px; }
	.grid-3 { grid-template-columns: 1fr; }
	.section { padding-block: 40px; }
	.section-head h2 { font-size: 22px; }
	.feature-main { min-height: 380px; }
	.feature-main .content { padding: 22px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { text-align: right; }
	.author-box { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.author-box .socials { justify-content: center; }
	.contact-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.share-bottom strong { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
	.topbar, .site-header, .share-rail, .share-bottom, .author-box .socials, .post-nav, .related, .site-footer, .reading-progress { display: none !important; }
	body { background: #fff; }
}
