/*
Theme Name:   Enhance Smart Skills (Kadence Child)
Theme URI:    https://enhancesmartskills.com
Description:  Kadence child theme that replaces the GP Premium features used on enhancesmartskills.com (Elements, sticky/mobile header, secondary nav, footer links, author box, breadcrumbs, category headings).
Author:       Enhance Smart Skills
Template:     kadence
Version:      1.3.9
Text Domain:  ess-child
*/

/* Brand tokens (match the previous GeneratePress palette; adjust in Customizer > Colors if needed) */
:root {
  --ess-font-body: Inter, system-ui, sans-serif;
  --ess-font-heading: Georgia, "Times New Roman", serif;
}

/* Author box (replaces GP Element "Author box") */
.ess-author-box { margin: 2rem 0; }
.ess-author-box img { border-radius: 50%; flex: 0 0 auto; }
.ess-author-box h4 { margin: 0 0 .25rem; }

/* Breadcrumbs */
.ess-breadcrumbs { font-size: .875rem; margin: 0 auto; padding: .75rem 1rem; max-width: var(--global-content-width, 1290px); }
.ess-breadcrumbs a { text-decoration: none; }

/* Category heading / intro */
.ess-category-heading { max-width: var(--global-content-width, 1290px); margin: 1rem auto; padding: 0 1rem; }

/* Footer quick links */
.ess-footer-links { text-align: center; padding: 1rem; }
.ess-footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* Secondary navigation */
.ess-secondary-nav { background: rgba(0,0,0,.04); }
.ess-secondary-nav ul { list-style: none; margin: 0 auto; padding: .5rem 1rem; display: flex; gap: 1.25rem; max-width: var(--global-content-width, 1290px); }

/* ---- Brand palette & typography (ported from GeneratePress customizer) ---- */
:root {
  --global-palette1: #1b78e2;  /* accent */
  --global-palette2: #14213d;  /* headings / strong accent */
  --global-palette3: #212121;  /* strong text */
  --global-palette4: #2f4468;  /* medium text */
  --global-palette5: #878787;  /* subtle text */
  --global-palette6: #f7f8f9;  /* lighter bg */
  --global-palette7: #fafafa;  /* site bg */
  --global-palette8: #ffffff;
  --global-palette9: #ffffff;
  --global-content-width: 1200px;
  --global-body-font-family: Inter, sans-serif;
  --global-heading-font-family: Georgia, "Times New Roman", serif;
}
body { font-family: Inter, sans-serif; font-size: 17px; color: #212121; background: #fafafa; }
h1, h2, h3, h4, h5, h6 { font-family: Georgia, "Times New Roman", serif; color: #14213d; }
.content-container, .site-container { max-width: 1200px; }

/* Sticky header (replaces GP Menu Plus sticky navigation) */
#masthead { position: sticky; top: 0; z-index: 999; background: #ffffff; }
.admin-bar #masthead { top: 32px; }

/* Remove Kadence's own archive title on categories (our Element already shows the heading) */
.category .post-archive-hero-section { display: none; }

/* Archive cards: hide category tags, style Read more button like the old loop template */
.archive .loop-entry .entry-taxonomies, .blog .loop-entry .entry-taxonomies { display: none; }
.ess-readmore { display: inline-block; margin-top: .5rem; padding: .5rem 1.1rem; background: #242226; color: #fff !important; border-radius: 999px; text-decoration: none; font-weight: 600; }
.ess-readmore:hover { background: #35343a; }
.loop-entry .entry-actions { display: none; }
.ess-readmore { display: table; margin-top: .75rem; }

/* Sidebar "Recent Posts" thumbnails: keep them small like the old sidebar */
.widget_recent_entries_with_thumbnails img, .rpwwt-widget img, #secondary .rpwwt-post-thumbnail img { width: 75px; height: 75px; object-fit: cover; }

/* =====================================================================
   DESIGN LAYER v2 - clean & modern
   ===================================================================== */
:root {
  --ess-navy: #14213d;
  --ess-navy-2: #2f4468;
  --ess-blue: #1b78e2;
  --ess-blue-dark: #145fb4;
  --ess-ink: #212121;
  --ess-muted: #5b6475;
  --ess-bg: #f4f7fb;
  --ess-line: rgba(20, 33, 61, .10);
  --ess-radius: 14px;
  --ess-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 10px 28px rgba(20, 33, 61, .08);
  --ess-shadow-hover: 0 2px 4px rgba(20, 33, 61, .08), 0 16px 36px rgba(20, 33, 61, .14);
}
body { background: var(--ess-bg); line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { transition: color .2s ease; }

/* Header & menu */
#masthead { box-shadow: 0 1px 0 var(--ess-line), 0 8px 24px rgba(20, 33, 61, .05); }
.header-navigation .header-menu-container > ul > li > a,
.header-navigation ul.menu > li > a { font-weight: 600; font-size: .95rem; border-radius: 999px; padding: .55rem .95rem; transition: background .2s ease, color .2s ease; }
.header-navigation ul.menu > li > a:hover,
.header-navigation ul.menu > li.current-menu-item > a,
.header-navigation ul.menu > li.current-menu-ancestor > a { background: rgba(27, 120, 226, .10); color: var(--ess-blue); }
.header-navigation ul.sub-menu { border: 1px solid var(--ess-line); border-radius: 12px; box-shadow: var(--ess-shadow); overflow: hidden; }
.header-navigation ul.sub-menu a { padding: .65rem 1rem; }

/* Page title hero */
.entry-hero .entry-hero-container-inner { background: linear-gradient(135deg, var(--ess-navy) 0%, var(--ess-navy-2) 100%) !important; }
.entry-hero .hero-section-overlay { background: transparent !important; }
.entry-hero h1, .entry-hero .entry-title { color: #fff !important; letter-spacing: -.01em; }
.entry-hero .entry-meta, .entry-hero .entry-meta a { color: rgba(255, 255, 255, .85); }

/* Content cards */
.content-style-boxed .entry.content-bg,
.content-style-boxed .comments-area,
.content-style-boxed .comment-respond { border-radius: var(--ess-radius); box-shadow: var(--ess-shadow); }

/* Buttons */
.wp-block-button__link, .wp-element-button, .button, button.button, input[type=submit] {
  border-radius: 999px; font-weight: 600; letter-spacing: .01em; transition: transform .15s ease, box-shadow .15s ease, background .2s ease; }
.wp-block-button__link:hover, .wp-element-button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(27, 120, 226, .28); }
.wp-block-button.is-style-outline .wp-block-button__link { border-width: 2px; }

/* Blog cards */
.loop-entry { border-radius: var(--ess-radius); overflow: hidden; box-shadow: var(--ess-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.loop-entry:hover { transform: translateY(-4px); box-shadow: var(--ess-shadow-hover); }
.loop-entry .post-thumbnail-inner img { transition: transform .4s ease; }
.loop-entry:hover .post-thumbnail-inner img { transform: scale(1.04); }
.loop-entry .entry-title { font-size: 1.35rem; line-height: 1.3; }
.loop-entry .entry-title a:hover { color: var(--ess-blue); }
.loop-entry .entry-meta { color: var(--ess-muted); font-size: .85rem; }
.ess-readmore:hover { transform: translateY(-1px); }

/* Article typography */
.single .entry-content { font-size: 1.07rem; }
.single .entry-content h2 { margin-top: 2.2rem; padding-bottom: .4rem; border-bottom: 2px solid rgba(27, 120, 226, .18); }
.single .entry-content h3 { margin-top: 1.6rem; }
.entry-content a { text-underline-offset: 3px; }
.entry-content blockquote, .wp-block-quote { border-left: 4px solid var(--ess-blue); background: #eef5fe; padding: 1rem 1.25rem; border-radius: 0 12px 12px 0; }
.entry-content img { border-radius: 10px; }
.entry-content table { border-radius: 10px; overflow: hidden; }
.entry-tags a, .tag-links a { border-radius: 999px; }

/* Sidebar widgets as cards */
#secondary .widget { background: #fff; border-radius: var(--ess-radius); box-shadow: var(--ess-shadow); padding: 1.25rem 1.35rem; margin-bottom: 1.5rem; }
#secondary .widget-title { font-family: Inter, sans-serif; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ess-blue); margin-bottom: .9rem; }
#secondary .widget ul { list-style: none; margin: 0; padding: 0; }
#secondary .widget li { padding: .35rem 0; border-bottom: 1px solid var(--ess-line); }
#secondary .widget li:last-child { border-bottom: 0; }
#secondary .widget a { text-decoration: none; }
#secondary .widget a:hover { color: var(--ess-blue); }

/* Footer */
.ess-footer-links { background: var(--ess-navy); color: #d9e2f2; padding: 2.5rem 1rem; margin-top: 2rem; }
.ess-footer-links h2, .ess-footer-links h3, .ess-footer-links strong { color: #fff; }
.ess-footer-links a { color: #bcd8ff; }
.ess-footer-links a:hover { color: #fff; }
.site-footer, .site-footer-wrap, .site-bottom-footer-wrap { background: #0f1a30; color: #aab6cc; }
.site-footer a { color: #cfe1ff; }

/* Breadcrumbs */
.ess-breadcrumbs { color: var(--ess-muted); }
.ess-breadcrumbs a { color: var(--ess-blue); }

/* Phones */
@media (max-width: 767px) {
  .entry-hero h1, .entry-hero .entry-title { font-size: 1.75rem; line-height: 1.25; }
  .loop-entry .entry-title { font-size: 1.2rem; }
  .single .entry-content { font-size: 1.02rem; }
  .ess-readmore { display: block; text-align: center; }
  #secondary .widget { padding: 1rem; }
  .wp-block-buttons .wp-block-button { width: 100%; }
  .wp-block-buttons .wp-block-button__link { display: block; text-align: center; }
}

/* Header refinement: logo already contains the name; keep title for screen readers only */
.site-branding .site-title-wrap, .site-branding .site-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-navigation ul.menu > li > a { padding: .5rem .8rem; white-space: nowrap; }

/* =====================================================================
   DESIGN LAYER v3 - corporate / IT-services inspired (bold hero, trust strip, CTA band)
   ===================================================================== */
.entry-hero .entry-hero-container-inner { background: radial-gradient(1200px 400px at 85% -20%, rgba(27,120,226,.45), transparent 60%), linear-gradient(135deg, #0b1630 0%, #14213d 55%, #2f4468 100%) !important; }
.home .entry-hero .entry-hero-container-inner { min-height: 280px; }
.home .entry-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; font-weight: 700; }

.ess-trust { background: #fff; border-bottom: 1px solid var(--ess-line); }
.ess-trust-inner { max-width: var(--global-content-width, 1200px); margin: 0 auto; padding: 1.25rem 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.ess-trust strong { display: block; font-family: Georgia, serif; font-size: 1.9rem; line-height: 1.1; color: var(--ess-blue); }
.ess-trust span { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ess-muted); font-weight: 600; }

.entry-content h2.wp-block-heading, .ess-sh h2, .essf h2 { position: relative; }
.entry-content > h2.wp-block-heading::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--ess-blue); margin-top: .5rem; }

.ess-cta { background: linear-gradient(135deg, #14213d, #1b4fa0); color: #fff; margin-top: 3rem; }
.ess-cta-inner { max-width: var(--global-content-width, 1200px); margin: 0 auto; padding: 3rem 1rem; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ess-cta h2 { color: #fff; margin: 0 0 .35rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.ess-cta p { margin: 0; color: #d6e4fb; }
.ess-cta-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.ess-btn { display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.ess-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.ess-btn-solid { background: #fff; color: var(--ess-navy) !important; }
.ess-btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff !important; }
.ess-footer-links { margin-top: 0; }

@media (max-width: 767px) {
  .ess-trust-inner { grid-template-columns: repeat(2, 1fr); }
  .ess-cta-inner { padding: 2rem 1rem; text-align: center; justify-content: center; }
  .ess-cta-actions { justify-content: center; width: 100%; }
}

.ess-trust { border-radius: var(--ess-radius); box-shadow: var(--ess-shadow); margin-bottom: 1.5rem; border: 0; }

/* ---- Mobile menu drawer: compact, professional ---- */
@media (max-width: 1024px) {
  #mobile-drawer .drawer-inner { width: min(86vw, 340px) !important; max-width: 340px !important; background: #fff; box-shadow: -12px 0 40px rgba(20,33,61,.25); }
  #mobile-drawer .drawer-header { border-bottom: 1px solid var(--ess-line); }
  #mobile-drawer .drawer-content { padding: .5rem 0 1.5rem; }
  #mobile-drawer .mobile-navigation { font-size: 1rem; }
  #mobile-drawer .mobile-navigation ul { margin: 0; padding: 0; list-style: none; }
  #mobile-drawer .mobile-navigation li { border-bottom: 1px solid var(--ess-line); }
  #mobile-drawer .mobile-navigation li > a,
  #mobile-drawer .mobile-navigation .drawer-nav-drop-wrap > a { padding: .85rem 1.1rem; font-weight: 600; color: var(--ess-navy); line-height: 1.3; }
  #mobile-drawer .mobile-navigation .drawer-sub-toggle { width: 48px; }
  #mobile-drawer .mobile-navigation ul ul { background: #f4f7fb; border-left: 3px solid var(--ess-blue); margin: 0 0 .25rem 1.1rem; }
  #mobile-drawer .mobile-navigation ul ul li { border-bottom: 1px solid rgba(20,33,61,.06); }
  #mobile-drawer .mobile-navigation ul ul li > a { padding: .65rem .9rem; font-size: .93rem; font-weight: 500; }
  #mobile-drawer .mobile-navigation li.current-menu-item > a,
  #mobile-drawer .mobile-navigation li > a:hover { color: var(--ess-blue); }
}

/* ---- Mobile header fix: logo already contains the name, so hide the duplicate text title and keep the menu button on screen ---- */
.mobile-site-branding .site-title-wrap, .mobile-site-branding .site-title, .mobile-site-branding .site-description,
.site-branding .site-description, a.brand .site-title-wrap, a.brand .site-title {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; padding: 0 !important; margin: 0 !important; }
@media (max-width: 1024px) {
  #mobile-header .site-main-header-inner-wrap, #mobile-header .site-header-row-container-inner { padding-left: 12px; padding-right: 12px; }
  #mobile-header .site-branding a.brand img, #mobile-header .custom-logo { max-width: 210px; height: auto; width: auto; }
  #mobile-header .site-header-row-mobile-layout-default, #mobile-header .site-main-header-inner-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
  #mobile-header .mobile-toggle-open-container, #mobile-header .menu-toggle-open { flex: 0 0 auto; margin-left: auto; }
  #mobile-header .menu-toggle-open { padding: .5rem .75rem; border-radius: 10px; color: var(--ess-navy); }
}

/* ---- Slimmer page-title banner (inner pages) ---- */
.entry-hero:not(.home .entry-hero) .entry-hero-container-inner,
body:not(.home) .entry-hero .entry-hero-container-inner { min-height: 0 !important; padding: 0 !important; }
body:not(.home) .entry-hero .hero-container { min-height: 0 !important; padding: 1.4rem 1rem !important; }
body:not(.home) .entry-hero h1, body:not(.home) .entry-hero .entry-title { font-size: clamp(1.5rem, 3vw, 2.1rem) !important; margin: 0 !important; line-height: 1.2; }
body:not(.home) .entry-hero .entry-header { min-height: 0 !important; padding: 0 !important; margin: 0; }
body:not(.home) .entry-hero .entry-meta { margin-top: .4rem; }
.home .entry-hero .entry-hero-container-inner { min-height: 220px; }
@media (max-width: 767px) {
  body:not(.home) .entry-hero .hero-container { padding: 1rem .75rem !important; }
  .home .entry-hero .entry-hero-container-inner { min-height: 160px; }
}

/* Categories: show the slim banner (single H1); hide the duplicate query-title heading from the Element. */
.category .post-archive-hero-section { display: block; }
.ess-category-heading .wp-block-query-title { display: none; }

/* Category banner: the same description already shows above the banner, so hide the duplicate inside it */
.entry-hero .archive-description, .entry-hero .hero-container p { display: none; }

/* ---- Accessibility (WCAG 2.1 AA) ---- */
:root { --global-palette1: #1565c0; --ess-blue: #1565c0; --ess-blue-dark: #0f4f9c; }
.header-navigation ul.menu > li > a, .header-navigation .menu-item > a, #mobile-drawer .mobile-navigation a { color: #2f4468; }
.header-navigation ul.menu > li > a:hover, .header-navigation ul.menu > li.current-menu-item > a,
.header-navigation ul.menu > li.current-menu-ancestor > a { color: #0f4f9c; background: rgba(21,101,192,.12); }
.entry-content p a, .entry-content li a, .ess-breadcrumbs a, .site-footer p a, .ess-footer-links p a, .widget p a { text-decoration: underline; text-underline-offset: 3px; }
.ess-readmore { background: #242226; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #0f4f9c; outline-offset: 2px; border-radius: 4px; }
.ess-cta a:focus-visible, .ess-footer-links a:focus-visible, .site-footer a:focus-visible { outline-color: #fff; }
.ess-trust span, .ess-breadcrumbs, .loop-entry .entry-meta { color: #4a5568; }
.site-footer, .site-footer-wrap, .site-bottom-footer-wrap { color: #c3cde0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .loop-entry:hover, .ess-btn:hover, .button:hover { transform: none !important; }
}

/* Accessibility: Kadence's menu uses palette 5 for text; darken it so it passes AA contrast. */
:root { --global-palette5: #5b6475; }
.header-navigation .menu > li > a, .header-navigation .menu > li > a span, .header-navigation .menu > li > .drawer-nav-drop-wrap > a { color: #2f4468; }

/* Accessibility: My Books page badge and subtitle contrast */
.ess-new { background: #a35200 !important; color: #fff !important; }
.ess-bt em { color: #1f6573 !important; }

/* ===== v1.3 usability & conversion ===== */
.ess-menu-search form { display: flex; align-items: center; background: #fff; border: 1px solid var(--ess-line); border-radius: 999px; padding: 0 .25rem 0 .9rem; margin-left: .5rem; }
.ess-menu-search input[type=search] { border: 0; background: transparent; width: 130px; min-height: 36px; padding: 0; font-size: .9rem; box-shadow: none; }
.ess-menu-search input[type=search]:focus { outline: none; }
.ess-menu-search form:focus-within { border-color: var(--ess-blue); box-shadow: 0 0 0 3px rgba(21,101,192,.2); }
.ess-menu-search button { background: transparent; border: 0; color: #2f4468; padding: .4rem .55rem; cursor: pointer; min-width: 36px; min-height: 36px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1024px) { .ess-menu-search { display: none; } }

.ess-hero-cta { margin-top: 1rem; text-align: center; }
.ess-hero-cta p { display: block !important; color: #dbe7fb; max-width: 640px; margin: 0 auto 1rem; font-size: 1.05rem; line-height: 1.5; }
.home .entry-hero .ess-btn { margin: .25rem; }
.ess-btn-blue { background: var(--ess-blue); color: #fff !important; }
.ess-btn-line { border: 2px solid var(--ess-blue); color: var(--ess-blue-dark, #0f4f9c) !important; }

.ess-post-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #eaf2fd, #f4f7fb); border: 1px solid var(--ess-line); border-radius: var(--ess-radius); padding: 1.5rem; margin: 2.5rem 0 1.5rem; }
.ess-post-cta strong { font-family: Georgia, serif; font-size: 1.3rem; color: var(--ess-navy); }
.ess-post-cta p { margin: .25rem 0 0; color: #3d4757; max-width: 520px; }
.ess-post-cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.ess-related h2 { font-size: 1.3rem; margin: 2rem 0 1rem; }
.ess-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ess-related li a { display: block; background: #fff; border-radius: var(--ess-radius); box-shadow: var(--ess-shadow); overflow: hidden; text-decoration: none; color: var(--ess-navy); height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.ess-related li a:hover { transform: translateY(-3px); box-shadow: var(--ess-shadow-hover); }
.ess-related img { width: 100%; height: 130px; object-fit: cover; display: block; border-radius: 0; }
.ess-related span { display: block; padding: .8rem 1rem 1rem; font-weight: 600; line-height: 1.35; }
@media (max-width: 767px) { .ess-related ul { grid-template-columns: 1fr; } .ess-post-cta { padding: 1.1rem; } .ess-post-cta-actions { width: 100%; } .ess-post-cta-actions .ess-btn { flex: 1; text-align: center; } }

/* ===== v1.3.1 - light, slim banner with dark text ===== */
.entry-hero .entry-hero-container-inner { background: linear-gradient(135deg, #eaf2fd 0%, #f4f7fb 60%, #ffffff 100%) !important; border-bottom: 1px solid var(--ess-line); }
.entry-hero .hero-section-overlay { background: transparent !important; }
.entry-hero h1, .entry-hero .entry-title, .entry-hero .page-title { color: var(--ess-navy) !important; letter-spacing: -.01em; }
.entry-hero .entry-meta, .entry-hero .entry-meta a { color: #4a5568 !important; }
body:not(.home) .entry-hero .hero-container { padding: .9rem 1rem !important; }
body:not(.home) .entry-hero h1, body:not(.home) .entry-hero .entry-title { font-size: clamp(1.35rem, 2.6vw, 1.8rem) !important; }
.home .entry-hero .entry-hero-container-inner { min-height: 0 !important; padding: 0 !important; }
.home .entry-hero .hero-container { min-height: 0 !important; padding: 1.6rem 1rem 1.4rem !important; }
.home .entry-hero h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.ess-hero-cta p { color: #3d4757 !important; font-size: 1rem; margin-bottom: .75rem; }
.home .entry-hero .ess-btn-solid { background: var(--ess-blue); color: #fff !important; }
.home .entry-hero .ess-btn-ghost { border-color: var(--ess-blue); color: var(--ess-blue-dark, #0f4f9c) !important; }
.home .entry-hero .ess-btn:hover { box-shadow: 0 8px 18px rgba(21,101,192,.25); }
@media (max-width: 767px) { .home .entry-hero .hero-container { padding: 1.1rem .75rem 1rem !important; } }

/* ===== v1.3.2 - fixes: banner height on home, compact search ===== */
.entry-hero .entry-header, .entry-hero .hero-container .entry-header { min-height: 0 !important; padding: 0 !important; margin: 0 !important; }
.entry-hero .entry-hero-container-inner, .entry-hero .hero-container { min-height: 0 !important; }
.ess-hero-cta p { max-width: 760px; margin: 0 auto .6rem; }
.ess-hero-cta { margin-top: .6rem; }

/* Search: icon-only that expands when used, so the menu never wraps. */
.header-navigation .ess-menu-search { flex: 0 0 auto; }
.ess-menu-search form { padding: 0 0 0 .25rem; width: 44px; overflow: hidden; transition: width .25s ease; background: transparent; border-color: transparent; margin-left: .25rem; }
.ess-menu-search input[type=search] { width: 0; min-width: 0; opacity: 0; transition: width .25s ease, opacity .2s ease; }
.ess-menu-search form:focus-within, .ess-menu-search form:hover { width: 190px; background: #fff; border-color: var(--ess-line); }
.ess-menu-search form:focus-within input[type=search], .ess-menu-search form:hover input[type=search] { width: 140px; opacity: 1; padding-left: .5rem; }
.ess-menu-search button { flex: 0 0 auto; }
@media (max-width: 1280px) { .header-navigation ul.menu > li > a { padding: .5rem .55rem; font-size: .9rem; } }

/* ===== v1.3.4 - My Books: icon links instead of buttons ===== */
.ess-tbl td.ess-buy { min-width: 320px; }
.ess-tbl .ess-fmt { display: grid !important; grid-template-columns: 86px auto; justify-content: start; align-items: center; gap: .5rem; margin: 0 0 .4rem !important; }
.ess-tbl .ess-fmt:last-child { margin-bottom: 0 !important; }
.ess-tbl .ess-fl { font-size: .72rem !important; font-weight: 700 !important; letter-spacing: .07em; text-transform: uppercase; color: #4a5568 !important; }
.ess-tbl .ess-stores { display: flex !important; flex-wrap: wrap; justify-content: flex-start !important; gap: .15rem .9rem !important; }
.ess-tbl a.ess-store { display: inline-flex !important; align-items: center; gap: .4rem; padding: .3rem .1rem !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important;
  color: #0f4f9c !important; font-size: .9rem !important; font-weight: 600 !important; text-decoration: none !important; min-width: 0; white-space: nowrap; line-height: 1.2;
  background-image: linear-gradient(currentColor, currentColor) !important; background-repeat: no-repeat !important; background-position: 0 100% !important; background-size: 0 2px !important; transition: background-size .2s ease, color .15s ease; }
.ess-tbl a.ess-store::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 100 4 2 2 0 000-4zm10 0a2 2 0 100 4 2 2 0 000-4zM1 2v2h2l3.6 7.6-1.4 2.4A2 2 0 007 17h12v-2H7.4l1.1-2h7.5a2 2 0 001.7-1l3.6-6.5A1 1 0 0020.4 4H5.2L4.3 2H1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18a2 2 0 100 4 2 2 0 000-4zm10 0a2 2 0 100 4 2 2 0 000-4zM1 2v2h2l3.6 7.6-1.4 2.4A2 2 0 007 17h12v-2H7.4l1.1-2h7.5a2 2 0 001.7-1l3.6-6.5A1 1 0 0020.4 4H5.2L4.3 2H1z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ess-tbl a.ess-store::after { content: "\2197"; font-size: .85em; opacity: .7; transition: transform .15s ease; }
.ess-tbl a.ess-store.in { color: #1f6573 !important; }
.ess-tbl a.ess-store:hover { color: #0b3f7e !important; background-size: 100% 2px !important; }
.ess-tbl a.ess-store:hover::after { transform: translate(2px, -2px); }
.ess-tbl a.ess-store:focus-visible { outline: 3px solid #14213d; outline-offset: 2px; border-radius: 4px !important; }
@media (max-width: 767px) {
  .ess-tbl td.ess-buy { min-width: 0; }
  .ess-tbl .ess-fmt { grid-template-columns: 1fr !important; gap: .15rem; }
  .ess-tbl a.ess-store { padding: .5rem .1rem !important; font-size: .95rem !important; }
}

/* ===== v1.3.5 - distinct colour per store (all pass AA contrast on white) ===== */
.ess-tbl a.ess-store.com { color: #0b4f9e !important; }                 /* Amazon.com - blue */
.ess-tbl a.ess-store.in { color: #b34700 !important; }                  /* Amazon.in - burnt orange */
.ess-tbl a.ess-store[href*="pothi.com"] { color: #6a2fa0 !important; }  /* Pothi - purple */
.ess-tbl a.ess-store.com:hover { color: #073a75 !important; }
.ess-tbl a.ess-store.in:hover { color: #8a3600 !important; }
.ess-tbl a.ess-store[href*="pothi.com"]:hover { color: #4d1f78 !important; }

/* ===== v1.3.6 - light footer ===== */
.ess-footer-links { background: #eaf1fa !important; color: #2f3b52 !important; border-top: 1px solid var(--ess-line); margin-top: 0; }
.ess-footer-links h2, .ess-footer-links h3, .ess-footer-links h4, .ess-footer-links strong { color: #14213d !important; }
.ess-footer-links p, .ess-footer-links li, .ess-footer-links span { color: #2f3b52 !important; }
.ess-footer-links a { color: #0f4f9c !important; text-decoration: underline; text-underline-offset: 3px; }
.ess-footer-links a:hover { color: #073a75 !important; }
.ess-footer-links a:focus-visible { outline-color: #14213d; }
.site-footer, .site-footer-wrap, .site-bottom-footer-wrap { background: #f4f7fb !important; color: #3d4757 !important; }
.site-footer a { color: #0f4f9c !important; }
.site-bottom-footer-wrap { border-top: 1px solid var(--ess-line); }

/* ===== v1.3.7 - compact, left-aligned footer ===== */
.ess-footer-links { padding: 1.75rem 1rem 1.25rem !important; font-size: .875rem; text-align: left !important; }
.ess-footer-links .wp-block-group__inner-container { max-width: var(--global-content-width, 1200px); margin: 0 auto; }
.ess-footer-links .ess-footer-cols { gap: 1.5rem 2.5rem !important; margin: 0 !important; align-items: flex-start; }
.ess-footer-links .ess-footer-cols > .wp-block-column { text-align: left !important; flex-basis: 0 !important; }
.ess-footer-links .ess-footer-cols > .wp-block-column:first-child { flex-grow: 1.6; }
.ess-footer-links .ess-fbrand { font-family: Georgia, serif; font-size: 1.1rem !important; font-weight: 700 !important; color: #14213d !important; margin: 0 0 .4rem !important; text-align: left !important; }
.ess-footer-links .ess-fdesc { font-size: .84rem !important; line-height: 1.55 !important; margin: 0 0 .75rem !important; max-width: 320px; text-align: left !important; color: #3d4757 !important; }
.ess-footer-links .ess-fh { font-size: .72rem !important; font-weight: 700 !important; letter-spacing: .09em; text-transform: uppercase; color: #14213d !important; margin: 0 0 .6rem !important; text-align: left !important; }
.ess-footer-links ul.ess-flist { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex !important; flex-direction: column; gap: .3rem !important; align-items: flex-start !important; }
.ess-footer-links ul.ess-flist li { margin: 0 !important; padding: 0 !important; font-size: .85rem; line-height: 1.35; }
.ess-footer-links ul.ess-flist a { text-decoration: none; }
.ess-footer-links ul.ess-flist a:hover { text-decoration: underline; }
.ess-footer-links .ess-social { gap: .65rem !important; justify-content: flex-start !important; margin: 0 !important; }
.ess-footer-links .ess-social a { display: inline-flex; padding: .2rem; }
.ess-footer-links .ess-social svg { width: 20px !important; height: 20px !important; }
.site-bottom-footer-wrap .site-footer-row-container-inner, .site-bottom-footer-inner-wrap { padding-top: .6rem !important; padding-bottom: .6rem !important; min-height: 0 !important; }
.site-bottom-footer-wrap, .site-bottom-footer-wrap .footer-html { font-size: .8rem !important; }
@media (max-width: 767px) {
  .ess-footer-links { padding: 1.5rem 1rem 1rem !important; }
  .ess-footer-links .ess-footer-cols { gap: 1.25rem !important; }
  .ess-footer-links .ess-footer-cols > .wp-block-column { flex-basis: 100% !important; }
}
.ess-cta { margin-top: 2rem; }
.ess-cta-inner { padding: 1.5rem 1rem !important; }
.ess-cta h2 { font-size: clamp(1.15rem, 2.2vw, 1.5rem) !important; }
.ess-cta p { font-size: .92rem; }
.ess-cta .ess-btn { padding: .6rem 1.2rem; font-size: .9rem; }

/* v1.3.8 related-book box */
.ess-book-box { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--ess-line); border-left: 4px solid #1565c0; border-radius: var(--ess-radius); padding: 1.1rem 1.4rem; margin: 1.2rem 0; }
.ess-book-box strong { display: block; font-family: Georgia, serif; font-size: 1.15rem; color: var(--ess-navy); }
.ess-book-box p { margin: .2rem 0 0; color: #3d4757; font-size: .95rem; }
.ess-book-kicker { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #5b6475; font-weight: 600; }
@media (max-width: 767px) { .ess-book-box { padding: 1rem; } .ess-book-box .ess-post-cta-actions { width: 100%; } .ess-book-box .ess-post-cta-actions .ess-btn { flex: 1; text-align: center; } }
