/* Yarn Resources — single resource page
   Retouched to match the premium compare/ design language. */

.yarn-res-single {
	background: #fff;
	color: #0f172a;
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	font-feature-settings: "ss01", "cv11";
}
.yarn-res-single[dir="rtl"] { font-family: 'Noto Sans Arabic', 'Cairo', sans-serif; }

.yarn-res-single-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}
.yarn-res-single-container-narrow {
	max-width: 860px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Hero */
.yarn-res-single-hero {
	background:
		radial-gradient(circle at 12% 0%, rgba(37,99,235,0.30) 0%, transparent 48%),
		radial-gradient(circle at 88% 100%, rgba(236,72,153,0.22) 0%, transparent 50%),
		linear-gradient(135deg, #0b1220 0%, #111827 60%, #1e293b 100%);
	color: #fff;
	padding: 72px 0 80px;
	position: relative;
	overflow: hidden;
}
.yarn-res-single-hero::after {
	content: "";
	position: absolute; inset: 0;
	background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
	background-size: 28px 28px;
	opacity: 0.35;
	pointer-events: none;
}
.yarn-res-single-hero.has-cover::after { opacity: 0; }
.yarn-res-single-hero > * { position: relative; z-index: 1; }

/* Full-bleed mode: post supplies its own layout. Thin breadcrumb above content. */
.yarn-res-single.is-full-bleed { background: transparent; }
.yarn-res-single-breadcrumb-bar {
	background: #0b1220;
	padding: 14px 0;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.yarn-res-single-breadcrumb-bar a {
	display: inline-flex; align-items: center; gap: 8px;
	color: #94a3b8; text-decoration: none;
	font-size: 13.5px; font-weight: 500;
	transition: color 0.15s ease;
}
.yarn-res-single-breadcrumb-bar a:hover { color: #fff; }
.yarn-res-single-breadcrumb-bar .yarn-res-icon { width: 16px; height: 16px; }
.yarn-res-single-fullbleed-content > * { position: relative; }

.yarn-res-breadcrumb { margin-bottom: 22px; }
.yarn-res-breadcrumb a {
	display: inline-flex; align-items: center; gap: 8px;
	color: #cbd5e1; text-decoration: none;
	font-size: 13.5px; font-weight: 500;
	transition: color 0.15s ease;
}
.yarn-res-breadcrumb a:hover { color: #fff; }
.yarn-res-breadcrumb .yarn-res-icon { width: 16px; height: 16px; }

.yarn-res-single-category {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px; font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #93c5fd;
	margin-bottom: 18px;
	padding: 6px 12px;
	background: rgba(59,130,246,0.12);
	border: 1px solid rgba(59,130,246,0.22);
	border-radius: 999px;
}
.yarn-res-single-category::before {
	content: "";
	width: 6px; height: 6px;
	background: #60a5fa;
	border-radius: 50%;
	display: inline-block;
}

.yarn-res-single-title {
	font-size: clamp(32px, 4.5vw, 52px);
	font-weight: 700; line-height: 1.1;
	letter-spacing: -0.022em;
	margin: 0 0 22px 0; max-width: 860px;
	color: #fff;
}

.yarn-res-single-excerpt {
	font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6;
	color: #e6edf5; max-width: 720px;
	margin: 0 0 26px 0;
}

.yarn-res-single-meta {
	display: flex; gap: 10px;
	flex-wrap: wrap; align-items: center;
}
.yarn-res-single-meta > span {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 13px; font-weight: 500;
	color: #e6edf5;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.18);
	padding: 7px 13px;
	border-radius: 999px;
}
.yarn-res-single-meta .yarn-res-icon { width: 14px; height: 14px; opacity: 0.95; color: #cbd5e1; }
.yarn-res-single-lang-tag {
	font-size: 11px !important; font-weight: 700 !important;
	letter-spacing: 0.06em;
	padding: 7px 11px !important;
	background: rgba(255,255,255,0.14) !important;
	border-radius: 999px !important;
	color: #fff !important;
}

/* Body */
.yarn-res-single-body { padding: 72px 0; background: #fff; }
.yarn-res-single-grid { display: block; }
.yarn-res-single-content { max-width: 820px; margin: 0 auto; }

.yarn-res-single-thumb {
	margin-bottom: 48px;
	border-radius: 16px; overflow: hidden;
	border: 1px solid #e2e8f0;
	background: #f1f5f9;
	box-shadow: 0 20px 40px -20px rgba(15,23,42,0.25);
}
.yarn-res-single-thumb img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 16/9; object-fit: cover;
}

.yarn-res-single-about h2,
.yarn-res-single-download h2,
.yarn-res-single-related h2 {
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 20px 0;
	letter-spacing: -0.015em;
	line-height: 1.2;
}

.yarn-res-single-about {
	font-size: 16.5px; line-height: 1.75;
	color: #334155; margin-bottom: 56px;
}
.yarn-res-single-about p { margin: 0 0 18px 0; }
.yarn-res-single-about h3 {
	font-size: 19px; font-weight: 700;
	color: #0f172a; margin: 36px 0 14px 0;
	letter-spacing: -0.005em;
}
.yarn-res-single-about ul, .yarn-res-single-about ol {
	padding-left: 24px;
	margin: 0 0 24px 0;
}
.yarn-res-single[dir="rtl"] .yarn-res-single-about ul,
.yarn-res-single[dir="rtl"] .yarn-res-single-about ol { padding-left: 0; padding-right: 24px; }
.yarn-res-single-about li { margin-bottom: 10px; }
.yarn-res-single-about strong { color: #0f172a; font-weight: 600; }
.yarn-res-single-about a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.yarn-res-single-about a:hover { color: #1d4ed8; }
.yarn-res-single-about blockquote {
	border-left: 3px solid #2563eb;
	background: #eff6ff;
	padding: 18px 22px; margin: 28px 0;
	font-style: italic; color: #1e3a8a;
	border-radius: 0 10px 10px 0;
}
.yarn-res-single[dir="rtl"] .yarn-res-single-about blockquote {
	border-left: none; border-right: 3px solid #2563eb;
	border-radius: 10px 0 0 10px;
}

.yarn-res-single-download {
	background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
	border: 1px solid #dbeafe;
	border-radius: 18px;
	padding: 36px 40px;
	margin: 56px 0 0;
}
.yarn-res-single-download h2 { margin-top: 0; }
.yarn-res-single-download-intro {
	font-size: 15.5px; color: #475569;
	margin: 0 0 24px 0;
	line-height: 1.6;
}
.yarn-res-single-download .yarn-resource-card {
	margin: 0;
	max-width: 100%;
	background: #fff !important;
}

/* Related */
.yarn-res-single-related {
	background: #f8fafc;
	padding: 72px 0;
	border-top: 1px solid #e2e8f0;
}
.yarn-res-single-related .yarn-res-single-container {
	max-width: 1180px;
}
.yarn-res-single-related h2 {
	margin-bottom: 28px;
	text-align: center;
	max-width: none;
}
.yarn-res-single-related-grid {
	display: grid; grid-template-columns: 1fr; gap: 22px;
}
@media (min-width: 640px) { .yarn-res-single-related-grid { grid-template-columns: repeat(3, 1fr); } }

.yarn-res-single-related-card {
	display: block; background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px; overflow: hidden;
	text-decoration: none; color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.yarn-res-single-related-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px -8px rgba(15,23,42,0.14);
	border-color: #cbd5e1;
}
.yarn-res-single-related-thumb {
	aspect-ratio: 16/9;
	background-size: cover; background-position: center;
	background-color: #f1f5f9;
}
.yarn-res-single-related-body { padding: 20px 22px 22px; }
.yarn-res-single-related-category {
	display: inline-block;
	font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.08em;
	color: #1d4ed8; background: #dbeafe;
	padding: 4px 10px; border-radius: 999px;
	margin-bottom: 10px;
}
.yarn-res-single-related-card h3 {
	font-size: 16.5px; font-weight: 700;
	color: #0f172a; margin: 0;
	line-height: 1.35;
	letter-spacing: -0.005em;
}

/* Bottom CTA band */
.yarn-res-single-cta-band {
	background: linear-gradient(135deg, #0b1220 0%, #1e3a8a 120%);
	color: #fff;
	padding: 64px 0;
	text-align: center;
	position: relative;
	overflow: hidden;
}
.yarn-res-single-cta-band::before {
	content: "";
	position: absolute; inset: 0;
	background: radial-gradient(circle at 50% 100%, rgba(236,72,153,0.15) 0%, transparent 55%);
	pointer-events: none;
}
.yarn-res-single-cta-band > * { position: relative; }
.yarn-res-single-cta-band h2 {
	font-size: clamp(24px, 2.8vw, 34px);
	font-weight: 700;
	color: #fff;
	margin: 0 auto 14px;
	max-width: 640px;
	line-height: 1.2;
}
.yarn-res-single-cta-band p {
	color: #cbd5e1;
	margin: 0 auto 24px;
	max-width: 560px;
	font-size: 17px;
	line-height: 1.6;
}
.yarn-res-single-cta-band a.yarn-res-cta-primary {
	background: #2563eb;
	color: #fff !important;
	padding: 14px 26px;
	border-radius: 10px;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 6px 18px rgba(37,99,235,0.35);
	transition: background 0.15s ease, transform 0.15s ease;
}
.yarn-res-single-cta-band a.yarn-res-cta-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
