/*
Theme Name: Wealth4India Insights
Theme URI: https://wealth4india.com/
Author: Wealth4India Pvt Ltd
Author URI: https://wealth4india.com/
Description: Editorial blog theme for Wealth4India Insights. Matches the header, footer, palette and typography of the main wealth4india.com site, with an article layout built for tax, wealth and business advisory writing.
Version: 1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: w4i-insights
Tags: blog, custom-logo, custom-menu, featured-images, right-sidebar, threaded-comments
*/

/* ==========================================================================
   1. DESIGN TOKENS
   To rebrand, change only the values in this block.
   ========================================================================== */

:root {
	--navy:        #0F2A4A;
	--navy-deep:   #0A1E36;
	--navy-soft:   #1B3D63;
	--gold:        #C9A24A;
	--gold-bright: #E0BC6B;
	--ink:         #16212E;
	--body:        #3D4C5C;
	--muted:       #6B7A8A;
	--line:        #E2E8EE;
	--line-soft:   #EFF3F7;
	--paper:       #FFFFFF;
	--paper-soft:  #F7F9FB;

	--font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--wrap: 1220px;
	--radius: 4px;
	--radius-lg: 8px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--body);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.25;
	margin: 0 0 .6em;
	font-weight: 600;
	letter-spacing: -0.01em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.3em; }

.w4i-wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

.skip-link {
	position: absolute; left: -9999px;
	background: var(--navy); color: #fff;
	padding: 12px 20px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

/* ==========================================================================
   3. TOP BAR
   ========================================================================== */

.w4i-topbar {
	background: var(--navy-deep);
	color: rgba(255,255,255,.72);
	font-size: 13.5px;
	padding: 9px 0;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.w4i-topbar .w4i-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
.w4i-topbar a { color: rgba(255,255,255,.85); }
.w4i-topbar a:hover { color: var(--gold-bright); }
.w4i-topbar-left { display: flex; gap: 22px; flex-wrap: wrap; }
.w4i-topbar-note { color: rgba(255,255,255,.55); }

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */

.w4i-header {
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 200;
}
.w4i-header .w4i-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	min-height: 78px;
}

.w4i-brand img { max-height: 48px; width: auto; }
.w4i-brand-text {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--navy);
}

.w4i-nav { display: flex; align-items: center; gap: 4px; }
.w4i-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.w4i-nav li { position: relative; }

.w4i-nav > ul > li > a {
	display: block;
	padding: 10px 14px;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	border-radius: var(--radius);
}
.w4i-nav > ul > li > a:hover,
.w4i-nav > ul > li.current-menu-item > a {
	color: var(--navy);
	background: var(--paper-soft);
}

/* Dropdowns */
.w4i-nav ul ul {
	position: absolute;
	top: 100%; left: 0;
	min-width: 250px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: 0 14px 40px rgba(15,42,74,.13);
	padding: 8px;
	display: block;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.w4i-nav li:hover > ul,
.w4i-nav li:focus-within > ul {
	opacity: 1; visibility: visible; transform: translateY(0);
}
.w4i-nav ul ul li { width: 100%; }
.w4i-nav ul ul a {
	display: block;
	padding: 9px 12px;
	font-size: 14.5px;
	color: var(--body);
	border-radius: var(--radius);
}
.w4i-nav ul ul a:hover { background: var(--paper-soft); color: var(--navy); }

.w4i-nav-group {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	padding: 10px 12px 4px;
	font-family: var(--font-body);
}

.w4i-cta {
	display: inline-block;
	background: var(--gold);
	color: var(--navy-deep) !important;
	font-weight: 600;
	font-size: 14.5px;
	padding: 11px 22px;
	border-radius: var(--radius);
	white-space: nowrap;
	transition: background .18s ease;
}
.w4i-cta:hover { background: var(--gold-bright); color: var(--navy-deep) !important; }

.w4i-nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 9px 13px;
	font-size: 16px;
	color: var(--navy);
	cursor: pointer;
}

/* ==========================================================================
   5. BREADCRUMB & PAGE HEAD
   ========================================================================== */

.w4i-crumb {
	background: var(--paper-soft);
	border-bottom: 1px solid var(--line);
	padding: 13px 0;
	font-size: 14px;
	color: var(--muted);
}
.w4i-crumb a { color: var(--muted); }
.w4i-crumb a:hover { color: var(--navy); }
.w4i-crumb span { margin: 0 8px; opacity: .55; }

.w4i-pagehead { padding: 48px 0 8px; }
.w4i-pagehead h1 { font-size: 2.9rem; margin-bottom: .25em; }
.w4i-pagehead p { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin: 0; }

/* ==========================================================================
   6. LAYOUT
   ========================================================================== */

.w4i-layout {
	display: grid;
	grid-template-columns: minmax(0,1fr) 336px;
	gap: 48px;
	align-items: start;
	padding: 40px 0 72px;
}

/* ==========================================================================
   7. ARTICLE CARDS
   ========================================================================== */

.w4i-card {
	display: grid;
	grid-template-columns: 292px minmax(0,1fr);
	gap: 26px;
	padding-bottom: 34px;
	margin-bottom: 34px;
	border-bottom: 1px solid var(--line);
}
.w4i-card:last-of-type { border-bottom: 0; }

.w4i-card-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-soft); }
.w4i-card-media img { width: 100%; height: 196px; object-fit: cover; }
.w4i-card-media .w4i-badge {
	position: absolute; left: 12px; bottom: 12px;
	background: rgba(10,30,54,.9);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	padding: 5px 11px;
	border-radius: 3px;
}

.w4i-card-meta {
	font-size: 13.5px;
	color: var(--muted);
	margin-bottom: 9px;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}
.w4i-card-meta a { color: var(--navy-soft); }

.w4i-card h2 { font-size: 1.42rem; line-height: 1.32; margin-bottom: .45em; }
.w4i-card h2 a { color: var(--ink); }
.w4i-card h2 a:hover { color: var(--navy-soft); }

.w4i-card-excerpt { font-size: 15.5px; color: var(--body); margin-bottom: 14px; }

.w4i-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.w4i-tags a {
	font-size: 12.5px;
	color: var(--body);
	background: var(--paper-soft);
	border: 1px solid var(--line);
	padding: 4px 10px;
	border-radius: 3px;
}
.w4i-tags a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.w4i-readmore {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--navy);
	border-bottom: 2px solid var(--gold);
	padding-bottom: 2px;
}
.w4i-readmore:hover { color: var(--gold); }

/* ==========================================================================
   8. PAGINATION
   ========================================================================== */

.w4i-pagination { margin-top: 44px; }
.w4i-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.w4i-pagination .page-numbers {
	display: inline-flex;
	align-items: center; justify-content: center;
	min-width: 42px; height: 42px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	font-size: 15px;
	color: var(--body);
}
.w4i-pagination .page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.w4i-pagination .page-numbers.current {
	background: var(--navy); border-color: var(--navy); color: #fff;
}
.w4i-pagination .page-numbers.dots { border: 0; }

/* ==========================================================================
   9. SINGLE POST
   ========================================================================== */

.w4i-single-head { padding: 42px 0 0; }
.w4i-single-head h1 { font-size: 2.5rem; margin-bottom: .4em; }
.w4i-single-meta {
	display: flex; flex-wrap: wrap; gap: 18px;
	font-size: 14px; color: var(--muted);
	padding-bottom: 22px;
	border-bottom: 1px solid var(--line);
}
.w4i-single-meta a { color: var(--navy-soft); }

.w4i-featured { margin: 28px 0 32px; border-radius: var(--radius-lg); overflow: hidden; }

.w4i-content { font-size: 17.5px; line-height: 1.78; color: var(--body); max-width: 74ch; }
.w4i-content h2 {
	font-size: 1.72rem;
	margin-top: 1.9em;
	padding-bottom: .3em;
	border-bottom: 1px solid var(--line-soft);
}
.w4i-content h3 { font-size: 1.32rem; margin-top: 1.7em; }
.w4i-content h4 { font-size: 1.12rem; margin-top: 1.5em; }
.w4i-content ul, .w4i-content ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.w4i-content li { margin-bottom: .5em; }
.w4i-content a { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold); }
.w4i-content a:hover { color: var(--gold); }
.w4i-content img { border-radius: var(--radius-lg); margin: 1.6em 0; }
.w4i-content strong { color: var(--ink); font-weight: 600; }

.w4i-content blockquote {
	margin: 1.8em 0;
	padding: 4px 0 4px 26px;
	border-left: 3px solid var(--gold);
	font-family: var(--font-display);
	font-size: 1.16rem;
	color: var(--ink);
	font-style: italic;
}

.w4i-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.7em 0;
	font-size: 15.5px;
}
.w4i-content th, .w4i-content td {
	border: 1px solid var(--line);
	padding: 11px 14px;
	text-align: left;
	vertical-align: top;
}
.w4i-content th { background: var(--paper-soft); color: var(--ink); font-weight: 600; }
.w4i-content tbody tr:nth-child(even) td { background: #FBFCFD; }

.w4i-content code {
	background: var(--paper-soft);
	border: 1px solid var(--line);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: .92em;
}

.w4i-posttags { margin: 34px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.w4i-posttags h4 { font-family: var(--font-body); font-size: 13px; color: var(--muted); margin-bottom: 11px; font-weight: 600; }

.w4i-authorbox {
	margin-top: 34px;
	background: var(--paper-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 26px;
	display: flex;
	gap: 20px;
	align-items: flex-start;
}
.w4i-authorbox img { border-radius: 50%; flex-shrink: 0; }
.w4i-authorbox h4 { margin-bottom: .35em; }
.w4i-authorbox p { font-size: 15px; margin: 0; }

.w4i-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-top: 34px;
}
.w4i-postnav a {
	display: block;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 18px 20px;
	transition: border-color .18s ease;
}
.w4i-postnav a:hover { border-color: var(--navy); }
.w4i-postnav span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.w4i-postnav strong { font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); font-weight: 600; line-height: 1.35; }
.w4i-postnav .is-next { text-align: right; }

/* Disclaimer strip on posts */
.w4i-disclaimer {
	margin-top: 34px;
	background: var(--paper-soft);
	border-left: 3px solid var(--gold);
	padding: 18px 22px;
	font-size: 14px;
	color: var(--muted);
	border-radius: 0 var(--radius) var(--radius) 0;
}
.w4i-disclaimer p { margin: 0; }

/* ==========================================================================
   10. SIDEBAR
   ========================================================================== */

.w4i-sidebar { position: sticky; top: 100px; }

.w4i-widget {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 24px;
	margin-bottom: 24px;
}
.w4i-widget h3, .w4i-widget .widget-title {
	font-size: 1.06rem;
	margin-bottom: 16px;
	padding-bottom: 11px;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.w4i-widget h3::after, .w4i-widget .widget-title::after {
	content: "";
	position: absolute;
	left: 0; bottom: -1px;
	width: 44px; height: 2px;
	background: var(--gold);
}
.w4i-widget ul { list-style: none; margin: 0; padding: 0; }
.w4i-widget li { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.w4i-widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.w4i-widget li a { color: var(--body); line-height: 1.45; display: block; }
.w4i-widget li a:hover { color: var(--navy); }
.w4i-widget .w4i-widget-date { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.w4i-search { display: flex; gap: 8px; }
.w4i-search input[type="search"] {
	flex: 1; min-width: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 11px 13px;
	font-family: var(--font-body);
	font-size: 15px;
	color: var(--ink);
}
.w4i-search input[type="search"]:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.w4i-search button {
	background: var(--navy);
	color: #fff;
	border: 0;
	border-radius: var(--radius);
	padding: 0 18px;
	font-family: var(--font-body);
	font-size: 14.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background .18s ease;
}
.w4i-search button:hover { background: var(--navy-soft); }

.w4i-consult {
	background: var(--navy);
	border: 0;
	color: rgba(255,255,255,.82);
}
.w4i-consult h3 { color: #fff; border-bottom-color: rgba(255,255,255,.16); }
.w4i-consult p { font-size: 14.5px; margin-bottom: 16px; }
.w4i-consult ul { margin-bottom: 18px; }
.w4i-consult li { border-bottom: 0; padding: 5px 0 5px 20px; position: relative; font-size: 14.5px; color: rgba(255,255,255,.82); }
.w4i-consult li::before { content: "\2022"; position: absolute; left: 4px; color: var(--gold); font-size: 18px; line-height: 1.2; }
.w4i-consult .w4i-cta { display: block; text-align: center; }

.w4i-contact-row { padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.w4i-contact-row:last-child { border-bottom: 0; }
.w4i-contact-row span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }

/* ==========================================================================
   11. FOOTER
   ========================================================================== */

.w4i-footer { background: var(--navy-deep); color: rgba(255,255,255,.68); padding: 60px 0 0; margin-top: 20px; }
.w4i-footer a { color: rgba(255,255,255,.68); }
.w4i-footer a:hover { color: var(--gold-bright); }
.w4i-footer h4 {
	color: #fff;
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 16px;
	letter-spacing: .02em;
}
.w4i-footer ul { list-style: none; margin: 0; padding: 0; }
.w4i-footer li { margin-bottom: 9px; font-size: 14.5px; }

.w4i-footer-grid {
	display: grid;
	grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
	gap: 44px;
	padding-bottom: 46px;
}
.w4i-footer-about img { max-height: 46px; margin-bottom: 18px; }
.w4i-footer-about p { font-size: 14.5px; line-height: 1.65; }
.w4i-footer-about .w4i-entity { color: rgba(255,255,255,.85); font-size: 14px; }

.w4i-footer-contact p { font-size: 14.5px; margin-bottom: 10px; line-height: 1.6; }

.w4i-footer-social { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.w4i-footer-social a {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: var(--radius);
	padding: 6px 13px;
	font-size: 13px;
}
.w4i-footer-social a:hover { border-color: var(--gold); }

.w4i-footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 22px 0 30px;
	font-size: 13.5px;
}
.w4i-footer-bottom .w4i-wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.w4i-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.w4i-footer-note {
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 18px 0 34px;
	font-size: 12.5px;
	color: rgba(255,255,255,.45);
	line-height: 1.65;
}

/* ==========================================================================
   12. 404 & SEARCH EMPTY
   ========================================================================== */

.w4i-empty { padding: 70px 0 90px; text-align: center; max-width: 620px; margin: 0 auto; }
.w4i-empty .w4i-404 { font-family: var(--font-display); font-size: 5.5rem; color: var(--gold); line-height: 1; margin-bottom: .1em; }
.w4i-empty h1 { margin-bottom: .4em; }
.w4i-empty .w4i-search { max-width: 420px; margin: 26px auto 0; }

/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

@media (max-width: 1080px) {
	.w4i-layout { grid-template-columns: 1fr; gap: 40px; }
	.w4i-sidebar { position: static; }
	.w4i-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 860px) {
	body { font-size: 16.5px; }
	h1 { font-size: 2.05rem; }
	.w4i-pagehead h1, .w4i-single-head h1 { font-size: 2rem; }
	.w4i-pagehead { padding: 34px 0 4px; }

	.w4i-nav-toggle { display: block; }
	.w4i-nav {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: 0 16px 30px rgba(15,42,74,.1);
		padding: 14px 24px 22px;
	}
	.w4i-nav.is-open { display: block; }
	.w4i-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.w4i-nav ul ul {
		position: static;
		opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; border-left: 2px solid var(--line);
		border-radius: 0;
		margin: 0 0 8px 12px; padding: 0 0 0 10px;
	}
	.w4i-header .w4i-wrap { position: relative; min-height: 68px; }

	.w4i-card { grid-template-columns: 1fr; gap: 16px; }
	.w4i-card-media img { height: 210px; }
	.w4i-postnav { grid-template-columns: 1fr; }
	.w4i-postnav .is-next { text-align: left; }
	.w4i-authorbox { flex-direction: column; }
	.w4i-footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.w4i-topbar .w4i-wrap { justify-content: center; text-align: center; }
	.w4i-topbar-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   14. WORDPRESS CORE CLASSES
   ========================================================================== */

.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption {
	font-size: 13.5px;
	color: var(--muted);
	text-align: center;
	margin-top: 8px;
}
.sticky .w4i-card { background: var(--paper-soft); }
