/*
 * Alumniyat (الأمنيات) — Poetry Stylesheet
 * Loaded conditionally on poem-related pages.
 * Optimized for Arabic verse display with diacritics.
 */

/* ══════════════════════════════════════════════════════
   POEM BODY — VERSE LAYOUT
   ══════════════════════════════════════════════════════ */

.poem-body {
	font-family: 'Amiri', var(--font-body);
	font-size: clamp(1.15rem, 2.5vw, 1.4rem);
	line-height: 2.6;  /* Extra generous for Arabic diacritics (tashkeel) */
	text-align: center;
}

.poem-body p {
	margin-block-end: var(--space-lg);
	text-align: center;
	letter-spacing: 0.02em;
}

/* Style for traditional two-hemistich layout:
   Users can use a <br> or · separator between hemistichs */
.poem-body br + br {
	content: '';
	display: block;
	margin-block: var(--space-md);
}

/* ══════════════════════════════════════════════════════
   POEM HEADER ENHANCEMENTS
   ══════════════════════════════════════════════════════ */

.poem-header {
	text-align: center;
	position: relative;
}

.poem-title {
	font-family: 'Amiri', var(--font-heading);
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	line-height: 1.8;
	text-align: center;
}

.poem-poet {
	font-size: 1.1rem;
	text-align: center;
	margin-block-end: var(--space-md);
}

.poem-meta-row {
	justify-content: center;
}

/* ══════════════════════════════════════════════════════
   DECORATIVE DIVIDER
   ══════════════════════════════════════════════════════ */

.poem-entry .entry-header::after {
	content: '✦ ✦ ✦';
	display: block;
	text-align: center;
	color: var(--color-accent);
	font-size: 1rem;
	margin-block-start: var(--space-md);
	letter-spacing: 0.5em;
}

.poem-entry .entry-footer::before {
	content: '— ❦ —';
	display: block;
	text-align: center;
	color: var(--color-accent);
	font-size: 0.9rem;
	margin-block-end: var(--space-md);
}

/* ══════════════════════════════════════════════════════
   POEM CARD ENHANCEMENTS (archive/homepage)
   ══════════════════════════════════════════════════════ */

.poem-card .card-title {
	font-family: 'Amiri', var(--font-heading);
}

.poem-card .card-excerpt {
	font-family: 'Amiri', var(--font-body);
	line-height: 2.2;
	font-style: italic;
}

.poem-card .poet-name a {
	color: var(--color-primary);
	font-weight: 500;
}

/* ══════════════════════════════════════════════════════
   POETRY SPECIFIC: GUTENBERG VERSE BLOCK
   ══════════════════════════════════════════════════════ */

.poem-body .wp-block-verse,
.poem-body pre {
	font-family: 'Amiri', var(--font-body);
	white-space: pre-wrap;
	text-align: center;
	background: var(--color-bg-alt);
	padding: var(--space-lg);
	border-radius: var(--border-radius);
	border: none;
	line-height: 2.8;
	font-size: 1.2rem;
}

/* ══════════════════════════════════════════════════════
   TWO-COLUMN HEMISTICH LAYOUT
   (Use a table with 2 columns or CSS grid in editor)
   ══════════════════════════════════════════════════════ */

.poem-body table {
	inline-size: 100%;
	border-collapse: collapse;
	margin-block: var(--space-lg);
}

.poem-body table td {
	padding: var(--space-sm) var(--space-md);
	text-align: center;
	inline-size: 50%;
	vertical-align: top;
	border: none;
	border-block-end: 1px solid var(--color-border-light);
	line-height: 2.6;
}

.poem-body table tr:last-child td {
	border-block-end: none;
}

/* ══════════════════════════════════════════════════════
   POET AVATAR ON POEM PAGES
   ══════════════════════════════════════════════════════ */

.single-poem-layout .poem-poet a {
	font-family: var(--font-heading);
	font-size: 1.1rem;
}

/* ══════════════════════════════════════════════════════
   SECTION: LATEST POEMS ON HOMEPAGE
   ══════════════════════════════════════════════════════ */

.section-poems .card-excerpt {
	font-family: 'Amiri', var(--font-body);
	font-style: italic;
	line-height: 2;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ══════════════════════════════════════════════════════ */

@media (max-width: 600px) {
	.poem-body {
		font-size: 1.05rem;
		line-height: 2.4;
	}

	.poem-body table td {
		display: block;
		inline-size: 100%;
	}

	.poem-body .wp-block-verse,
	.poem-body pre {
		padding: var(--space-md);
		font-size: 1rem;
	}
}

/* ══════════════════════════════════════════════════════
   PRINT — POETRY
   ══════════════════════════════════════════════════════ */

@media print {
	.poem-body {
		font-size: 14pt;
		line-height: 2.4;
	}

	.poem-entry .entry-header::after,
	.poem-entry .entry-footer::before {
		color: #999;
	}
}
