/* IA Site Harmony — brand layer for indriariadna.com (GeneratePress) */

/* ---------- 1. Design tokens (same values as the new Program/Home pages) ---------- */
:root {
	--ia-forest: #174C4A;
	--ia-forest-dark: #0F3836;
	--ia-rust: #C96B52;
	--ia-ink: #202522;
	--ia-muted: #626865;
	--ia-line: #E6E7E3;
	--ia-sage: #8FA7A3;
	--ia-sage-soft: #C9D6D3;
	--ia-cream: #F8F7F3;
	--ia-white: #FFFFFF;
	--ia-blush: #F3DDD6;
	--ia-display: 'DM Serif Display', Georgia, serif;
	--ia-body: 'Manrope', system-ui, -apple-system, sans-serif;
	--ia-radius: 14px;
	--ia-shadow: 0 10px 28px rgba(32, 37, 34, .09);
}

/* Old Kadence theme palette → brand. Blocks written under the Kadence theme
   reference --global-paletteN and .has-theme-paletteN-* which no longer exist. */
body.ia-sh-brand-tokens {
	--global-palette1: var(--ia-rust);
	--global-palette2: var(--ia-forest);
	--global-palette3: var(--ia-ink);
	--global-palette4: var(--ia-ink);
	--global-palette5: var(--ia-muted);
	--global-palette6: var(--ia-sage);
	--global-palette7: var(--ia-line);
	--global-palette8: var(--ia-cream);
	--global-palette9: var(--ia-white);
}
.ia-sh-brand-tokens .has-theme-palette-1-color, .ia-sh-brand-tokens .has-theme-palette1-color { color: var(--ia-rust) !important; }
.ia-sh-brand-tokens .has-theme-palette-2-color, .ia-sh-brand-tokens .has-theme-palette2-color { color: var(--ia-forest) !important; }
.ia-sh-brand-tokens .has-theme-palette-3-color, .ia-sh-brand-tokens .has-theme-palette3-color,
.ia-sh-brand-tokens .has-theme-palette-4-color, .ia-sh-brand-tokens .has-theme-palette4-color { color: var(--ia-ink) !important; }
.ia-sh-brand-tokens .has-theme-palette-5-color, .ia-sh-brand-tokens .has-theme-palette5-color { color: var(--ia-muted) !important; }
.ia-sh-brand-tokens .has-theme-palette-8-color, .ia-sh-brand-tokens .has-theme-palette8-color { color: var(--ia-cream) !important; }
.ia-sh-brand-tokens .has-theme-palette-9-color, .ia-sh-brand-tokens .has-theme-palette9-color { color: var(--ia-white) !important; }
.ia-sh-brand-tokens .has-theme-palette-1-background-color, .ia-sh-brand-tokens .has-theme-palette1-background-color { background-color: var(--ia-rust) !important; }
.ia-sh-brand-tokens .has-theme-palette-2-background-color, .ia-sh-brand-tokens .has-theme-palette2-background-color { background-color: var(--ia-forest) !important; }
.ia-sh-brand-tokens .has-theme-palette-7-background-color, .ia-sh-brand-tokens .has-theme-palette7-background-color,
.ia-sh-brand-tokens .has-theme-palette-8-background-color, .ia-sh-brand-tokens .has-theme-palette8-background-color { background-color: var(--ia-cream) !important; }
.ia-sh-brand-tokens .has-theme-palette-9-background-color, .ia-sh-brand-tokens .has-theme-palette9-background-color { background-color: var(--ia-white) !important; }

/* ---------- 2. Content typography ---------- */
.ia-sh-typography .entry-content,
.ia-sh-typography .entry-summary {
	font-family: var(--ia-body);
	color: var(--ia-ink);
}
.ia-sh-typography .entry-title,
.ia-sh-typography .page-title,
.ia-sh-typography .entry-content h1,
.ia-sh-typography .entry-content h2,
.ia-sh-typography .entry-content h3,
.ia-sh-typography .entry-content .wp-block-kadence-advancedheading:is(h1, h2, h3) {
	font-family: var(--ia-display) !important;
	font-weight: 400 !important;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ia-ink);
	text-wrap: balance;
}
.ia-sh-typography .entry-content h4,
.ia-sh-typography .entry-content h5,
.ia-sh-typography .entry-content h6 {
	font-family: var(--ia-body) !important;
	font-weight: 700 !important;
	color: var(--ia-ink);
}
/* Kadence headings that were styled as body copy (e.g. paragraph-like "h4/h5" blocks) */
.ia-sh-typography .entry-content p.wp-block-kadence-advancedheading,
.ia-sh-typography .entry-content div.wp-block-kadence-advancedheading {
	font-family: var(--ia-body) !important;
	font-weight: 400 !important;
}
.ia-sh-typography .entry-content a:not(.ia-btn):not(.wp-block-button__link):not(.button):not([class*="kt-button"]) {
	color: var(--ia-rust);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.ia-sh-typography .entry-content a:not(.ia-btn):not(.wp-block-button__link):not(.button):hover { color: var(--ia-forest); }

/* Yellow default <mark> / Kadence highlight → soft brand highlight */
/* Not limited to .entry-content: product, course (Tutor) and excerpt text uses it too. */
.ia-sh-typography mark:not(.count),
.ia-sh-typography .kt-highlight,
.ia-sh-typography mark.has-inline-color[style*="background"] {
	background: linear-gradient(transparent 55%, var(--ia-blush) 55%) !important;
	color: inherit !important;
	padding: 0 .1em;
}

/* Tables & media never overflow on mobile */
.ia-sh-typography .entry-content table { width: 100%; border-collapse: collapse; font-size: .95em; }
.ia-sh-typography .entry-content th, .ia-sh-typography .entry-content td { border: 1px solid var(--ia-line); padding: .6em .8em; vertical-align: top; }
.ia-sh-typography .entry-content th { background: var(--ia-cream); text-align: left; }
.ia-sh-typography .entry-content .wp-block-table, .ia-sh-typography .entry-content figure.wp-block-table { overflow-x: auto; }
.ia-sh-typography .entry-content img, .ia-sh-typography .entry-content iframe, .ia-sh-typography .entry-content video { max-width: 100%; height: auto; }
.ia-sh-typography .entry-content iframe[src*="youtube"] { aspect-ratio: 16 / 9; width: 100%; height: auto; }

/* Buttons: Gutenberg, WooCommerce and fallback Kadence buttons share one style */
.ia-sh-typography .wp-block-button__link,
.ia-sh-typography .woocommerce a.button,
.ia-sh-typography .woocommerce button.button,
.ia-sh-typography .woocommerce .single_add_to_cart_button,
.ia-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
	min-height: 48px;
	padding: .8em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--ia-forest) !important;
	color: var(--ia-white) !important;
	font-family: var(--ia-body);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	box-shadow: var(--ia-shadow);
	transition: background .2s ease, transform .2s ease;
}
.ia-sh-typography .wp-block-button__link:hover,
.ia-sh-typography .woocommerce a.button:hover,
.ia-sh-typography .woocommerce button.button:hover,
.ia-btn:hover { background: var(--ia-forest-dark) !important; transform: translateY(-1px); }
.ia-btn--static { background: var(--ia-sage) !important; box-shadow: none; }

/* ---------- 3. Kadence fallback (plugin inactive) ---------- */
.ia-btns, .ia-sh-kb-fallback .wp-block-kadence-advancedbtn { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.ia-btns--center { justify-content: center; }
.ia-btns--right { justify-content: flex-end; }
.ia-btns .wp-block-kadence-advancedbtn { margin: 0; }

.ia-row { margin: 2em 0; }
.ia-row__inner { display: grid; gap: clamp(16px, 3vw, 32px); }
.ia-row--v-middle .ia-row__inner { align-items: center; }
.ia-row--bg-palette2, .ia-row--bg-palette1 { background: var(--ia-forest); color: var(--ia-cream); padding: clamp(24px, 5vw, 56px); border-radius: var(--ia-radius); }
.ia-row--bg-palette2 :is(h1, h2, h3, h4, p, li), .ia-row--bg-palette1 :is(h1, h2, h3, h4, p, li) { color: var(--ia-cream) !important; }
.ia-row--bg-palette7, .ia-row--bg-palette8 { background: var(--ia-cream); padding: clamp(24px, 5vw, 56px); border-radius: var(--ia-radius); }
/* Columns follow the real number of columns in the row (set by PHP). */
@media (min-width: 768px) {
	.ia-row--cols-2 .ia-row__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ia-row--cols-3 .ia-row__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ia-row--cols-4 .ia-row__inner,
	.ia-row--cols-5 .ia-row__inner,
	.ia-row--cols-6 .ia-row__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ia-row--cols-2.ia-row--left-golden .ia-row__inner { grid-template-columns: 2fr 1fr; }
	.ia-row--cols-2.ia-row--right-golden .ia-row__inner { grid-template-columns: 1fr 2fr; }
	.ia-row--cols-2.ia-row--left-forty .ia-row__inner { grid-template-columns: 2fr 3fr; }
	.ia-row--cols-2.ia-row--right-forty .ia-row__inner { grid-template-columns: 3fr 2fr; }
	/* Safety net: an empty column (no content) does not take a grid track. */
	.ia-row__inner > .wp-block-kadence-column:empty,
	.ia-row__inner > .wp-block-kadence-column:has(> .kt-inside-inner-col:empty) { display: none; }
}
@media (min-width: 1024px) {
	.ia-row--cols-4 .ia-row__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ia-row--cols-5 .ia-row__inner { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.ia-row--cols-6 .ia-row__inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ia-sh-kb-fallback .kt-inside-inner-col > :first-child { margin-top: 0; }

/* Icon lists: empty icon placeholders → brand check mark */
.ia-sh-kb-fallback .kt-svg-icon-list { list-style: none; padding-left: 0; margin-left: 0; }
.ia-sh-kb-fallback .kt-svg-icon-list-item-wrap { display: flex; gap: .7em; align-items: flex-start; margin-bottom: .7em; }
.ia-sh-kb-fallback .kadence-dynamic-icon:empty,
.ia-sh-kb-fallback .kt-info-svg-icon:empty {
	flex: 0 0 auto;
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	margin-top: .2em;
	border-radius: 50%;
	background: var(--ia-forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8F7F3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 65% no-repeat;
}
.ia-sh-kb-fallback .wp-block-kadence-single-icon:empty,
.ia-sh-kb-fallback .kt-svg-icon-wrap:empty { display: none; }

/* Info boxes → cards */
.ia-sh-kb-fallback .wp-block-kadence-infobox .kt-blocks-info-box-link-wrap {
	display: block;
	height: 100%;
	background: var(--ia-white);
	border: 1px solid var(--ia-line);
	border-radius: var(--ia-radius);
	padding: 24px;
	color: inherit;
	text-decoration: none;
}
.ia-sh-kb-fallback .kt-blocks-info-box-media-container:has(.kt-info-svg-icon:empty) { margin-bottom: .6em; }
.ia-sh-kb-fallback .kt-blocks-info-box-number { font-family: var(--ia-display); font-size: 2rem; color: var(--ia-rust); }

/* Accordion */
.ia-sh-kb-fallback .kt-accordion-pane { border-bottom: 1px solid var(--ia-line); }
.ia-sh-kb-fallback .kt-blocks-accordion-header {
	all: unset;
	box-sizing: border-box;
	display: flex;
	width: 100%;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	padding: 1em 0;
	cursor: pointer;
	font-family: var(--ia-body);
	font-weight: 700;
	color: var(--ia-ink);
}
.ia-sh-kb-fallback .kt-blocks-accordion-header:focus-visible { outline: 3px solid var(--ia-rust); outline-offset: 3px; }
.ia-sh-kb-fallback .kt-blocks-accordion-icon-trigger { flex: 0 0 auto; width: 14px; height: 14px; position: relative; }
.ia-sh-kb-fallback .kt-blocks-accordion-icon-trigger::before,
.ia-sh-kb-fallback .kt-blocks-accordion-icon-trigger::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--ia-forest); transition: transform .2s; }
.ia-sh-kb-fallback .kt-blocks-accordion-icon-trigger::after { transform: rotate(90deg); }
.ia-sh-kb-fallback .ia-open > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger::after { transform: rotate(0deg); }
.ia-sh-kb-fallback.ia-js .kt-accordion-panel { display: none; }
.ia-sh-kb-fallback.ia-js .ia-open > .kt-accordion-panel { display: block; padding-bottom: 1em; }

/* Tabs */
.ia-sh-kb-fallback .kt-tabs-title-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 1em; padding: 0; }
.ia-sh-kb-fallback .kt-tab-title { display: inline-block; padding: .6em 1.1em; border-radius: 999px; border: 1px solid var(--ia-line); color: var(--ia-ink); text-decoration: none; cursor: pointer; }
.ia-sh-kb-fallback .ia-tab-active > .kt-tab-title, .ia-sh-kb-fallback .kt-tab-title-active > .kt-tab-title { background: var(--ia-forest); color: var(--ia-cream); border-color: var(--ia-forest); }
.ia-sh-kb-fallback.ia-js .kt-tabs-content-wrap > .wp-block-kadence-tab { display: none; }
.ia-sh-kb-fallback.ia-js .kt-tabs-content-wrap > .wp-block-kadence-tab.ia-tab-show { display: block; }

/* Kadence images */
.ia-sh-kb-fallback .kb-image-is-ratio-size img, .ia-sh-kb-fallback .kb-is-ratio-image img { width: 100%; height: 100%; object-fit: cover; }
.ia-sh-kb-fallback .wp-block-kadence-image img { border-radius: 10px; }

/* ---------- 4. Bundled pages in an iframe ---------- */
.ia-bundle-frame { display: block; width: 100%; min-height: 100vh; border: 0; background: var(--ia-cream); }
.ia-sh-bundle-page .entry-header {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ia-sh-bundle-page .site-content .content-area,
.ia-sh-bundle-page .site-main,
.ia-sh-bundle-page .inside-article,
.ia-sh-bundle-page .entry-content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
.ia-sh-bundle-page .site-content, .ia-sh-bundle-page .grid-container.site-content { max-width: none !important; padding: 0 !important; }

/* ---------- 5. Author box ---------- */
.ia-author-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin: 3em 0 1em;
	padding: 24px;
	background: var(--ia-cream);
	border: 1px solid var(--ia-line);
	border-radius: var(--ia-radius);
	font-family: var(--ia-body);
}
.ia-author-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: 0 0 80px; }
.ia-author-box p { margin: 0 0 .35em; }
.ia-author-eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ia-rust); font-weight: 700; }
.ia-author-name { font-family: var(--ia-display); font-size: 1.35rem; }
.ia-author-name a { color: var(--ia-ink) !important; text-decoration: none; }
.ia-author-bio { color: var(--ia-muted); font-size: .95rem; line-height: 1.6; }
.ia-author-updated { font-size: .8rem; color: var(--ia-muted); }
@media (max-width: 540px) { .ia-author-box { flex-direction: column; } }

/* ---------- Mobile header (GeneratePress Menu Plus) ----------
   Customizer sets the logo to 60px tall = ~340px wide, which pushes the menu
   button onto a second row under the transparent header, where it sits on top
   of the first line of the page. Keep logo + icons + toggle on one row. */
@media (max-width: 1024px) {
	.ia-sh-mobile-logo #mobile-header .inside-navigation { display: flex; flex-wrap: wrap; align-items: center; min-height: 60px; }
	.ia-sh-mobile-logo #mobile-header .site-logo.mobile-header-logo { order: 0; flex: 0 0 auto; margin: 0 auto 0 16px; }
	.ia-sh-mobile-logo #mobile-header .site-logo.mobile-header-logo a { display: block; line-height: 0; }
	.ia-sh-mobile-logo #mobile-header .site-logo.mobile-header-logo img { width: 150px !important; max-width: 42vw; height: auto !important; }
	.ia-sh-mobile-logo #mobile-header .menu-bar-items { order: 1; margin-left: auto; }
	.ia-sh-mobile-logo #mobile-header .menu-toggle { order: 2; }
}
