/* ==========================================================================
   Prerna Education - one type scale for every page (v1.7)
   Desktop > 1024px | Tablet 768-1024px | Mobile <= 767px (Elementor breakpoints)
   Readable body text (16px+ on phones, as Google recommends) and a clear
   heading order: H1 > H2 > H3 > H4 > text, the same on every page.
   ========================================================================== */
:root {
	/* paragraphs stay 15px on every screen (as asked) */
	--fs-body: 15px;   --lh-body: 1.7;
	--fs-small: 14px;
	--fs-h1: 34px;     --fs-h2: 26px;     --fs-h3: 20px;     --fs-h4: 17px;     --fs-h5: 16px;
}
@media (max-width: 1024px) {
	:root { --fs-h1: 30px; --fs-h2: 24px; --fs-h3: 19px; --fs-h4: 17px; --fs-h5: 15.5px; }
}
@media (max-width: 767px) {
	:root { --lh-body: 1.65; --fs-small: 13.5px; --fs-h1: 26px; --fs-h2: 21px; --fs-h3: 18px; --fs-h4: 16px; --fs-h5: 15px; }
}

/* ---------- Headings (page content and page header) ---------- */
.pe-site .pe-pagehead-title,
.pe-site :where(#content) h1:where(:not(.pe-hub *, .pe-posts *, .pe-latest *, .pe-toc-auto *, .pe-home-hero *)) {
	font-size: var(--fs-h1); line-height: 1.2; letter-spacing: -.015em;
}
.pe-site :where(#content) h2:where(:not(.pe-hub *, .pe-posts *, .pe-latest *, .pe-col-narrow *, .pe-toc-auto *, .pe-box *)) {
	font-size: var(--fs-h2); line-height: 1.28; letter-spacing: -.01em;
}
.pe-site :where(#content) h3:where(:not(.pe-hub *, .pe-posts *, .pe-latest *, .pe-col-narrow *, .pe-toc-auto *, .pe-box *)) {
	font-size: var(--fs-h3); line-height: 1.35;
}
.pe-site :where(#content) h4:where(:not(.pe-hub *, .pe-posts *, .pe-latest *, .pe-col-narrow *, .pe-box *)) {
	font-size: var(--fs-h4); line-height: 1.4;
}
.pe-site :where(#content) h5, .pe-site :where(#content) h6 { font-size: var(--fs-h5); line-height: 1.45; }
/* headings keep their own size inside side cards */
.pe-site :where(#content) .pe-col-narrow :is(h1, h2, h3, h4) { font-size: 18px; line-height: 1.35; }

/* ---------- Body text ---------- */
.pe-site :where(#content) :is(p, li, dd, dt, blockquote):where(:not(.elementor-widget-text-editor *, .pe-home-hero *, .pe-hub *, .pe-posts *, .pe-latest *, .pe-col-narrow *, .pe-toc-auto *, .pe-box *, .fluentform *, .pe-share *, .pe-pagehead *, .pe-crumbs *, .pe-cta *, .pe-related-courses *)) {
	font-size: var(--fs-body); line-height: var(--lh-body);
}
.pe-site :where(#content) .elementor-widget-text-editor:where(:not(.pe-col-narrow *)),
.pe-site :where(#content) .elementor-icon-list-text,
.pe-site :where(#content) .elementor-tab-content,
.pe-site :where(#content) .elementor-toggle-content,
.pe-site :where(#content) .elementor-accordion .elementor-tab-content {
	font-size: var(--fs-body); line-height: var(--lh-body);
}
.pe-site :where(#content) .elementor-icon-list-text { line-height: 1.5; }
/* Normalize old sizes outside editable Elementor widgets. */
.pe-site :where(#content) :is(p, li, h1, h2, h3, h4) [style*="font-size"]:not(.elementor-widget *) {
	font-size: inherit !important;
}
/* tables, captions, small print */
.pe-site :where(#content) :is(td, th):where(:not(.pe-col-narrow *)) { font-size: var(--fs-small); line-height: 1.55; }
.pe-site :where(#content) :is(figcaption, .wp-caption-text, small) { font-size: 14px; line-height: 1.5; }
/* tabs / accordions / toggles */
.pe-site :where(#content) :is(.elementor-tab-title, .elementor-toggle-title, .elementor-accordion-title, .pe-faq summary, .pe-accordion summary) {
	font-size: var(--fs-h5); line-height: 1.45;
}
/* side cards: compact but readable */
.pe-site :where(#content) .pe-col-narrow :is(p, li, td):where(:not(.elementor-widget-text-editor *)) { font-size: 15px; line-height: 1.6; }
/* buttons */
.pe-site :where(#content) .elementor-button { font-size: 16px; line-height: 1.2; }
@media (max-width: 767px) {
	.pe-site :where(#content) .elementor-button { font-size: 15.5px; }
	/* tap targets: links in lists get enough room for a finger */
	.pe-site :where(#content) .elementor-widget-text-editor li > a:only-child { display: inline-block; padding: 4px 0; }
}

/* ---------- Spacing that follows the scale ---------- */
.pe-site #content :is(h2, h3):not(.pe-hub *, .pe-posts *, .pe-latest *, .pe-col-narrow *, .pe-toc-auto *, .pe-box *) { margin-top: 0; margin-bottom: .55em; }
.pe-site #content .elementor-widget-text-editor p { margin-bottom: 1em; }
.pe-site #content .elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* ---------- Pictures never wider than the page ---------- */
.pe-site .ast-single-post-featured-section, .pe-site .post-thumb-img-content { max-width: 100%; overflow: hidden; text-align: center; }
/* featured picture: never stretched past its own size, never huge on a computer */
.pe-site .ast-single-post-featured-section img, .pe-site .post-thumb-img-content img {
	display: block; margin: 0 auto;
	width: auto !important; height: auto !important;
	max-width: min(100%, 760px) !important; max-height: 420px; object-fit: contain;
	border-radius: 14px;
}
.pe-site.page .ast-single-post-featured-section img { max-width: min(100%, 560px) !important; max-height: 320px; }
:where(.pe-site #content) img { max-width: 100%; height: auto; }
.pe-site .hfeed.site { overflow-x: clip; }

/* wide tables scroll inside their own box on tablets and phones */
@media (max-width: 1024px) {
	.pe-site #content table:has(tr > :nth-child(4)) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.pe-site #content table:has(tr > :nth-child(4)) :is(td, th) { min-width: 110px; }
	/* two- and three-column tables (course details, fees) fit the screen and wrap */
	.pe-site #content table:not(:has(tr > :nth-child(4))) { display: table; width: 100% !important; table-layout: auto; white-space: normal; }
	.pe-site #content table:not(:has(tr > :nth-child(4))) :is(td, th) { white-space: normal; word-break: normal; overflow-wrap: anywhere; }
}
/* a phone is too narrow for three columns: that table scrolls sideways instead
   of squeezing every heading into one letter per line */
@media (max-width: 767px) {
	.pe-site #content table:has(tr > :nth-child(3)) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.pe-site #content table:has(tr > :nth-child(3)) :is(td, th) { min-width: 128px; white-space: normal; }
	.pe-site #content table:has(tr > :nth-child(3)) tr > :first-child { min-width: 96px; }
}
/* post bylines and dates in lists */
.pe-site #content :is(.entry-meta, .entry-meta *, .posted-on, .author-name) { font-size: 14px !important; }
/* some old pages pulled the whole page wider on phones (negative body margin) */
@media (max-width: 767px) {
	body.pe-site[class*="elementor-page-"] { margin-left: 0 !important; margin-right: 0 !important; }
}
html { overflow-x: clip; }
.pe-site.page .ast-single-post-featured-section, .pe-site.page .post-thumb-img-content { display: none !important; }

/* ---------- Icons: small and even ---------- */
.pe-site :where(#content) .elementor-widget-icon .elementor-icon { font-size: 20px; }
.pe-site :where(#content) .elementor-icon-box-icon .elementor-icon { font-size: 24px; }
.pe-site :where(#content) .elementor-icon svg { width: 1em; height: 1em; }
.pe-site :where(#content) .elementor-icon-list-icon i { font-size: 15px; }
.pe-site :where(#content) .elementor-icon-list-icon svg { width: 15px; height: 15px; }
.pe-site :where(#content) .elementor-icon-list-icon { min-width: 18px; }

/* ---------- 1.9.2: hub heading/lead on the scale; big content pictures kept in proportion ---------- */
.pe-site .pe-hub .pe-hub-title { font-size: var(--fs-h2) !important; line-height: 1.3; }
.pe-site .pe-hub .pe-hub-lead { font-size: var(--fs-body) !important; line-height: var(--lh-body); }
@media (min-width: 768px) {
	.pe-site #content .entry-content > p img,
	.pe-site #content .entry-content > figure img {
		max-width: min(100%, 720px) !important;
		height: auto !important;
	}
	.pe-site #content .elementor-widget-text-editor img.aligncenter,
	.pe-site #content .entry-content figure.aligncenter img { margin-left: auto; margin-right: auto; display: block; }
}


/* ---------- 1.9.3: readable colours everywhere ---------- */
/* Elementor's default "primary" (#6EC1E4) is too light behind white headings: same hue, darker */
body.pe-site { --e-global-color-primary: #0a6fa0; --e-global-color-text: #4b5563; }
/* old inline colours inside dark table headers */
.pe-site #content th [style*="color"] { color: inherit !important; }

/* "On this page" list: same 15px body size */
.pe-site #content :is(.pe-toc, .pe-toc-auto) :is(li, a) { font-size: 15px !important; }

/* ---------- 1.9.6: article helpers (byline, update box, inline CTA, sources) ---------- */
.pe-site #content .pe-byline { font-size: 14px !important; color: #5b6473; margin: 0 0 14px; }
.pe-site #content .pe-update { background: #fff8e6; border: 1px solid #ffe1a3; border-left: 4px solid #f09a3e; border-radius: 10px; padding: 12px 16px; margin: 0 0 20px; }
.pe-site #content .pe-update p { margin: 0; font-size: 15px; }
.pe-site #content .pe-cta-inline { background: linear-gradient(135deg, #012284, #1a4fd6); color: #fff; border-radius: 14px; padding: 18px 20px; margin: 26px 0; }
.pe-site #content .pe-cta-inline p { color: #fff; margin: 0 0 8px; font-weight: 600; }
.pe-site #content .pe-cta-inline p:last-child { margin: 0; font-weight: 400; }
.pe-site #content .pe-cta-inline a { color: #ffd54a; font-weight: 700; text-decoration: none; }
.pe-site #content .pe-cta-inline a:hover { text-decoration: underline; }
.pe-site #content .pe-sources { font-size: 14px; }
.pe-site #content .pe-sources li { font-size: 14px !important; margin-bottom: 4px; }
/* space above a section heading that starts a new text block */
.pe-site #content .elementor-widget-text-editor + .elementor-widget-text-editor h2:first-child { margin-top: 30px; }
.pe-site #content .elementor-widget-text-editor h2 { margin-bottom: 14px; }
.pe-site #content .elementor-widget-text-editor h3 { margin-top: 20px; margin-bottom: 10px; }

/* ---------- 1.9.14: links inside a dark table header keep the header's colour ---------- */
.pe-site #content th a { color: inherit !important; text-decoration: underline; }
.pe-site #content th a:hover { opacity: .85; }
/* a two-column table gives its label column room instead of breaking words */
@media (min-width: 768px) {
	.pe-site #content table:has(tr > :nth-child(2)):not(:has(tr > :nth-child(3))) tr > :first-child { width: 30%; }
}
