/**
 * NewsManch Child — Option A refresh (2 Dec 2026).
 * Loads LAST (after the parent's styles incl. newsup-performance at
 * priority 99), so these rules win on equal specificity. Parent files
 * are untouched. AdSense is Auto Ads only — no ad slots are touched;
 * layout changes are limited to the items below.
 */

/* ============ 1. HERO ============ */
/* The hero slider (#homemain) is an <img> inside .mg-blog-post.lg, sized
   by the theme's INLINE customizer CSS (#newsup-style-inline-css):
   height 100%, object-fit cover, object-position center. The
   background-* rules below are kept as a no-op defence for any .back-img
   that IS a background image — they do nothing for the <img> hero.
   FOCAL POINT (2 Dec fix): center crops portrait/square slides
   vertically — the 1 Dec WhatsApp portrait (384x518, BJP Seva Doot
   slide) had its head cut off, and the square 3-person collage lost its
   top face. center 5% keeps the portrait head fully in frame at desktop
   (475px slot) and mobile (300px slot); the two 16:9 slides have no
   vertical crop so they are unaffected; the square collage keeps its
   top-right face fully and the top half of the bottom-right face (no
   single value can show all three faces in a 475px window of a 730px
   image). Long-term the portrait still wants an editorial replacement
   (384px upscaled ~1.9x — no CSS can add pixels). The #homemain ID
   beats the inline rule's (0,4,1) specificity. */
.mg-blog-post.lg.back-img {
	background-size: cover;
	background-position: center center;
}
#homemain .mg-blog-post.lg img.mg-featured-image {
	object-fit: cover;
	object-position: center 5%;
}

/* ============ 2. IN-ARTICLE IMAGES ============ */
/* Editor inserts default to 'medium' (200px), so existing posts keep that
   HTML. Fill the ~730px content column instead; the browser picks the
   ~768w candidate from srcset (sizes fixed in functions.php). Floated
   images keep their size. */
.page-content-single img.size-medium:not(.alignleft):not(.alignright),
.page-content-single img.size-large:not(.alignleft):not(.alignright),
.page-content-single img.size-full:not(.alignleft):not(.alignright) {
	width: 100%;
	height: auto;
}

/* ============ 3. TYPE SCALE ============ */
/* Body line-height 30px (1.875) -> 1.7; headings scale with clamp() so
   they shrink sanely on phones instead of staying at fixed desktop sizes. */
body {
	line-height: 1.7;
}
.page-content-single h1,
.mg-blog-post-box h1.title.single {
	font-size: clamp(26px, 5vw, 34px);
	line-height: 1.25;
}
.page-content-single h2 {
	font-size: clamp(24px, 4.5vw, 32px);
	line-height: 1.3;
}
.page-content-single h3 {
	font-size: clamp(21px, 4vw, 28px);
	line-height: 1.35;
}
.page-content-single h4 {
	font-size: clamp(19px, 3.5vw, 24px);
	line-height: 1.4;
}

/* ============ 4. HOMEPAGE H1 (SEO) ============ */
/* The homepage H1 is the site title, hidden with Bootstrap .d-none because
   the logo already shows the brand. Keep it in the DOM (not display:none)
   using the standard visually-hidden pattern — no layout change. */
h1.site-title.d-none {
	display: block !important;
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ============ 5. BADGES / META / TAP TARGETS ============ */
/* Category chips: 10px/~18px tall -> 12px/~30px tall. */
.mg-blog-category a {
	font-size: 12px;
	padding: 7px 10px;
	line-height: 1.3;
}
/* Dropdown items: 9px -> 12px vertical padding (navigation.css:157). */
.navbar-wp .dropdown-menu > li > a,
.navbar-wp .dropdown-menu .dropdown-item {
	padding-top: 12px;
	padding-bottom: 12px;
}
/* Burger hit area: ~48x40 -> >=48x48. */
.navbar-toggler {
	min-width: 48px;
	min-height: 48px;
	padding: 0.75rem 1rem;
}
/* Mobile nav links: roomier tap targets (collapsed menu, <=991px). */
@media (max-width: 991px) {
	.navbar-wp .navbar-nav > li > a {
		padding: 14px 16px;
	}
}

/* ============ 6. STICKY NAV ============ */
/* Works because the child header.php places .mg-menu-full outside
   <header> (a sticky element cannot stick past its parent's box).
   ROOT CAUSE of the transparent-sticky defect (found by the 2 Dec
   desktop visual check): the theme's nav background lives in
   newsup/css/colors/default.css as `.mg-headwidget .navbar-wp`
   (#202f5b) — scoped under the <header> element (.mg-headwidget).
   Moving .mg-menu-full out of <header> orphaned the nav from that
   rule, so it went transparent and the links floated over photos and
   headlines. Fix: restore the theme's own colour on the moved wrapper
   itself, plus a subtle shadow so the bar separates from content when
   stuck. Admin-bar offset keeps it below the WP bar when logged in. */
.mg-menu-full {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: #202f5b;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
body.admin-bar .mg-menu-full {
	top: 32px;
}
@media (max-width: 782px) {
	body.admin-bar .mg-menu-full {
		top: 46px;
	}
}

/* ============ 7. MOBILE: horizontal-scroll guard + align bleed ============ */
/* The parent's .alignwide/.alignfull bleed (left:-20px, width:100%+40px)
   is only reset at min-width:570px — undo it below 570px at the source. */
@media (max-width: 569px) {
	.alignwide,
	.alignfull {
		left: 0;
		width: 100%;
		max-width: 100%;
	}
}
/* Defense-in-depth: clip horizontal overflow on the content area only.
   Deliberately NOT on html/body — a non-visible overflow on an ancestor
   can break the sticky nav (and the sticky sidebar). overflow:clip does
   not create a scroll container, so sticky keeps working. */
#content {
	overflow-x: clip;
}
