/*
 * Article page: categoerydetails and videodetails (UI-4, issue #129).
 *
 * Loaded by those two views only, through @push('head'), so after style.css:
 * at equal specificity these rules win over the theme. Values come from
 * docs/design/THEME.md (2.2 scale, 2.3 reading text, 5 share row) and the
 * version 2 mockups; every colour is a token from tokens.css with its value
 * as the fallback.
 *
 * Measured on production before (2026-11-18, /categoerydetails/8229, 390px):
 * the story was one paragraph of #666 15px/26px justified text that started
 * at 782px, share came only after the story, and the page listed 7 generic
 * "Recent Post" items.
 */

/* ---- Layout -------------------------------------------------------------
 * Phones: one column in reading order - head, photo, story, share again,
 * more from the section, advert, comments. From 992px the section list and
 * the advert move to a right-hand column beside everything else. Named areas
 * rather than floats: the theme's float-based widget columns cannot put the
 * comments after the section list on a phone and beside it on a desktop.
 */
.ku-article {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas:
		"head"
		"photo"
		"main"
		"aside"
		"comments";
	padding: var(--ku-space-5, 24px) 0 var(--ku-space-7, 48px);
	color: var(--ku-heading, #333333);
}
.ku-article-head { grid-area: head; min-width: 0; }
.ku-article-photo { grid-area: photo; min-width: 0; }
.ku-article-main { grid-area: main; min-width: 0; }
.ku-article-aside { grid-area: aside; min-width: 0; }
.ku-article-comments { grid-area: comments; min-width: 0; }
/* The gallery, the advert and the comment block are theme floats. */
.ku-article-main,
.ku-article-aside,
.ku-article-comments { display: flow-root; }

@media (min-width: 992px) {
	.ku-article {
		grid-template-columns: minmax(0, 1fr) 300px;
		/* The last row takes any height the side column has to spare, so a
		   short story never opens gaps between its head, photo and text. */
		grid-template-rows: auto auto auto 1fr;
		grid-template-areas:
			"head     aside"
			"photo    aside"
			"main     aside"
			"comments aside";
		column-gap: 40px;
		padding-top: var(--ku-space-6, 32px);
	}
}
@media (min-width: 1200px) {
	.ku-article { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---- Head: breadcrumb, headline, date + reading time, share ----------- */
.ku-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 var(--ku-space-2, 8px);
	padding: 0;
	list-style: none;
	font: 400 14px/1.4 var(--ku-font-body, "Open Sans", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-muted, #666666);
}
.ku-crumbs li {
	display: flex;
	align-items: center;
	width: auto;
	margin: 0;
	list-style: none;
}
.ku-crumbs li + li::before {
	content: "\203A";
	margin: 0 var(--ku-space-2, 8px);
	color: var(--ku-muted, #666666);
}
.ku-crumbs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--ku-tap, 44px);
	min-height: var(--ku-tap, 44px);
	color: var(--ku-muted, #666666);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.ku-crumbs li:last-child a {
	color: var(--ku-brand, #d3147c);
	font-weight: 600;
}

.ku-article-title {
	margin: 0 0 var(--ku-space-3, 12px);
	font: 700 26px/1.35 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	overflow-wrap: break-word;
}

.ku-article-bar {
	display: flex;
	flex-direction: column;
	gap: var(--ku-space-3, 12px);
	margin: 0 0 var(--ku-space-4, 16px);
}
.ku-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ku-space-1, 4px) var(--ku-space-4, 16px);
	margin: 0;
	font: 400 14px/1.4 var(--ku-font-body, "Open Sans", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-muted, #666666);
}
.ku-article-meta > * {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}

@media (min-width: 992px) {
	.ku-article-title { font-size: 36px; }
	.ku-article-bar {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		padding: var(--ku-space-3, 12px) 0;
		border-top: 1px solid var(--ku-line, #e5e5e5);
		border-bottom: 1px solid var(--ku-line, #e5e5e5);
	}
}

/* ---- Share row (THEME.md 5) -------------------------------------------
 * Top, phones: WhatsApp | શેર કરો (the phone's own share sheet) | copy.
 * Top, desktop: WhatsApp | Facebook | X | લિંક કૉપી કરો.
 * End of story: the same four as icon buttons under "આ સમાચાર મિત્રોને મોકલો".
 * Square corners: the theme allows the round radius only on back-to-top.
 */
.ku-share-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ku-space-2, 8px);
	margin: 0;
	padding: 0;
}
.ku-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ku-space-2, 8px);
	min-width: var(--ku-tap, 44px);
	min-height: var(--ku-tap, 44px);
	margin: 0;
	padding: 0 var(--ku-space-4, 16px);
	border: 1px solid var(--ku-ink, #252525);
	border-radius: var(--ku-radius, 4px);
	background: var(--ku-bg, #ffffff);
	color: var(--ku-ink, #252525);
	font: 600 15px/1.2 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.ku-share-btn span { font-weight: inherit; font-family: inherit; }
.ku-share-btn i { font-size: 18px; line-height: 1; }
.ku-share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.ku-share-btn:focus,
.ku-share-btn:active { color: var(--ku-ink, #252525); text-decoration: none; }
.ku-share-btn:active { transform: translateY(1px); }
@media (hover: hover) {
	.ku-share-btn:hover {
		border-color: var(--ku-brand, #d3147c);
		color: var(--ku-brand, #d3147c);
		text-decoration: none;
	}
}
.ku-share-btn.is-done {
	border-color: var(--ku-success, #1e7e34);
	color: var(--ku-success, #1e7e34);
}

/* The one magenta action in the row. */
.ku-share-btn--native,
.ku-share-btn--native:focus,
.ku-share-btn--native:active {
	border-color: var(--ku-brand, #d3147c);
	background: var(--ku-brand, #d3147c);
	color: var(--ku-on-dark, #ffffff);
}
@media (hover: hover) {
	.ku-share-btn--native:hover {
		border-color: var(--ku-brand-strong, #b01067);
		background: var(--ku-brand-strong, #b01067);
		color: var(--ku-on-dark, #ffffff);
	}
}

.ku-share--top .ku-share-row { flex-wrap: nowrap; }
.ku-share--top .ku-share-btn { flex: 1 1 0; min-width: 0; }
.ku-share--top .ku-share-btn--copy { flex: 0 0 52px; padding: 0; }
.ku-share--top .ku-share-btn--copy .ku-share-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ku-share--top .ku-share-btn--facebook,
.ku-share--top .ku-share-btn--x { display: none; }

@media (min-width: 992px) {
	.ku-share--top .ku-share-btn { flex: 0 0 auto; min-width: var(--ku-tap, 44px); }
	.ku-share--top .ku-share-btn--native { display: none; }
	.ku-share--top .ku-share-btn--facebook,
	.ku-share--top .ku-share-btn--x { display: inline-flex; }
	/* X is its mark alone, as in the mockup; the name stays for screen readers. */
	.ku-share--top .ku-share-btn--x { padding: 0; }
	.ku-share--top .ku-share-btn--x .ku-share-text {
		position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
		overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
	}
	.ku-share--top .ku-share-btn--copy,
	.ku-share--top .ku-share-btn--copy:focus,
	.ku-share--top .ku-share-btn--copy:active {
		flex: 0 0 auto;
		padding: 0 var(--ku-space-4, 16px);
		border-color: var(--ku-brand, #d3147c);
		background: var(--ku-brand, #d3147c);
		color: var(--ku-on-dark, #ffffff);
	}
	.ku-share--top .ku-share-btn--copy .ku-share-text {
		position: static; width: auto; height: auto; margin: 0;
		overflow: visible; clip: auto; white-space: nowrap;
	}
	.ku-share--top .ku-share-btn--copy.is-done {
		border-color: var(--ku-success, #1e7e34);
		background: var(--ku-success, #1e7e34);
	}
}
@media (min-width: 992px) and (hover: hover) {
	.ku-share--top .ku-share-btn--copy:hover {
		border-color: var(--ku-brand-strong, #b01067);
		background: var(--ku-brand-strong, #b01067);
		color: var(--ku-on-dark, #ffffff);
	}
}

.ku-share--end {
	margin: var(--ku-space-6, 32px) 0;
	padding: var(--ku-space-4, 16px);
	border-radius: var(--ku-radius, 4px);
	background: var(--ku-surface, #f5f5f5);
	text-align: center;
}
.ku-share-label {
	margin: 0 0 var(--ku-space-3, 12px);
	font: 600 15px/1.4 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
}
.ku-share--end .ku-share-row { justify-content: center; gap: var(--ku-space-3, 12px); }
.ku-share--end .ku-share-btn,
.ku-share--end .ku-share-btn:focus,
.ku-share--end .ku-share-btn:active {
	width: 48px;
	height: 48px;
	padding: 0;
	border-color: var(--ku-ink, #252525);
	background: var(--ku-ink, #252525);
	color: var(--ku-on-dark, #ffffff);
}
@media (hover: hover) {
	.ku-share--end .ku-share-btn:hover {
		border-color: var(--ku-brand, #d3147c);
		background: var(--ku-brand, #d3147c);
		color: var(--ku-on-dark, #ffffff);
	}
}
.ku-share--end .ku-share-btn.is-done {
	border-color: var(--ku-success, #1e7e34);
	background: var(--ku-success, #1e7e34);
}
.ku-share--end .ku-share-text {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Photo ---------------------------------------------------------------
 * Never cropped and never enlarged, capped in height (style.css, Phase 4:
 * on an article the photo is the story; cover cropped one to 55%).
 */
.ku-article-photo {
	float: none;
	width: 100%;
	margin: 0 0 var(--ku-space-5, 24px);
	overflow: visible;
	text-align: center;
}
.ku-article-photo img {
	display: inline-block;
	float: none;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 320px;
}
@media (min-width: 768px) {
	.ku-article-photo img { max-height: 420px; }
}
/* Video stories: the embed fills the column at 16:9. */
.ku-article-video iframe {
	display: block;
	float: none;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}
/* Browsers without aspect-ratio (Safari 14 and older) gave the iframe its
   150px default height: the classic padding box instead. */
@supports not (aspect-ratio: 1 / 1) {
	.ku-article-video {
		position: relative;
		height: 0;
		padding-top: 56.25%;
		overflow: hidden;
	}
	.ku-article-video iframe {
		position: absolute;
		top: 0;
		left: 0;
		height: 100%;
	}
}

/* ---- Story text (THEME.md 2.3) -------------------------------------------
 * 18px / 1.8 in --ku-heading on phones, 19px / 1.85 from 992px, left aligned,
 * first paragraph bold, about 690px wide on a desktop.
 */
.ku-article-body {
	max-width: 690px;
	font: 400 18px/1.8 var(--ku-font-body, "Open Sans", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
	text-align: left;
	overflow-wrap: break-word;
	word-wrap: break-word;
}
.ku-article-body p {
	margin: 0 0 18px;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	text-align: left;
}
/* The lead, only when there is more than a lead: a one-paragraph story
   (5600, 7300) would otherwise print entirely in bold. */
.ku-article-body > p:first-of-type:not(:only-of-type) { font-weight: 700; }
/* The theme gives every span weight 500 and every strong #444. */
.ku-article-body span { font-weight: inherit; font-family: inherit; }
.ku-article-body strong,
.ku-article-body b { color: inherit; font-weight: 700; }
.ku-article-body a {
	color: var(--ku-brand, #d3147c);
	font-family: inherit;
	text-decoration: underline;
}

/*
 * The editor's own sizes. 10 of 10 sampled stories wrap the whole body in
 * <span style="font-size:16px">, CKEditor's size menu, which an inline style
 * makes stronger than any rule here: the body would stay 16px whatever this
 * file said. !important on these three properties only, inside the story
 * only, so the page sets the reading size; colour, bold and alignment the
 * editor chose are kept, except justify (left aligned, THEME.md 2.3).
 */
.ku-article-body [style*="font-size"] { font-size: inherit !important; }
.ku-article-body [style*="line-height"] { line-height: inherit !important; }
.ku-article-body [style*="font-family"],
.ku-article-body font[face] { font-family: inherit !important; }
.ku-article-body font[size] { font-size: inherit; }
.ku-article-body [style*="justify"] { text-align: left !important; }

/* Nothing in a story may push the page sideways at 360px. Not the "આ પણ
   વાંચો" thumbnail, which is ours and keeps its fixed 16:9 crop. */
.ku-article-body img:not(.ku-also-img) {
	max-width: 100% !important;
	height: auto !important;
}
.ku-article-body table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}
.ku-article-body iframe,
.ku-article-body video { max-width: 100%; }

@media (min-width: 992px) {
	.ku-article-body {
		font-size: 19px;
		line-height: 1.85;
	}
	.ku-article-body p { margin-bottom: 20px; }
}

/* ---- "આ પણ વાંચો": one story from the section, after paragraph 2 ---------- */
.ku-also {
	margin: var(--ku-space-2, 8px) 0 var(--ku-space-5, 24px);
	border-left: 4px solid var(--ku-brand, #d3147c);
	border-radius: 0 var(--ku-radius, 4px) var(--ku-radius, 4px) 0;
	background: var(--ku-brand-tint, #fbe8f2);
}
.ku-also a {
	display: flex;
	align-items: center;
	gap: var(--ku-space-3, 12px);
	min-height: var(--ku-tap, 44px);
	padding: var(--ku-space-3, 12px) var(--ku-space-4, 16px);
	color: var(--ku-heading, #333333);
	font-weight: 400;
	text-decoration: none;
}
/* Two classes deep: the box sits inside the story, whose span reset above
   (.ku-article-body span) would otherwise win. */
.ku-also .ku-also-text { flex: 1 1 auto; min-width: 0; }
.ku-also .ku-also-label {
	display: block;
	margin: 0 0 2px;
	font: 600 13px/1.3 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-brand-strong, #b01067);
}
.ku-also .ku-also-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font: 600 16px/1.5 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
}
.ku-also .ku-also-img {
	flex: 0 0 96px;
	width: 96px;
	height: 54px;
	object-fit: cover;
	border-radius: 0;
}
@media (hover: hover) {
	.ku-also a:hover .ku-also-title { color: var(--ku-brand, #d3147c); }
}
@media (min-width: 992px) {
	.ku-also a { flex-direction: row-reverse; justify-content: flex-end; }
	.ku-also .ku-also-img { flex-basis: 112px; width: 112px; height: 63px; }
}

/* ---- "<section>માં વધુ" ----------------------------------------------------- */
.ku-more { margin: 0 0 var(--ku-space-6, 32px); }
.ku-more-title {
	margin: 0 0 var(--ku-space-2, 8px);
	padding-left: var(--ku-space-3, 12px);
	border-left: 4px solid var(--ku-brand, #d3147c);
	font: 700 20px/1.3 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
}
.ku-more-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ku-more-list li {
	margin: 0;
	border-bottom: 1px solid var(--ku-line, #e5e5e5);
	list-style: none;
}
.ku-more-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--ku-space-3, 12px);
	padding: var(--ku-space-3, 12px) 0;
	color: var(--ku-heading, #333333);
	text-decoration: none;
}
.ku-more-text { flex: 1 1 auto; min-width: 0; }
.ku-more-headline {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font: 600 17px/1.5 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-heading, #333333);
}
.ku-more-date {
	display: block;
	margin-top: var(--ku-space-1, 4px);
	font: 400 13px/1.4 var(--ku-font-body, "Open Sans", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	color: var(--ku-muted, #666666);
}
.ku-more-thumb {
	flex: 0 0 112px;
	width: 112px;
	height: 63px;
	object-fit: cover;
	background: var(--ku-surface, #f5f5f5);
}
.ku-more-all,
.ku-more-all:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--ku-space-2, 8px);
	min-height: 48px;
	margin-top: var(--ku-space-4, 16px);
	padding: var(--ku-space-2, 8px) var(--ku-space-4, 16px);
	border: 1px solid var(--ku-ink, #252525);
	border-radius: var(--ku-radius, 4px);
	color: var(--ku-ink, #252525);
	font: 600 15px/1.3 var(--ku-font-head, "Poppins", "Noto Sans Gujarati", "Nirmala UI", sans-serif);
	text-align: center;
	text-decoration: none;
}
@media (hover: hover) {
	.ku-more-item:hover .ku-more-headline { color: var(--ku-brand, #d3147c); }
	.ku-more-all:hover {
		border-color: var(--ku-brand, #d3147c);
		color: var(--ku-brand, #d3147c);
		text-decoration: none;
	}
}
@media (min-width: 992px) {
	.ku-more-title { font-size: 18px; }
	.ku-more-item { flex-direction: row-reverse; justify-content: flex-end; }
	.ku-more-thumb { flex-basis: 96px; width: 96px; height: 54px; }
	.ku-more-headline { font-size: 16px; }
}

/* ---- Comments (the form itself is UI-5's) ------------------------------- */
.ku-article-comments { margin-top: var(--ku-space-4, 16px); }

/* ---- Motion (THEME.md 4.5) ---------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.ku-share-btn,
	.ku-more-all,
	.ku-more-headline,
	.ku-also-title {
		transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out;
	}
}
