/* Leadminds unified colours for hero and primary section headings. */

:root {
  --lm-heading-teal: #42a6a6;
  --lm-heading-yellow: #faba3e;
}

/* Hero titles and the large, primary headings used throughout the site. */
html body main :is(
  .hero,
  .page-hero,
  .booking-hero,
  .hero-premium-section,
  [class*="reference-hero"],
  [class*="hero-showcase"]
) :is(h1, .hero-title, .hero-premium-title),
html body main .section :is(.section-head, .section-heading) > h2,
html body main .section .section-head h2,
html body main .section .section-heading h2,
html body main .section > .container > h2,
html body main .section > .container.narrow > h2,
html body main .section .proof-copy > h2,
html body main .section .split-intro h2,
html body main :is(.page-title, .section-title, .main-title) {
  color: var(--lm-heading-teal) !important;
  -webkit-text-fill-color: var(--lm-heading-teal) !important;
  text-decoration-color: var(--lm-heading-teal) !important;
}

/* The homepage hero uses the coral/gold palette, so its title stays teal. */
html body.home-page main .hero-premium-section :is(h1, .hero-title, .hero-premium-title) {
  color: var(--lm-heading-teal) !important;
  -webkit-text-fill-color: var(--lm-heading-teal) !important;
}

/* The rotating words have their own gradient/transparent fill in the base theme. */
html body.home-page main .hero-premium-section .hero-premium-title [data-slogan-text] {
  color: var(--lm-heading-teal) !important;
  -webkit-text-fill-color: var(--lm-heading-teal) !important;
  background: none !important;
  background-image: none !important;
  text-shadow: none !important;
}

html body.home-page main .hero-premium-section .hero-premium-title .typing-cursor {
  color: var(--lm-heading-teal) !important;
  background: var(--lm-heading-teal) !important;
  -webkit-text-fill-color: var(--lm-heading-teal) !important;
}

/* Yellow is reserved for titles sitting on teal or similarly dark surfaces. */
html body:not(.home-page) main :is(
  .page-hero,
  .booking-hero,
  [class*="reference-hero"],
  [class*="hero-showcase"]
) :is(h1, .hero-title, .hero-premium-title),
html body main .section-dark :is(h1, h2, .section-title, .section-heading),
html body main :is(.section-head, .section-heading).light h2,
html body main [class*="bg-teal"] :is(h1, h2, .section-title),
html body main [class*="teal-section"] :is(h1, h2, .section-title) {
  color: var(--lm-heading-yellow) !important;
  -webkit-text-fill-color: var(--lm-heading-yellow) !important;
  text-decoration-color: var(--lm-heading-yellow) !important;
}

/* Case studies & success stories page hero title explicitly turquoise */
html body:not(.home-page) main :is(.page-hero, [class*="case-study"], [class*="reference-hero"], .partners-hero) :is(.case-study-reference-copy, .page-hero-copy, .case-study-hero-copy) :is(h1, .hero-title, .page-hero-title),
html body:is(.case-study-view, .case-study-page) main :is(.page-hero, .case-study-reference-hero, .partners-hero) :is(h1, .page-hero-title, .hero-title),
html body main :is(.case-study-reference-hero, .case-study-reference-copy, .partners-hero) :is(h1, .page-hero-title, .hero-title) {
  color: #42a6a6 !important;
  -webkit-text-fill-color: #42a6a6 !important;
  text-decoration-color: #42a6a6 !important;
}

/* SLOGAN VISIBILITY OVERRIDE */
.site-header.premium-header .logo-slogan,
.premium-header .logo-slogan,
.logo-slogan {
    display: block !important;
    font-size: 11px !important;
    color: #7c9494 !important;
    font-weight: 500 !important;
    white-space: normal !important;
    margin-top: 2px !important;
}

.footer-slogan {
    display: block !important;
    font-weight: 700 !important;
    color: #faba3d !important;
    margin: 0.35rem 0 0.55rem !important;
}


/* ==========================================================================
   GLOBAL MOBILE HERO TEXT REDUCTION (ALL PAGES)
   ========================================================================== */
@media (max-width: 991px) {
  body .hero h1,
  body .hero-copy h1,
  body .page-hero-copy h1,
  body .hero-showcase .hero-copy h1,
  body .hero-homepage .hero-copy h1,
  body .course-header h1,
  body .post-header h1,
  body .page-header h1,
  body .hero-content h1,
  body .section-hero h1,
  body h1.hero-title,
  body h1.page-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
    max-width: 100% !important;
  }
  
  body .hero p,
  body .hero-copy p,
  body .page-hero-copy p,
  body .hero-showcase .hero-copy p,
  body .hero-homepage .hero-copy p,
  body .page-header p,
  body .hero-content p,
  body .section-hero p,
  body p.hero-subtitle {
    font-size: clamp(0.9rem, 4.5vw, 1.1rem) !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
    max-width: 100% !important;
  }
}



/* ==========================================================================
   CENTERED MOBILE HEADER SLOGAN - V4 (ABSOLUTE CENTERING)
   ========================================================================== */
@media (max-width: 991px) {
  /* 1. Ensure header-shell is the relative parent */
  body .site-header .header-shell,
  body .site-header.premium-header .header-shell {
    position: relative !important;
  }
  
  /* 2. Remove any relative positioning from brand link and its wrappers */
  body .site-header .brand,
  body .site-header.premium-header .brand,
  html[dir="rtl"] body .site-header.premium-header .brand,
  body a.brand,
  body a.brand-saas {
    position: static !important;
  }

  /* 3. Absolute position the slogan in the exact center of header-shell */
  body .site-header .brand .logo-slogan,
  body .site-header.premium-header .brand .logo-slogan,
  body .site-header.premium-header .brand-saas .logo-slogan,
  body a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header.premium-header a.brand span.logo-slogan,
  html[dir="rtl"] body .site-header a.brand span.logo-slogan {

    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* 4. Formatting */
    width: 125px !important;
    max-width: 130px !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.7)) !important;
    direction: rtl !important;
  }
}


/* ==========================================================================
   MOBILE MENU CONTAINER OVERFLOW FIX - V7 (ALLOW FULL TEXT)
   ========================================================================== */
@media (max-width: 991px) {
  /* Remove overflow-x: hidden from parent containers that clip the text */
  body .premium-header .site-nav.site-nav-saas .drawer-content,
  body .premium-header .site-nav.site-nav-saas .navigation-container,
  body .site-nav .drawer-content,
  body .site-nav .navigation-container {
    overflow-x: visible !important;
    overflow: visible !important;
  }

  /* nav-panel must allow overflow too */
  body .premium-header .site-nav.site-nav-saas .nav-panel {
    overflow-x: visible !important;
  }

  /* nav-list items should not clip */  
  body .premium-header .site-nav.site-nav-saas .nav-list,
  body .nav-list {
    overflow: visible !important;
  }

  /* nav-item-dropdown should not clip */
  body .nav-item-dropdown,
  body .premium-header .nav-item-dropdown {
    overflow: visible !important;
  }

  /* open dropdown menu must show all content */
  body .premium-header .site-nav.site-nav-saas .nav-item-dropdown.open .nav-dropdown-menu,
  body .nav-item-dropdown.open .nav-dropdown-menu {
    overflow: visible !important;
    max-height: 2500px !important;
  }

  /* Force dropdown links to wrap text */
  body .nav-dropdown-link,
  body .premium-header .nav-dropdown-link,
  body .site-nav .nav-dropdown-link {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: unset !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    line-height: 1.5 !important;
  }
}



/* ==========================================================================
   MOBILE MENU DROPDOWN FIX - V8 (ACCORDION STYLE FOR MOBILE)
   ========================================================================== */
@media (max-width: 991px) {
  body .premium-header .nav-dropdown-menu,
  body .site-header .nav-dropdown-menu,
  body .site-nav-saas .nav-dropdown-menu,
  body .site-header.premium-header .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    inset-inline-start: 0 !important;
    left: 0 !important;
    right: auto !important;
    margin-top: 0.5rem !important;
    min-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
