/*
 * Home B ("gradients & rings") -- the redesigned public home page.
 * Source design: honest2/Honest Home Redesign.html, variant "Home B".
 *
 * Almost all styling lives inline in resources/views/home-b/*.blade.php exactly as in the design
 * file; this sheet only carries what inline styles cannot: the keyframes, a scoped reset (the
 * legacy Mobirise/Bootstrap theme this site also loads restyles bare h1/h2/a/button/section), the
 * dropdown / hover / focus states, and the narrow-window behaviour.
 */

/* ---------- scoped reset against the legacy theme ---------- */
.hb, .hb * { box-sizing: border-box; }
.hb {
  font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  color: #2D3A55;
  background: #FFFFFF;
  line-height: 1.6;
  min-width: 0;
  overflow-x: clip;
  text-align: start;
  -webkit-font-smoothing: antialiased;
}
.hb h1, .hb h2, .hb h3, .hb h4, .hb p, .hb figure, .hb blockquote { text-transform: none; letter-spacing: normal; }
.hb h1, .hb h2, .hb h3, .hb h4 { font-style: normal; word-break: normal; }
.hb a { text-decoration: none; }
.hb a:hover { text-decoration: none; }
.hb button, .hb input { font-family: inherit; }
.hb button { line-height: 1.4; }
.hb section { padding: 0; margin: 0; }
.hb svg { display: inline-block; overflow: visible; }
.hb img { max-width: 100%; }
.hb [hidden] { display: none !important; }

/* ---------- animations from the design ---------- */
@keyframes hbRingFill { from { stroke-dashoffset: var(--circ); } }
@keyframes hbFloaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes hbRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hbMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hbMarqueeRtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
.hb .ring-anim { animation: hbRingFill 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.hb .float-a { animation: hbFloaty 5s ease-in-out infinite; }
.hb .float-b { animation: hbFloaty 6s ease-in-out -2s infinite; }
.hb .bar-anim { transform-origin: bottom; animation: hbRise 1.2s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .hb .ring-anim, .hb .float-a, .hb .float-b, .hb .bar-anim, .hb .hb-marquee-track { animation: none !important; }
  /* no auto-scroll for visitors who turned animations off: they can swipe/scroll the band instead */
  .hb .hb-marquee { overflow-x: auto !important; scrollbar-width: none; }
}

/* ---------- interaction states (the design file is static, these are the live equivalents) ---------- */
.hb a, .hb button { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, opacity .18s ease; }
.hb a:focus-visible, .hb button:focus-visible, .hb input:focus-visible { outline: 3px solid #28C7F7; outline-offset: 2px; }
.hb .hb-lift:hover { transform: translateY(-4px); }
.hb .hb-press:hover { transform: translateY(-2px); }
.hb .hb-nav-link:hover { background: rgba(255, 255, 255, .18); }
.hb .hb-slide-chip:hover { background: rgba(255, 255, 255, .28) !important; }

/* ---------- nav dropdowns (nav items that have children) ---------- */
.hb .hb-nav-item { position: relative; }
.hb .hb-nav-item > .hb-nav-link { display: inline-block; border-radius: 999px; }
.hb .hb-dropdown {
  position: absolute; z-index: 40; top: calc(100% + 8px); inset-inline-start: 0; min-width: 220px;
  background: #FFFFFF; color: #2D3A55; border-radius: 22px; padding: 8px;
  box-shadow: 0 20px 44px rgba(0, 50, 20, .28);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.hb .hb-nav-item:hover > .hb-dropdown,
.hb .hb-nav-item:focus-within > .hb-dropdown,
.hb .hb-nav-item.is-open > .hb-dropdown { opacity: 1; visibility: visible; transform: none; }
.hb .hb-dropdown a { display: block; color: #2D3A55; border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.hb .hb-dropdown a:hover { background: #EAF3FF; color: #1A56E8; }
.hb .hb-quick { position: relative; }
.hb .hb-quick .hb-dropdown { inset-inline-start: auto; inset-inline-end: 0; }
.hb .hb-quick.is-open .hb-dropdown { opacity: 1; visibility: visible; transform: none; }

/* ---------- hero slides ---------- */
.hb .hb-slide { display: none; }
.hb .hb-slide.is-active { display: block; animation: hbFade .5s ease both; }
@keyframes hbFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- market tabs / news tabs ---------- */
.hb .hb-tab-panel[hidden] { display: none !important; }
.hb [role="tab"] { cursor: pointer; }

/* ---------- ticker (news pill) ---------- */
.hb .hb-marquee { overflow: hidden; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
/* trailing padding = gap, so the doubled content is exactly twice one copy and the loop has no jump */
.hb .hb-marquee-track { display: inline-flex; gap: var(--hb-gap, 56px); padding-inline-end: var(--hb-gap, 56px); will-change: transform; animation: hbMarquee var(--hb-marquee-dur, 60s) linear infinite; }
/* direction follows the band itself, not the page: the stock strip is dir="ltr" even on Arabic pages */
.hb[dir="rtl"] .hb-marquee:not([dir="ltr"]) .hb-marquee-track, .hb .hb-marquee[dir="rtl"] .hb-marquee-track { animation-name: hbMarqueeRtl; }
.hb .hb-marquee[dir="ltr"] .hb-marquee-track { animation-name: hbMarquee; }
.hb .hb-marquee.is-paused .hb-marquee-track, .hb .hb-marquee:hover .hb-marquee-track { animation-play-state: paused; }
.hb .hb-marquee a { color: inherit; }
.hb .hb-marquee a:hover { color: #1A56E8; }

/* ---------- loading skeleton for async cards ---------- */
.hb .hb-skeleton { background: linear-gradient(90deg, #EEF2FA 25%, #F7F9FD 50%, #EEF2FA 75%); background-size: 200% 100%; animation: hbShimmer 1.4s linear infinite; border-radius: 999px; }
@keyframes hbShimmer { to { background-position: -200% 0; } }

/* ---------- stale market data (>15 min) -- same contract as the older widgets ---------- */
/* mute only the figures (not the white cards, which would wash out over the green) */
.hb [data-stale="true"] [data-hb-price], .hb [data-stale="true"] [data-hb-pct] { opacity: .65; }

/* ---------- narrow windows (phones are served /mobile; this is for tablets & small desktop windows) ---------- */
@media (max-width: 991.98px) {
  .hb h1.hb-h1 { font-size: 44px !important; }
  .hb h2.hb-h2 { font-size: 32px !important; }
}
@media (max-width: 575.98px) {
  .hb h1.hb-h1 { font-size: 34px !important; }
  .hb h2.hb-h2 { font-size: 26px !important; }
  .hb .hb-pad-lg { padding-inline: 20px !important; }
}

/* ---------- LTR (English) ---------- */
.hb[dir="ltr"] .hb-flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- ring gauge states (set by home-b.js) */
.hb .hb-ring.is-na .hb-ring-arc,
.hb .hb-ring.is-norange .hb-ring-arc { display: none; }
.hb .hb-ring.is-na .hb-ring-track { stroke: #DCE4F3; stroke-dasharray: 6 8; }
@media (prefers-reduced-motion: reduce) { .hb .hb-ring-arc { transition: none !important; } }

/* The design's own round "smart assistant" button drives the existing chatbot widget, so the
   widget's default launcher is hidden on this page (it stays in the DOM and clickable by script). */

body.hb-home { background: #FFFFFF; }

/* ---------------------------------------------------------------- inherit the design's base type from .hb
   The legacy theme sets its own line-height / font-family on bare tags; the design simply inherits
   1.6 and IBM Plex Sans Arabic from its root. Icon elements (<i>) are excluded so Font Awesome /
   Bootstrap Icons keep their own icon font. */
.hb div, .hb span, .hb a, .hb p, .hb b, .hb strong, .hb label, .hb li, .hb td, .hb th,
.hb h1, .hb h2, .hb h3, .hb h4, .hb blockquote, .hb figcaption, .hb button, .hb input { line-height: inherit; }
.hb h1, .hb h2, .hb h3, .hb h4 { margin-top: 0; }
.hb p { margin-bottom: 0; }

/* ---------------------------------------------------------------- legacy floating widgets
   The shared <head> partial also drops a WhatsApp circle and a notification bell on every page. Home B
   has its own WhatsApp / assistant buttons (bottom-left), so the duplicates are hidden here. */
body.hb-home .notification-container,
body.hb-home div[style*="bottom: 180px"][style*="right: 30px"] { display: none !important; }

/* ---------------------------------------------------------------- more legacy-theme resets */
.hb footer { padding: 0; margin: 0; border: 0; }
.hb blockquote { border: 0; padding: 0; margin: 0; font-style: normal; quotes: none; background: none; }
.hb blockquote::before, .hb blockquote::after { content: none; }
.hb figure { margin: 0; }

/* ---------------------------------------------------------------- typography vs. the legacy theme
   custom.css forces a site font on EVERY element with `font-family: var(--arabic-font|--english-font)
   !important` (Cairo / DM Serif Text, admin-configurable) -- which beats even inline styles. Home B
   uses IBM Plex Sans Arabic for body text and Cairo for headings and numbers, so this rule out-ranks
   the legacy selectors (they are ~7 classes deep; this is 9) and picks the face from the
   --hb-font custom property: unset = body face, set inline to Cairo where the design uses Cairo
   (a custom property is inherited exactly like font-family was). <i> icon elements are excluded so
   Font Awesome / Bootstrap Icons keep their icon fonts. */
.hb.hb.hb.hb.hb.hb.hb.hb.hb,
.hb.hb.hb.hb.hb.hb.hb.hb.hb *:not(i) {
  font-family: var(--hb-font, 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif) !important;
}

/* ---------------------------------------------------------------- team portraits
   The uploaded photos are tall full-body shots; a plain cover-crop shows a tiny figure off-centre.
   Anchor to the top (faces), centre horizontally, and zoom in to head-and-shoulders. */
.hb .hb-team-photo { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 6%;
  transform: scale(1.7); transform-origin: 50% 14%; max-width: none; }
/* server-made square crop, already centred on the face */
.hb .hb-team-photo.is-avatar { object-position: 50% 50%; transform: none; }


/* ================================================================ shared additions (new system) */
.hb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hb-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); inset-inline-start: 0; }
.hb-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 2000; background: #F5A623; color: #2B1A00; font-weight: 800; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-family: 'Cairo', sans-serif; }
.hb-skip:focus { top: 12px; }
html, body { margin: 0; }
body.hb-home { font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif; }

/* menu button (shown only on narrow screens) */
.hb .hb-menu-toggle { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; font-size: 22px; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 991.98px) {
  .hb .hb-menu-toggle { display: inline-flex; }
  .hb .hb-topnav { row-gap: 14px; }
  .hb #hbNavPill { display: none !important; order: 5; width: 100%; border-radius: 26px !important; padding: 8px !important; flex-direction: column; align-items: stretch !important; }
  .hb #hbNavPill.is-open { display: flex !important; }
  .hb #hbNavPill .hb-nav-link { display: block; border-radius: 18px; padding: 12px 14px !important; }
  .hb #hbNavPill .hb-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(255,255,255,.1); display: none; margin: 4px 0; }
  .hb #hbNavPill .hb-dropdown a { color: #fff; }
  .hb #hbNavPill .hb-nav-item.is-open > .hb-dropdown { display: block; }
  .hb .hb-nav-actions { width: 100%; justify-content: space-between; order: 4; }
}
@media (max-width: 575.98px) {
  .hb .hb-testi-box, .hb .hb-about-box { padding: 32px 22px !important; border-radius: 28px !important; }
  .hb figure[data-hb-testi-slide] { padding: 26px !important; }
  .hb .hb-nav-actions .hb-quick { display: none; }
}

/* help panel */
.hb-assistant { position: fixed; z-index: 1040; bottom: 92px; width: min(380px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; color: #2D3A55; border-radius: 28px; box-shadow: 0 30px 60px rgba(14, 27, 61, .3); overflow: hidden; font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif; }
.hb-assistant[dir="rtl"] { left: 20px; } .hb-assistant[dir="ltr"] { right: 20px; }
.hb-assistant[hidden] { display: none; }
.hb-assistant-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: linear-gradient(225deg, #1236C7, #1A56E8); color: #fff; font-family: 'Cairo', sans-serif; font-size: 18px; }
.hb-assistant-close { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.hb-assistant-search { padding: 14px 16px 6px; margin: 0; }
.hb-assistant-search input { width: 100%; box-sizing: border-box; border: 0; background: #F0F4FB; border-radius: 999px; padding: 12px 18px; font: inherit; color: #2D3A55; }
.hb-assistant-search input:focus { outline: 3px solid #28C7F7; }
.hb-assistant-results { padding: 6px 16px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hb-assistant-item { background: #F4F8FF; border-radius: 18px; padding: 12px 14px; }
.hb-assistant-item summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.hb-assistant-item p { margin: 8px 0 6px; font-size: 14px; color: #5A6683; line-height: 1.7; }
.hb-assistant-item a { color: #1A56E8; font-weight: 700; font-size: 13px; text-decoration: none; }
.hb-assistant-empty { color: #5A6683; font-size: 14px; margin: 6px 0; }
.hb-assistant-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 16px; border-top: 1px solid #E9EEF8; }
.hb-assistant-actions a { flex: 1 1 auto; text-align: center; text-decoration: none; background: #EAF3FF; color: #1A56E8; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 9px 12px; white-space: nowrap; }
.hb-assistant-actions a:hover { background: #1A56E8; color: #fff; }
/* visitor notices (Admin → Visitor notices) */
.hb-notice-bar { position: relative; z-index: 1035; font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif; font-size: 14px; line-height: 1.6; }
.hb-notice-bar[hidden], .hb-notice-popup[hidden] { display: none !important; }
.hb-notice-inner { max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.hb-notice-inner a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.hb-notice-inner button { border: 0; background: rgba(255,255,255,.18); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; margin-inline-start: 6px; }
.hb-notice-popup { position: fixed; inset: 0; z-index: 2000; background: rgba(14,27,61,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hb-notice-dialog { width: min(480px, 100%); background: #fff; color: #2D3A55; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.35); font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif; }
.hb-notice-head { display: flex; align-items: center; gap: 10px; padding: 20px 24px; font-family: 'Cairo', sans-serif; font-size: 19px; }
.hb-notice-dialog p { margin: 0; padding: 20px 24px 4px; font-size: 16px; line-height: 1.8; white-space: pre-line; }
.hb-notice-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 18px 24px 22px; flex-wrap: wrap; }
.hb-notice-actions a, .hb-notice-actions button { border: 0; border-radius: 999px; padding: 11px 24px; font: 700 14px 'Cairo', sans-serif; cursor: pointer; text-decoration: none; }
.hb-notice-actions button { background: #F0F4FB; color: #2D3A55; }

/* reading modal (home page news) */
.hb-reader { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif; }
.hb-reader[hidden] { display: none; }
.hb-reader-backdrop { position: absolute; inset: 0; background: rgba(14, 27, 61, .6); backdrop-filter: blur(3px); animation: hbFadeIn .2s ease both; }
.hb-reader-dialog { position: relative; width: min(760px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; background: #fff; color: #2D3A55; border-radius: 32px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.4); animation: hbPop .25s cubic-bezier(.2,.7,.2,1) both; outline: none; }
@keyframes hbFadeIn { from { opacity: 0; } }
@keyframes hbPop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.hb-reader-head { position: relative; padding: 26px 28px 22px; background: linear-gradient(225deg, #067A33 0%, #0B9440 55%, #18B455 100%); color: #fff; }
.hb-reader-head::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); top: -110px; inset-inline-end: -60px; pointer-events: none; }
.hb-reader-kicker { display: inline-block; background: rgba(255,255,255,.18); border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 700; }
.hb-reader-kicker:empty { display: none; }
.hb-reader-x { position: absolute; top: 18px; inset-inline-end: 18px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; font-size: 16px; }
.hb-reader-x:hover { background: rgba(255,255,255,.3); }
.hb-reader-title { margin: 12px 0 0; padding-inline-end: 46px; font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 22px; line-height: 1.5; color: #fff; text-align: start; }
.hb-reader-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: #D5F5DE; }
.hb-reader-meta span:empty { display: none; }
.hb-reader-body { padding: 24px 28px; overflow-y: auto; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.hb-reader-body .hb-reader-text { white-space: pre-line; margin: 0; }
.hb-reader-body img { max-width: 100%; height: auto; border-radius: 20px; }
.hb-reader-body table { display: block; overflow-x: auto; border-collapse: collapse; }
.hb-reader-body td, .hb-reader-body th { border: 1px solid #E9EEF8; padding: 8px 10px; }
.hb-reader-cover { width: 100%; max-height: 280px; object-fit: cover; border-radius: 22px; margin-bottom: 18px; }
.hb-reader-loading { color: #5A6683; }
.hb-reader-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 16px 28px 22px; border-top: 1px solid #E9EEF8; }
.hb-reader-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 12px 24px; font: 700 14px 'Cairo', sans-serif; text-decoration: none; transition: transform .18s ease; }
.hb-reader-btn:hover { transform: translateY(-2px); }
.hb-reader-btn[hidden] { display: none; }
.hb-reader-btn-pdf { background: #F5A623; color: #2B1A00; box-shadow: 0 10px 20px rgba(240,138,0,.3); }
.hb-reader-btn-ghost { background: #EAF3FF; color: #1A56E8; margin-inline-start: auto; }
body.hb-reader-open { overflow: hidden; }
@media (max-width: 575.98px) {
  .hb-reader { padding: 0; align-items: flex-end; }
  .hb-reader-dialog { max-height: 92vh; border-radius: 28px 28px 0 0; }
  .hb-reader-title { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .hb-reader-dialog, .hb-reader-backdrop { animation: none; } }
