.blog-page {
  overflow-x: hidden;
}

.blog-reference-hero {
  --blog-hero-gold: #fabb3f;
  --blog-hero-dark: #164b4d;
  --blog-hero-mid: #2f777a;
  --blog-hero-light: #4b9ea4;
  --blog-hero-line: rgba(13, 68, 70, 0.62);
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: clamp(700px, calc(100svh - 82px), 980px);
  padding-block: 0 !important;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 5% 96%, rgba(108, 196, 203, 0.34), transparent 34%),
    linear-gradient(90deg, var(--blog-hero-light) 0%, var(--blog-hero-mid) 43%, var(--blog-hero-dark) 100%) !important;
}

.blog-reference-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.82;
  background-image:
    radial-gradient(circle 350px at 7% 27%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
    radial-gradient(circle 370px at 29% 82%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
    radial-gradient(circle 330px at 74% 42%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
    radial-gradient(circle 420px at 92% 102%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
    repeating-linear-gradient(0deg, transparent 0 254px, var(--blog-hero-line) 255px 258px),
    repeating-linear-gradient(90deg, transparent 0 238px, var(--blog-hero-line) 239px 242px);
}

.blog-reference-hero::after {
  display: none;
}

.blog-reference-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.59fr) minmax(390px, 0.41fr) !important;
  align-items: center !important;
  gap: clamp(30px, 5vw, 86px) !important;
  min-height: inherit;
  direction: ltr;
}

.blog-reference-hero .page-hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  width: min(100%, 780px);
  margin: 0;
  padding: clamp(40px, 4vw, 72px) clamp(18px, 3.5vw, 62px);
  align-content: center;
  justify-items: center;
  direction: rtl;
  text-align: center !important;
}

.blog-reference-hero .page-hero-copy::after {
  display: none;
}

.blog-reference-hero .eyebrow {
  display: inline-flex;
  width: auto;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin: 0 0 1rem;
  padding: 0.55rem 1.35rem;
  color: #fff !important;
  background: var(--blog-hero-gold) !important;
  border: 0 !important;
  border-radius: 999px;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0;
  box-shadow: none;
}

.blog-reference-hero .page-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--blog-hero-gold) !important;
  font-size: clamp(3rem, 4.55vw, 5rem) !important;
  font-weight: 800;
  line-height: 1.2 !important;
  text-shadow: none;
}

.blog-reference-hero .page-hero-copy p {
  max-width: 720px;
  margin: clamp(1.6rem, 3vw, 2.7rem) auto 0;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: clamp(1.05rem, 1.45vw, 1.32rem);
  font-weight: 500;
  line-height: 1.9;
  text-align: center !important;
  text-shadow: 0 3px 18px rgba(4, 49, 51, 0.2);
}

.blog-reference-hero .hero-related-actions {
  justify-content: center;
  margin-top: clamp(1.8rem, 3vw, 3rem);
}

.blog-reference-hero .hero-related-link {
  min-width: 150px;
  min-height: 54px;
  color: #164b4d !important;
  background: var(--blog-hero-gold) !important;
  border-color: var(--blog-hero-gold) !important;
  box-shadow: 0 14px 28px rgba(4, 49, 51, 0.18);
}

.blog-reference-hero .hero-related-link:hover {
  color: #164b4d !important;
  background: #ffd16d !important;
  border-color: #ffd16d !important;
}

.blog-reference-hero__mark.page-hero-media {
  position: relative;
  z-index: 2;
  grid-column: 2;
  display: block;
  width: min(100%, 475px);
  height: auto;
  aspect-ratio: 0.62;
  min-height: 0 !important;
  justify-self: end;
  overflow: visible;
  direction: ltr;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.blog-reference-hero__mark.page-hero-media::after {
  display: none;
}

.blog-reference-hero__piece {
  position: absolute;
  display: block;
  background: var(--blog-hero-gold);
}

.blog-reference-hero__piece--wide-one {
  top: 0;
  left: 0;
  width: 65.5%;
  height: 19.7%;
  border-top-right-radius: 100% 100%;
}

.blog-reference-hero__piece--narrow-one {
  top: 0;
  right: 0;
  width: 31.6%;
  height: 28.2%;
  border-bottom-left-radius: 100% 70%;
}

.blog-reference-hero__piece--narrow-two {
  top: 21.3%;
  left: 0;
  width: 31.7%;
  height: 27.9%;
  border-top-right-radius: 100% 70%;
}

.blog-reference-hero__piece--wide-two {
  top: 29.6%;
  right: 0;
  width: 65.6%;
  height: 19.6%;
  border-bottom-left-radius: 100% 100%;
}

.blog-reference-hero__piece--wide-three {
  top: 50.9%;
  left: 0;
  width: 65.5%;
  height: 19.7%;
  border-top-right-radius: 100% 100%;
}

.blog-reference-hero__piece--narrow-three {
  top: 50.9%;
  right: 0;
  width: 31.6%;
  height: 27.7%;
  border-bottom-left-radius: 100% 70%;
}

.blog-reference-hero__piece--narrow-four {
  top: 72.2%;
  left: 0;
  width: 31.7%;
  height: 27.8%;
  border-top-right-radius: 100% 70%;
}

.blog-reference-hero__piece--wide-four {
  top: 80.3%;
  right: 0;
  width: 65.6%;
  height: 19.7%;
  border-bottom-left-radius: 100% 100%;
}

[data-theme="dark"] .blog-reference-hero {
  background:
    radial-gradient(circle at 5% 96%, rgba(108, 196, 203, 0.22), transparent 34%),
    linear-gradient(90deg, #347f83 0%, #225f61 43%, #0f383a 100%) !important;
}

@media (max-width: 980px) {
  .blog-reference-hero {
    min-height: auto;
  }

  .blog-reference-hero__grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding-block: 32px 54px;
  }

  .blog-reference-hero .page-hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, 760px);
    justify-self: center;
    padding: 42px 16px 36px;
  }

  .blog-reference-hero__mark.page-hero-media {
    grid-column: 1;
    grid-row: 2;
    width: min(68vw, 390px);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .blog-reference-hero::before {
    background-image:
      radial-gradient(circle 220px at 8% 20%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
      radial-gradient(circle 250px at 83% 73%, transparent 99%, var(--blog-hero-line) 99.3%, transparent 100%),
      repeating-linear-gradient(0deg, transparent 0 176px, var(--blog-hero-line) 177px 179px),
      repeating-linear-gradient(90deg, transparent 0 164px, var(--blog-hero-line) 165px 167px);
  }

  .blog-reference-hero .page-hero-copy {
    padding: 36px 12px 30px;
  }

  .blog-reference-hero .eyebrow {
    min-height: 44px;
    padding: 0.45rem 1.05rem;
    font-size: 0.95rem;
  }

  .blog-reference-hero .page-hero-copy h1 {
    font-size: clamp(2.45rem, 12vw, 3.65rem) !important;
  }

  .blog-reference-hero .page-hero-copy p {
    margin-top: 1.35rem;
    font-size: 0.98rem;
    line-height: 1.85;
  }

  .blog-reference-hero .hero-related-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .blog-reference-hero .hero-related-link {
    width: 100%;
    min-width: 0;
  }

  .blog-reference-hero__mark.page-hero-media {
    width: min(74vw, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-reference-hero .hero-related-link {
    transition: none;
  }
}

/* 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;
  }
}
