/*!
 * UrduPaper utility classes — drop-in replacement for the bundled custom
 * Bootstrap (16-column grid + spacing/visibility utilities + minimal nav).
 *
 * Class contracts match the legacy Bootstrap build so existing templates
 * (~50 PHP files) keep working without edits. New code can also use these.
 *
 * Breakpoints (BS3-style):
 *   xs: <768px (always applied)
 *   sm: ≥768px
 *   md: ≥992px
 *   lg: ≥1200px
 */

/* ---------- Base reset (the bits of Bootstrap's reset the theme depends on) ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
}
body {
	font-size: 14px;
	line-height: 1.42857143;
	color: #333;
}
a {
	color: inherit;
	text-decoration: none;
	background-color: transparent;
}
a:hover,
a:focus {
	text-decoration: underline;
}
a:focus {
	outline: thin dotted;
	outline-offset: -2px;
}
img {
	vertical-align: middle;
	max-width: 100%;
	height: auto;
}
figure { margin: 0; }
hr {
	margin-top: 20px;
	margin-bottom: 20px;
	border: 0;
	border-top: 1px solid #eee;
}
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}
button { cursor: pointer; }

/* ---------- Containers ---------- */
.container {
	width: 100%;
	max-width: 1170px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 15px;
	padding-left: 15px;
}
.container-fluid {
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
	margin-right: auto;
	margin-left: auto;
}
@media (min-width: 768px)  { .container { max-width: 750px; } }
@media (min-width: 992px)  { .container { max-width: 970px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }
@media (min-width: 1400px) { .container { max-width: 1370px; } }
/* ---------- Row ---------- */
.row {
	margin-right: 0px;
	margin-left: 0px;
}
.row::before,
.row::after { content: " "; display: table; }
.row::after { clear: both; }

/* ---------- 16-column grid ---------- */
[class*="col-xs-"],
[class*="col-sm-"],
[class*="col-md-"],
[class*="col-lg-"] {
	position: relative;
	min-height: 1px;
	padding-right: 15px;
	padding-left: 15px;
}
[class*="col-xs-"] { float: left; }

.col-xs-1  { width: 6.25%; }
.col-xs-2  { width: 12.5%; }
.col-xs-3  { width: 18.75%; }
.col-xs-4  { width: 25%; }
.col-xs-5  { width: 31.25%; }
.col-xs-6  { width: 37.5%; }
.col-xs-7  { width: 43.75%; }
.col-xs-8  { width: 50%; }
.col-xs-9  { width: 56.25%; }
.col-xs-10 { width: 62.5%; }
.col-xs-11 { width: 68.75%; }
.col-xs-12 { width: 75%; }
.col-xs-13 { width: 81.25%; }
.col-xs-14 { width: 87.5%; }
.col-xs-15 { width: 93.75%; }
.col-xs-16 { width: 100%; }

@media (min-width: 768px) {
	[class*="col-sm-"] { float: left; }
	.col-sm-1  { width: 6.25%; }
	.col-sm-2  { width: 12.5%; }
	.col-sm-3  { width: 18.75%; }
	.col-sm-4  { width: 25%; }
	.col-sm-5  { width: 31.25%; }
	.col-sm-6  { width: 37.5%; }
	.col-sm-7  { width: 43.75%; }
	.col-sm-8  { width: 50%; }
	.col-sm-9  { width: 56.25%; }
	.col-sm-10 { width: 62.5%; }
	.col-sm-11 { width: 68.75%; }
	.col-sm-12 { width: 75%; }
	.col-sm-13 { width: 81.25%; }
	.col-sm-14 { width: 87.5%; }
	.col-sm-15 { width: 93.75%; }
	.col-sm-16 { width: 100%; }
}
@media (min-width: 992px) {
	[class*="col-md-"] { float: left; }
	.col-md-1  { width: 6.25%; }
	.col-md-2  { width: 12.5%; }
	.col-md-3  { width: 18.75%; }
	.col-md-4  { width: 25%; }
	.col-md-5  { width: 31.25%; }
	.col-md-6  { width: 37.5%; }
	.col-md-7  { width: 43.75%; }
	.col-md-8  { width: 50%; }
	.col-md-9  { width: 56.25%; }
	.col-md-10 { width: 62.5%; }
	.col-md-11 { width: 68.75%; }
	.col-md-12 { width: 75%; }
	.col-md-13 { width: 81.25%; }
	.col-md-14 { width: 87.5%; }
	.col-md-15 { width: 93.75%; }
	.col-md-16 { width: 100%; }
}
@media (min-width: 1200px) {
	[class*="col-lg-"] { float: left; }
	.col-lg-1  { width: 6.25%; }
	.col-lg-2  { width: 12.5%; }
	.col-lg-3  { width: 18.75%; }
	.col-lg-4  { width: 25%; }
	.col-lg-5  { width: 31.25%; }
	.col-lg-6  { width: 37.5%; }
	.col-lg-7  { width: 43.75%; }
	.col-lg-8  { width: 50%; }
	.col-lg-9  { width: 56.25%; }
	.col-lg-10 { width: 62.5%; }
	.col-lg-11 { width: 68.75%; }
	.col-lg-12 { width: 75%; }
	.col-lg-13 { width: 81.25%; }
	.col-lg-14 { width: 87.5%; }
	.col-lg-15 { width: 93.75%; }
	.col-lg-16 { width: 100%; }
}

/* ---------- Spacing utilities (px values used in templates) ---------- */
/* Padding */
.pl-0  { padding-left:  0    !important; }
.pl-5  { padding-left:  5px  !important; }
.pl-10 { padding-left:  10px !important; }
.pl-15 { padding-left:  15px !important; }
.pl-20 { padding-left:  20px !important; }
.pr-0  { padding-right: 0    !important; }
.pr-5  { padding-right: 5px  !important; }
.pr-10 { padding-right: 10px !important; }
.pr-15 { padding-right: 15px !important; }
.pr-20 { padding-right: 20px !important; }
.pt-0  { padding-top:   0    !important; }
.pt-5  { padding-top:   5px  !important; }
.pt-10 { padding-top:   10px !important; }
.pt-15 { padding-top:   15px !important; }
.pt-20 { padding-top:   20px !important; }
.pb-0  { padding-bottom:0    !important; }
.pb-5  { padding-bottom:5px  !important; }
.pb-10 { padding-bottom:10px !important; }
.pb-15 { padding-bottom:15px !important; }
.pb-20 { padding-bottom:20px !important; }
/* Margin */
.ml-0  { margin-left:  0    !important; }
.ml-5  { margin-left:  5px  !important; }
.ml-10 { margin-left:  10px !important; }
.ml-15 { margin-left:  15px !important; }
.ml-20 { margin-left:  20px !important; }
.mr-0  { margin-right: 0    !important; }
.mr-5  { margin-right: 5px  !important; }
.mr-10 { margin-right: 10px !important; }
.mr-15 { margin-right: 15px !important; }
.mr-20 { margin-right: 20px !important; }
.mt-0  { margin-top:   0    !important; }
.mt-5  { margin-top:   5px  !important; }
.mt-10 { margin-top:   10px !important; }
.mt-15 { margin-top:   15px !important; }
.mt-20 { margin-top:   20px !important; }
.mb-0  { margin-bottom:0    !important; }
.mb-5  { margin-bottom:5px  !important; }
.mb-10 { margin-bottom:10px !important; }
.mb-15 { margin-bottom:15px !important; }
.mb-20 { margin-bottom:20px !important; }

/* ---------- Floats / clearfix ---------- */
.pull-right { float: right !important; }
.pull-left  { float: left  !important; }
.clearfix::before,
.clearfix::after { content: " "; display: table; }
.clearfix::after { clear: both; }
.center-block { display: block; margin-right: auto; margin-left: auto; }

/* ---------- Text alignment ---------- */
.text-left    { text-align: left;    }
.text-right   { text-align: right;   }
.text-center  { text-align: center;  }
.text-justify { text-align: justify; }
.text-nowrap  { white-space: nowrap; }

/* ---------- Border Radiuses ---------- */
.rounded { border-radius: 50%; }
.rounded-top { border-top-left-radius: 50%; border-top-right-radius: 50%; }
.rounded-right { border-top-right-radius: 50%; border-bottom-right-radius: 50%; }
.rounded-bottom { border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; }
.rounded-left { border-top-left-radius: 50%; border-bottom-left-radius: 50%; }
.rounded-0 { border-radius: 0; }
.rounded-top-0 { border-top-left-radius: 0; border-top-right-radius: 0; }
.rounded-right-0 { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rounded-bottom-0 { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.rounded-left-0 { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rounded-sm { border-radius: 4px; }
.rounded-top-sm { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.rounded-right-sm { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.rounded-bottom-sm { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.rounded-left-sm { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.rounded-top-lg { border-top-left-radius: 8px; border-top-right-radius: 8px; }
.rounded-right-lg { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.rounded-bottom-lg { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.rounded-left-lg { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
/* ---------- Responsive visibility (BS3 hidden-* contract) ---------- */
@media (max-width: 767px) {
	.hidden-xs { display: none !important; }
}
@media (min-width: 768px) and (max-width: 991px) {
	.hidden-sm { display: none !important; }
}
@media (min-width: 992px) and (max-width: 1199px) {
	.hidden-md { display: none !important; }
}
@media (min-width: 1200px) {
	.hidden-lg { display: none !important; }
}
.show { display: block !important; }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* ---------- Buttons (minimal) ---------- */
.btn {
	display: inline-block;
	padding: 6px 12px;
	margin-bottom: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.42857143;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	user-select: none;
	background-image: none;
	border: 1px solid transparent;
	border-radius: 4px;
	text-decoration: none;
}
.btn:focus,
.btn:hover { text-decoration: none; }
.btn-default {
	color: #333;
	background-color: #fff;
	border-color: #ccc;
}
.btn-primary {
	color: #fff;
	background-color: #337ab7;
	border-color: #2e6da4;
}
.btn-block { display: block; width: 100%; }

/* ---------- News ticker (native replacement for jQuery liMarquee) ---------- */
.newsTicker {
	overflow: hidden;
	width: 100%;
	white-space: nowrap;
	position: relative;
	/* Force LTR positioning context so the inline-flex track starts at x=0
	 * (in an RTL parent, inline children would start at the right edge,
	 * which combined with translateX(-50%) pushes the track off-screen). */
	direction: ltr;
}
.newsTicker .upaper-ticker-track {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	animation: upaper-ticker-scroll 60s linear infinite;
	will-change: transform;
	padding: 0;
	margin: 0;
	direction: ltr;
}
.newsTicker:hover .upaper-ticker-track,
.newsTicker:focus-within .upaper-ticker-track {
	animation-play-state: paused;
}
.newsTicker .upaper-ticker-track > a {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none;
	/* Item text itself is still RTL (Urdu); only the row layout is LTR. */
	direction: rtl;
}
/* JS doubles the content inside the track. Animating from -50% back to 0
 * makes the track slide RIGHTWARD: items enter from the left edge of the
 * window and exit on the right (RTL reading direction). */
@keyframes upaper-ticker-scroll {
	from { transform: translateX( -50% ); }
	to   { transform: translateX( 0 ); }
}
@media (prefers-reduced-motion: reduce) {
	.newsTicker .upaper-ticker-track {
		animation: none;
	}
}

/* ---------- Priority+ overflow menu (".upaper-nav-more") ---------- */
.main-menu {
	white-space: nowrap;
}
.main-menu li {
	white-space: nowrap;
}
.upaper-nav-more {
	position: relative;
}
.upaper-nav-more > a::after {
	content: " ▾";
	font-size: 0.75em;
	margin-right: 4px;
	opacity: 0.7;
}
.upaper-nav-more > .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;        /* RTL: open on the left side of the More item */
	right: auto;
	min-width: 180px;
	z-index: 99999;
	margin: 0;
	padding: 0;
	list-style: none;
	background: var( --primary-color, #121212 );
}
.upaper-nav-more:hover > .sub-menu,
.upaper-nav-more:focus-within > .sub-menu {
	display: block;
}
.upaper-nav-more > .sub-menu > li {
	float: none;
	display: block;
	border-left: none;
	border-right: none;
	border-top: 1px solid rgba( 0, 0, 0, 0.4 );
}
.upaper-nav-more > .sub-menu > li > a {
	display: block;
	padding: 10px 15px !important;
	color: #fff;
	text-decoration: none;
	height: auto !important;
	top: 0 !important;
}
.upaper-nav-more > .sub-menu > li > a:hover {
	background: var( --accent-color, #f4ac04 );
}

/* ---------- Navbar (minimal — only what header-desktop.php uses) ---------- */
.navbar {
	position: relative;
	min-height: 50px;
	margin-bottom: 20px;
	border: 1px solid transparent;
}
.navbar-default {
	background-color: #f8f8f8;
	border-color: transparent;
}
.navbar-header { float: none; }
@media (min-width: 768px) {
	.navbar-header { float: left; }
	.navbar-toggle { display: none; }
	.navbar-collapse { display: block !important; max-height: none; padding: 0; overflow: visible !important; }
	.navbar-collapse.collapse { display: block !important; }
}
.navbar-toggle {
	position: relative;
	float: right;
	padding: 9px 10px;
	margin-top: 8px;
	margin-right: 15px;
	margin-bottom: 8px;
	background-color: transparent;
	background-image: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
}
.navbar-toggle .icon-bar {
	display: block;
	width: 22px;
	height: 2px;
	background-color: #888;
	border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; }
.navbar-collapse {
	overflow-x: visible;
	padding-right: 15px;
	padding-left: 15px;
	border-top: 1px solid transparent;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.navbar-collapse.collapse {
	display: none;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease;
}
.navbar-collapse.collapse.in {
	display: block;
	max-height: 1000px;
}
.navbar-nav {
	margin: 7.5px -15px;
	padding-left: 0;
	list-style: none;
}
.navbar-nav > li { position: relative; display: block; }
.navbar-nav > li > a {
	position: relative;
	display: block;
	padding: 10px 15px;
	text-decoration: none;
}
@media (min-width: 768px) {
	.navbar-nav { float: left; margin: 0; }
	.navbar-nav > li { float: left; }
	.navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; }
}
