/**
 * Techuz Blog: post content.
 *
 * Typography and legacy content classes for the post body, rebuilt from the
 * old `.demo-blog-detail-page .blog-content-inner` styles (techuz-child) and
 * checked against computed styles on www.techuz.com/blog at 1440px and 390px.
 * Loaded on singular views, and in the Classic Editor (TinyMCE body gets the
 * `tz-content` class), so writers see the real styles while editing.
 *
 * Scope
 * -----
 * Every rule starts with `.tz-content` (the post body wrapper in single.php
 * and page.php). One class keeps specificity low, so inline styles used in
 * newer posts still win.
 *
 * Breakpoints follow the old theme: 1199, 991, 767, 568.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

.tz-content {
	/* Old body text was `gorditaregular`: regular faces only, so inline bold is synthesised. */
	font-family: var(--wp--preset--font-family--gordita-regular);
	--tz-gap: 30px;            /* p / last li bottom margin */
	--tz-li-gap: 14px;         /* between list items */
	--tz-text: 18px;           /* p, li */
	--tz-h2: 40px;
	--tz-h3: 32px;
	--tz-h4: 24px;
	--tz-h4-mt: 22px;
	--tz-h2-mb: 20px;
	--tz-sr-space: 0px;        /* .suggested-read vertical margin */
	--tz-sr-link: 26px;        /* .suggested-read link size */
	--tz-box-bg: #F7F8F9;      /* legacy grey boxes */
	--tz-pink: #E34880;        /* "Suggested read" label */
}

/* ==========================================================================
   2. Text
   ========================================================================== */

.tz-content p,
.tz-content li {
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita-regular);
	font-size: var(--tz-text);
	font-weight: 400;
	line-height: 1.66;
}

.tz-content p {
	margin: 0 0 var(--tz-gap);
}

/*
 * Spacing model. The old theme made p and h1-h6 inline-block (width 100%),
 * so their margins add to a neighbour's margin instead of collapsing
 * (p 30px + h2 20px = 50px, p + blockquote = 46px). Keeping that model is
 * what makes every gap match live. Scoped to .tz-content only, so the
 * "post only" editor canvas keeps normal blocks (gaps there are slightly
 * tighter than on the front end).
 */
.tz-content :is(p, h1, h2, h3, h4, h5, h6) {
	display: inline-block;
	width: 100%;
}

/*
 * Replace core's flow-layout gap (16px above every block) with the old
 * rhythm: blocks without their own rule get only a bottom gap. Same weight
 * as core's rule (0,1,0); this file loads after the global styles.
 */
.tz-content > * {
	margin-block: 0 var(--tz-gap);
}

/* Spacer line breaks and plain wrapper divs carry no margin (old content);
   classed boxes set their own. */
.tz-content > :is(br, div, section),
.tz-content > aside:where(:not(.tz-cta)) {
	margin: 0;
}

.tz-content :is(strong, b) {
	font-family: var(--wp--preset--font-family--gordita-bold); /* old global `strong { font-family: gorditabold }` */
	font-weight: 700;
}

.tz-content :is(em, i) {
	font-style: italic;
}

/* Links: old `gorditamedium` italic (weight inherited, so the faces resolve as
   they did), blue, underlined. Buttons are excluded. */
.tz-content a:where(:not(.common-btn)) {
	color: var(--wp--preset--color--link);
	font-family: var(--wp--preset--font-family--gordita-medium);
	font-size: inherit;
	font-style: italic;
	text-decoration: underline;
}

.tz-content a:where(:not(.common-btn)):hover {
	text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
	.tz-content a {
		transition: color 0.4s ease, background-color 0.4s ease;
	}
}

/* ==========================================================================
   3. Headings
   ========================================================================== */

.tz-content :is(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--black);
	letter-spacing: normal;   /* TT5 sets -0.1px / 0.5px / 1.4px */
	text-transform: none;     /* TT5 uppercases h6 */
	scroll-margin-top: 120px; /* clear the fixed header for TOC anchors */
}

/* Old `blancobold`: bold faces only, so inline font-weight spans stay bold. */
.tz-content :is(h2, h3, h4) {
	font-family: var(--wp--preset--font-family--blanco-bold);
	font-weight: 700;
	line-height: normal;
}

.tz-content h2 {
	font-size: var(--tz-h2);
	margin: 20px 0 var(--tz-h2-mb);
}

.tz-content h3 {
	font-size: var(--tz-h3);
	margin: 20px 0;
}

.tz-content h4 {
	font-size: var(--tz-h4);
	margin: var(--tz-h4-mt) 0 10px;
}

/* h5/h6 were Bootstrap defaults on the body font. */
/* Old h5/h6 had no rules of their own: body face (regular only), inherited colour. */
.tz-content :is(h5, h6) {
	color: inherit;
	font-family: var(--wp--preset--font-family--gordita-regular);
	font-weight: 400;
	line-height: 1.2;
	margin: 0 0 8px;
}

.tz-content h5 {
	font-size: var(--wp--preset--font-size--lg);
}

.tz-content h6 {
	font-size: var(--wp--preset--font-size--base);
}


.tz-content :is(h2, h3, h4) :is(strong, b) {
	font-family: inherit;
	font-weight: inherit;
}

/* h5/h6 <strong>: the heading's regular face, bold (synthesised, as before). */
.tz-content :is(h5, h6) :is(strong, b) {
	font-family: inherit;
	font-weight: 700;
}

/* An h1 typed into a post took the old page-title style; its <strong> kept Gordita Bold. */
.tz-content h1 {
	max-width: 555px;
	margin: 0 0 30px;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--blanco-bold);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

@media (min-width: 992px) {
	.tz-content h1 {
		font-size: 40px;
	}
}

@media (min-width: 1200px) {
	.tz-content h1 {
		font-size: var(--wp--preset--font-size--display);
	}
}

/* One legacy post underlined its linked h2s on hover. */
.postid-7679 .tz-content h2 a:hover {
	text-decoration: underline;
}

/* Linked headings read as plain headings. */
.tz-content :is(h1, h2, h3, h4, h5, h6) a {
	color: inherit;
	font: inherit;
	text-decoration: none;
}

/* Bare "Suggested Read – <a>" h6 lines: Bootstrap's link blue, no underline. */
.tz-content > h6 a:where(:not(.common-btn)) {
	color: #007BFF;
}

.tz-content :is(h1, h2, h3, h4, h5, h6) a:where(:not(.common-btn)):hover {
	text-decoration: none;
}

/* ==========================================================================
   4. Lists
   Both ul and ol use the red dot (ol had no numbers on the old site).
   ========================================================================== */

.tz-content :is(ul, ol) {
	list-style: none;
	margin: 0;
	padding-left: 10px;
}

.tz-content ol {
	margin-bottom: 1rem;
}

.tz-content li {
	position: relative;
	margin: 0 0 var(--tz-li-gap);
	padding-left: 16px;
}

.tz-content li:last-child {
	margin-bottom: var(--tz-gap);
}

/* Only bullet lists followed the smaller sizes on narrow screens: ol items kept
   18px text and the 30px gap after the last item. */
.tz-content ol > li {
	font-size: 18px;
}

.tz-content ol > li:last-child {
	margin-bottom: 30px;
}

.tz-content li::before {
	content: "";
	position: absolute;
	top: 11px;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-red);
}

/* ==========================================================================
   5. Media: images, figures, captions, embeds
   ========================================================================== */

.tz-content img:where(:not(.emoji, .wp-smiley)) {
	display: block;
	width: auto; /* intrinsic width: 740px for large images via `sizes` (ImageSizes) */
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

.tz-content figure {
	max-width: 100%;
	margin: 28px 0;
}

.tz-content :is(figcaption, .wp-element-caption, .wp-caption-text),
.tz-content .img-caption span {
	display: block;
	margin: 14px 0 0;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.5;
	text-align: center;
}

/* [caption] shortcode output and the old manual caption wrapper. */
.tz-content .wp-caption {
	max-width: 100%;
	margin: 28px auto;
}

.tz-content .img-caption {
	text-align: center;
}

/* Embeds keep their width/height attributes, centred (old `iframe { display: table }`). */
.tz-content :is(iframe, embed, object) {
	display: block;
	max-width: 100%;
	margin: 0 auto;
}

/* <video> stays inline in its paragraph, as on the old site (see global.css). */

/* ==========================================================================
   6. Blockquote, rule, code
   ========================================================================== */

.tz-content blockquote {
	margin: 0 0 16px;
}

.tz-content blockquote cite {
	color: #6B7280;
	font-size: 15px;
	font-style: normal;
}

.tz-content hr {
	height: 0;
	margin: 1rem 0;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Inline code: Bootstrap's defaults, which the old posts rendered with. */
.tz-content code {
	color: #E83E8C;
	font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 87.5%;
	overflow-wrap: anywhere;
}

/* Old posts use <pre> as a lavender pill label ("App design duration: 3-4 weeks"). */
.tz-content pre {
	display: inline-block;
	max-width: 100%;
	margin: 0 0 1rem;
	padding: 8px 20px;
	border-radius: 68px;
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	line-height: 1.5;
	white-space: pre;
	overflow: auto; /* Bootstrap's pre: also puts the inline-block's baseline at its bottom edge */
}

/* Old `pre strong`: medium, normal weight (a <b> kept the global Gordita Bold). */
.tz-content pre strong {
	font-family: var(--wp--preset--font-family--gordita);
	font-weight: 500;
}

/* Real code blocks (core/code, or a <pre> that wraps <code>). */
.tz-content :is(pre.wp-block-code, pre:has(> code)) {
	display: block;
	margin: 0 0 var(--tz-gap);
	padding: 16px 20px;
	overflow-x: auto;
	border-radius: var(--wp--custom--radius--sm);
	background: var(--tz-box-bg);
	font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	white-space: pre;
}

.tz-content pre code {
	color: inherit;
	font-size: inherit;
	overflow-wrap: normal;
}

/* ==========================================================================
   7. Tables
   Cells use the body text style (16/1.5, #212529), as on the old site.
   ========================================================================== */

.tz-content table {
	margin: 0 0 var(--tz-gap);
	border-collapse: collapse;
	color: var(--wp--preset--color--body);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.5;
}

.tz-content th {
	font-weight: 700;
	text-align: left;
}

/* ==========================================================================
   8. Legacy content classes (old posts)
   ========================================================================== */

/* --- .price-table / .price-table-two-col: bordered pricing tables. ------- */

.tz-content .price-table:not(li) {
	max-width: 100%;
	margin-bottom: 0;
}

/* The table's 30px bottom margin collapses through the wrapper, as before. */
.tz-content .price-table table {
	min-width: 500px;
	margin-bottom: 30px;
}

.tz-content .price-table :is(table, th, td) {
	border: 1px solid var(--wp--preset--color--black);
}

.tz-content .price-table :is(th, td) {
	padding: 10px;
	text-align: left;
}

.tz-content .price-table th {
	background: #EEEEEE;
}

/* --- .highlited-sec: grey in-content summary / TOC box. ------------------ */

.tz-content .highlited-sec {
	margin: 20px 0;
	padding: 30px 50px;
	border-radius: 20px;
	background: var(--tz-box-bg);
}

.tz-content .highlited-sec > :first-child {
	margin-top: 0;
}

/* An <ol> kept Bootstrap's 1rem bottom margin here on the old site. */
.tz-content .highlited-sec > :last-child:not(ol),
.tz-content .highlited-sec li:last-child {
	margin-bottom: 0;
}

.tz-content .highlited-sec h2 {
	margin: 0 0 30px;
}

/* White pill label inside the box heading. */
.tz-content .highlited-sec h2 span {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 100px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 400;
	line-height: 1.5;
}

.tz-content .highlited-sec h2 span strong {
	font-style: italic;
	font-weight: 700;
}

/* TOC links: plain black, underline + medium on hover. */
.tz-content .highlited-sec li a {
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--base);
	font-style: normal;
	font-weight: 400;
	line-height: 1.66;
	text-decoration: none;
}

.tz-content .highlited-sec li a:hover {
	color: var(--wp--preset--color--black);
	font-weight: 500;
	text-decoration: underline;
}

.tz-content .highlited-sec p a:hover {
	color: var(--wp--preset--color--accent-red);
}

/* --- .suggested-read: "Related read" card. ------------------------------- */

.tz-content .suggested-read {
	margin: var(--tz-sr-space) 0;
	padding: 18px 30px;
	border-radius: 20px;
	background: var(--tz-box-bg);
	color: var(--tz-pink);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--sm);
	font-style: italic;
	font-weight: 500;
	line-height: 1.5;
}

/* Some cards wrap the label in an h6 (often h6.post-title). */
.tz-content .suggested-read :is(h5, h6) {
	margin: 0 0 8px;
	color: inherit;
	font: inherit;
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.2;
}

/* Old `.suggested-read strong` only; a <b> kept the global Gordita Bold. */
.tz-content .suggested-read strong {
	font-family: var(--wp--preset--font-family--gordita-medium);
	font-weight: 400;
}

.tz-content .suggested-read a {
	display: block;
	margin-top: 4px;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita-medium);
	font-size: var(--tz-sr-link);
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
}

.tz-content .suggested-read a:hover {
	color: var(--wp--preset--color--link);
	text-decoration: none;
}

.tz-content .suggested-read + p {
	margin-top: 20px;
}

/* --- .cat-label: category pill typed into post content. ----------------- */

.tz-content .cat-label {
	display: inline-block;
	padding: 8px 18px 7px;
	border-radius: 50px;
	background-color: var(--wp--custom--category--default);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--gordita-medium);
	font-size: 12px;
	font-style: italic;
	line-height: 1.5;
}

.tz-content .cat-label.web-development-cat { background-color: var(--wp--custom--category--web-development); }
.tz-content .cat-label.trending-cat { background-color: var(--wp--custom--category--trending); }
.tz-content .cat-label.react-cat { background-color: var(--wp--custom--category--reactjs); }
.tz-content .cat-label.design-development-cat { background-color: var(--wp--custom--category--design-and-development); }
.tz-content .cat-label.mobile-development-cat { background-color: var(--wp--custom--category--mobile-development); }
.tz-content .cat-label.angular-cat { background-color: var(--wp--custom--category--angularjs); }
.tz-content .cat-label.node-cat { background-color: var(--wp--custom--category--nodejs); }
.tz-content .cat-label.project-management-cat { background-color: var(--wp--custom--category--project-management); }

/* --- .Methodologies-table: bordered box (no published post uses it now). - */

.tz-content .Methodologies-table {
	display: flow-root;
	margin: 20px 0 60px;
	padding: 40px 35px 15px;
	border: 1px solid #E5E5E5;
	background: #F9F9F9;
}

/* --- a.common-btn: orange pill CTA. ---------------------------------------- */

.tz-content a.common-btn {
	display: inline-block;
	text-align: center;
	padding: 0.5rem 2rem 0.6rem;
	border-radius: 1.5rem;
	background: #FF9100;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--gordita);
	font-size: var(--wp--preset--font-size--base);
	font-style: italic;
	font-weight: 500;
	line-height: 1.375;
	text-decoration: underline;
}

.tz-content a.common-btn:hover {
	background: #F97316;
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.tz-content a.common-btn img {
	display: inline-block;
	margin: 0 0 0 8px;
	border-radius: 0;
	vertical-align: middle;
}

/* --- ul.inline-img-lsiting + .cnt-txt: logo + text rows. ----------------- */

.tz-content ul.inline-img-lsiting {
	padding-bottom: 20px;
}

.tz-content ul.inline-img-lsiting li {
	display: flex;
	align-items: center;
}

.tz-content ul.inline-img-lsiting li:last-child {
	margin-bottom: 0;
}

.tz-content ul.inline-img-lsiting img {
	flex: none;
	margin: 0;
	padding-right: 30px;
	border-radius: 0;
}

.tz-content .cnt-txt {
	padding: 20px 0;
	border-bottom: 1px solid #DCE2DE;
}

.tz-content li:last-child > .cnt-txt {
	border-bottom: 0;
}

/* ==========================================================================
   9. Responsive
   ========================================================================== */

@media (max-width: 1199px) {
	.tz-content {
		--tz-text: 16px;
		--tz-h2: 38px;
		--tz-h3: 28px;
		--tz-h4: 28px;
		--tz-h4-mt: 20px;
	}
}

@media (max-width: 991px) {
	.tz-content {
		--tz-gap: 20px;
		--tz-h2: 30px;
		--tz-h3: 25px;
		--tz-h4: 25px;
		--tz-sr-space: 30px;
		--tz-sr-link: 22px;
	}

	.tz-content .suggested-read {
		padding: 15px 20px;
	}

	.tz-content ul > li:not(:last-child) {
		font-size: 15px;
	}

	/* Old `.blog-content-inner a { font-size: 16px }`, headings' links included. */
	.tz-content a:where(:not(.common-btn)),
	.tz-content :is(h1, h2, h3, h4, h5, h6) a {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.tz-content {
		--tz-h2: 25px;
		--tz-h3: 22px;
		--tz-h4: 22px;
		--tz-h2-mb: 15px;
		--tz-sr-space: 20px;
		--tz-sr-link: 18px;
	}

	.tz-content .highlited-sec {
		padding: 30px;
	}

	/*
	 * Wide tables scroll sideways instead of widening the page. The table
	 * itself scrolls (no wrapper needed), and its bottom margin still
	 * collapses through .price-table as on desktop.
	 */
	.tz-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}

	.tz-content a.common-btn.mob-none {
		display: none;
	}
}

@media (max-width: 568px) {
	/* Pricing tables shrink to fit, laid out as plain tables like the old site. */
	.tz-content .price-table table {
		display: table;
		min-width: 0;
	}

	.tz-content ul.inline-img-lsiting li {
		display: block;
		text-align: center;
	}

	.tz-content ul.inline-img-lsiting img {
		margin: 0 auto;
		padding: 15px 0 0;
	}

	.tz-content .cnt-txt {
		padding: 10px 0 15px;
	}
}
