/*
Theme Name:   ColorMag Child - PressNews24
Description:  PressNews24 customizations for ColorMag. Put all custom CSS here so ColorMag updates don't overwrite it.
Template:     colormag
Version:      1.0.0
Text Domain:  colormag-child
*/

/* Bangla font: SolaimanLipi, self-hosted in fonts/ */
@font-face {
	font-family: 'SolaimanLipi';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/solaimanlipi-normal-v1.0.woff2') format('woff2'),
		url('fonts/solaimanlipi-normal-v1.0.ttf') format('truetype');
}

@font-face {
	font-family: 'SolaimanLipi';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('fonts/solaimanlipi-bold-v1.0.woff2') format('woff2'),
		url('fonts/solaimanlipi-bold-v1.0.ttf') format('truetype');
}

body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6,
.cm-entry-title,
.cm-primary-nav li,
.cm-primary-nav a,
.cm-header .cm-menu-toggle,
.cm-site-description,
blockquote p,
.wp-block-quote p {
	font-family: 'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif;
}

/* Bangla script needs a bit more line height than Latin */
body,
.cm-entry-summary,
.entry-content {
	line-height: 1.8;
}

/* Readable text size (ColorMag default is 14px) */
.cm-entry-summary,
.cm-entry-summary p,
.cm-entry-summary li {
	font-size: 17px;
	line-height: 1.8;
}

/* Full article and page text */
.single .cm-entry-summary,
.single .cm-entry-summary p,
.single .cm-entry-summary li,
.page .cm-entry-summary,
.page .cm-entry-summary p,
.page .cm-entry-summary li {
	font-size: 19px;
	line-height: 1.9;
	color: #222;
}

/* Slogan under the header logo (added in functions.php) */
.cm-site-branding {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.pn-slogan {
	margin: 6px 0 0;
	color: #009926;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	letter-spacing: 0.5px;
}

/* Footer logo column: left-aligned, slogan sized to the 272px logo */
.pn-slogan--footer {
	margin-top: 10px;
	font-size: 17px;
	text-align: left;
}

@media (max-width: 768px) {
	.pn-slogan {
		font-size: 16px;
	}
}

/* Headlines in the homepage/sidebar post lists (ColorMag default is 14px) */
.cm-featured-posts .cm-entry-title {
	font-size: 18px;
	line-height: 1.5;
}

.cm-featured-posts .cm-first-post .cm-entry-title {
	font-size: 26px;
}

/* Sidebar "সর্বশেষ সংবাদ" list */
.widget_recent_entries li a {
	font-size: 16px;
	line-height: 1.6;
}

@media (max-width: 768px) {
	.cm-featured-posts .cm-entry-title {
		font-size: 17px;
	}

	.cm-featured-posts .cm-first-post .cm-entry-title {
		font-size: 22px;
	}
}

@media (max-width: 768px) {
	.single .cm-entry-summary,
	.single .cm-entry-summary p,
	.single .cm-entry-summary li,
	.page .cm-entry-summary,
	.page .cm-entry-summary p,
	.page .cm-entry-summary li {
		font-size: 18px;
	}

	/* Old articles use inline text-align: justify, which leaves big word gaps on narrow screens */
	.cm-entry-summary p,
	.cm-entry-summary div {
		text-align: left !important;
	}
}


/* ==========================================================================
   Professional polish
   ========================================================================== */

/* One brand colour: ColorMag's palette variable still defaulted to blue */
:root,
body {
	--cm-color-1: #009926 !important;
	--pn-green: #009926;
	--pn-green-dark: #007a1f;
	--pn-red: #d32f2f;
}

a:hover {
	color: var(--pn-green);
}

/* ---- Breaking-news ticker in the top bar ---- */
.cm-header-top-row .breaking-news {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.breaking-news .breaking-news-latest {
	position: relative;
	flex-shrink: 0;
	padding: 4px 12px 4px 26px;
	border-radius: 3px;
	background: var(--pn-red);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

/* Pulsing "live" dot */
.breaking-news .breaking-news-latest::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 10px;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-radius: 50%;
	background: #fff;
	animation: pn-pulse 1.4s ease-in-out infinite;
}

@keyframes pn-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.3; transform: scale(0.7); }
}

.breaking-news .newsticker {
	min-width: 0;
	margin: 0;
}

.breaking-news .newsticker li a {
	display: block;
	overflow: hidden;
	color: #222;
	font-size: 15px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.breaking-news .newsticker li a:hover {
	color: var(--pn-green);
}

/* Phones: the ticker is the only top-bar item; let it take the full width instead of centring
   (centring pushed the label off the left edge) */
.cm-mobile-row .cm-header-top-row .cm-header-left-col,
.cm-mobile-row .cm-header-top-row .cm-header-right-col {
	display: none;
}

.cm-mobile-row .cm-header-top-row .cm-header-center-col {
	flex: 1 1 100%;
	justify-content: flex-start;
	min-width: 0;
	max-width: 100%;
}

.cm-mobile-row .breaking-news {
	width: 100%;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.breaking-news .breaking-news-latest::before {
		animation: none;
	}
}

/* ---- Header ---- */
.cm-header-builder .cm-mobile-row .cm-header-bottom-row,
.cm-header-builder.cm-full-width .cm-header-bottom-row {
	border-top-color: var(--pn-green);
}

/* ---- Section headings on the homepage and sidebar ---- */
.cm-primary .cm-widget-title,
.cm-secondary .cm-widget-title,
#cm-tertiary .cm-widget-title {
	border-bottom: 2px solid var(--pn-green);
}

.cm-primary .cm-widget-title span,
.cm-secondary .cm-widget-title span {
	padding: 6px 14px;
	font-size: 18px;
}

/* Post cards: subtle depth on hover */
.cm-featured-posts .cm-post,
.cm-posts .post {
	transition: box-shadow 0.2s ease;
}

.cm-featured-posts .cm-post:hover,
.cm-posts .post:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Buttons ("বিস্তারিত", search, pagination) */
.cm-entry-button,
.search-wrap button,
.page-numbers.current,
button,
input[type=submit] {
	background-color: var(--pn-green);
}

.cm-entry-button:hover,
.search-wrap button:hover,
button:hover,
input[type=submit]:hover {
	background-color: var(--pn-green-dark);
}

/* ---- Breadcrumbs ---- */
.breadcrumb-wrap {
	margin-bottom: 16px;
	font-size: 15px;
}

.breadcrumb-wrap a {
	color: var(--pn-green);
}

.home .breadcrumb-wrap {
	display: none;
}

/* ---- Share buttons under articles ---- */
.pn-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid #e5e5e5;
}

.pn-share__label {
	margin-right: 4px;
	color: #444;
	font-size: 16px;
	font-weight: 700;
}

.pn-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff !important;
	font-size: 17px;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.pn-share__btn:hover {
	opacity: 0.9;
	transform: translateY(-2px);
}

.pn-share__btn--facebook { background: #1877f2; }
.pn-share__btn--whatsapp { background: #25d366; }
.pn-share__btn--x { background: #000; }
.pn-share__btn--telegram { background: #229ed9; }
.pn-share__btn--copy,
.pn-share__btn--copy:hover { background: #6b7280; }
.pn-share__btn--copy.is-copied { background: var(--pn-green); }

/* ---- Footer ---- */
.cm-footer-builder .cm-footer-main-row {
	border-top: 4px solid var(--pn-green);
	background: #f4f6f4;
}

.cm-footer-builder .cm-footer-bottom-row {
	background: #1f2320;
}

.cm-footer-builder .cm-widget-title {
	border-bottom-color: var(--pn-green);
}
