/* ==========================================================================
   SwissTamilMedia Web Child – v1.0.0
   Loaded after newsroom-pro/assets/css/main.css
   ========================================================================== */

:root {
	--nrpc-site-bg: #eef0f3;      /* light grey site background */
	--nrpc-box-bg: #ffffff;       /* white news boxes */
	--nrpc-box-radius: 8px;
	--nrpc-box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
	--nrpc-line: #d9dde3;
}

/* 1. Light grey site background ------------------------------------------ */
body {
	background: var(--nrpc-site-bg);
}

/* White boxes so the news stands out from the grey background */
.sidebar .widget {
	background: var(--nrpc-box-bg);
	border-radius: var(--nrpc-box-radius);
	box-shadow: var(--nrpc-box-shadow);
	padding: 14px;
	margin-bottom: 18px;
}
.sidebar .widget:last-child { margin-bottom: 0; }

body:not(.home):not(.blog) .content-area {
	background: var(--nrpc-box-bg);
	border-radius: var(--nrpc-box-radius);
	box-shadow: var(--nrpc-box-shadow);
	padding: 22px;
}

/* 2. Homepage category section = white box with tab title --------------- */
.home-section {
	container-type: inline-size;
	container-name: nrpc-section;
	background: var(--nrpc-box-bg);
	border: 0;
	border-radius: var(--nrpc-box-radius);
	box-shadow: var(--nrpc-box-shadow);
	padding: 16px 16px 18px;
	margin-bottom: 22px;
}
.home-section:last-child {
	margin-bottom: 0;
	padding-bottom: 18px;
}

/* Tab title with a thin line under the whole box (like the design) */
.home-section .home-section__head {
	align-items: flex-end;
	margin-bottom: 18px;
	border-bottom: 2px solid var(--section-color);
}
.home-section .home-section__head::after { display: none; }
.home-section .home-section__ribbon {
	font-size: 1.02rem;
	padding: 8px 20px 7px;
	border-radius: 6px 6px 0 0;
	box-shadow: none;
	margin-bottom: -2px;
	line-height: 1.5;
}

/* 3. Layout of the 4 stories -------------------------------------------- */
/* Default (narrow boxes / phones): lead story on top, 3 stories below. */
.home-section .home-section__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}
.home-section .home-section__grid > .card {
	padding: 14px 0;
	border-top: 1px dashed var(--nrpc-line);
}
.home-section .home-section__grid > .card:first-child {
	padding-top: 0;
	border-top: 0;
}
.home-section .home-section__grid > .card:last-child { padding-bottom: 0; }

/* Lead story (first card): big image + bold full title under it */
.home-section .home-section__grid > .card:first-child {
	display: block;
}
.home-section .home-section__grid > .card:first-child .card__media {
	width: 100%;
	flex: none;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
}
.home-section .home-section__grid > .card:first-child .card__title {
	font-size: 1.18rem;
	font-weight: 700;
	line-height: 1.55;
	margin: 14px 0 0;
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

/* The other 3 stories: thumbnail left, full title right */
.home-section .home-section__grid > .card:not(:first-child) {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.home-section .home-section__grid > .card:not(:first-child) .card__media {
	flex: 0 0 112px;
	width: 112px;
	aspect-ratio: 3 / 2;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.home-section .home-section__grid > .card:not(:first-child) .card__title {
	font-size: .97rem;
	font-weight: 500;
	line-height: 1.55;
	margin: 0;
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
	word-break: break-word;
}

.home-section .card__title a:hover { color: var(--section-color, var(--nrp-primary)); }

/* Wide boxes (desktop / tablet): lead left, 3 stories stacked right */
@container nrpc-section (min-width: 540px) {
	.home-section .home-section__grid {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		grid-auto-rows: auto;
		column-gap: 20px;
	}
	.home-section .home-section__grid > .card:first-child {
		grid-column: 1;
		grid-row: 1 / span 3;
		padding-bottom: 0;
	}
	.home-section .home-section__grid > .card:not(:first-child) {
		grid-column: 2;
	}
	.home-section .home-section__grid > .card:nth-child(2) {
		padding-top: 0;
		border-top: 0;
	}
	.home-section .home-section__grid > .card:not(:first-child) .card__media {
		flex-basis: 104px;
		width: 104px;
	}
	.home-section .home-section__grid > .card:not(:first-child) .card__title {
		font-size: .93rem;
	}
}

/* "More" link */
.home-section .home-section__more {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px dashed var(--nrpc-line);
}
.home-section .home-section__more a { color: var(--section-color, #2563eb); }

/* 4. Mobile ------------------------------------------------------------- */
@media (max-width: 640px) {
	.home-section {
		padding: 12px 12px 14px;
		margin-bottom: 16px;
	}
	.home-section .home-section__head { margin-bottom: 14px; }
	.home-section .home-section__ribbon {
		font-size: .95rem;
		padding: 7px 16px 6px;
	}
	/* undo parent's mobile grid borders */
	.home-section .home-section__grid > :nth-child(n+2) {
		padding-top: 14px;
		border-top: 1px dashed var(--nrpc-line);
	}
	.home-section .home-section__grid > .card:first-child .card__title {
		font-size: 1.1rem;
		margin-top: 12px;
	}
	.home-section .home-section__grid > .card:not(:first-child) .card__media {
		flex-basis: 108px;
		width: 108px;
	}
	.home-section .home-section__grid > .card:not(:first-child) .card__title {
		font-size: .95rem;
	}
	.sidebar .widget { padding: 12px; }
	body:not(.home):not(.blog) .content-area { padding: 14px; border-radius: 6px; }
}

@media (max-width: 380px) {
	.home-section .home-section__grid > .card:not(:first-child) .card__media {
		flex-basis: 92px;
		width: 92px;
	}
	.home-section .home-section__grid > .card:not(:first-child) .card__title {
		font-size: .9rem;
	}
}

/* ==========================================================================
   v1.1.0 additions
   ========================================================================== */

/* 5. "இன்றைய விளம்பரம்" sidebar title – red background ------------------ */
.sidebar .smallads-title,
.smallads-title {
	background: var(--nrp-primary, #c8102e);
	color: var(--nrp-on-primary, #fff);
	border: 0;
	border-radius: 6px;
	padding: 9px 12px;
	margin: 0 0 10px;
	text-align: center;
	font-size: .92rem;
	font-weight: 800;
	line-height: 1.4;
	box-shadow: 0 2px 6px rgba(200, 16, 46, .25);
}

/* 6. "முக்கிய செய்தி" headline – a little smaller ----------------------- */
.breaking-feature .breaking-feature__title {
	font-size: 1.12rem;
	line-height: 1.5;
}
@media (max-width: 640px) {
	.breaking-feature .breaking-feature__title { font-size: 1.02rem; }
}

/* 7. Rounded image corners everywhere ---------------------------------- */
.card__media,
.list-item__media,
.breaking-feature__media,
.video-feature__media,
.video-item__media,
.obit-card__media,
.entry-thumb,
.entry-thumb img,
.entry-content img,
.wp-post-image {
	border-radius: 8px;
}
.card__media,
.list-item__media,
.breaking-feature__media,
.video-feature__media,
.video-item__media,
.entry-thumb {
	overflow: hidden;
}
.hero__item { border-radius: 8px; overflow: hidden; }
.nrp-smallad { border-radius: 8px; }
.home-section .home-section__grid > .card:not(:first-child) .card__media,
.video-item__media { border-radius: 6px; }

/* 8. Share bar – highlighted, with SwissTamilRadio DAB+ badge on the right */
.entry-share-row {
	background: linear-gradient(90deg, #f1f5fb 0%, #fdf2f4 100%);
	border: 1px solid #e3e8f0;
	border-radius: 10px;
	padding: 10px 14px;
	margin: 0 0 22px;
	gap: 12px;
}
.entry-share-row .share__label {
	font-weight: 800;
	color: var(--nrp-text);
}

.nrpc-dab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(17, 24, 39, .25);
	transition: transform .2s, background .2s;
}
.nrpc-dab:hover,
.nrpc-dab:focus-visible {
	color: #fff;
	background: var(--nrp-primary, #c8102e);
	transform: translateY(-1px);
}
.nrpc-dab__dot {
	position: relative;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ff2d3f;
	flex: none;
	animation: nrpc-blink 1.1s ease-in-out infinite;
}
.nrpc-dab__dot::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid #ff2d3f;
	animation: nrpc-pulse 1.6s ease-out infinite;
}
.nrpc-dab__tag {
	background: #ff2d3f;
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .03em;
}
.nrpc-dab:hover .nrpc-dab__tag { background: #fff; color: var(--nrp-primary, #c8102e); }

@keyframes nrpc-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes nrpc-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.nrpc-dab__dot, .nrpc-dab__dot::after { animation: none; }
}

@media (max-width: 640px) {
	.entry-share-row { padding: 10px 12px; }
	.nrpc-dab { font-size: .76rem; padding: 5px 10px 5px 9px; }
}
@media (max-width: 420px) {
	.nrpc-dab { margin-left: 0; }
}

/* 9. Related News – 6 posts (3 x 2 desktop, 2 x 3 mobile) --------------- */
.related .related__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 18px;
}
.related .card__title {
	font-size: .98rem;
	line-height: 1.5;
	margin: .55em 0 .2em;
}
@media (max-width: 640px) {
	.related .related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 12px;
	}
	.related .card__title { font-size: .9rem; }
	.related .card__meta { font-size: .75rem; }
}
