/**
 * Blog stylesheet: utilities, LuckyWP TOC override, prose tweaks, hero variants.
 *
 * @package meblearkadius-tw
 */

/* ============================================================
 * Line-clamp utilities.
 * ============================================================ */
.matw-line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.matw-line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ============================================================
 * Blog list — intro on /porady/ page should NOT be prose-restricted.
 * ============================================================ */
.matw-blog-intro p {
	margin: 0 0 .75rem 0;
}
.matw-blog-intro p:last-child {
	margin-bottom: 0;
}
.matw-blog-intro strong {
	color: #3D3D3D;
	font-weight: 600;
}

/* ============================================================
 * Blog cards.
 * ============================================================ */
.matw-blog-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
 * Pagination.
 * ============================================================ */
.matw-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 .75rem;
	font-size: .875rem;
	font-weight: 500;
	color: #3D3D3D;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: .375rem;
	text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}
.matw-pagination .page-numbers:hover {
	border-color: #E8734A;
	color: #E8734A;
}
.matw-pagination .page-numbers.current {
	background: #E8734A;
	color: #fff;
	border-color: #E8734A;
}
.matw-pagination .page-numbers.dots {
	background: transparent;
	border: 0;
}

/* ============================================================
 * Article hero variants.
 * ============================================================ */
.matw-hero-landscape h1 {
	text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

/* ============================================================
 * Lead paragraph.
 * ============================================================ */
.matw-article-lead::before {
	content: "";
	display: block;
	width: 3rem;
	height: 3px;
	background: #E8734A;
	margin-bottom: 1rem;
}

/* ============================================================
 * Article prose tweaks.
 * ============================================================ */
.matw-article-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #3D3D3D;
}
.matw-article-content > * + * {
	margin-top: 1.25em;
}
.matw-article-content h2,
.matw-article-content h3,
.matw-article-content h4 {
	font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
	color: #3D3D3D;
	line-height: 1.3;
	margin-top: 2em;
	margin-bottom: .5em;
}
.matw-article-content h2 { font-size: 1.875rem; }
.matw-article-content h3 { font-size: 1.5rem; }
.matw-article-content h4 { font-size: 1.25rem; }
.matw-article-content a {
	color: #E8734A;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.matw-article-content a:hover {
	color: #3D3D3D;
}
.matw-article-content img,
.matw-article-content figure {
	border-radius: .5rem;
	margin: 1.75rem auto;
}
.matw-article-content blockquote {
	border-left: 4px solid #E8734A;
	background: #F5F0EA;
	padding: 1rem 1.25rem;
	font-style: italic;
	border-radius: 0 .5rem .5rem 0;
	color: #3D3D3D;
}
.matw-article-content ul,
.matw-article-content ol {
	padding-left: 1.5rem;
}
.matw-article-content li + li {
	margin-top: .25rem;
}

/* ============================================================
 * LuckyWP TOC override — compact, brand-aligned.
 * ============================================================ */
.matw-article-content .lwptoc,
.lwptoc.lwptoc-autoWidth,
.lwptoc {
	background: #F5F0EA;
	border: 0;
	border-left: 3px solid #E8734A;
	border-radius: 0 .375rem .375rem 0;
	padding: .875rem 1rem;
	margin: 1.5rem 0;
	font-family: inherit;
	box-shadow: none;
	width: auto;
	max-width: 100%;
}

.lwptoc .lwptoc_i {
	padding: 0;
}

.lwptoc .lwptoc_header {
	margin-bottom: .5rem;
	padding: 0;
	display: flex;
	align-items: center;
	gap: .5rem;
}

.lwptoc .lwptoc_title {
	font-size: .6875rem !important;
	font-weight: 700 !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #E8734A !important;
	margin: 0 !important;
	padding: 0 !important;
	font-family: inherit !important;
}

.lwptoc .lwptoc_toggle {
	margin-left: auto;
}
.lwptoc .lwptoc_toggle_label,
.lwptoc .lwptoc_toggle a {
	font-size: .6875rem !important;
	color: #E8734A !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}
.lwptoc .lwptoc_toggle_label:hover {
	color: #3D3D3D !important;
}

.lwptoc .lwptoc_items {
	margin: 0;
	padding: 0;
}

.lwptoc .lwptoc_itemWrap {
	margin: 0;
	padding: 0;
}

.lwptoc .lwptoc_item {
	margin: 0;
	padding: 0;
}

.lwptoc .lwptoc_item > a {
	display: flex !important;
	align-items: flex-start;
	gap: .5rem;
	color: #3D3D3D !important;
	padding: .25rem .375rem !important;
	border-radius: .25rem;
	text-decoration: none !important;
	line-height: 1.4;
	font-weight: 400;
	transition: color .15s, background-color .15s;
}
.lwptoc .lwptoc_item > a:hover {
	color: #E8734A !important;
	background: rgba(232, 115, 74, .07);
}

.lwptoc .lwptoc_item_number {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	background: rgba(232, 115, 74, .12);
	color: #E8734A !important;
	border-radius: 999px;
	font-size: .6875rem;
	font-weight: 700;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1;
}
.lwptoc .lwptoc_item > a:hover .lwptoc_item_number {
	background: #E8734A;
	color: #fff !important;
}

.lwptoc .lwptoc_item_label {
	font-size: .8125rem !important;
	color: inherit !important;
	font-weight: inherit !important;
	flex: 1;
	min-width: 0;
	padding-top: 1px;
}

/* Nested items */
.lwptoc .lwptoc_item .lwptoc_item {
	margin-left: 1.25rem;
}
.lwptoc .lwptoc_item .lwptoc_item .lwptoc_item_number {
	width: 1.125rem;
	height: 1.125rem;
	font-size: .625rem;
}
.lwptoc .lwptoc_item .lwptoc_item .lwptoc_item_label {
	font-size: .75rem !important;
}

.lwptoc .lwptoc_items:not(.lwptoc_items-visible) {
	display: none;
}

/* ============================================================
 * Force TOC to span the full content column (overrides
 * plugin's .lwptoc-autoWidth which uses inline-block).
 * ============================================================ */
.matw-article-content .lwptoc,
.lwptoc,
.lwptoc.lwptoc-autoWidth,
.lwptoc.lwptoc-fixedWidth {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	box-sizing: border-box;
}

/* ============================================================
 * Tailwind utilities NOT present in compiled style.css.
 * Tailwind v4 only includes classes seen during build; new
 * template files weren't scanned, so we ship them here.
 * ============================================================ */

/* Aspect ratios */
.aspect-\[4\/3\]   { aspect-ratio: 4 / 3; }
.aspect-\[3\/4\]   { aspect-ratio: 3 / 4; }
.aspect-\[16\/9\]  { aspect-ratio: 16 / 9; }
.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
.aspect-\[21\/9\]  { aspect-ratio: 21 / 9; }
@media (min-width: 640px) { .sm\:aspect-\[16\/9\] { aspect-ratio: 16 / 9; } }
@media (min-width: 768px) { .md\:aspect-\[21\/9\] { aspect-ratio: 21 / 9; } }

/* Max heights */
.max-h-\[640px\] { max-height: 640px; }
.max-h-\[520px\] { max-height: 520px; }

/* Hovers */
.hover\:text-accent:hover     { color: #E8734A; }
.hover\:text-accent\/80:hover { color: rgba(232, 115, 74, .8); }
.hover\:bg-accent:hover       { background-color: #E8734A; }
.hover\:border-accent:hover   { border-color: #E8734A; }
.hover\:text-white:hover      { color: #ffffff; }
.hover\:shadow-md:hover       { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.hover\:shadow-sm:hover       { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

/* Group-hover */
.group:hover .group-hover\:scale-105         { transform: scale(1.05); }
.group:hover .group-hover\:translate-x-0\.5  { transform: translateX(0.125rem); }
.group:hover .group-hover\:text-accent       { color: #E8734A; }

/* Transitions */
.transition-shadow    { transition-property: box-shadow;       transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
.transition-transform { transition-property: transform;        transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
.transition-colors    { transition-property: color, background-color, border-color, fill, stroke; transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
.transition-all       { transition-property: all;              transition-duration: 150ms; transition-timing-function: cubic-bezier(.4,0,.2,1); }
.duration-500         { transition-duration: 500ms; }

/* Misc */
.no-underline    { text-decoration: none; }
.bg-gray-100     { background-color: #f3f4f6; }
.bg-gray-900     { background-color: #111827; }
.tracking-widest { letter-spacing: 0.1em; }

/* Safety net — image inside our blog card's image wrapper */
.matw-blog-card a.block.relative {
	display: block;
	width: 100%;
}
.matw-blog-card a.block.relative img,
.matw-blog-card .wp-post-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
 * HERO FIX — make magazine-style overlay actually work.
 * The compiled Tailwind doesn't ship: bg-gradient-to-t,
 * from-black/N, via-black/N, to-black/N, text-white/N,
 * text-accent/N, inset-x-0, pb-14. Plus the header itself
 * needs the same aspect-ratio as its inner box so that
 * absolute-positioned overlay actually sits *inside* it.
 * ============================================================ */

/* Header itself takes the same height as the inner aspect box,
   so absolute children (overlay text) stay inside it. */
.matw-hero-landscape {
	display: block;
}
.matw-hero-landscape > div:first-child {
	width: 100%;
	position: relative;
}
.matw-hero-landscape > div:first-child > img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	z-index: 0;
}
.matw-hero-landscape > div.absolute {
	z-index: 2;
}

/* Force the aspect-ratio container to fill width and respect ratios */
.matw-hero-landscape .aspect-\[16\/10\],
.matw-hero-landscape .aspect-\[16\/9\],
.matw-hero-landscape .aspect-\[21\/9\] {
	width: 100%;
}

/* Inset utilities */
.inset-x-0 { left: 0; right: 0; }
.inset-y-0 { top: 0; bottom: 0; }

/* Padding utilities used in hero */
.pb-8  { padding-bottom: 2rem; }
.pb-14 { padding-bottom: 3.5rem; }
@media (min-width: 768px) { .md\:pb-14 { padding-bottom: 3.5rem; } }

/* Gradient — only this single one is used by hero overlay */
.bg-gradient-to-t {
	background-image: linear-gradient(to top, var(--tw-gradient-stops));
}
.from-black\/85 { --tw-gradient-from: rgba(0, 0, 0, 0.85); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via, transparent), var(--tw-gradient-to, transparent); }
.via-black\/40  { --tw-gradient-via:  rgba(0, 0, 0, 0.40); --tw-gradient-stops: var(--tw-gradient-from, transparent), var(--tw-gradient-via), var(--tw-gradient-to, transparent); }
.to-black\/10   { --tw-gradient-to:   rgba(0, 0, 0, 0.10); }

/* White text with alpha */
.text-white\/90  { color: rgba(255, 255, 255, 0.90); }
.text-white\/80  { color: rgba(255, 255, 255, 0.80); }
.text-white\/70  { color: rgba(255, 255, 255, 0.70); }
.hover\:text-white:hover { color: #ffffff; }

/* Accent with alpha */
.text-accent\/80 { color: rgba(232, 115, 74, 0.80); }
.bg-accent\/10   { background-color: rgba(232, 115, 74, 0.10); }
.bg-accent\/5    { background-color: rgba(232, 115, 74, 0.05); }

/* Black solid for fallback bg */
.text-white { color: #ffffff; }

/* Mb increments missing */
.mb-3 { margin-bottom: 0.75rem; }
@media (min-width: 768px) { .md\:mb-5 { margin-bottom: 1.25rem; } }

/* ============================================================
 * TOC NUMBERS — drop the colored circle (too small for "2.4"
 * sub-numbers). Just use accent-colored text aligned in a
 * fixed-width slot. The container itself keeps its bg-background.
 * ============================================================ */
.lwptoc .lwptoc_item_number {
	display: inline-flex !important;
	align-items: baseline;
	justify-content: flex-start;
	width: auto !important;
	min-width: 1.5rem;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	color: #E8734A !important;
	border-radius: 0 !important;
	font-size: .8125rem !important;
	font-weight: 700 !important;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
	line-height: inherit;
}

/* Sub-level numbers a bit smaller */
.lwptoc .lwptoc_item .lwptoc_item .lwptoc_item_number {
	min-width: 1.75rem;
	font-size: .75rem !important;
}

/* On hover, no pill background — just darken text */
.lwptoc .lwptoc_item > a:hover .lwptoc_item_number {
	background: transparent !important;
	color: #3D3D3D !important;
}

/* A touch more padding inside the item link */
.lwptoc .lwptoc_item > a {
	gap: .375rem !important;
	padding: .3125rem .375rem !important;
}

/* ============================================================
 * TOC — remove background tint entirely. Just left accent bar
 * with subtle border. Cleaner on bg-background page.
 * ============================================================ */
.matw-article-content .lwptoc,
.lwptoc,
.lwptoc.lwptoc-autoWidth,
.lwptoc.lwptoc-fixedWidth {
	background: transparent !important;
	border-left: 3px solid #E8734A !important;
	border-top: 1px solid #e5e7eb;
	border-right: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
	border-radius: 0 .375rem .375rem 0;
}
.lwptoc .lwptoc_item > a:hover {
	background: transparent !important;
	color: #E8734A !important;
}

/* ============================================================
 * TOC FINAL — move background to outer .lwptoc, kill the
 * inner .lwptoc_i background that the plugin paints.
 * ============================================================ */

/* Outer: bg-background + left accent bar */
.matw-article-content .lwptoc,
.lwptoc,
.lwptoc.lwptoc-autoWidth,
.lwptoc.lwptoc-fixedWidth {
	background: #F5F0EA !important;
	border: 0 !important;
	border-left: 3px solid #E8734A !important;
	border-radius: 0 .375rem .375rem 0 !important;
	padding: 0 !important;
	margin: 1.5rem 0 !important;
}

/* Inner wrapper: kill plugin's bg/color, keep the spacing here */
.lwptoc .lwptoc_i,
.lwptoc.lwptoc-light .lwptoc_i,
.lwptoc.lwptoc-dark .lwptoc_i {
	background: transparent !important;
	color: #3D3D3D !important;
	padding: .875rem 1rem !important;
	text-align: left !important;
}
