/* TeluguNewsTime – front-end polish: card lift, section reveal, Ken Burns,
   category accents and a smooth back-to-top.

   Everything degrades safely: reveal states are only applied once polish.js
   has added .tnt-anim to <html>, so a reader without JS sees normal content.
   Reduced-motion readers get the layout and colour, none of the movement. */

/* ---------- 1. Cards: smooth lift + image zoom ---------- */
.hero-card,
.news-card,
.list-card,
.cat-block {
	transition: transform .28s cubic-bezier(.2, .7, .2, 1),
	            box-shadow .28s cubic-bezier(.2, .7, .2, 1);
	will-change: transform;
}
.news-card:hover,
.list-card:hover,
.hero-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .08);
}

/* The media box clips, the image inside scales – no layout shift. */
.hero-card__media,
.news-card__media,
.list-card__media,
.cat-block__lead a { overflow: hidden; }

.hero-card__media .tnt-thumb__img,
.news-card__media .tnt-thumb__img,
.list-card__media .tnt-thumb__img,
.cat-block__lead .tnt-thumb__img {
	transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}
.news-card:hover .tnt-thumb__img,
.list-card:hover .tnt-thumb__img,
.hero-card:hover .tnt-thumb__img,
.cat-block__lead a:hover .tnt-thumb__img { transform: scale(1.055); }

/* Headline nudges toward the brand red on hover. */
.news-card__title a,
.list-card__title a,
.cat-block__lead-title a { transition: color .2s; }

/* ---------- 2. Section reveal on scroll ---------- */
.tnt-anim .tnt-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}
.tnt-anim .tnt-reveal.tnt-in {
	opacity: 1;
	transform: none;
}
/* Stagger the cards inside a revealed block so it reads as one motion. */
.tnt-anim .tnt-reveal.tnt-in > * { animation: tnt-rise .5s both; }
.tnt-anim .tnt-reveal.tnt-in > *:nth-child(2) { animation-delay: .06s; }
.tnt-anim .tnt-reveal.tnt-in > *:nth-child(3) { animation-delay: .12s; }
.tnt-anim .tnt-reveal.tnt-in > *:nth-child(4) { animation-delay: .18s; }
@keyframes tnt-rise {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

/* ---------- 3. Ken Burns on the headline slider ---------- */
.tnt-slider__slide .tnt-slider__img { transform-origin: center center; }
.tnt-anim .tnt-slider__slide[aria-hidden="false"] .tnt-slider__img {
	animation: tnt-kenburns 9s ease-out forwards;
}
@keyframes tnt-kenburns {
	from { transform: scale(1); }
	to   { transform: scale(1.07); }
}

/* ---------- 4. Category sections: colour accents + breathing room ---------- */
.cat-block {
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}
.cat-block + .cat-block { margin-top: 4px; }

/* A coloured rule under each section heading, tinted per category. */
.cat-block__head,
.cat-block > h2,
.cat-block > header { position: relative; }

.tnt-cat-telangana      { --tnt-accent: #e30613; }
.tnt-cat-andhra-pradesh { --tnt-accent: #0b7a3b; }
.tnt-cat-hyderabad      { --tnt-accent: #065ea8; }
.tnt-cat-national       { --tnt-accent: #37474f; }
.tnt-cat-international  { --tnt-accent: #1565c0; }
.tnt-cat-politics       { --tnt-accent: #7b1fa2; }
.tnt-cat-cinema         { --tnt-accent: #c2185b; }
.tnt-cat-sports         { --tnt-accent: #2e7d32; }
.tnt-cat-business       { --tnt-accent: #00695c; }
.tnt-cat-technology     { --tnt-accent: #4527a0; }
.tnt-cat-lifestyle      { --tnt-accent: #ad1457; }
.tnt-cat-education      { --tnt-accent: #0277bd; }
.tnt-cat-jobs           { --tnt-accent: #ef6c00; }

/* Left accent stripe that grows in on reveal. */
.tnt-anim .cat-block::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 3px;
	background: var(--tnt-accent, #e30613);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1) .1s;
}
.cat-block { position: relative; }
.tnt-anim .cat-block.tnt-in::before { transform: scaleY(1); }

/* ---------- 5. Back to top ---------- */
.back-to-top {
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(.9);
	transition: opacity .25s, transform .25s cubic-bezier(.2, .7, .2, 1), visibility .25s, background .2s;
}
.back-to-top.tnt-show {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.back-to-top:hover { transform: translateY(-2px); }

/* ---------- Respect the reader's motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
	.tnt-anim .tnt-reveal,
	.tnt-anim .tnt-reveal.tnt-in {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.tnt-anim .tnt-reveal.tnt-in > * { animation: none !important; }
	.tnt-anim .tnt-slider__slide .tnt-slider__img { animation: none !important; }
	.tnt-anim .cat-block::before { transform: scaleY(1) !important; transition: none !important; }
	.news-card:hover, .list-card:hover, .hero-card:hover { transform: none; }
	.news-card:hover .tnt-thumb__img,
	.list-card:hover .tnt-thumb__img,
	.hero-card:hover .tnt-thumb__img,
	.cat-block__lead a:hover .tnt-thumb__img { transform: none; }
	.back-to-top { transition: none; }
}
