/*
Theme Name: Today in Nepal
Author: WordPress Telex
Description: A clean, modern WordPress block theme for Nepali daily news — inspired by the Aero FSE aesthetic with the crimson and blue of the Nepali flag as accent colors.
Version: 0.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: today-in-nepal
Tags: block-theme, full-site-editing, editorial, news, light

Today in Nepal — Independent Reporting from the Heart of the Himalayas
*/

/* ---- Equal card layout ---- */
.equal-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
	flex-grow: 0;
}
.equal-cards > .wp-block-column > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
.equal-cards .cta-bottom {
	margin-top: auto;
	justify-content: center;
}

/* Remove margin above footer */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* ---- Header styling ---- */
.site-header-nav {
	z-index: 100;
}
.site-header-nav > .wp-block-group:last-child {
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

/* Navigation link hover effect */
.site-header-nav .wp-block-navigation a {
	position: relative;
	transition: color 0.2s ease;
}
.site-header-nav .wp-block-navigation a::after {
	content: "";
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: #CC0000;
	transition: width 0.25s ease;
}
.site-header-nav .wp-block-navigation a:hover::after {
	width: 100%;
}

/* ---- Breaking badge ---- */
.nav-breaking-badge a {
	font-family: 'DM Sans', sans-serif !important;
	font-weight: 600 !important;
	font-size: 11px !important;
	color: #FFFFFF !important;
	background: #CC0000;
	padding: 4px 10px;
	border-radius: 3px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}
.nav-breaking-badge a:hover {
	background: #990000;
}

/* ---- Category tag badge ---- */
.category-tag {
	display: inline-block;
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 3px;
	padding: 3px 10px;
}

/* ---- Story cards ---- */
.story-card {
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.story-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
	transform: translateY(-3px);
}
.story-card img {
	transition: transform 0.4s ease;
}
.story-card:hover img {
	transform: scale(1.03);
}

/* ---- Section heading with line ---- */
.section-label {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.section-label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--wp--preset--color--border);
}

/* ---- Date selector styling ---- */
.date-selector-wrap {
	background: var(--wp--preset--color--body);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: 2.5rem;
}

/* ---- Hero section ---- */
.hero-cover .wp-block-cover__image-background {
	filter: brightness(0.85) contrast(1.05);
}

/* ---- Ticker row ---- */
.ticker-row {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.ticker-label {
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
}
.ticker-dot {
	width: 4px;
	height: 4px;
	background: rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	display: inline-block;
}

/* ---- Gold divider line ---- */
.gold-divider {
	width: 80px;
	height: 2px;
	background: var(--wp--preset--color--crimson);
	border: none;
	margin: 0;
	border-radius: 1px;
}

/* ---- Scroll hint ---- */
@keyframes scrollBounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(4px); }
}
.scroll-hint svg {
	animation: scrollBounce 2s ease-in-out infinite;
}

/* ---- Footer credit ---- */
.footer-credit a {
	color: var(--wp--preset--color--crimson);
	text-decoration: underline;
	text-decoration-color: rgba(204, 0, 0, 0.3);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}
.footer-credit a:hover {
	text-decoration-color: var(--wp--preset--color--crimson);
}

/* ---- Fade-in animation on scroll ---- */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.animate-in {
	animation: fadeInUp 0.6s ease both;
}

/* ---- Quick date links ---- */
.quick-date-links a {
	display: inline-block;
	padding: 6px 14px;
	background: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 20px;
	font-size: 0.8125rem;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.quick-date-links a:hover {
	background: var(--wp--preset--color--body);
	border-color: var(--wp--preset--color--crimson);
}

/* ---- Responsive adjustments ---- */
/* ---- Dark mode toggle button ---- */
.dark-mode-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--wp--preset--color--elevated);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 4px;
	padding: 6px 14px;
	cursor: pointer;
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--dark-secondary);
	transition: background-color 0.2s ease, border-color 0.2s ease;
	line-height: 1;
}
.dark-mode-toggle:hover {
	border-color: var(--wp--preset--color--crimson);
}
.dark-mode-toggle svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ---- Dark mode overrides ---- */
body.dark-mode {
	background-color: #0C0A09 !important;
	color: #F5F0E8 !important;
}
body.dark-mode .wp-site-blocks {
	background-color: #0C0A09;
}

/* Header */
body.dark-mode .site-header-nav > .wp-block-group:last-child {
	background: rgba(12, 10, 9, 0.97) !important;
	backdrop-filter: blur(14px);
}
body.dark-mode .site-header-nav .has-primary-background-color {
	background-color: #141210 !important;
}
body.dark-mode .site-header-nav .wp-block-site-title a {
	color: #F5F0E8 !important;
}
body.dark-mode .site-header-nav .wp-block-navigation a {
	color: rgba(245, 240, 232, 0.7) !important;
}
body.dark-mode .site-header-nav .wp-block-navigation a:hover {
	color: #F5F0E8 !important;
}
body.dark-mode .site-header-nav .has-dark-muted-color {
	color: rgba(245, 240, 232, 0.4) !important;
}
body.dark-mode .site-header-nav {
	border-bottom-color: rgba(245, 240, 232, 0.08) !important;
}

/* Section backgrounds */
body.dark-mode .has-primary-background-color {
	background-color: #0C0A09 !important;
}
body.dark-mode .has-body-background-color {
	background-color: #141210 !important;
}

/* Text colors */
body.dark-mode .has-dark-color {
	color: #F5F0E8 !important;
}
body.dark-mode .has-dark-secondary-color {
	color: rgba(245, 240, 232, 0.65) !important;
}
body.dark-mode .has-dark-muted-color {
	color: rgba(245, 240, 232, 0.4) !important;
}

/* Headings */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
	color: #F5F0E8;
}
body.dark-mode .wp-block-heading.has-dark-color {
	color: #F5F0E8 !important;
}

/* Story cards */
body.dark-mode .story-card {
	background: #1E1B18 !important;
	border-color: rgba(245, 240, 232, 0.08) !important;
}
body.dark-mode .story-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Date selector */
body.dark-mode .date-selector-wrap {
	background: #1E1B18 !important;
	border-color: rgba(245, 240, 232, 0.08) !important;
}

/* Separator / dividers */
body.dark-mode .wp-block-separator {
	border-color: rgba(245, 240, 232, 0.1) !important;
}
body.dark-mode .section-label::after {
	background: rgba(245, 240, 232, 0.1);
}

/* Links */
body.dark-mode a {
	color: #CC0000;
}
body.dark-mode .footer-credit a {
	color: #CC0000;
}

/* Quick date links */
body.dark-mode .quick-date-links a {
	background: #2A2622;
	border-color: rgba(245, 240, 232, 0.1);
	color: rgba(245, 240, 232, 0.7);
}
body.dark-mode .quick-date-links a:hover {
	background: #1E1B18;
	border-color: #CC0000;
}

/* Outline buttons */
body.dark-mode .is-style-outline .wp-block-button__link {
	border-color: rgba(245, 240, 232, 0.25) !important;
	color: #F5F0E8 !important;
}
body.dark-mode .is-style-outline .wp-block-button__link:hover {
	border-color: rgba(245, 240, 232, 0.5) !important;
}

/* Footer */
body.dark-mode footer .has-body-background-color {
	background-color: #0C0A09 !important;
}
body.dark-mode footer .wp-block-navigation a {
	color: rgba(245, 240, 232, 0.65) !important;
}
body.dark-mode footer .wp-block-navigation a:hover {
	color: #F5F0E8 !important;
}

/* Toggle button in dark mode */
body.dark-mode .dark-mode-toggle {
	background: #2A2622;
	border-color: rgba(201, 168, 76, 0.15);
	color: #B8960C;
}

@media (max-width: 781px) {
	.ticker-row {
		display: none;
	}
	.hero-headline-text {
		font-size: clamp(1.5rem, 5vw, 2.25rem) !important;
	}
	.date-selector-wrap {
		padding: 1.5rem;
	}
	.dark-mode-toggle .toggle-label {
		display: none;
	}
}