/* ═══════════════════════════════════════════════════════════
   RI Digital Header Footer — Frontend Styles  v1.0.0
   Full implementation (Session 2).
   Fonts: DM Serif Display (headings) + Plus Jakarta Sans (UI)
═══════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --ridhf-p:           #5c1d77;
  --ridhf-p-d:         #451459;
  --ridhf-p-m:         #7b2fa0;
  --ridhf-p-l:         #f7f2fa;
  --ridhf-p-xl:        #faf6fd;
  --ridhf-void:        #0d0a16;
  --ridhf-void2:       #130b22;
  --ridhf-text:        #1a1a2e;
  --ridhf-text-2:      #4b5563;
  --ridhf-text-3:      #9ca3af;
  --ridhf-border:      #e5e7eb;
  --ridhf-white:       #ffffff;
  --ridhf-font-head:   'DM Serif Display', Georgia, serif;
  --ridhf-font-body:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ridhf-ease:        cubic-bezier(.4,0,.2,1);
  /* --ridhf-h-desktop, --ridhf-h-mobile, --ridhf-z, --ridhf-logo-h are
     intentionally NOT defined here. They're set dynamically from admin
     settings by the inline <style id="ridhf-vars"> block in wp_head
     (priority 5), and every usage below carries its own var(--x, fallback)
     default. Declaring them here too used to silently win the cascade
     over the real admin-configured values, since this external sheet
     prints after that inline block — Logo Height / Desktop Spacer /
     Mobile Spacer / header z-index settings had no effect at all. */
}

/* ── Reset ── */
.ridhf-header *, .ridhf-header *::before, .ridhf-header *::after,
.ridhf-footer *, .ridhf-footer *::before, .ridhf-footer *::after,
.ridhf-prefooter *, .ridhf-mobile-menu *, .ridhf-overlay {
  box-sizing: border-box;
}
.ridhf-header ul, .ridhf-mobile-menu ul,
.ridhf-footer ul { list-style: none; margin: 0; padding: 0; }
/* Force text-decoration off for ALL link states — blocks BeTheme's a:hover{underline} rule */
.ridhf-header a,
.ridhf-header a:hover,
.ridhf-header a:focus,
.ridhf-header a:visited,
.ridhf-footer a,
.ridhf-footer a:hover,
.ridhf-footer a:focus,
.ridhf-footer a:visited,
.ridhf-prefooter a,
.ridhf-prefooter a:hover,
.ridhf-prefooter a:focus,
.ridhf-mobile-menu a,
.ridhf-mobile-menu a:hover,
.ridhf-mobile-menu a:focus { text-decoration: none !important; }

/* ── Hardened isolation against theme/WP CSS bleed ──
   ROOT CAUSE (persistent "close button invisible" report): the ✕ icon's
   fill/stroke were only set as SVG *presentation attributes*
   (fill="none" stroke="currentColor" on the <svg> tag). Presentation
   attributes sit at the very bottom of the cascade — practically ANY
   theme/global stylesheet rule targeting svg, path, or line (very common
   in themes that reset icon-font/SVG defaults, e.g. BeTheme) silently
   wins with no specificity fight even happening. Every icon in this
   plugin had the same latent vulnerability, not just the close button.
   Also hardens bare <button> elements against theme resets that set
   backgrounds/borders/box-shadow/appearance/fonts on them (equally
   common in page-builder themes). Both resets use :where() so they
   contribute ZERO specificity of their own — they only neutralise the
   THEME's bleed, and every one of this plugin's own component rules
   further down the file (.ridhf-hamburger, .ridhf-nav__caret-btn, etc.)
   still wins normally, exactly as if this block didn't exist. */
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) svg {
  fill: none !important;
  stroke: currentColor !important;
}
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) svg[fill="currentColor"] {
  fill: currentColor !important;
  stroke: none !important;
}
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) svg * {
  fill: inherit;
  stroke: inherit;
}
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) button {
  -webkit-appearance: none;
  appearance: none;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  letter-spacing: normal;
  text-transform: none;
  font-family: inherit;
  line-height: normal;
  margin: 0;
}
.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter, .ridhf-overlay {
  isolation: isolate;
}
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) h1,
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) h2,
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) h3,
:where(.ridhf-header, .ridhf-mobile-menu, .ridhf-footer, .ridhf-prefooter) p {
  margin: 0;
}

/* Close-button icon — belt-and-braces on top of the general reset above,
   in case a theme rule happens to be MORE specific than the reset.
   NOTE: stroke/width/display alone will NOT fix invisibility caused by a
   theme/plugin rule that hides raw <svg> via opacity:0 / visibility:hidden
   (very common: lazy-load scripts and BeTheme's own icon-reveal CSS both
   do this to any bare <svg> that isn't wrapped in their expected markup).
   So every property that could zero the icon out is forced here too. */
html body #ridhf-mobile-close,
html body button#ridhf-mobile-close.ridhf-mobile-menu__close {
  overflow: visible !important;
}
html body #ridhf-mobile-close svg,
html body button#ridhf-mobile-close.ridhf-mobile-menu__close svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.5 !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  opacity: 1 !important;
  visibility: visible !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  transform: none !important;
  position: static !important;
  pointer-events: none;
}
html body #ridhf-mobile-close svg line,
html body button#ridhf-mobile-close.ridhf-mobile-menu__close svg line {
  stroke: currentColor !important;
  fill: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ═══════════════════════════════════
   HEADER SHELL
═══════════════════════════════════ */
.ridhf-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--ridhf-z, 99000);
  height: var(--ridhf-h-desktop, 72px);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: box-shadow .28s var(--ridhf-ease), border-color .28s var(--ridhf-ease);
  font-family: var(--ridhf-font-body);
}
.ridhf-header.scrolled {
  box-shadow: 0 2px 24px rgba(92,29,119,.09), 0 1px 4px rgba(0,0,0,.04);
  border-bottom-color: rgba(92,29,119,.1);
}
.ridhf-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Logo ── */
.ridhf-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.ridhf-logo__img {
  display: block;
  height: var(--ridhf-logo-h, 38px);
  width: auto;
}
.ridhf-logo__text {
  font-family: var(--ridhf-font-head);
  font-size: 20px;
  color: var(--ridhf-p);
  font-weight: 400;
}

/* Spacer */
.ridhf-header-spacer { height: var(--ridhf-h-desktop, 72px); }

/* ═══════════════════════════════════
   DESKTOP NAV
═══════════════════════════════════ */
.ridhf-nav {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: visible;
}
.ridhf-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: visible;
}
/* Safety net: items moved into the More overflow MUST be hidden.
   The HTML [hidden] attribute maps to display:none but a theme with
   li { display: flex/block !important } can override it. This rule
   wins because it's more specific AND uses !important. */
.ridhf-nav__list > li[data-overflow],
.ridhf-nav__list > [data-overflow] {
  display: none !important;
  visibility: hidden !important;
}

/* ── Nav Item ── */
.ridhf-nav__item { position: relative; display: flex; align-items: center; }

/* ── Nav Link (anchor + button variants) ── */
.ridhf-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-family: var(--ridhf-font-body);
  font-size: 14px;
  font-weight: 580;
  color: var(--ridhf-text);
  text-decoration: none;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s var(--ridhf-ease), color .16s var(--ridhf-ease);
  position: relative;
  line-height: 1;
}
.ridhf-nav__link:hover {
  background: var(--ridhf-p-l);
  color: var(--ridhf-p);
}
.ridhf-nav__link--active { color: var(--ridhf-p); }
.ridhf-nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--ridhf-p);
  border-radius: 2px;
}

/* Caret icon inside link */
.ridhf-nav__caret {
  width: 14px; height: 14px;
  flex-shrink: 0;
  opacity: .6;
  transition: transform .18s var(--ridhf-ease);
}
.ridhf-nav__item--open > .ridhf-nav__link .ridhf-nav__caret,
.ridhf-nav__item--open > button .ridhf-nav__caret { transform: rotate(180deg); opacity: 1; }

/* Split caret button (when top-level has real URL) */
.ridhf-nav__caret-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ridhf-text-2);
  transition: background .16s, color .16s;
  flex-shrink: 0;
  margin-left: -6px;
}
.ridhf-nav__caret-btn:hover { background: var(--ridhf-p-l); color: var(--ridhf-p); }
.ridhf-nav__caret-btn svg { width: 14px; height: 14px; transition: transform .18s; }
.ridhf-nav__item--open .ridhf-nav__caret-btn svg { transform: rotate(180deg); }
.ridhf-nav__item--open .ridhf-nav__caret-btn { color: var(--ridhf-p); }

/* ═══════════════════════════════════
   DROPDOWN PANEL
═══════════════════════════════════ */
.ridhf-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px; /* was 260px — widened per request; this is the panel
                        'Products' actually uses (type=dropdown, not mega) */
  background: var(--ridhf-white);
  background-color: var(--ridhf-white);
  border: 1px solid rgba(92,29,119,.1);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,.04),
              0 10px 30px rgba(92,29,119,.12),
              0 2px 4px rgba(0,0,0,.04);
  padding: 8px;
  z-index: 10;
  isolation: isolate;
  /* Open state controlled by JS via hidden attr + class */
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ridhf-ease), transform .18s var(--ridhf-ease);
}
.ridhf-dropdown.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Arrow pointer */
.ridhf-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  background: var(--ridhf-white);
  border-left: 1px solid rgba(92,29,119,.1);
  border-top: 1px solid rgba(92,29,119,.1);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px 0 0 0;
}

/* Overflow dropdown - right-aligned */
.ridhf-nav__overflow .ridhf-dropdown {
  left: auto;
  right: 0;
  transform: translateY(8px);
  min-width: 220px;
}
.ridhf-nav__overflow .ridhf-dropdown.is-open {
  transform: translateY(0);
}
.ridhf-nav__overflow .ridhf-dropdown::before { left: auto; right: 20px; transform: rotate(45deg); }

/* Dropdown items */
.ridhf-dropdown__item { display: block; }
.ridhf-dropdown__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .14s;
}
.ridhf-dropdown__link:hover { background: var(--ridhf-p-l); }
.ridhf-dropdown__icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--ridhf-p-l);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ridhf-p);
  transition: background .14s;
}
.ridhf-dropdown__link:hover .ridhf-dropdown__icon { background: rgba(92,29,119,.15); }
.ridhf-dropdown__icon svg { width: 17px; height: 17px; }
.ridhf-dropdown__text { flex: 1; min-width: 0; }
.ridhf-dropdown__label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ridhf-text);
  line-height: 1.2;
  margin-bottom: 3px;
}
.ridhf-dropdown__desc {
  font-size: 12px;
  color: var(--ridhf-text-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════
   MEGA MENU PANEL
═══════════════════════════════════ */
.ridhf-mega-wrap {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 640px; /* was 580px — widened alongside the dropdown panel */
  max-width: calc(100vw - 48px);
  background: var(--ridhf-white);
  background-color: var(--ridhf-white);
  border: 1px solid rgba(92,29,119,.1);
  border-radius: 18px;
  box-shadow: 0 4px 6px rgba(0,0,0,.04),
              0 12px 36px rgba(92,29,119,.14),
              0 2px 4px rgba(0,0,0,.04);
  padding: 12px;
  z-index: 10;
  isolation: isolate;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ridhf-ease), transform .18s var(--ridhf-ease);
}
.ridhf-mega-wrap.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ridhf-mega-wrap::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px; height: 12px;
  background: var(--ridhf-white);
  border-left: 1px solid rgba(92,29,119,.1);
  border-top: 1px solid rgba(92,29,119,.1);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px 0 0 0;
}
.ridhf-mega {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
/* Mega items share dropdown link styles */
.ridhf-mega .ridhf-dropdown__item { display: block; }
.ridhf-mega .ridhf-dropdown__link { border-radius: 10px; }

/* Featured tile inside mega grid.
   BUG FIX: the fallback here used to be a hardcoded red (#dc2626) whenever
   an item was auto-featured without an explicit per-item colour override —
   completely unrelated to the site's actual brand colour, which is why a
   dropdown's first/active item could show an odd mismatched highlight.
   Falls back to the real brand colour now, so it always looks intentional
   even when no custom featured colour has been set. */
.ridhf-dropdown__item--featured .ridhf-dropdown__link {
  background: rgba(0,0,0,.035);
  border: 1px solid rgba(0,0,0,.06);
}
.ridhf-dropdown__item--featured .ridhf-dropdown__link:hover {
  background: rgba(0,0,0,.065);
}
.ridhf-dropdown__item--featured .ridhf-dropdown__icon {
  background: var(--ridhf-featured-color, var(--ridhf-p));
  color: #fff;
}
.ridhf-dropdown__item--featured .ridhf-dropdown__label {
  color: var(--ridhf-featured-color, var(--ridhf-p));
}

/* Mega menu CTA footer strip */
.ridhf-mega__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ridhf-border);
}
.ridhf-mega__footer--left   { justify-content: flex-start; }
.ridhf-mega__footer--center { justify-content: center; }
.ridhf-mega__footer--right  { justify-content: flex-end; }
.ridhf-mega__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ridhf-font-body);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: all .16s var(--ridhf-ease);
  white-space: nowrap;
}
.ridhf-mega__cta-btn svg { flex-shrink: 0; }
.ridhf-mega__cta-btn--primary { background: var(--ridhf-p); color: #fff; border-color: var(--ridhf-p-d); }
.ridhf-mega__cta-btn--primary:hover { background: var(--ridhf-p-d); }
.ridhf-mega__cta-btn--secondary { background: transparent; color: var(--ridhf-p); border-color: var(--ridhf-p); }
.ridhf-mega__cta-btn--secondary:hover { background: var(--ridhf-p-l); }
.ridhf-mega__cta-btn--ghost { background: transparent; color: var(--ridhf-text-2); border-color: transparent; padding: 8px 4px; }
.ridhf-mega__cta-btn--ghost:hover { color: var(--ridhf-p); }

/* ═══════════════════════════════════
   PRIORITY+ OVERFLOW
═══════════════════════════════════ */
.ridhf-nav__overflow {
  position: relative;
  flex-shrink: 0;
  margin-left: 2px;
}
.ridhf-nav__overflow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border: none;
  background: transparent;
  font-family: var(--ridhf-font-body);
  font-size: 14px;
  font-weight: 580;
  color: var(--ridhf-text);
  cursor: pointer;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.ridhf-nav__overflow-btn:hover { background: var(--ridhf-p-l); color: var(--ridhf-p); }
.ridhf-nav__overflow-btn svg { width: 13px; height: 13px; opacity: .6; transition: transform .18s; }
.ridhf-nav__overflow[data-open] .ridhf-nav__overflow-btn { background: var(--ridhf-p-l); color: var(--ridhf-p); }
.ridhf-nav__overflow[data-open] .ridhf-nav__overflow-btn svg { transform: rotate(180deg); opacity: 1; }

/* ═══════════════════════════════════
   NAV BADGES (inline in nav items)
═══════════════════════════════════ */
.ridhf-badge-item {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 9.5px !important;
  font-weight: 750 !important;
  padding: 2px 7px !important;
  border-radius: 99px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  font-family: var(--ridhf-font-body) !important;
  border: 1px solid transparent !important;
  vertical-align: middle !important;
}
/* Preset badge colours — all !important so theme can't override */
.ridhf-badge--live      { background: #dcfce7 !important; color: #15803d !important; }
.ridhf-badge--soon      { background: #fef3c7 !important; color: #92400e !important; }
.ridhf-badge--launching { background: #ede9fe !important; color: #6d28d9 !important; }
.ridhf-badge--new       { background: #dbeafe !important; color: #1d4ed8 !important; }
.ridhf-badge--hot       { background: #fee2e2 !important; color: #991b1b !important; }
.ridhf-badge--beta      { background: #f3e8ff !important; color: #7c3aed !important; }
.ridhf-badge--free      { background: #ccfbf1 !important; color: #0f766e !important; }
.ridhf-badge--pro       { background: #fef9c3 !important; color: #a16207 !important; }
.ridhf-badge--sale      { background: #ffedd5 !important; color: #c2410c !important; }
.ridhf-badge--updated   { background: #e0f2fe !important; color: #0369a1 !important; }
/* .ridhf-badge--custom inline styles carry full background/color — no rule needed */

/* ── CSS Isolation — nav links ──
   BeTheme and WordPress themes reset/style a, li, ul globally. All rules
   below re-assert our values with !important to guarantee the header and
   dropdown panels always look exactly as configured regardless of which
   theme is active. */
.ridhf-header a,
.ridhf-header button {
  text-decoration: none !important;
  outline-offset: 2px;
}
.ridhf-header ul,
.ridhf-header li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.ridhf-nav__link {
  color: var(--ridhf-text) !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
  font-family: var(--ridhf-font-body) !important;
}
.ridhf-nav__link:hover,
.ridhf-nav__link:focus-visible {
  color: var(--ridhf-p) !important;
  background: transparent !important;
}
.ridhf-nav__link--active {
  color: var(--ridhf-p) !important;
  font-weight: 600 !important;
}
/* Dropdown / mega isolation */
.ridhf-dropdown,
.ridhf-mega-wrap {
  color: var(--ridhf-text) !important;
  font-family: var(--ridhf-font-body) !important;
}
.ridhf-dropdown__link {
  color: var(--ridhf-text) !important;
  background: transparent !important;
  text-decoration: none !important;
  font-family: var(--ridhf-font-body) !important;
}
.ridhf-dropdown__link:hover {
  background: var(--ridhf-bg-hover, rgba(92,29,119,.05)) !important;
  color: var(--ridhf-p) !important;
  text-decoration: none !important;
}
.ridhf-dropdown__label {
  color: inherit !important;
  font-weight: 500 !important;
  font-size: 14px !important;
}
.ridhf-dropdown__desc {
  color: var(--ridhf-text-2) !important;
  font-size: 12px !important;
}
/* Mobile nav isolation */
.ridhf-mobile-menu ul,
.ridhf-mobile-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.ridhf-mobile-nav__link {
  color: rgba(255,255,255,.85) !important;
  text-decoration: none !important;
  font-family: var(--ridhf-font-body) !important;
}
.ridhf-mobile-nav__link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.06) !important;
  text-decoration: none !important;
}

/* ── Drag-and-drop indicators ── */
.ridhf-drag--active { opacity: .4; }
.ridhf-drag--over-before { box-shadow: 0 -2px 0 0 var(--ridhf-p) !important; }
.ridhf-drag--over-after  { box-shadow: 0  2px 0 0 var(--ridhf-p) !important; }

/* ── Overflow manual checklist ── */
.ridhf-overflow-checklist { margin-top: 10px; }
.ridhf-overflow-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background .12s;
}
.ridhf-overflow-check-row:hover { background: var(--ridhf-bg-hover, rgba(92,29,119,.05)); }
.ridhf-overflow-check-row input[type="checkbox"] {
  width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--ridhf-p);
}

/* ═══════════════════════════════════
   DATABASES BUTTON
═══════════════════════════════════ */
.ridhf-db-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 8px;
  font-family: var(--ridhf-font-body);
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: all .16s var(--ridhf-ease);
  flex-shrink: 0;
}
.ridhf-db-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ridhf-db-btn--filled   { background: var(--ridhf-p); color: #fff; border: 1.5px solid var(--ridhf-p-d); }
.ridhf-db-btn--filled:hover { background: var(--ridhf-p-d); transform: translateY(-1px); }
.ridhf-db-btn--outlined { background: transparent; color: var(--ridhf-p); border: 1.5px solid var(--ridhf-p); }
.ridhf-db-btn--outlined:hover { background: var(--ridhf-p-l); transform: translateY(-1px); }
.ridhf-db-btn--ghost    { background: transparent; color: var(--ridhf-text-2); border: 1.5px solid var(--ridhf-border); }
.ridhf-db-btn--ghost:hover { background: var(--ridhf-p-l); color: var(--ridhf-p); border-color: var(--ridhf-p); }

/* ═══════════════════════════════════
   CTA BUTTONS
═══════════════════════════════════ */
.ridhf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--ridhf-font-body);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all .16s var(--ridhf-ease);
  border: 1.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.ridhf-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ridhf-btn--primary   { background: var(--ridhf-p); color: #fff !important; border-color: var(--ridhf-p-d); }
.ridhf-btn--primary:hover { background: var(--ridhf-p-d); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(92,29,119,.25); }
.ridhf-btn--secondary { background: transparent; color: var(--ridhf-p) !important; border-color: var(--ridhf-p); }
.ridhf-btn--secondary:hover { background: var(--ridhf-p-l); transform: translateY(-1px); }
/* outlined = alias for secondary, used in mobile DB button */
.ridhf-btn--outlined  { background: transparent; color: var(--ridhf-p) !important; border-color: var(--ridhf-p); }
.ridhf-btn--outlined:hover { background: var(--ridhf-p-l); }
.ridhf-btn--white     { background: #fff; color: var(--ridhf-p) !important; border-color: rgba(255,255,255,.8); }
.ridhf-btn--white:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.ridhf-btn--outline-white { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.45); }
.ridhf-btn--outline-white:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.8); }
.ridhf-btn--lg { padding: 13px 28px; font-size: 15px; border-radius: 10px; }
/* Inside the dark mobile drawer, outlined/ghost buttons must read in the
   drawer's own text colour (not brand purple, which is invisible on a dark
   background). BUG FIX (v1.1.2 report): this used to also catch every
   ".ridhf-btn--db-mobile" unconditionally, which flattened a "Filled" style
   choice into the same transparent look as "Outlined" — the admin's style
   picker had no visible effect on mobile. Filled buttons are excluded below
   so they keep their solid brand-colour background as chosen. */
.ridhf-mobile-menu .ridhf-btn--outlined,
.ridhf-mobile-menu .ridhf-btn--secondary,
.ridhf-mobile-menu .ridhf-db-btn--outlined,
.ridhf-mobile-menu .ridhf-db-btn--ghost {
  color: var(--ridhf-drawer-text, #fff) !important;
  border-color: var(--ridhf-drawer-text, rgba(255,255,255,.5)) !important;
  background: rgba(255,255,255,.06) !important;
}
.ridhf-mobile-menu .ridhf-btn--outlined:hover,
.ridhf-mobile-menu .ridhf-btn--secondary:hover,
.ridhf-mobile-menu .ridhf-db-btn--outlined:hover,
.ridhf-mobile-menu .ridhf-db-btn--ghost:hover {
  background: rgba(255,255,255,.14) !important;
}
.ridhf-mobile-menu .ridhf-db-btn--filled {
  color: #fff !important;
  border-color: transparent !important;
}

/* Header right: don't shrink CTA buttons */
.ridhf-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ═══════════════════════════════════
   HAMBURGER
═══════════════════════════════════ */
.ridhf-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px; height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ridhf-hamburger__bar {
  display: block;
  height: 2px; width: 100%;
  background: var(--ridhf-text);
  border-radius: 2px;
  transition: transform .22s var(--ridhf-ease), opacity .22s var(--ridhf-ease);
  transform-origin: center;
}
.ridhf-hamburger[aria-expanded="true"] .ridhf-hamburger__bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.ridhf-hamburger[aria-expanded="true"] .ridhf-hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ridhf-hamburger[aria-expanded="true"] .ridhf-hamburger__bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ═══════════════════════════════════
   MOBILE MENU DRAWER
═══════════════════════════════════ */
.ridhf-mobile-menu {
  position: fixed !important;
  inset: 0;
  z-index: calc(var(--ridhf-z, 99000) + 10) !important;
  background: var(--ridhf-drawer-bg, #1a0a2e) !important;
  display: flex !important;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s var(--ridhf-ease);
  font-family: var(--ridhf-font-body) !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* text colour driven by --ridhf-drawer-text CSS var (set from admin settings) */
  color: var(--ridhf-drawer-text, rgba(255,255,255,.9)) !important;
}
.ridhf-mobile-menu:not([hidden]) { transform: translateX(0); }

.ridhf-mobile-menu__inner { display: flex; flex-direction: column; min-height: 100%; }

.ridhf-mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.ridhf-mobile-menu__close {
  width: 40px; height: 40px;
  display: flex !important; align-items: center !important; justify-content: center !important;
  margin-left: auto;
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px;
  /* colour set via inline style="color:var(--ridhf-drawer-close,#fff)" on the button */
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.ridhf-mobile-menu__close:hover { background: rgba(255,255,255,.18) !important; }
.ridhf-mobile-menu__close svg { width: 20px; height: 20px; }
/* Mobile-only Databases row */
.ridhf-mobile-db-row {
  padding: 12px 20px 0;
}
.ridhf-btn--db-mobile {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px !important;
  font-size: 14px !important;
  border-radius: 10px !important;
}

/* ── Mobile Nav ── */
.ridhf-mobile-nav { flex: 1; }
.ridhf-mobile-nav__list { }
.ridhf-mobile-nav__item { border-bottom: 1px solid rgba(255,255,255,.05); }

.ridhf-mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ridhf-drawer-text, rgba(255,255,255,.88)) !important;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-family: var(--ridhf-font-body) !important;
  text-align: left;
  transition: background .14s, color .14s;
}
.ridhf-mobile-nav__link:hover { background: rgba(255,255,255,.04) !important; color: #fff !important; }
.ridhf-mobile-nav__link[aria-expanded="true"] { color: #fff !important; background: rgba(255,255,255,.04) !important; }

.ridhf-mobile-nav__link-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ridhf-mobile-nav__chevron {
  width: 20px; height: 20px;
  color: rgba(255,255,255,.35);
  transition: transform .22s var(--ridhf-ease), color .14s;
  flex-shrink: 0;
}
.ridhf-mobile-nav__item--open .ridhf-mobile-nav__chevron {
  transform: rotate(180deg);
  color: rgba(255,255,255,.7);
}

/* ── Mobile Sub-menu ── */
.ridhf-mobile-sub {
  background: rgba(0,0,0,.15);
  border-top: 1px solid rgba(255,255,255,.05);
}
/* JS controls hidden attr; animate height with max-height trick */
.ridhf-mobile-sub[hidden] { display: none !important; }
.ridhf-mobile-sub__item { border-bottom: 1px solid rgba(255,255,255,.04); }
.ridhf-mobile-sub__item:last-child { border-bottom: none; }

.ridhf-mobile-sub__link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 20px 13px 24px;
  text-decoration: none;
  transition: background .14s;
}
.ridhf-mobile-sub__link:hover { background: rgba(255,255,255,.04); }

.ridhf-mobile-sub__icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,.55);
  transition: background .14s, color .14s;
}
.ridhf-mobile-sub__link:hover .ridhf-mobile-sub__icon { background: rgba(92,29,119,.4); color: #c084fc; }
.ridhf-mobile-sub__icon svg { width: 15px; height: 15px; }

.ridhf-mobile-sub__text { flex: 1; min-width: 0; }
.ridhf-mobile-sub__label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  margin-bottom: 3px;
}
.ridhf-mobile-sub__desc {
  font-size: 12px;
  color: rgba(255,255,255,.38);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Mobile CTAs ── */
.ridhf-mobile-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

/* ── Mobile drawer footer ── */
.ridhf-mobile-footer {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  text-align: center;
  flex-shrink: 0;
}
.ridhf-mobile-footer__social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ridhf-mobile-footer__copy {
  font-size: 11.5px;
  color: rgba(255,255,255,.28);
  line-height: 1.6;
}

/* ── Social icon system ──
   Shape, size AND colour style are controlled by modifier classes on the
   parent row (.ridhf-social--{shape} .ridhf-social--{size}
   .ridhf-social--style-{style}), set from the "Social Icon Style" admin
   control so every icon on the site (footer + mobile drawer) stays
   visually consistent no matter how many platforms are added.

   Each icon link also carries its own inline custom properties —
   --ridhf-sb (brand solid colour), --ridhf-sb-rgb (same, as an r,g,b
   triplet for translucent backgrounds) and --ridhf-sb-grad (a ready-made
   two-stop gradient, or Instagram's real multi-stop gradient) — set from
   PHP (ridhf_social_brand_style()) so ONE shared ruleset here can render
   five completely different looks per platform without hand-authoring
   per-brand CSS. This is also what keeps the admin preview and the live
   footer pixel-identical: both render through this exact same system. */
.ridhf-footer__social,
.ridhf-mobile-footer__social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.ridhf-social-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.15);
  color: rgba(255,255,255,.65);
  text-decoration: none;
  overflow: hidden;
  flex-shrink: 0;
  transition: background .18s var(--ridhf-ease), border-color .18s var(--ridhf-ease), color .18s var(--ridhf-ease), transform .18s var(--ridhf-ease), box-shadow .18s var(--ridhf-ease);
}
.ridhf-social-icon:hover { transform: translateY(-3px) scale(1.04); }
.ridhf-social-icon:active { transform: translateY(-1px) scale(1); }
.ridhf-social-icon svg { width: 19px; height: 19px; display: block; flex-shrink: 0; }
.ridhf-social-icon text { fill: currentColor; }
.ridhf-social-icon__glyph {
  font-family: var(--ridhf-font-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Shape modifiers */
.ridhf-social--circle .ridhf-social-icon    { border-radius: 999px; }
.ridhf-social--square .ridhf-social-icon    { border-radius: 5px; }
.ridhf-social--rounded .ridhf-social-icon   { border-radius: 12px; }

/* Size modifiers */
.ridhf-social--sm .ridhf-social-icon { width: 36px; height: 36px; }
.ridhf-social--sm .ridhf-social-icon svg { width: 15px; height: 15px; }
.ridhf-social--sm .ridhf-social-icon__glyph { font-size: 10.5px; }
.ridhf-social--md .ridhf-social-icon { width: 42px; height: 42px; }
.ridhf-social--lg .ridhf-social-icon { width: 50px; height: 50px; }
.ridhf-social--lg .ridhf-social-icon svg { width: 22px; height: 22px; }
.ridhf-social--lg .ridhf-social-icon__glyph { font-size: 14px; }

/* ── Colour style 1: MONO (default) ──
   Subtle neutral chip, brightens to the site's brand purple on hover.
   Ignores each icon's individual brand colour entirely — this is the
   "quiet" option for sites that want the icons to blend in. */
.ridhf-social--style-mono .ridhf-social-icon:hover {
  background: var(--ridhf-p);
  border-color: var(--ridhf-p-d);
  color: #fff;
  box-shadow: 0 8px 18px -6px var(--ridhf-p-l, rgba(0,0,0,.4));
}

/* ── Colour style 2: FLAT ──
   Solid brand colour at rest — bold, immediately recognisable, matches
   "Minimal Flat" / "Filled Rounded" reference styles. */
.ridhf-social--style-flat .ridhf-social-icon {
  background: var(--ridhf-sb, var(--ridhf-p));
  border-color: transparent;
  color: #fff;
}
.ridhf-social--style-flat .ridhf-social-icon:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 20px -6px rgba(var(--ridhf-sb-rgb, 92,29,119), .55);
}

/* ── Colour style 3: GRADIENT ──
   Glossy two-tone (or Instagram's real multi-stop) gradient fill with a
   soft coloured glow — matches "Gradient Glossy" reference style. */
.ridhf-social--style-gradient .ridhf-social-icon {
  background: var(--ridhf-sb-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(var(--ridhf-sb-rgb, 92,29,119), .5), 0 1px 0 rgba(255,255,255,.25) inset;
}
.ridhf-social--style-gradient .ridhf-social-icon:hover {
  box-shadow: 0 10px 22px -6px rgba(var(--ridhf-sb-rgb, 92,29,119), .65), 0 1px 0 rgba(255,255,255,.3) inset;
}

/* ── Colour style 4: NEON ──
   Transparent fill, glowing brand-coloured outline + icon — matches
   "Outline Neon" reference style. Reads great on dark footers. */
.ridhf-social--style-neon .ridhf-social-icon {
  background: rgba(var(--ridhf-sb-rgb, 92,29,119), .07);
  border: 1.5px solid var(--ridhf-sb, var(--ridhf-p));
  color: var(--ridhf-sb, var(--ridhf-p));
  box-shadow: 0 0 0 rgba(var(--ridhf-sb-rgb, 92,29,119), 0);
}
.ridhf-social--style-neon .ridhf-social-icon:hover {
  background: rgba(var(--ridhf-sb-rgb, 92,29,119), .16);
  box-shadow: 0 0 16px rgba(var(--ridhf-sb-rgb, 92,29,119), .55), 0 0 3px rgba(var(--ridhf-sb-rgb, 92,29,119), .8);
}

/* ── Colour style 5: GLASS ──
   Frosted translucent brand-tinted glass — matches "Glassmorphism"
   reference style. Falls back gracefully to a plain tinted panel on
   browsers without backdrop-filter support. */
.ridhf-social--style-glass .ridhf-social-icon {
  background: rgba(var(--ridhf-sb-rgb, 255,255,255), .16);
  border: 1px solid rgba(var(--ridhf-sb-rgb, 255,255,255), .28);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px -6px rgba(var(--ridhf-sb-rgb, 92,29,119), .4), 0 1px 0 rgba(255,255,255,.2) inset;
}
.ridhf-social--style-glass .ridhf-social-icon:hover {
  background: rgba(var(--ridhf-sb-rgb, 255,255,255), .26);
  box-shadow: 0 8px 22px -6px rgba(var(--ridhf-sb-rgb, 92,29,119), .5), 0 1px 0 rgba(255,255,255,.3) inset;
}

/* ═══════════════════════════════════
   OVERLAY
═══════════════════════════════════ */
.ridhf-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--ridhf-z, 99000) + 5);
  background: rgba(13,10,22,.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ridhf-ease);
}
.ridhf-overlay.visible { opacity: 1; pointer-events: auto; }

/* ═══════════════════════════════════
   PRE-FOOTER CTA BAND
═══════════════════════════════════ */
.ridhf-prefooter {
  background: linear-gradient(135deg, #2a0845 0%, #5c1d77 45%, #1a0533 100%);
  padding: 84px 24px;
  font-family: var(--ridhf-font-body);
  position: relative;
  overflow: hidden;
}
.ridhf-prefooter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(168,85,247,.18) 0%, transparent 70%);
  pointer-events: none;
}
.ridhf-prefooter__inner { max-width: 720px; margin: 0 auto; text-align: center; position: relative; }

.ridhf-prefooter__eyebrow {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  margin-bottom: 18px;
}
.ridhf-prefooter__heading {
  font-family: var(--ridhf-font-head);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}
.ridhf-prefooter__sub {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin-bottom: 32px;
}
.ridhf-prefooter__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-bottom: 40px;
}
.ridhf-prefooter__trust li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
  color: rgba(255,255,255,.75);
}
.ridhf-prefooter__trust svg { width: 15px; height: 15px; color: #a855f7; flex-shrink: 0; }
.ridhf-prefooter__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.ridhf-footer {
  background: var(--ridhf-void2);
  color: rgba(255,255,255,.7);
  font-family: var(--ridhf-font-body);
}
.ridhf-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 68px 24px 52px;
  display: grid;
  grid-template-columns: 280px repeat(auto-fit, minmax(140px, 1fr));
  gap: 48px 40px;
}
.ridhf-footer__brand { }
/* Logo — !important blocks BeTheme CSS that may wildcard-target [class*="logo"] */
.ridhf-footer__logo {
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 18px !important;
  text-decoration: none !important;
}
.ridhf-footer__logo img {
  height: 34px !important;
  max-height: 34px !important;
  width: auto !important;
}
/* "Force White Logo" — a flat, crisp recolor to pure white. brightness(0)
   first crushes the logo to solid black (removing all original colour),
   then invert(1) flips that black to solid white — no blur, no glow, no
   translucency, just the same shape rendered in white. */
.ridhf-footer__logo--white img {
  filter: brightness(0) invert(1);
}
.ridhf-footer__logo-text {
  font-family: var(--ridhf-font-head) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #e040fb !important;
  font-weight: 400 !important;
  letter-spacing: -.01em !important;
}
.ridhf-footer__logo--white .ridhf-footer__logo-text {
  color: #fff !important;
}
.ridhf-footer__tagline {
  font-size: 13.5px;
  color: rgba(255,255,255,.42);
  line-height: 1.7;
  margin-bottom: 22px;
}
.ridhf-footer__social { display: flex; gap: 8px; flex-wrap: wrap; }

.ridhf-footer__col-title {
  font-size: 11.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.28);
  margin-bottom: 18px;
}
.ridhf-footer__links { }
.ridhf-footer__links li { margin-bottom: 11px; }
.ridhf-footer__links a {
  font-size: 14px;
  font-weight: 450;
  color: rgba(255,255,255,.58);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .14s;
}
.ridhf-footer__links a:hover { color: rgba(255,255,255,.95); }

/* Legal row — dedicated full-width strip, independent of the columns above
   so it can grow to any number of legal pages without crowding a column. */
.ridhf-footer__legal-row {
  border-top: 1px solid rgba(255,255,255,.07);
}
.ridhf-footer__legal-row-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}
.ridhf-footer__legal {
  display: flex;
  gap: 8px 28px;
  flex-wrap: wrap;
  align-items: center;
}
/* Alignment modifiers — desktop only, mobile always centers (see media query) */
.ridhf-footer__legal-row--left .ridhf-footer__legal     { justify-content: flex-start; }
.ridhf-footer__legal-row--center .ridhf-footer__legal   { justify-content: center; }
.ridhf-footer__legal-row--right .ridhf-footer__legal    { justify-content: flex-end; }
.ridhf-footer__legal a {
  font-size: 12.5px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .14s;
}
.ridhf-footer__legal a:hover { color: rgba(255,255,255,.75); }

/* Bottom row — copyright centered, Fiverr badge on the right. A matching
   spacer on the left keeps the copyright text visually centered even
   though the Fiverr badge only occupies the right side. Both children are
   locked to the same line-height/font-size and the <p>'s default browser
   margin is reset to 0 — that stray margin was what threw them out of
   vertical alignment before. */
.ridhf-footer__bottom { border-top: 1px solid rgba(255,255,255,.07); }
.ridhf-footer__bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.ridhf-footer__bottom-spacer { min-width: 0; }
.ridhf-footer__copy {
  grid-column: 2;
  justify-self: center;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: rgba(255,255,255,.28);
  text-align: center;
  white-space: nowrap;
}

/* Fiverr attribution badge — a solid "Fiverr" pill (brand green, white
   text) plus the handle, locked to the exact same 20px line-height as the
   copyright text so both sit on one visual baseline. */
.ridhf-fiverr-badge {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  height: 20px;
  gap: 8px;
  font-size: 12.5px;
  line-height: 20px;
  font-weight: 400;
  color: rgba(255,255,255,.45);
  text-decoration: none !important;
  transition: color .16s;
}
.ridhf-fiverr-badge:hover { color: rgba(255,255,255,.85); }
.ridhf-fiverr-badge__pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 5px;
  background: #1dbf73;
  color: #fff;
  font-family: var(--ridhf-font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -.01em;
  transition: background .16s;
}
.ridhf-fiverr-badge:hover .ridhf-fiverr-badge__pill { background: #17a862; }
.ridhf-fiverr-badge__text { white-space: nowrap; line-height: 20px; }

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 900px) {
  /* Hide non-primary CTA on smaller desktop */
  .ridhf-header__right .ridhf-btn--secondary { display: none; }
}
@media (max-width: 768px) {
  .ridhf-header { height: var(--ridhf-h-mobile, 64px); }
  .ridhf-header-spacer { height: var(--ridhf-h-mobile, 64px); }
  .ridhf-nav, .ridhf-db-btn { display: none !important; }
  .ridhf-header__right .ridhf-btn { display: none; }
  .ridhf-hamburger { display: flex; }
  .ridhf-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    padding: 52px 20px 40px;
  }
  .ridhf-footer__brand { grid-column: 1 / -1; }
  .ridhf-footer__legal-row-inner { padding: 14px 20px; }
  .ridhf-footer__legal-row .ridhf-footer__legal { justify-content: center; text-align: center; gap: 8px 18px; }
  /* Bottom row on mobile: stacked, centered. Copyright MUST be the very
     last line of the site — non-negotiable — so it's pinned to order:2
     while the Fiverr badge sits above it at order:1, regardless of DOM
     source order or any future edits to the markup. */
  .ridhf-footer__bottom-inner {
    grid-template-columns: 1fr;
    padding: 18px 20px;
    gap: 10px;
    text-align: center;
  }
  .ridhf-footer__bottom-spacer { display: none; }
  .ridhf-fiverr-badge { grid-column: 1; justify-self: center; order: 1; }
  .ridhf-footer__copy { grid-column: 1; white-space: normal; order: 2; }
  .ridhf-prefooter { padding: 60px 20px; }
  .ridhf-prefooter__heading { font-size: clamp(24px,6vw,34px); }
}
@media (max-width: 480px) {
  .ridhf-footer__inner { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .ridhf-footer__brand { grid-column: 1 / -1; }
  .ridhf-footer__social { gap: 8px; }
  .ridhf-social--lg .ridhf-social-icon { width: 44px; height: 44px; }
  .ridhf-social--lg .ridhf-social-icon svg { width: 19px; height: 19px; }
  .ridhf-social--md .ridhf-social-icon { width: 38px; height: 38px; }
  .ridhf-social--sm .ridhf-social-icon { width: 34px; height: 34px; }
  .ridhf-fiverr-badge__text { white-space: normal; text-align: center; }
  .ridhf-prefooter__trust { gap: 8px 16px; }
}
@media (max-width: 360px) {
  .ridhf-footer__inner { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════ */
.ridhf-header *:focus-visible,
.ridhf-mobile-menu *:focus-visible,
.ridhf-footer *:focus-visible {
  outline: 2px solid var(--ridhf-p);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .ridhf-header,
  .ridhf-mobile-menu,
  .ridhf-overlay,
  .ridhf-btn,
  .ridhf-social-icon,
  .ridhf-hamburger__bar,
  .ridhf-dropdown,
  .ridhf-mega-wrap,
  .ridhf-mobile-nav__chevron,
  .ridhf-nav__caret,
  .ridhf-db-btn {
    transition: none !important;
    animation: none !important;
  }
}
