/*
 * Kalanjiyam – The7 child theme layer.
 * Tokens match kalanjiyam-core/assets/css/kj-components.css so the site
 * still looks right if only one of the two is active.
 */
:root {
	--kj-ink: #1b2238;
	--kj-kumkum: #9b1b30;
	--kj-kumkum-dark: #7a1526;
	--kj-turmeric: #c98a12;
	--kj-granite: #4a4f57;
	--kj-stone: #eef0f3;
	--kj-line: #d5d9e0;
	--kj-font-display: "Noto Serif Tamil", "Latha", "Nirmala UI", Georgia, serif;
	--kj-font-body: "Hind Madurai", "Latha", "Nirmala UI", system-ui, sans-serif;
	--kj-kaavi: repeating-linear-gradient(90deg, var(--kj-kumkum) 0 18px, #fff 18px 36px);
}

/* ---------- Base typography ---------- */
.kj-site,
.kj-site .content,
.kj-site input,
.kj-site textarea,
.kj-site select,
.kj-site button {
	font-family: var(--kj-font-body);
}
.kj-site { color: var(--kj-granite); }
.kj-site .content { font-size: 17px; line-height: 1.75; }
.kj-site h1, .kj-site h2, .kj-site h3, .kj-site h4,
.kj-site .entry-title,
.kj-site .page-title h1 {
	font-family: var(--kj-font-display);
	color: var(--kj-ink);
	letter-spacing: 0;
	text-transform: none;
}
.kj-site [lang="ta"],
.kj-site :lang(ta) { line-height: 1.85; word-break: normal; overflow-wrap: anywhere; }
.kj-site .content a { color: var(--kj-kumkum); text-underline-offset: 3px; }
.kj-site .content a:hover { color: var(--kj-kumkum-dark); }
.kj-site :focus-visible { outline: 3px solid var(--kj-turmeric); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.kj-site .top-bar { background: var(--kj-ink); color: #d7dbe6; font-size: 14px; }
.kj-site .top-bar a { color: #e6e8ef; }
.kj-site .top-bar .subtitle-text { display: none; }
.kj-site .kj-menu-cta > a {
	background: var(--kj-kumkum);
	color: #fff !important;
	padding: 6px 14px !important;
	font-weight: 600;
}
.kj-site .kj-menu-cta > a:hover { background: var(--kj-kumkum-dark); }

/* ---------- Header + bilingual main menu ---------- */
.kj-site .masthead:not(.side-header) { border-bottom: 0; box-shadow: 0 1px 0 var(--kj-line); }
.kj-site .main-nav > li > a .menu-text {
	font-family: var(--kj-font-body);
	font-weight: 600;
	font-size: 15px;
	color: var(--kj-ink);
	text-transform: none;
	letter-spacing: 0;
}
.kj-site .main-nav > li > a .subtitle-text {
	display: block;
	font-family: var(--kj-font-display);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--kj-kumkum);
	text-transform: none;
	letter-spacing: 0;
}
.kj-site .main-nav > li.act > a .menu-text,
.kj-site .main-nav > li > a:hover .menu-text { color: var(--kj-kumkum); }
.kj-site .main-nav .sub-nav { border-top: 3px solid var(--kj-kumkum); }
.kj-site .main-nav .sub-nav > li > a .menu-text { font-weight: 500; color: var(--kj-ink); }
.kj-site .main-nav .sub-nav .subtitle-text { font-size: 12px; color: var(--kj-granite); }
.kj-site .dt-mobile-header .subtitle-text,
.kj-site .mobile-main-nav .subtitle-text { display: block; font-size: 12px; color: var(--kj-kumkum); }

/* ---------- The7 page title (pages without a Kalanjiyam layout) ---------- */
.kj-site .page-title {
	background: var(--kj-ink);
	position: relative;
}
.kj-site .page-title::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: var(--kj-kaavi);
}
.kj-site .page-title h1,
.kj-site .page-title .entry-title { color: #fff; }
.kj-site .page-title .breadcrumbs,
.kj-site .page-title .breadcrumbs a { color: #c9cedb; }

/* Kalanjiyam layouts bring their own header band and full-width sections. */
.kj-has-layout #main { padding-top: 0 !important; padding-bottom: 0 !important; }
.kj-has-layout #main > .wf-wrap { max-width: none; padding: 0; }

/* ---------- Classic content (pages that still use the editor) ---------- */
.kj-site .content > :where(p, ul, ol, h2, h3, table) { max-width: 72ch; }
.kj-site .content h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-top: 1.8em; }
.kj-site .content table { border-collapse: collapse; width: 100%; }
.kj-site .content th,
.kj-site .content td { border-bottom: 1px solid var(--kj-line); padding: .6em .8em; text-align: left; }

/* Single issue / article */
.kj-site.single-kj_issue .entry-title,
.kj-site.single-kj_prepress .entry-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }

/* ---------- Blog cards ---------- */
.kj-site .post .entry-meta,
.kj-site .post .entry-meta a { color: var(--kj-kumkum); }
.kj-site .blog-content .entry-title a { color: var(--kj-ink); }

/* ---------- Footer ---------- */
.kj-site #footer { position: relative; background: var(--kj-ink); color: #d7dbe6; }
.kj-site #footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 10px;
	background: var(--kj-kaavi);
}
.kj-site #footer .widget-title { color: #fff; font-family: var(--kj-font-display); }
.kj-site #footer a { color: #e6e8ef; }
.kj-site #bottom-bar { background: #141a2c; color: #b9bfcf; font-size: 14px; }
.kj-site #bottom-bar a { color: #e6e8ef; }

/* ---------- Buttons from The7 / forms ---------- */
.kj-site .dt-btn,
.kj-site input[type="submit"],
.kj-site button[type="submit"] {
	background: var(--kj-kumkum);
	border-radius: 2px;
	font-family: var(--kj-font-body);
	font-weight: 600;
}
.kj-site .dt-btn:hover,
.kj-site input[type="submit"]:hover,
.kj-site button[type="submit"]:hover { background: var(--kj-kumkum-dark); }

@media (prefers-reduced-motion: reduce) {
	.kj-site * { scroll-behavior: auto !important; }
}

@media print {
	.kj-site .masthead, .kj-site .top-bar, .kj-site #footer, .kj-site #bottom-bar,
	.kj-site .page-title::after { display: none !important; }
	.kj-site .page-title { background: none; }
	.kj-site .page-title h1 { color: #000; }
	.kj-site .content a::after { content: " (" attr(href) ")"; font-size: .85em; }
}
