/*
Theme Name: محمد الحربي – Cimaat Poetry
Theme URI: https://m-alharbi.com/
Author: Cimaat Poetry
Description: قالب شعري عربي لموقع الشاعر محمد الحربي: مجلة أدبية رقمية تعرض القصائد النصية والخواطر والمكتبة المرئية والصوتية والأخبار، مع واجهة رئيسية بثلاثة أنماط (سلايد شو، فيديو، صورة ثابتة)، وصفحة قصيدة تحافظ على تنسيق الأبيات، ولوحة تخصيص كاملة. يعمل على التصنيفات الحالية دون نقل المحتوى. تعمل إضافة Cimaat Core المساندة على إضافة الشرائح وحقول الوسائط وطريقة عرض كل قصيدة.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cimaat
Tags: rtl-language-support, blog, news, custom-logo, custom-menu, featured-images, theme-options, translation-ready, editor-style, block-styles
*/

/* ---------- 1. Tokens (overridden from the Customizer) ---------- */
:root {
	--c-ink: #17150F;
	--c-paper: #F4EEE2;
	--c-sand: #EAE1CE;
	--c-sand-2: #D9C9A8;
	--c-line: #DDD2BC;
	--c-line-2: #CDBF9F;
	--c-muted: #5E574A;
	--c-accent: #C9A56A;
	--c-accent-ink: #7A5B2B;
	--c-green: #1F3A2E;
	--c-dark-2: #221F18;
	--c-dark-line: #3A352B;
	--c-dark-text: #EDE5D3;
	--c-dark-muted: #B9AE98;
	--c-article-bg: var(--c-paper);
	--f-logo: "Aref Ruqaa", "Amiri", serif;
	--f-head: "Amiri", "Noto Naskh Arabic", serif;
	--f-poem: "Amiri", "Noto Naskh Arabic", serif;
	--f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
	--poem-size: 26px;
	--poem-scale: 1;
	--wrap: 1240px;
	--gutter: 32px;
	--header-h: 84px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
	margin: 0;
	background: var(--c-paper);
	color: var(--c-ink);
	font-family: var(--f-body);
	font-size: 16px;
	line-height: 1.75;
	text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--c-ink); }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.screen-reader-text:focus { position: fixed !important; top: 8px; right: 8px; width: auto; height: auto; clip: auto; padding: 12px 18px; background: var(--c-ink); color: var(--c-paper); z-index: 1000; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 960px; }
.wrap--text { max-width: 780px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: 2px; text-decoration: none; font-weight: 600; cursor: pointer; background: none; transition: background .2s, color .2s, border-color .2s; }
.btn--accent { background: var(--c-accent); color: var(--c-ink); }
.btn--accent:hover { background: var(--c-paper); color: var(--c-ink); }
.btn--ghost-dark { border-color: #4A4436; color: var(--c-dark-text); }
.btn--ghost-dark:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn--ink { background: var(--c-ink); color: var(--c-paper); }
.btn--ink:hover { background: var(--c-accent-ink); color: var(--c-paper); }
.btn--line { border-color: var(--c-ink); color: var(--c-ink); }
.btn--line:hover { background: var(--c-ink); color: var(--c-paper); }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; border: 1px solid var(--c-dark-line); background: transparent; color: var(--c-dark-text); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.icon { width: 18px; height: 18px; flex: none; }
.ph { background: var(--c-sand-2); display: flex; align-items: center; justify-content: center; color: var(--c-muted); font-family: var(--f-logo); font-size: 64px; line-height: 1; }
.ph--dark { background: var(--c-dark-2); color: #4A4436; }
.dot-sep { display: inline-block; width: 4px; height: 4px; border-radius: 2px; background: var(--c-accent-ink); vertical-align: middle; margin: 0 8px; }

/* ---------- 3. Header ---------- */
.site-header { background: var(--c-ink); color: var(--c-dark-text); border-bottom: 1px solid #2E2A22; z-index: 50; transition: box-shadow .3s, background .3s; }
.has-sticky-header .site-header { position: sticky; top: 0; }
.admin-bar.has-sticky-header .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.has-sticky-header .site-header { top: 0; position: relative; } }
.site-header.is-scrolled { background: rgba(23,21,15,.97); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--c-dark-text); flex: none; }
.brand:hover { color: var(--c-dark-text); }
.brand__name { font-family: var(--f-logo); font-size: 34px; line-height: 1.1; color: var(--c-accent); font-weight: 400; margin: 0; }
.brand__sub { font-size: 11px; letter-spacing: .18em; color: #A79C86; direction: ltr; }
.custom-logo-link img { max-height: 56px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a { color: var(--c-dark-text); text-decoration: none; font-size: 15px; display: inline-flex; align-items: center; min-height: 44px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current-cat > a { color: var(--c-accent); }
.main-nav .sub-menu { position: absolute; top: 100%; right: -16px; min-width: 210px; background: var(--c-ink); border: 1px solid var(--c-dark-line); padding: 8px 16px; display: none; flex-direction: column; align-items: stretch; gap: 0; z-index: 60; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.search-panel { border-top: 1px solid #2E2A22; padding: 18px 0; }
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: 8px; }
.search-form input[type=search] { flex: 1; min-height: 48px; padding: 0 16px; border: 1px solid var(--c-line-2); background: var(--c-paper); color: var(--c-ink); border-radius: 2px; min-width: 0; }
.site-header .search-form input[type=search] { background: var(--c-dark-2); border-color: var(--c-dark-line); color: var(--c-dark-text); }
@media (max-width: 1100px) {
	.nav-toggle { display: inline-flex; }
	.main-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; background: var(--c-ink); border-top: 1px solid #2E2A22; padding: 12px var(--gutter) 24px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav a { border-bottom: 1px solid #2E2A22; width: 100%; font-size: 17px; }
	.main-nav .sub-menu { position: static; display: flex; border: 0; padding: 0 16px 0 0; }
	.site-header { position: relative; }
	.has-sticky-header .site-header { position: sticky; }
}

/* ---------- 4. Hero ---------- */
.hero { background: var(--c-ink); color: var(--c-dark-text); position: relative; overflow: hidden; }
.hero__kicker { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .06em; color: #A79C86; }
.hero__kicker b { color: var(--c-accent); font-weight: 500; }
.hero__kicker i { width: 40px; height: 1px; background: #4A4436; display: inline-block; }
.hero__title { font-family: var(--f-head); font-size: clamp(34px, 4.4vw, 60px); line-height: 1.35; margin: 0; color: var(--c-paper); }
.hero__title a { color: inherit; text-decoration: none; }
.hero__text { margin: 0; color: var(--c-dark-muted); font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-slides { position: relative; }
.hero-slides__track { position: relative; min-height: 600px; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.slide.is-active { position: relative; opacity: 1; visibility: visible; }
.no-js .slide:first-child { position: relative; opacity: 1; visibility: visible; }
.slide__grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 120px; min-height: 600px; }
.slide__body { display: flex; flex-direction: column; gap: 22px; }
.slide__media { margin: 0; position: relative; aspect-ratio: 4/3; background: var(--c-dark-2); }
.slide__media::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(201,165,106,.35); pointer-events: none; }
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__media .ph { width: 100%; height: 100%; font-size: 140px; }
.slide.is-active .slide__media img { animation: cimaat-kenburns 12s ease-out both; }
@keyframes cimaat-kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-slides__controls { position: absolute; bottom: 48px; right: 0; left: 0; }
.hero-slides__controls .wrap { display: flex; align-items: center; gap: 16px; }
.slide-dots { display: flex; gap: 8px; align-items: center; }
.slide-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 5px; background: #4A4436; cursor: pointer; transition: width .3s, background .3s; position: relative; }
.slide-dot::before { content: ""; position: absolute; inset: -17px -6px; }
.slide-dot[aria-current="true"] { width: 32px; background: var(--c-accent); }
.hero--video { min-height: 640px; display: flex; align-items: flex-end; background: #0F0E0A; }
.hero-video__media { position: absolute; inset: 0; }
.hero-video__media > *, .hero-video__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.hero-video__media iframe { pointer-events: none; transform: scale(1.35); }
.hero-video__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,14,10,.92) 0%, rgba(15,14,10,.35) 55%, rgba(15,14,10,.2) 100%); }
.hero-video__inner { position: relative; width: 100%; padding-top: 96px; padding-bottom: 64px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero-video__inner > div { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.hero__name { font-family: var(--f-logo); font-size: clamp(64px, 9vw, 128px); line-height: 1.05; font-weight: 400; margin: 0; color: var(--c-paper); }
.video-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; background: rgba(23,21,15,.7); border: 1px solid #5A5343; color: var(--c-paper); border-radius: 22px; cursor: pointer; }
.hero--static { background: var(--c-sand); color: var(--c-ink); }
.hero-static__grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,4fr); gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.hero-static__grid > div { display: flex; flex-direction: column; gap: 20px; }
.hero--static .hero__name { color: var(--c-ink); }
.hero--static .hero__text { color: #4F483B; font-family: var(--f-poem); font-size: 22px; }
.hero--static .hero__kicker { color: var(--c-accent-ink); }
.hero-static__img { margin: 0; aspect-ratio: 3/4; background: var(--c-sand-2); }
.hero-static__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
	.slide__grid, .hero-static__grid { grid-template-columns: minmax(0,1fr); gap: 32px; padding-top: 40px; }
	.slide__media { order: -1; aspect-ratio: 16/10; }
	.hero-slides__track, .slide__grid { min-height: 0; }
	.hero--video { min-height: 78vh; }
}

/* ---------- 5. Index strip & sections ---------- */
.index-strip { border-bottom: 1px solid var(--c-line); }
.index-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; padding-top: 18px; padding-bottom: 18px; font-size: 14px; }
.index-strip b { color: var(--c-accent-ink); }
.index-strip a { color: var(--c-ink); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.index-strip a:hover { color: var(--c-accent-ink); }
.section { padding: 96px 0; }
.section--dark { background: var(--c-ink); color: var(--c-dark-text); }
.section--green { background: var(--c-green); color: var(--c-dark-text); }
.section--sand { background: var(--c-sand); }
.section--tight { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--c-ink); padding-bottom: 18px; margin-bottom: 44px; }
.section--dark .section-head, .section--green .section-head { border-color: #4A4436; }
.section-head__title { display: flex; align-items: baseline; gap: 18px; }
.section-head__num { font-family: var(--f-head); font-size: 22px; color: var(--c-accent-ink); }
.section--dark .section-head__num, .section--green .section-head__num { color: var(--c-accent); }
.section-head h2 { margin: 0; font-size: clamp(30px, 3vw, 40px); }
.section--dark h2, .section--green h2 { color: var(--c-paper); }
.section-head__more { font-size: 15px; }
.section--dark .section-head__more, .section--green .section-head__more { color: var(--c-accent); }
.meta { font-size: 13px; color: var(--c-muted); }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--c-accent-ink); }
.section--dark .meta, .section--green .meta { color: #A79C86; }
.grid-2 { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
@media (max-width: 900px) {
	:root { --gutter: 16px; --header-h: 68px; }
	.section { padding: 64px 0; }
	.grid-2, .grid-3 { grid-template-columns: minmax(0,1fr); gap: 32px; }
	.brand__name { font-size: 28px; }
	.brand__sub { display: none; }
}

/* ---------- 6. Poems on the home page ---------- */
.poem-feature { display: flex; flex-direction: column; gap: 18px; }
.poem-feature__title { font-size: clamp(32px, 3.4vw, 44px); margin: 0; }
.poem-feature__title a, .poem-list a { color: var(--c-ink); text-decoration: none; }
.poem-feature__title a:hover, .poem-list a:hover { color: var(--c-accent-ink); }
.excerpt-verse { background: var(--c-sand); padding: 32px; font-family: var(--f-poem); font-size: 23px; line-height: 2.1; text-align: center; }
.excerpt-verse p { margin: 0; }
.poem-list { list-style: none; margin: 0; padding: 0; counter-reset: poems; }
.poem-list li { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--c-line); }
.poem-list__n { font-family: var(--f-head); font-size: 22px; color: var(--c-accent-ink); }
.poem-list__t { font-family: var(--f-head); font-size: 23px; font-weight: 700; display: block; line-height: 1.5; }

/* ---------- 7. Selection ---------- */
.selection { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.selection__label { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-head); color: var(--c-dark-muted); font-size: 22px; }
.selection__label span { color: var(--c-accent); font-size: 20px; }
.selection__title { font-size: clamp(34px, 3.8vw, 48px); color: var(--c-paper); margin: 0; }
.selection__title a { color: inherit; text-decoration: none; }
.selection__verse { width: 100%; max-width: 980px; font-family: var(--f-poem); font-size: clamp(22px, 2.3vw, 30px); line-height: 2.2; color: var(--c-paper); }
.selection__verse p { margin: 0; }
.selection__nav { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.selection-item[hidden] { display: none; }
.selection__count { font-size: 13px; color: #8E846F; }

/* ---------- 8. Cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.cards--even { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { padding: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 260px; border: 1px solid var(--c-line-2); }
.card h3 { margin: 0; font-size: 27px; line-height: 1.45; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--c-accent-ink); }
.card p { margin: 0; }
.card--green { background: var(--c-green); border-color: var(--c-green); color: var(--c-dark-text); }
.card--green h3 { font-size: clamp(32px, 3.4vw, 46px); color: var(--c-paper); }
.card--green h3 a:hover { color: var(--c-accent); }
.card--green .meta { color: #B8C7B4; }
.card--green p { font-family: var(--f-poem); font-size: 19px; color: #CAD5C6; }
.card--sand { background: var(--c-sand); border-color: var(--c-sand); }
.card--dark { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-dark-text); }
.card--dark h3 { color: var(--c-paper); }
.card--dark .meta { color: var(--c-dark-muted); }
@media (max-width: 900px) { .cards, .cards--even { grid-template-columns: minmax(0,1fr); } }

/* ---------- 9. Video ---------- */
.video-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 28px; }
.video-card { display: flex; flex-direction: column; gap: 14px; }
.video-card h3 { margin: 0; font-size: 28px; color: var(--c-paper); }
.video-card h3 a { color: inherit; text-decoration: none; }
.video-card p { margin: 0; color: var(--c-dark-muted); }
.thumb { position: relative; display: block; aspect-ratio: 16/9; background: var(--c-dark-2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.thumb:hover img { transform: scale(1.03); }
.thumb .ph { width: 100%; height: 100%; }
.play { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 38px; background: var(--c-accent); color: var(--c-ink); display: flex; align-items: center; justify-content: center; }
.play .icon { width: 26px; height: 26px; }
.thumb--small .play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.thumb--small .play .icon { width: 18px; height: 18px; }
.duration { position: absolute; bottom: 12px; left: 12px; background: var(--c-ink); color: var(--c-dark-text); font-size: 12px; padding: 3px 8px; direction: ltr; }
.video-side { display: flex; flex-direction: column; gap: 22px; }
.video-row { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px; align-items: start; }
.video-row h3 { font-size: 20px; line-height: 1.5; margin: 0; color: var(--c-paper); }
.video-row h3 a { color: inherit; text-decoration: none; }
.video-row h3 a:hover, .video-card h3 a:hover { color: var(--c-accent); }
.video-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.video-tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #4A4436; border-radius: 22px; color: var(--c-dark-text); text-decoration: none; font-size: 14px; }
.video-tabs a:hover { border-color: var(--c-accent); color: var(--c-accent); }
@media (max-width: 900px) { .video-grid { grid-template-columns: minmax(0,1fr); } .video-row { grid-template-columns: 120px minmax(0,1fr); } }

/* ---------- 10. Audio ---------- */
.audio-layout { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,7fr); gap: 56px; }
.audio-layout__intro { display: flex; flex-direction: column; gap: 16px; }
.audio-layout__intro p { margin: 0; color: #CAD5C6; }
.audio-list { display: flex; flex-direction: column; gap: 14px; }
.audio-item { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 18px; align-items: center; padding: 16px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.08); }
.audio-item__cover { width: 72px; height: 72px; background: rgba(255,255,255,.08); overflow: hidden; }
.audio-item__cover img { width: 100%; height: 100%; object-fit: cover; }
.audio-item__cover .ph { width: 100%; height: 100%; font-size: 36px; background: rgba(255,255,255,.06); color: #9FB29B; }
.audio-item h3 { margin: 0; font-size: 21px; color: var(--c-paper); }
.audio-item h3 a { color: inherit; text-decoration: none; }
.audio-item h3 a:hover { color: var(--c-accent); }
.audio-item .meta { color: #B8C7B4; }
.audio-player { margin-top: 8px; }
.audio-player audio { width: 100%; height: 40px; display: block; }
.section--green .audio-player audio { filter: sepia(.25); }
@media (max-width: 900px) { .audio-layout { grid-template-columns: minmax(0,1fr); gap: 32px; } }

/* ---------- 11. News & gallery ---------- */
.news-grid { display: grid; grid-template-columns: minmax(0,6fr) minmax(0,5fr); gap: 48px; }
.news-lead { display: flex; flex-direction: column; gap: 14px; }
.news-lead .thumb, .news-row .thumb { background: var(--c-sand-2); }
.news-lead h3 { font-size: 32px; line-height: 1.5; margin: 0; }
.news-lead h3 a, .news-row h3 a { color: var(--c-ink); text-decoration: none; }
.news-lead h3 a:hover, .news-row h3 a:hover { color: var(--c-accent-ink); }
.news-lead p { margin: 0; color: #4F483B; }
.news-row { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--c-line); }
.news-row:first-child { padding-top: 0; }
.news-row .thumb { aspect-ratio: 4/3; }
.news-row .thumb .ph { font-size: 40px; }
.news-row h3 { font-size: 21px; line-height: 1.55; margin: 0; }
.gallery-strip { display: grid; grid-template-columns: minmax(0,2fr) repeat(3, minmax(0,1fr)); gap: 12px; }
.gallery-strip a { display: block; aspect-ratio: 3/4; background: var(--c-sand-2); overflow: hidden; position: relative; }
.gallery-strip a:first-child { aspect-ratio: auto; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.gallery-strip a:hover img { transform: scale(1.04); }
.gallery-strip figcaption { position: absolute; bottom: 0; right: 0; left: 0; padding: 12px 14px; background: linear-gradient(transparent, rgba(23,21,15,.8)); color: var(--c-paper); font-size: 13px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: minmax(0,1fr); } .gallery-strip { grid-template-columns: repeat(2, minmax(0,1fr)); } .gallery-strip a:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; } }

/* ---------- 12. About + archive ---------- */
.about-archive { display: grid; grid-template-columns: minmax(0,6fr) minmax(0,5fr); gap: 72px; }
.about { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 32px; align-items: start; }
.about__img { aspect-ratio: 3/4; background: var(--c-sand-2); margin: 0; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__body { display: flex; flex-direction: column; gap: 16px; }
.about__name { font-family: var(--f-logo); font-size: 52px; line-height: 1.1; font-weight: 400; margin: 0; }
.about__text { font-family: var(--f-poem); font-size: 20px; line-height: 1.9; color: #3B352A; margin: 0; }
.cat-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 24px; }
.cat-index li { border-bottom: 1px solid var(--c-line-2); display: flex; justify-content: space-between; gap: 8px; }
.cat-index a { color: var(--c-ink); text-decoration: none; min-height: 48px; display: flex; align-items: center; flex: 1; }
.cat-index a:hover { color: var(--c-accent-ink); }
.cat-index span { color: var(--c-muted); font-size: 13px; align-self: center; }
.year-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.year-chips a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--c-ink); color: var(--c-ink); text-decoration: none; font-size: 14px; }
.year-chips a:hover { background: var(--c-ink); color: var(--c-paper); }
@media (max-width: 900px) { .about-archive { grid-template-columns: minmax(0,1fr); gap: 48px; } .about { grid-template-columns: minmax(0,1fr); } .about__img { max-width: 260px; } }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--c-ink); color: var(--c-dark-muted); padding: 72px 0 32px; }
.site-footer a { color: var(--c-dark-text); text-decoration: none; }
.site-footer a:hover { color: var(--c-accent); }
.footer-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap: 40px; margin-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .brand__name { font-size: 44px; }
.footer-brand p { margin: 0; font-size: 14px; max-width: 420px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.footer-nav a { min-height: 36px; display: inline-flex; align-items: center; }
.footer-nav h2 { font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--c-accent); margin-bottom: 8px; }
.social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social a { width: 44px; height: 44px; border: 1px solid var(--c-dark-line); border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--c-dark-text); }
.social a:hover { border-color: var(--c-accent); }
.footer-bottom { border-top: 1px solid #2E2A22; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: minmax(0,1fr); } }

/* ---------- 14. Single: shared ---------- */
.entry-head { border-bottom: 1px solid var(--c-line); }
.entry-head .wrap { padding-top: 72px; padding-bottom: 52px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.breadcrumbs { font-size: 13px; color: var(--c-muted); }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-accent-ink); }
.entry-title { font-size: clamp(36px, 5vw, 64px); line-height: 1.3; margin: 0; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px; font-size: 14px; color: var(--c-muted); }
.entry-meta a { color: var(--c-accent-ink); }
.single-main { background: var(--c-article-bg); }
.entry-content { font-size: 18px; line-height: 1.95; }
.entry-content > * { margin-top: 0; margin-bottom: 1.3em; }
.entry-content h2 { font-size: 32px; margin-top: 1.6em; }
.entry-content h3 { font-size: 26px; margin-top: 1.4em; }
.entry-content blockquote { margin: 1.6em 0; padding: 8px 28px 8px 0; border-right: 3px solid var(--c-accent); font-family: var(--f-poem); font-size: 1.2em; }
.entry-content figure { margin-right: 0; margin-left: 0; }
.entry-content figcaption, .wp-caption-text { font-size: 13px; color: var(--c-muted); text-align: center; margin-top: 8px; }
.entry-content img { height: auto; }
.entry-content .alignwide { margin-right: -120px; margin-left: -120px; max-width: none; }
.entry-content .aligncenter { margin-right: auto; margin-left: auto; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.5em; }
.entry-content .alignleft { float: left; margin: 0 1.5em 1em 0; }
@media (max-width: 1100px) { .entry-content .alignwide { margin-right: 0; margin-left: 0; } }
.entry-content table:not(.poem-table) { width: 100%; border-collapse: collapse; }
.entry-content table:not(.poem-table) td, .entry-content table:not(.poem-table) th { border: 1px solid var(--c-line-2); padding: 8px 12px; }
.entry-body { padding: 64px 0 80px; }
.entry-footer { border-top: 1px solid var(--c-line); }
.featured-media { margin: 0 0 48px; }
.featured-media img { width: 100%; height: auto; }
.page-links { margin-top: 32px; font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tags a { font-size: 13px; padding: 6px 12px; border: 1px solid var(--c-line-2); text-decoration: none; color: var(--c-ink); }

/* ---------- 15. Poem reading ---------- */
.reader-bar { position: sticky; top: 0; background: rgba(244,238,226,.96); border-bottom: 1px solid var(--c-line); z-index: 20; }
.has-sticky-header .reader-bar { top: var(--header-h); }
.admin-bar.has-sticky-header .reader-bar { top: calc(var(--header-h) + 32px); }
@media (max-width: 1100px) { .has-sticky-header .reader-bar { top: var(--header-h); } }
@media (max-width: 782px) { .admin-bar.has-sticky-header .reader-bar { top: var(--header-h); } }
.reader-bar .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button, .tool-btn { min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--c-line-2); background: transparent; color: var(--c-ink); cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); }
.tool-btn { font-family: var(--f-poem); font-size: 18px; padding: 0; }
.tool-btn:hover, .seg button:hover { border-color: var(--c-ink); }

.poem-body { font-family: var(--f-poem); font-size: calc(var(--poem-size) * var(--poem-scale)); line-height: 2.15; text-align: center; overflow-wrap: break-word; }
.poem-body p { margin: 0 0 1.15em; }
.poem-body .bayt-group, .poem-body .qasida { margin: 0 0 1.15em; }
.poem-body .verse-line, .excerpt-verse .verse-line, .selection__verse .verse-line { margin: 0; }
.poem-body h2, .poem-body h3 { font-size: 1.15em; color: var(--c-accent-ink); margin: 1.4em 0 .6em; }
.poem-body img, .poem-body figure { margin-left: auto; margin-right: auto; }
.poem-body blockquote { border: 0; padding: 0; font-size: 1em; }
.poem-body .wp-block-verse, .poem-body pre { font-family: inherit; font-size: inherit; white-space: pre-wrap; background: none; padding: 0; margin: 0 0 1.15em; overflow: visible; }
.mode-free .poem-body { text-align: start; max-width: 40rem; margin: 0 auto; }
.mode-free .poem-body .bayt { display: block; }
.mode-free .poem-body .bayt__sep { display: none; }
.mode-free .poem-body .bayt > span { display: block; text-align: start !important; }

/* Hemistich layouts: theme shortcode, block style, and legacy two-column tables */
.bayt { display: grid; grid-template-columns: minmax(0,1fr) 3rem minmax(0,1fr); align-items: baseline; padding: .1em 0; }
.bayt > span { text-align: center; }
.bayt__sep { color: var(--c-accent-ink); font-size: .5em; }
.mode-nabati .bayt { grid-template-columns: minmax(0,1fr) 5rem minmax(0,1fr); }
.mode-nabati .bayt__s { text-align: right !important; }
.mode-nabati .bayt__a { text-align: left !important; }
.mode-nabati .bayt__sep { visibility: hidden; }
.poem-body table, table.poem-table, .is-style-cimaat-bayt table { width: 100%; border: 0; border-collapse: collapse; margin: 0 0 1.15em; font-size: inherit; }
.poem-body td, .poem-body th, .is-style-cimaat-bayt td { border: 0 !important; padding: .05em .9em; width: 50%; text-align: center; vertical-align: baseline; background: none; }
.poem-body .wp-block-table { margin: 0 0 1.15em; overflow: visible; }
.poem-body .wp-block-table td { border: 0; }
.mode-nabati .poem-body td:first-child { text-align: right; }
.mode-nabati .poem-body td:last-child:not(:first-child) { text-align: left; }
.mode-free .poem-body td { display: block; width: auto; text-align: start; padding: 0; }
.mode-free .poem-body tr { display: block; margin-bottom: .4em; }
.is-style-cimaat-highlight, .bayt.is-highlight, .poem-body .is-highlight, .poem-body mark { background: var(--c-sand); color: #5A421C; padding: .35em .8em; border-radius: 2px; }
.poem-body mark { padding: .1em .2em; }
.poem-body .is-style-cimaat-highlight { margin: .8em 0; padding: .6em 1em; }
@media (max-width: 700px) {
	.bayt, .mode-nabati .bayt { grid-template-columns: minmax(0,1fr); gap: 0; padding: .35em 0; }
	.bayt__sep { display: none; }
	.bayt__s { text-align: right !important; }
	.bayt__a { text-align: left !important; padding-right: 2.2em; }
	.mode-free .bayt__a { padding-right: 0; }
	.poem-body table, .poem-body tbody { display: block; }
	.poem-body tr { display: flex; flex-direction: column; margin-bottom: .5em; }
	.poem-body td { width: auto; padding: 0; }
	.poem-body td:first-child { text-align: right; }
	.poem-body td + td { text-align: left; padding-right: 2.2em; }
	.poem-body { --poem-size: 22px; }
}
.poem-note { margin: 48px auto 0; text-align: center; font-size: 13px; color: var(--c-muted); }

/* Share & related */
.share-bar { border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.share-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding-top: 22px; padding-bottom: 22px; }
.share-bar__label { font-size: 14px; color: var(--c-muted); margin-left: 6px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--c-line-2); color: var(--c-ink); text-decoration: none; font-size: 14px; background: transparent; cursor: pointer; }
.share-btn:hover { border-color: var(--c-ink); color: var(--c-ink); }
.share-btn--strong { border-color: var(--c-ink); }
.share-btn.is-done { background: var(--c-ink); color: var(--c-paper); }
.related { padding: 80px 0 96px; }
.related h2 { font-size: 32px; border-bottom: 1px solid var(--c-ink); padding-bottom: 14px; margin-bottom: 32px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; flex-wrap: wrap; font-size: 15px; }

/* Media frames */
.media-frame, .entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16/9; background: #0F0E0A; }
.media-frame iframe, .media-frame video, .entry-content .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper::before { display: none; }
.video-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #0F0E0A; cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.single-video .entry-body { padding-top: 0; }
.video-stage { background: var(--c-ink); padding: 48px 0; }
.audio-stage { background: var(--c-green); color: var(--c-dark-text); padding: 48px 0; }
.audio-stage .wrap { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: 32px; align-items: center; }
.audio-stage .audio-item__cover { width: 200px; height: 200px; }
.audio-stage .audio-item__cover .ph { font-size: 96px; }
.audio-stage h2 { color: var(--c-paper); margin: 0 0 12px; font-size: 28px; }
@media (max-width: 700px) { .audio-stage .wrap { grid-template-columns: minmax(0,1fr); } }

/* ---------- 16. Archives, search, 404 ---------- */
.archive-head { background: var(--c-ink); color: var(--c-dark-text); }
.archive-head .wrap { padding-top: 72px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 12px; }
.archive-head h1 { color: var(--c-paper); font-size: clamp(36px, 5vw, 60px); margin: 0; }
.archive-head p, .archive-head .archive-desc { color: var(--c-dark-muted); margin: 0; max-width: 720px; }
.archive-head .breadcrumbs, .archive-head .breadcrumbs a { color: #A79C86; }
.sub-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sub-cats a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #4A4436; border-radius: 20px; color: var(--c-dark-text); text-decoration: none; font-size: 14px; }
.sub-cats a:hover { border-color: var(--c-accent); color: var(--c-accent); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--c-line); align-items: baseline; }
.post-row__n { font-family: var(--f-head); font-size: 22px; color: var(--c-accent-ink); }
.post-row h2 { font-size: 26px; margin: 0; line-height: 1.5; }
.post-row h2 a { color: var(--c-ink); text-decoration: none; }
.post-row h2 a:hover { color: var(--c-accent-ink); }
.post-row p { margin: 6px 0 0; color: #4F483B; font-size: 15px; }
.post-row__type { font-size: 12px; padding: 4px 10px; border: 1px solid var(--c-line-2); color: var(--c-muted); white-space: nowrap; }
@media (max-width: 700px) { .post-row { grid-template-columns: 40px minmax(0,1fr); } .post-row__type { grid-column: 2; justify-self: start; } }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 32px 24px; }
.archive-grid--dark { background: var(--c-ink); }
.tile { display: flex; flex-direction: column; gap: 12px; }
.tile h2 { font-size: 22px; line-height: 1.5; margin: 0; }
.tile h2 a { color: var(--c-ink); text-decoration: none; }
.tile h2 a:hover { color: var(--c-accent-ink); }
.tile p { margin: 0; font-size: 15px; color: #4F483B; }
.tile .thumb { background: var(--c-sand-2); }
.tile .thumb .ph { background: var(--c-sand-2); }
@media (max-width: 900px) { .archive-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .archive-grid { grid-template-columns: minmax(0,1fr); } }
.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--c-line-2); text-decoration: none; color: var(--c-ink); }
.pagination .page-numbers.current { background: var(--c-ink); color: var(--c-paper); border-color: var(--c-ink); }
.pagination .page-numbers:hover { border-color: var(--c-ink); }
.empty-state { text-align: center; padding: 48px 0; }
.empty-state p { color: var(--c-muted); }
.big-404 { font-family: var(--f-logo); font-size: clamp(120px, 20vw, 220px); line-height: 1; color: var(--c-accent); margin: 0; }
.archives-cols { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 48px; }
.archives-cols ul { list-style: none; margin: 0; padding: 0; }
.archives-cols li { border-bottom: 1px solid var(--c-line); display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; color: var(--c-muted); font-size: 14px; }
.archives-cols li a { flex: 1; font-size: 16px; }
.archives-cols .children { width: 100%; padding-right: 18px; }
.archives-cols .children li:last-child { border-bottom: 0; }
.archives-cols li a { display: flex; min-height: 44px; align-items: center; color: var(--c-ink); text-decoration: none; }
.archives-cols li a:hover { color: var(--c-accent-ink); }
.archives-cols h2 { font-size: 26px; border-bottom: 1px solid var(--c-ink); padding-bottom: 10px; }
@media (max-width: 900px) { .archives-cols { grid-template-columns: minmax(0,1fr); } }

/* Contact & forms */
.contact-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); gap: 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0,1fr); } }
.cimaat-form { display: flex; flex-direction: column; gap: 18px; }
.cimaat-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.cimaat-form input, .cimaat-form textarea { min-height: 48px; padding: 10px 14px; border: 1px solid var(--c-line-2); background: #FBF8F1; border-radius: 2px; font-weight: 400; }
.cimaat-form textarea { min-height: 180px; }
.cimaat-notice { padding: 14px 18px; border: 1px solid var(--c-line-2); background: var(--c-sand); }
.cimaat-notice--error { border-color: #9B3B2B; color: #7A2A1D; }

/* Comments */
.comments-area { padding: 48px 0 0; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border-bottom: 1px solid var(--c-line); padding: 20px 0; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--c-line-2); background: #FBF8F1; }
.comment-form input[type=submit] { min-height: 48px; padding: 0 24px; background: var(--c-ink); color: var(--c-paper); border: 0; cursor: pointer; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(15,14,10,.94); display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 84vh; width: auto; max-width: 100%; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox figcaption { color: var(--c-dark-text); margin-top: 12px; font-size: 14px; }
.lightbox .icon-btn { position: absolute; }
.lightbox__close { top: 16px; left: 16px; }
.lightbox__prev { right: 16px; top: 50%; }
.lightbox__next { left: 16px; top: 50%; }

/* WP core classes */
.sticky {}
.bypostauthor {}
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.gallery-item { margin: 0; }
.wp-block-gallery a { cursor: zoom-in; }

/* ---------- 17. Print ---------- */
@media print {
	@page { margin: 18mm; }
	body { background: #fff; color: #000; }
	.site-header, .site-footer, .reader-bar, .share-bar, .related, .comments-area, .index-strip, .post-nav, .skip-link, .lightbox { display: none !important; }
	.entry-head .wrap { padding: 0 0 12px; }
	.entry-title { font-size: 28pt; }
	.poem-body { font-size: 16pt; line-height: 2; --poem-scale: 1; }
	.is-style-cimaat-highlight, .bayt.is-highlight { background: none; border-right: 2pt solid #999; }
	a { color: #000; text-decoration: none; }
	.print-source { display: block !important; font-size: 9pt; color: #555; text-align: center; margin-top: 18pt; }
}
.print-source { display: none; }
