/*
 * LCCN mobile layout (2026-10-24)
 * Stopgap retrofit for the Gabfire Advanced Newspaper theme until the redesign.
 * All layout rules are inside the media query below, so the desktop layout (>= 980px) is untouched.
 * The only rule outside it hides the mobile menu button (added by mobile.js) on desktop.
 */
.lccn-menu-toggle { display: none; }

@media (max-width: 979px) {

	/* ---------- Base ---------- */
	html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
	body { font-size: 16px; line-height: 1.5; }
	*, *::before, *::after { box-sizing: border-box; }
	img, video, embed, object { max-width: 100% !important; height: auto !important; }
	iframe { max-width: 100% !important; }
	/* Some pasted excerpts are long runs of &nbsp; that cannot wrap otherwise */
	.wrapper p, .wrapper li, .wrapper h1, .wrapper h2, .wrapper h3, .wrapper a, .wrapper span { overflow-wrap: anywhere; }

	/* ---------- Fluid containers ---------- */
	.wrapper, #masthead, #header, #mainmenu, #submenu,
	#primarycontent, #secondarycontent, #subnews, #container,
	#footer, #footer_meta, .ad728 {
		width: auto !important;
		max-width: 100% !important;
		float: none !important;
	}
	.wrapper { padding: 0 12px !important; margin: 0 auto !important; }
	.ad728 { overflow: hidden; text-align: center; margin: 0 auto; }
	/* Fixed-size ads wider than the screen are scaled down by mobile.js (never cropped) */
	.lccn-fit { transform-origin: 0 0; vertical-align: top; }

	/* ---------- Columns stack to one ---------- */
	#primary-left, #primary-mid, #primary-right,
	#secondary-left, #secondary-mid, #secondary-right,
	#subnews_left, #subnews_right, #subnews_left .col,
	#main, #sidebar, .sidebarinner, .sidebar_left, .sidebar_right,
	.featuredpost, .postteaser, .featured-media,
	#featured-slider, .fea-slides, .slide_item, #fea-nav, #featured-nav,
	.section_shadow, #subnews .border {
		float: none !important;
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		border-left: 0 !important;
		border-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	#primary-left, #primary-mid, #primary-right,
	#secondary-left, #secondary-mid, #secondary-right,
	#subnews_left, #subnews_right, #subnews_left .col,
	#main, #sidebar, .sidebar_left, .sidebar_right {
		margin-bottom: 20px !important;
	}

	/* Featured slider (jQuery Cycle fade): keep it rotating, but fluid.
	   Cycle still controls which slide is shown; we only size the box and slides. */
	#featured-slider .fea-slides { position: relative !important; height: auto !important; aspect-ratio: 478 / 270; overflow: hidden; }
	#featured-slider .fea-slides .slide_item { top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; }
	#featured-slider .featured-media, #featured-slider .featured-media a { display: block; height: 100%; }
	#featured-slider .featured-media img.media { width: 100% !important; height: 100% !important; object-fit: cover; }
	#fea-nav { display: none !important; }

	/* ---------- Contrast: theme gold #A88110 is 3.6:1 on white; #7D5F00 is 5.97:1 (5.19:1 on #efefef) ---------- */
	a, .widgettitle a, .mastheadnav li.date,
	.mastheadnav li.current_page_item a, .mastheadnav li.current-cat a, .mastheadnav li.current-menu-item a,
	.mainnav li.current_page_item a, .mainnav li.current-cat a, .mainnav li.current-menu-item a,
	#header .themequote .quotecaption, #header .themequote .quotecaption a { color: #7d5f00; }
	#sidebar .sidebar_left .widgettitle, #sidebar .sidebar_right .widgettitle { background: #7d5f00; color: #fff; }
	.entry .entry_title { border-left-color: #7d5f00; }

	/* ---------- Masthead: date, Stay Connected, search ---------- */
	#masthead { padding: 8px 0 !important; height: auto !important; background-image: none !important; }
	.mastheadnav { float: none !important; width: auto !important; }
	.mastheadnav > li { padding: 4px 8px 4px 0 !important; }
	.mastheadnav > li + li { padding-left: 10px !important; }
	.mastheadnav li a.show { color: #333; display: inline-flex; align-items: center; min-height: 44px; }
	#search { width: auto !important; float: none !important; padding: 8px 0 0 !important; }
	#search form { float: none !important; width: 100% !important; display: flex; }
	#search input#s {
		float: none !important; flex: 1 1 auto; width: auto !important;
		font-size: 16px !important; min-height: 44px; padding: 8px 10px !important;
	}
	#search input[type="submit"], #search button, #search input[type="image"] { min-height: 44px; min-width: 44px; }

	/* ---------- Header logo ---------- */
	#header { height: auto !important; padding: 0 !important; }
	#header img, #header_banner { width: 100% !important; height: auto !important; }
	#header .logo, #header .banner, #header .themequote { float: none !important; width: auto !important; padding: 0 !important; }

	/* ---------- Main menu: horizontal scroll strip ---------- */
	#mainmenu { height: auto !important; }
	#mainmenu ul.mainnav {
		display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
		width: auto !important; height: auto !important; white-space: nowrap;
	}
	#mainmenu ul.mainnav > li { float: none !important; flex: 0 0 auto; width: auto !important; }
	#mainmenu ul.mainnav > li > a { display: flex !important; align-items: center; min-height: 44px; padding: 0 14px !important; font-size: 17px !important; }
	#mainmenu ul ul, #submenu ul ul { display: none !important; }

	/* ---------- Secondary menu: collapsed behind a toggle ---------- */
	.lccn-menu-toggle {
		display: flex; align-items: center; justify-content: space-between;
		width: 100%; min-height: 44px; margin: 0; padding: 0 14px;
		font: 600 16px/1.2 Arial, Helvetica, sans-serif; color: #111; background: #ececec;
		border: 0; border-bottom: 1px solid #c8c8c8; cursor: pointer; text-align: left;
	}
	.lccn-menu-toggle::after { content: "\25BE"; font-size: 18px; }
	.lccn-menu-toggle[aria-expanded="true"]::after { content: "\25B4"; }
	#submenu { height: auto !important; }
	#submenu ul.subnav { display: none; width: auto !important; height: auto !important; }
	#submenu.lccn-open ul.subnav { display: block; }
	#submenu ul.subnav > li { float: none !important; width: auto !important; border-bottom: 1px solid #d6d6d6; }
	#submenu ul.subnav > li > a { display: flex !important; align-items: center; min-height: 44px; padding: 8px 14px !important; font-size: 15px !important; white-space: normal; }

	/* ---------- Readable text ---------- */
	p, li, td, dd, dt, label, .postmeta, .entry, .entry p, .featuredpost p, .postteaser p {
		font-size: 16px !important; line-height: 1.55 !important;
	}
	p.postmeta, .postmeta, .postmeta a, .catname, span.catname, #bcrum, #bcrum a { font-size: 14px !important; }
	h1, .entry_title, h1.entry_title { font-size: 26px !important; line-height: 1.25 !important; }
	h2, h2.posttitle, h2.entry_title { font-size: 21px !important; line-height: 1.3 !important; }
	h3, .widgettitle { font-size: 18px !important; line-height: 1.3 !important; }
	.featuredpost h2 a, .entry h2 a, h2.posttitle a { display: inline-block; padding: 4px 0; }

	/* ---------- Post content ---------- */
	.entry .wp-caption, .wp-caption, .alignleft, .alignright, .aligncenter, figure {
		max-width: 100% !important; width: auto !important;
	}
	.entry .alignleft, .entry .alignright { float: none !important; display: block; margin: 0 auto 12px !important; }
	/* Older posts carry inline fixed widths (e.g. <div style="width:420px"> Issuu embeds) */
	.entry [style*="width"], .entry div, .entry object, .entry embed { max-width: 100% !important; }

	/* Jetpack sharing buttons and author box */
	.sharedaddy .sd-content ul li a, .sharedaddy .sd-content ul li button, .sharedaddy .sd-button {
		display: inline-flex !important; align-items: center; min-height: 44px; font-size: 14px !important;
	}
	.sharedaddy .sd-content ul li span { font-size: 14px !important; }
	.gab_authorInfo, .gab_authorInfo * { font-size: 16px !important; line-height: 1.5 !important; }

	/* Attachment (image) page navigation: theme uses #ccc (1.6:1) at 12px */
	.attachment-nav { font-size: 16px !important; color: #444 !important; }
	.attachment-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px !important; }

	/* Breadcrumb and homepage section-label links as tap targets */
	#bcrum a, .catname a { display: inline-flex; align-items: center; min-height: 44px; }
	.entry table { display: block; overflow-x: auto; max-width: 100%; }
	.entry pre { overflow-x: auto; white-space: pre; }
	.entry a { overflow-wrap: anywhere; }

	/* Comment form */
	#commentform input[type="text"], #commentform input[type="email"], #commentform input[type="url"],
	#commentform textarea { width: 100% !important; font-size: 16px !important; }
	#commentform input[type="submit"] { min-height: 44px; padding: 0 20px; font-size: 16px; }

	/* ---------- Pagination ---------- */
	.numbered-pagination { float: none !important; width: auto !important; }
	.numbered-pagination a, .numbered-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 16px !important; }

	/* ---------- Footer ---------- */
	#footer { padding-left: 12px !important; padding-right: 12px !important; }
	#footer ul.footercats, #footer ul.footerpages { width: auto !important; }
	#footer ul.footercats li, #footer ul.footerpages li { display: inline-block; float: none !important; }
	#footer ul.footercats li a, #footer ul.footerpages li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 15px !important; }
	#footer_meta p.footer-left-text, #footer_meta p.footer-right-text { float: none !important; width: auto !important; text-align: left !important; }
}
