/*
 * VYBE Journal – Scholar Light on Astra
 *
 * Navy and gold on white with the journal's accent (--vj-accent). Colours
 * come from inc/palette.php as --vj-* custom properties (also Astra's global
 * palette and the Journal Kit's Elementor colours). Text pairs from the
 * Journal Kit: .l-1 = the journal's main language, .l-2 = the second; the
 * language switch sets html[data-vjk-lang] to en | both | ta.
 *
 * Language rule: styling of the second language (.l-2) is scoped to "both"
 * (and to pages without the switch) with
 *   html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"])
 * With one language chosen, the switch hides the other language and the
 * remaining text – .l-1 or .l-2 – shows as plain main text. This works for
 * Tamil-first (Tamilmanam, KALANJIYAM) and English-first (Aathiyoga) journals.
 *
 * Contents
 *  1. Base
 *  2. Top bar
 *  3. Masthead: brand and actions
 *  4. Menu bar and sub-menus
 *  5. Sticky menu bar
 *  6. Tablets and phones: header and menu panel
 *  7. Footer
 *  8. Posts, pages and widgets outside the Kit
 *  9. 404, print, motion
 *
 * Text sizes and fonts are Astra's: the masthead title and subtitle are
 * Astra's site title and tagline, the top bar, header actions, menus, footer
 * columns, copyright and buttons use the sizes of their Astra (Pro) builder
 * elements, and fonts come from Astra's typography (--vjk-serif / --vjk-sans,
 * inc/typography.php). Sizes below are relative (em) to those, or fallbacks
 * that Astra's own rules outrank.
 */

/* ---------- 1. Base ---------- */

body.vybe-journal {
	background-color: var(--vj-paper);
	color: var(--vj-ink);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.vybe-journal ::selection { background: var(--vj-gold-soft); color: var(--vj-navy-deep); }
body.vybe-journal :focus-visible { outline: 2px solid var(--vj-gold); outline-offset: 2px; }
body.vybe-journal .entry-content a:not(.elementor-button):not(.ast-button):not(.wp-block-button__link) { text-underline-offset: .18em; text-decoration-thickness: 1px; }
body.vybe-journal [lang="ta"] { line-height: 1.75; }
body.vybe-journal :is(h1, h2, h3, h4, h5, h6) [lang="ta"] { line-height: 1.45; }

/* ---------- 2. Top bar ---------- */

.vybe-journal .ast-above-header-bar { line-height: 1.4; }
.vybe-journal .ast-above-header-bar .ast-builder-grid-row { min-height: 40px; }
.vj-topbar {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 18px;
	min-width: 0;
	color: var(--vj-top-text);
}
.vybe-journal .ast-above-header-bar .site-header-above-section-left,
.vybe-journal .ast-above-header-bar .ast-header-html-1,
.vybe-journal .ast-above-header-bar .ast-header-html-1 .ast-header-html,
.vybe-journal .ast-above-header-bar .ast-header-html-1 .ast-builder-html-element { min-width: 0; flex: 1 1 auto; }
.vybe-journal .ast-above-header-bar .site-header-above-section-right { flex: none; }
.vj-topbar__ids { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.vj-topbar__ids strong { font-weight: 700; color: var(--vj-navy); letter-spacing: .02em; }
.vj-surface-clean .vj-topbar__ids strong { color: var(--vj-ink); }
.vj-dot { opacity: .5; }
.vj-topbar__badges { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--vj-gold-deep); font-weight: 600; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-topbar__badges .l-2 { display: none; }
.vybe-journal .ast-builder-menu-2 .menu-item > .menu-link { padding-top: 0; padding-bottom: 0; line-height: 40px; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .ast-builder-menu-2 .menu-link .l-2,
.vybe-journal .ast-builder-menu-2 .ast-icon { display: none !important; }
.vybe-journal .ast-builder-menu-2 .menu-item + .menu-item > .menu-link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	height: 12px;
	margin-top: -6px;
	border-left: 1px solid var(--vj-line);
}
.vybe-journal .ast-builder-menu-2 .menu-item > .menu-link { position: relative; }

/* ---------- 3. Masthead: brand and actions ---------- */

.vybe-journal .site-branding.ast-site-identity { padding: 10px 0; }
.vj-brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none !important;
	color: var(--vj-navy) !important;
	max-width: 100%;
}
.vj-brand__mark { flex: none; display: inline-flex; line-height: 0; }
.vj-brand__mark .vj-emblem { width: var(--vj-emblem, 58px); height: var(--vj-emblem, 58px); filter: drop-shadow(0 4px 10px rgba(15, 39, 71, .18)); }
.vj-brand__logo { width: auto; max-height: var(--vj-logo-h, 64px); }
.vj-brand__text { display: flex; flex-direction: column; min-width: 0; }
.vybe-journal .vj-brand__name,
.vybe-journal .vj-brand__name.site-title {
	margin: 0;
	font-family: var(--vjk-serif, "Journal Serif", "Noto Serif", "Noto Serif Tamil", Georgia, serif);
	font-weight: 700;
	line-height: 1.15;
	color: var(--vj-navy);
	letter-spacing: .005em;
}
.vj-brand__sub {
	margin-top: 4px;
	font-size: .8em; /* Astra’s tagline size outranks this in the masthead */
	line-height: 1.35;
	color: var(--vj-muted);
}
/* Tamil names sit a little smaller than Latin capitals */
.vj-brand__name [lang="ta"] { line-height: 1.3; }
.vj-brand__name .l-ta.l-1 { font-size: .92em; }
/* Both languages: the second name small and gold under the first; one subtitle */
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-brand__name .l-2 { display: block; margin-top: 3px; font-size: .62em; font-weight: 600; color: var(--vj-gold-deep); line-height: 1.35; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-brand__sub .l-2 { display: none !important; }
.vj-brand--header:hover .vj-brand__name { color: var(--vj-navy-deep); }

.vj-actions { display: flex; align-items: center; gap: 14px; }
.vj-actions .vjl-inline { display: inline-flex; }
.vj-cta {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 8px 20px;
	border-radius: 6px;
	background: var(--vj-accent);
	border: 2px solid var(--vj-accent);
	color: #fff !important;
	font-weight: 700;
	font-size: 1em; /* Astra: Header builder → HTML 2 → font size */
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 8px 18px -10px var(--vj-accent);
	transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.vj-cta:hover, .vj-cta:focus { background: var(--vj-accent-deep); border-color: var(--vj-accent-deep); color: #fff !important; }
.vj-cta:active { transform: translateY(1px); }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-cta .l-2 { display: block; font-size: .8em; font-weight: 500; opacity: .92; margin-top: 2px; }

/* Language switch next to the button (masthead style, light pill) */
.vj-actions .vjl-switch--masthead { background: var(--vj-paper); border-color: var(--vj-line); color: var(--vj-navy); }
.vj-actions .vjl-switch--masthead .vjl-switch__opt:hover { background: var(--vj-mist); }
.vj-actions .vjl-switch--masthead .vjl-switch__opt[aria-current="true"] { background: var(--vj-navy); color: #fff; }

/* ---------- 4. Menu bar and sub-menus ---------- */

.vybe-journal .ast-below-header-bar { box-shadow: 0 1px 0 var(--vj-line); }
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
	position: relative;
	align-items: center;
	min-height: 54px;
	padding-top: 6px;
	padding-bottom: 6px;
	line-height: 1.2;
	color: var(--vj-nav-text);
	font-weight: 600;
}
.vybe-journal .ast-builder-menu-1 .vj-mt { display: inline-flex; flex-direction: column; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link .vj-mt .l-2 {
	display: block;
	margin-top: 2px;
	font-size: .77em;
	font-weight: 500;
	color: var(--vj-gold-deep);
	line-height: 1.25;
}
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-surface-clean .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link .vj-mt .l-2 { color: var(--vj-gold-soft); }
/* Gold line under the current item and on hover */
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--vj-gold);
	transform: scaleX(0);
	transition: transform .18s ease;
}
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent, .current_page_item, .current_page_ancestor) > .menu-link::after,
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link::after,
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:focus-visible::after { transform: scaleX(1); }
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link { background: var(--vj-mist); }
.vj-surface-clean .ast-builder-menu-1 .main-header-menu > .menu-item:hover > .menu-link { background: rgba(255, 255, 255, .08); }
.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link .dropdown-menu-toggle { margin-left: 4px; }

/* Sub-menus */
.vybe-journal .ast-builder-menu .sub-menu {
	min-width: 270px;
	border-radius: 0 0 8px 8px;
	box-shadow: var(--vj-shadow);
	background: var(--vj-paper);
}
.vybe-journal .ast-builder-menu .sub-menu .menu-link { padding: 10px 18px; line-height: 1.3; font-weight: 500; } /* size: Astra Pro → Menu 1 → sub-menu */
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .ast-builder-menu .sub-menu .vj-mt .l-2 { display: inline; font-size: .86em; color: var(--vj-muted); font-weight: 400; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .ast-builder-menu .sub-menu .vj-mt .l-2::before { content: " · "; opacity: .6; }
.vybe-journal .ast-builder-menu .sub-menu .vj-mt { display: inline; }
.vybe-journal .ast-builder-menu .sub-menu .menu-item:hover > .menu-link { color: var(--vj-link); }

/* Pro "mega menu" description markers are not shown */
.vybe-journal .ast-mm-has-desc > .menu-link > .ast-icon.icon-arrow:first-child { display: none; }

/* ---------- 5. Sticky menu bar ---------- */

/* Without Astra Pro: the header sticks with a negative top so only the menu bar stays (assets/js/vybe-journal.js). */
@media (min-width: 922px) {
	body.vj-sticky-js.vj-stick-ready #masthead {
		position: sticky;
		top: calc(var(--vj-stick, 0px) + var(--wp-admin--admin-bar--height, 0px));
		z-index: 999;
	}
	body.vj-sticky-js.vj-is-stuck #masthead .ast-below-header-bar,
	body.vj-sticky-pro .ast-header-sticked .ast-below-header-bar,
	body.vj-sticky-pro #ast-fixed-header .ast-below-header-bar { box-shadow: 0 10px 24px -16px rgba(15, 39, 71, .45); }
}
/* With Astra Pro: the stuck menu bar keeps the journal's colours */
.vybe-journal .ast-sticky-active .ast-below-header-bar,
.vybe-journal #ast-fixed-header .ast-below-header-bar { background: var(--vj-nav) !important; }

/* ---------- 6. Tablets and phones ---------- */

@media (max-width: 1200px) {
	.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link { padding-left: 10px; padding-right: 10px; }
	.vj-topbar__badges { display: none; }
}
@media (max-width: 921px) {
	.vybe-journal .site-branding.ast-site-identity { padding: 8px 0; }
	.vj-brand { gap: 10px; }
	.vj-brand__mark .vj-emblem { --vj-emblem: 46px; }
	.vybe-journal #ast-mobile-header .ast-primary-header-bar { border-bottom: 3px solid var(--vj-gold); }
	.vybe-journal .ast-mobile-header-wrap .menu-toggle { border-radius: 6px; }

	/* Menu panel */
	.vybe-journal .ast-mobile-popup-drawer .ast-mobile-popup-inner { background: var(--vj-paper); }
	.vybe-journal .ast-mobile-popup-drawer .ast-mobile-popup-header { border-bottom: 3px solid var(--vj-gold); }
	.vybe-journal .ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link { padding-top: 12px !important; padding-bottom: 12px !important; line-height: 1.3; color: var(--vj-navy); font-weight: 600; border-bottom: 1px solid var(--vj-line); }
	.vybe-journal .ast-mobile-popup-drawer .main-header-menu .menu-item > .ast-menu-toggle { top: 8px; }
	.vybe-journal .ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link { background: var(--vj-mist); box-shadow: inset 3px 0 0 var(--vj-gold); }
	html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .ast-mobile-popup-content .vj-mt .l-2 { display: block; margin-top: 2px; font-size: .78em; font-weight: 500; color: var(--vj-gold-deep); }
	.vybe-journal .ast-mobile-popup-content .sub-menu .menu-link { font-weight: 500; }
	.vybe-journal .ast-mobile-popup-drawer .ast-header-html-2 { margin-top: 18px; width: 100%; }
	.vybe-journal .ast-mobile-popup-drawer .ast-header-html-2 .ast-header-html { flex: 1 1 auto; min-width: 0; }
	.vybe-journal .ast-mobile-popup-drawer .vj-actions { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
	.vybe-journal .ast-mobile-popup-drawer .vj-actions .vjl-inline { justify-content: center; }
	.vybe-journal .ast-mobile-popup-drawer .vj-cta { width: 100%; }
}
@media (max-width: 544px) {
	.vj-brand__mark .vj-emblem { --vj-emblem: 40px; }
	.vj-hide-sm { display: none; }
}

/* ---------- 7. Footer ---------- */

.vybe-journal .site-primary-footer-wrap { padding-top: 56px; padding-bottom: 40px; line-height: 1.65; color: var(--vj-ink); } /* size: Astra → Footer builder → Widget 1–4 */
.vybe-journal .site-primary-footer-wrap .widget { margin-bottom: 0; }
.vj-f-about .vj-brand { margin-bottom: 14px; }
.vj-f-about .vj-brand__mark .vj-emblem { --vj-emblem: 46px; }
.vj-f-about .vj-brand__name { font-size: 1.3em; }
.vj-f-about .vj-brand__sub { font-size: .86em; }
.vj-f-about__text { max-width: 440px; color: var(--vj-ink); }
.vj-f-about__text p { margin-bottom: .5em; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-f-about__text .l-2.l-block { font-size: .92em; color: var(--vj-muted); }
.vj-f-ids { margin: 10px 0 0; font-size: .86em; color: var(--vj-muted); letter-spacing: .02em; }
.vj-f-title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--vj-line);
	font-family: var(--vjk-serif, "Journal Serif", "Noto Serif", "Noto Serif Tamil", Georgia, serif);
	font-size: 1.17em; /* Astra's footer widget title size outranks this */
	font-weight: 700;
	line-height: 1.3;
	color: var(--vj-navy);
	position: relative;
}
.vj-f-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 36px; height: 2px; background: var(--vj-gold); }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-f-title .l-2 { display: block; margin-top: 2px; font-family: var(--vjk-sans, "Journal Sans", "Noto Sans", "Noto Sans Tamil", sans-serif); font-size: .74em; font-weight: 500; color: var(--vj-gold-deep); }
.vj-f-menu, .vj-f-list { list-style: none; margin: 0; padding: 0; }
.vj-f-menu li, .vj-f-list li { margin: 0 0 8px; }
.vj-f-menu a, .vj-f-list a { color: var(--vj-navy); text-decoration: none; }
.vj-f-menu a:hover, .vj-f-list a:hover, .vj-f-menu a:focus, .vj-f-list a:focus { color: var(--vj-link); text-decoration: underline; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-f-menu .l-2 { display: block; font-size: .86em; color: var(--vj-muted); }
.vj-f-address { color: var(--vj-ink); }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-f-address .l-2.l-block { margin-top: 6px; font-size: .92em; color: var(--vj-muted); }

/* Bottom bar */
.vybe-journal .site-below-footer-wrap { color: var(--vj-muted); } /* size: Astra → Footer builder → Copyright, Footer menu */
.vybe-journal .ast-footer-copyright p { margin: 0; }
.vj-bottom { display: flex; align-items: flex-start; gap: 12px; }
.vj-bottom__text { line-height: 1.55; }
.vj-bottom__copy { font-weight: 600; color: var(--vj-navy); white-space: nowrap; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-bottom__licence .l-2 { display: none; }
.vj-cc {
	flex: none;
	margin-top: 2px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px 2px 4px;
	border-radius: 4px;
	background: var(--vj-navy);
	color: #fff !important;
	font-size: .88em;
	font-weight: 700;
	text-decoration: none !important;
	letter-spacing: .03em;
}
.vj-cc span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--vj-navy); font-size: .87em; }
.vybe-journal .site-below-footer-wrap .ast-builder-footer-menu-1 .menu-link,
.vybe-journal .site-below-footer-wrap .footer-nav-wrap .menu-link { padding: 4px 10px; }
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vybe-journal .site-below-footer-wrap .menu-link .l-2 { display: none; }

@media (max-width: 921px) {
	.vybe-journal .site-primary-footer-wrap { padding-top: 40px; }
	.vybe-journal .site-primary-footer-wrap .site-footer-section { margin-bottom: 24px; }
	.vj-bottom { justify-content: center; text-align: center; }
}

/* ---------- 8. Posts, pages and widgets outside the Kit ---------- */

.vybe-journal .entry-title, .vybe-journal .page-title { color: var(--vj-navy); }
.vybe-journal .ast-separate-container .ast-article-post,
.vybe-journal .ast-separate-container .ast-article-single { border-radius: 10px; }
.vybe-journal .entry-content :is(h2, h3) { color: var(--vj-navy); }
.vybe-journal .entry-content blockquote { border-left: 4px solid var(--vj-gold); background: var(--vj-mist); padding: 14px 20px; }
.vybe-journal .ast-button, .vybe-journal .wp-block-button__link, .vybe-journal button.ast-button { border-radius: 6px; }
.vybe-journal .widget-title { font-family: var(--vjk-serif, "Journal Serif", "Noto Serif", "Noto Serif Tamil", Georgia, serif); color: var(--vj-navy); }
.vybe-journal .post-navigation a { color: var(--vj-navy); }
:where(.vybe-journal .ast-breadcrumbs-wrapper) { font-size: .8em; color: var(--vj-muted); }

/* Quick Submit forms keep their own design, with the journal's colours */
.vybe-journal :is(.qsub-form, .qst-wrap, .qsc-verify) :is(button[type="submit"], .button-primary) { background: var(--vj-accent); border-color: var(--vj-accent); }

/* ---------- 9. 404, print, motion ---------- */

.vj-404 ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.vj-404 a {
	display: inline-flex;
	flex-direction: column;
	padding: 10px 16px;
	border: 1px solid var(--vj-line);
	border-top: 3px solid var(--vj-accent);
	border-radius: 6px;
	background: var(--vj-mist);
	color: var(--vj-navy);
	text-decoration: none;
	font-weight: 600;
}
html:not([data-vjk-lang="en"]):not([data-vjk-lang="ta"]) .vj-404 a .l-2 { font-size: .82em; font-weight: 500; color: var(--vj-muted); }
.vj-404 a:hover { background: var(--vj-paper); }

@media print {
	#masthead, .site-footer, .ast-scroll-top-icon { display: none !important; }
	body.vybe-journal { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
	.vybe-journal .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link::after,
	.vj-cta { transition: none; }
}
