/**
 * FXD Color System
 * Single source of truth for color across forexdailyinfo.com
 * plugins (header/footer builder, FXD Core, etc.)
 *
 * Enqueue this ONE file first (before any plugin CSS), then
 * reference these variables instead of hardcoded hex values.
 */
:root {
  /* ── Brand ─────────────────────────────── */
  --fxd-primary:       #4B52FF;
  --fxd-primary-hover: #4A51FE;
  --fxd-primary-light: #6268F9;
  --fxd-primary-tint:  #F1F1FB; /* light bg wash, e.g. active/selected state */
  /* ── Neutrals ──────────────────────────── */
  --fxd-text:          #1F2937;
  --fxd-text-muted:    #6B7280;
  --fxd-border:        #E5E7EB;
  --fxd-surface:       #FFFFFF;
  --fxd-surface-alt:   #FAFAFA;
  --fxd-page-bg:       #f0f2f8; /* light-mode website/body background, distinct from card/header surfaces */
  --fxd-dark:          #1A1D2E; /* dark surfaces only, e.g. footer bg */
  /* ── Social brand icons (fixed, not site brand) ── */
  --fxd-whatsapp:      #25D366;
  --fxd-telegram:      #229ED9;
  --fxd-facebook:      #1877F2;
  --fxd-linkedin:      #0A66C2;
  --fxd-x:              #111111;
  /* ── Status (badges) ──────────────────── */
  --fxd-success-bg:     #E6F7F2;
  --fxd-success-text:   #0F6E56;
  --fxd-success-border: #B6E8D9;
  /* ── Semantic (ratings, indicators) ─────
     Consolidated from brokers-review's frs-green/#2ECC8A vs a-green/rm-green
     (#10b981) and frs-red/#E85555 vs a-red/rm-red (#e53935) — same role,
     drifted shades — now one value each. */
  --fxd-positive:      #2ECC8A;
  --fxd-positive-dark: #1D9E75; /* solid-fill contexts (buttons) needing more contrast */
  --fxd-positive-tint: rgba(46,204,138,.10);
  --fxd-negative:      #E85555;
  --fxd-negative-tint: rgba(232,85,85,.10);
  --fxd-negative-bg:     #fef2f2;
  --fxd-negative-border: #fecaca;
  --fxd-negative-text:   #b91c1c;
  --fxd-info:          #4A90D9;
  --fxd-info-dark:     #185FA5; /* solid-fill contexts (buttons) needing more contrast */
  --fxd-info-tint:     rgba(74,144,217,.10);
  --fxd-warning:       #B45309;
  --fxd-warning-tint:  rgba(217,119,6,.10);
  /* ── Rating stars ──────────────────────── */
  --fxd-star:      #EF9F27;
  --fxd-star-half: #F5CF8A;
}

/*
 * ─────────────────────────────────────────────────────────────
 * Theme-layer tokens (Forex Daily theme only, not part of the
 * plugin-shared FXD Color System above): layout/spacing/radius/
 * type scale, plus light/dark surface mapping for the theme UI.
 * Components should prefer --fxd-* wherever a plugin equivalent
 * exists; use --fdt-* only for theme-chrome-specific needs.
 * ─────────────────────────────────────────────────────────────
 */
:root {
  --fdt-radius-sm: 4px;
  --fdt-radius-md: 8px;
  --fdt-radius-lg: 10px;
  --fdt-space-1: 4px;
  --fdt-space-2: 8px;
  --fdt-space-3: 12px;
  --fdt-space-4: 24px;
  --fdt-space-5: 40px;
  --fdt-font-base: "Inter", system-ui, -apple-system, sans-serif;
  --fdt-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --fdt-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --fdt-shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);

  color-scheme: light;
}

/*
 * NOTE: the FXD Color System above ships light-mode values only —
 * no dark variants were defined for --fxd-* yet. Until dark
 * equivalents are supplied, [data-theme="dark"] only remaps the
 * neutrals/surfaces (text, border, surface, dark) since those are
 * the ones that actually break in a dark UI. Brand, status, and
 * semantic colors pass through unchanged for now — flag if any of
 * those need dark-specific values too.
 */
[data-theme="dark"] {
  --fxd-text:          #E9EDF2;
  --fxd-text-muted:    #9AA7B8;
  --fxd-border:        #1e242c;
  --fxd-surface:       #12171F;
  --fxd-surface-alt:   #12171F;
  --fxd-page-bg:       #0C1015;
  --fxd-dark:          #0C1015;
  --fxd-primary-tint:  rgba(98, 104, 249, .16); /* nav active/hover pill, topbar/footer social icons, "Updated" badge */

  --fdt-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --fdt-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fxd-text:          #E9EDF2;
    --fxd-text-muted:    #9AA7B8;
    --fxd-border:        #1e242c;
    --fxd-surface:       #12171F;
    --fxd-surface-alt:   #12171F;
    --fxd-page-bg:       #0C1015;
    --fxd-dark:          #0C1015;
    --fxd-primary-tint:  rgba(98, 104, 249, .16);
    color-scheme: dark;
  }
}

/* ═══════════════════════════════════════════════════════════════
   The 6 files below (style.css, topbar.css, header.css, footer.css,
   ad-banner.css, back-to-top.css) are concatenated into this file
   because they load unconditionally on every single page — merging
   them cuts 6 HTTP requests down to 0 extra, with zero effect on
   cascade order since they were already always loaded together, in
   this exact order, ahead of every per-template stylesheet.

   Each source file below still exists on disk for organization —
   edit it there, then re-run the concatenation (or just edit this
   file directly and mirror the change back) — but only THIS file
   (variables.css, handle 'fordai-variables') is actually enqueued.
   See fordai_enqueue_assets() in functions.php.
   ═══════════════════════════════════════════════════════════════ */
/* Forex Daily — base layer. Colors from --fxd-* (FXD Color System),
   layout/spacing/type from --fdt-* (theme-only tokens). */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fxd-page-bg);
  color: var(--fxd-text);
  font-family: var(--fdt-font-base);
  line-height: 1.55;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--fxd-primary); }
a:hover { color: var(--fxd-primary-hover); }

.site-footer {
  background: var(--fxd-surface);
  border-color: var(--fxd-border);
}

.card, .fxd-card {
  background: var(--fxd-surface-alt);
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-md);
  box-shadow: var(--fdt-shadow-sm);
  padding: var(--fdt-space-3);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-text);
  cursor: pointer;
  padding: var(--fdt-space-1) var(--fdt-space-2);
}
/* ════════════════════════════════════════════════
   TOPBAR
   Static — scrolls with the page, not fixed/sticky.
   Colors: --fxd-* (light/dark handled automatically
   via [data-theme] in variables.css). Layout: --fdt-*.
   ════════════════════════════════════════════════ */

.topbar {
  background: var(--fxd-surface);
  border-bottom: 1px solid var(--fxd-border);
  font-size: 12px;
  color: var(--fxd-text-muted);
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 38px;
  padding: 0 var(--fdt-space-3);
  display: flex;
  align-items: center;
  gap: var(--fdt-space-4);
  flex-wrap: wrap;
}

/* ── Trust badge ── */
.topbar__trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--fxd-text-muted);
}

.topbar__trust-item svg {
  width: 14px;
  height: 14px;
  color: var(--fxd-primary);
  flex-shrink: 0;
}

/* ── Center links: Forex Award / Advertising / Contact Us ── */
.topbar__links {
  display: flex;
  gap: var(--fdt-space-3);
  align-items: center;
  flex-wrap: wrap;
}

.topbar__link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fxd-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}

.topbar__link svg {
  width: 13px;
  height: 13px;
  opacity: .75;
  flex-shrink: 0;
  transition: opacity .2s ease;
}

.topbar__link:hover {
  color: var(--fxd-primary);
}

.topbar__link:hover svg {
  opacity: 1;
}

/* First link (Forex Award) gets brand-color emphasis, matching the
   reference design where it reads as the "featured" topbar item. */
.topbar__links .topbar__link:first-child {
  color: var(--fxd-primary);
  font-weight: 600;
}

.topbar__links .topbar__link:first-child svg {
  opacity: 1;
  color: var(--fxd-primary);
}

/* ── Right side: date + socials ── */
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--fdt-space-2);
  margin-left: auto;
}

.topbar__date {
  font-size: 11px;
  color: var(--fxd-text-muted);
  white-space: nowrap;
}

.topbar__date strong {
  color: var(--fxd-primary);
  font-weight: 600;
}

.topbar__socials {
  display: flex;
  gap: 6px;
  align-items: center;
}

.topbar__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fxd-primary-tint);
  border: 1px solid var(--fxd-border);
  color: var(--fxd-text-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.topbar__social-link svg {
  width: 13px;
  height: 13px;
}

.topbar__social-link:hover {
  border-color: var(--fxd-primary);
  color: var(--fxd-primary);
  transform: translateY(-1px);
}

/* ── Mobile view: hide the whole topbar ── */
@media (max-width: 900px) {
  .topbar {
    display: none;
  }
}
/* ════════════════════════════════════════════════
   MAIN HEADER
   Sticky — pinned to the top of the viewport on scroll.
   Topbar (above it in the DOM) stays static and scrolls
   away, so this becomes flush with the viewport top.
   Colors: --fxd-* (light/dark via [data-theme]).
   Layout: --fdt-*.
   ════════════════════════════════════════════════ */

:root {
  --header-h: 64px;
}

.main-header {
  background: var(--fxd-surface);
  border-bottom: 1px solid var(--fxd-border);
  position: sticky; /* stays pinned to viewport top; also containing block for .mega-panel (position:absolute) */
  top: 0;
  z-index: 300; /* above mega-panel (199/200) and page content, below mobile drawer (998/999) */
}

.main-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 var(--fdt-space-3);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ── Logo ── */
.main-header__logo {
  flex-shrink: 0;
}

.main-header__logo a,
.logo-text-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity .2s ease;
}

.main-header__logo a:hover,
.logo-text-link:hover {
  opacity: .85;
}

.main-header__logo img {
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--fdt-radius-md);
  background: linear-gradient(135deg, var(--fxd-primary), var(--fxd-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--fxd-surface);
  letter-spacing: -1px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--fxd-text);
  letter-spacing: .3px;
}

/* ── Nav ── */
.main-nav {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.nav-list {
  display: flex;
  gap: 2px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-item.has-mega {
  position: static;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--fxd-text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: var(--fdt-radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

.nav-link:hover,
.nav-item.active > .nav-link {
  color: var(--fxd-text);
  background: var(--fxd-primary-tint);
}

.nav-arrow {
  display: flex;
  align-items: center;
}

.nav-arrow svg {
  width: 12px;
  height: 12px;
  opacity: .6;
  transition: transform .25s ease;
}

.nav-item:hover > .nav-link .nav-arrow svg,
.nav-item:focus-within > .nav-link .nav-arrow svg {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── Regular dropdown (non-mega submenu) ── */
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--fxd-surface-alt);
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-md);
  box-shadow: var(--fdt-shadow-md);
  list-style: none;
  margin: 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  z-index: 200;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.nav-item.has-dropdown:hover > .dropdown,
.nav-item.has-dropdown:focus-within > .dropdown,
.nav-item.has-dropdown.mega-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item a {
  display: block;
  padding: 8px 12px;
  color: var(--fxd-text-muted);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--fdt-radius-sm);
  transition: color .2s ease, background .2s ease;
}

.dropdown-item a:hover {
  color: var(--fxd-primary);
  background: var(--fxd-primary-tint);
}

/* ── Mega panel ── */
.mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  transform: translateY(6px);
  background: var(--fxd-surface-alt);
  border: 1px solid var(--fxd-border);
  border-top: 2px solid var(--fxd-primary);
  border-radius: 0 0 var(--fdt-radius-lg) var(--fdt-radius-lg);
  box-shadow: var(--fdt-shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 199;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.nav-item.has-mega:hover > .mega-panel,
.nav-item.has-mega:focus-within > .mega-panel,
.nav-item.has-mega.mega-open > .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.mega-panel__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 28px 20px;
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}

.mega-col {
  padding: 0 20px;
  border-right: 1px solid var(--fxd-border);
}

.mega-col:first-child {
  padding-left: 0;
}

.mega-col:last-child {
  padding-right: 0;
  border-right: none;
}

.mega-col__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fxd-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--fxd-border);
}

.mega-col__title a {
  color: inherit;
  text-decoration: none;
}

.mega-col__title a:hover {
  color: var(--fxd-primary-light);
}

.mega-col__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mega-col__links li a {
  display: block;
  padding: 6px 8px;
  color: var(--fxd-text-muted);
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--fdt-radius-sm);
  transition: color .15s ease, background .15s ease, padding-left .15s ease;
}

.mega-col__links li a:hover {
  color: var(--fxd-text);
  background: var(--fxd-primary-tint);
  padding-left: 12px;
}

.mega-col__links li.active a {
  color: var(--fxd-primary);
}

/* ── Header actions: search + CTA ── */
.main-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-text-muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.search-toggle svg {
  width: 16px;
  height: 16px;
}

.search-toggle:hover,
.search-toggle.active {
  color: var(--fxd-primary);
  border-color: var(--fxd-primary);
  background: var(--fxd-primary-tint);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--fdt-radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .2s ease, transform .2s ease;
}

.cta-btn:hover {
  opacity: .85;
  transform: translateY(-1px);
}

.cta-primary {
  background: linear-gradient(135deg, var(--fxd-primary), var(--fxd-primary-light));
  color: var(--fxd-surface) !important;
}

.cta-ghost {
  background: transparent;
  color: var(--fxd-text) !important;
  border: 1px solid var(--fxd-border);
}

.cta-ghost:hover {
  border-color: var(--fxd-primary);
  color: var(--fxd-primary) !important;
}

/* ── Theme toggle (icon button, matches search-toggle sizing) ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.theme-toggle:hover {
  color: var(--fxd-primary);
  border-color: var(--fxd-primary);
  background: var(--fxd-primary-tint);
}

.theme-toggle__icon {
  display: none;
  align-items: center;
  justify-content: center;
}

.theme-toggle__icon svg {
  width: 16px;
  height: 16px;
}

/* Light mode (default / [data-theme="light"]): show moon — click to go dark. */
.theme-toggle__icon--moon {
  display: flex;
}

/* Dark mode: show sun — click to go light. */
[data-theme="dark"] .theme-toggle__icon--sun {
  display: flex;
}

[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

/* ── Search bar (slides open below header) ── */
.search-bar {
  background: var(--fxd-surface-alt);
  border-bottom: 0 solid var(--fxd-border);
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
}

.search-bar.search-open {
  max-height: 90px;
  border-bottom: 1px solid var(--fxd-border);
}

.search-bar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

/* ── Search pill: field + clear button merged into one continuous pill ── */
.search-pill {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--fxd-primary-tint);
  border: 1px solid var(--fxd-border);
  border-radius: 999px;
  padding: 4px 4px 4px 20px;
}

.search-pill .search-form {
  flex: 1 1 0;
  min-width: 0;
}

.search-pill .search-field {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--fxd-text);
  padding: 10px 0;
}
.search-pill .search-field::placeholder { color: var(--fxd-text-muted); }

.search-pill .search-submit {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background: var(--fxd-surface);
  border: none;
  border-radius: 50%;
  color: var(--fxd-text-muted);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.search-close svg {
  width: 14px;
  height: 14px;
}

.search-close:hover {
  color: var(--fxd-primary);
  background: var(--fxd-surface-alt);
}

/* ── Hamburger (mobile menu toggle) — hidden on desktop ── */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.mobile-menu-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-toggle:hover {
  color: var(--fxd-primary);
  border-color: var(--fxd-primary);
  background: var(--fxd-primary-tint);
}

/* ── Mobile drawer (off-canvas, drill-down panels) ── */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  z-index: 998;
  transition: opacity .3s ease, visibility .3s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: var(--fxd-surface);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--fdt-shadow-md);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--fdt-space-3);
  border-bottom: 1px solid var(--fxd-border);
  flex-shrink: 0;
}.mobile-drawer__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fxd-text);
}

.mobile-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--fxd-border);
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-text-muted);
  cursor: pointer;
}

.mobile-drawer__close svg {
  width: 14px;
  height: 14px;
}

.mobile-drawer__close:hover {
  color: var(--fxd-primary);
  border-color: var(--fxd-primary);
}

.mobile-drawer__search {
  padding: 10px var(--fdt-space-3);
  border-bottom: 1px solid var(--fxd-border);
  flex-shrink: 0;
}

.mobile-drawer__search .search-form {
  width: 100%;
  display: block;
  background: var(--fxd-primary-tint);
  border: 1px solid var(--fxd-border);
  border-radius: 999px;
  padding: 0 20px;
}

.mobile-drawer__search .search-field {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--fxd-text);
  padding: 10px 0;
}
.mobile-drawer__search .search-field::placeholder { color: var(--fxd-text-muted); }

.mobile-drawer__search .search-submit {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Panel stack: each panel fills the viewport of the container; the
   active panel is centred, panels slide in from the right and out to
   the left as the user drills deeper (classic drill-down UI). */
.mobile-drawer__panels {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.mobile-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 8px;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  background: var(--fxd-surface);
}

.mobile-panel.active {
  transform: translateX(0);
}

.mobile-panel.prev {
  transform: translateX(-100%);
}

.mobile-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-item {
  border-bottom: 1px solid var(--fxd-border);
}

.mobile-item:last-child {
  border-bottom: none;
}

.mobile-item__link,
.mobile-item__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 10px;
  background: transparent;
  border: none;
  color: var(--fxd-text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-item__btn svg {
  width: 15px;
  height: 15px;
  opacity: .5;
  flex-shrink: 0;
}

.mobile-item.active > .mobile-item__link {
  color: var(--fxd-primary);
}

/* Sub-panel (built by JS from desktop dropdown/mega content) */
.mobile-panel__back {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin-bottom: 4px;
  background: var(--fxd-primary-tint);
  border: none;
  border-radius: var(--fdt-radius-sm);
  color: var(--fxd-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-panel__back svg {
  width: 14px;
  height: 14px;
}

.mobile-panel__group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--fxd-primary);
  padding: 14px 10px 6px;
}

.mobile-panel__group-title:first-of-type {
  padding-top: 8px;
}

.mobile-panel__link {
  display: block;
  padding: 10px;
  color: var(--fxd-text-muted);
  font-size: 13.5px;
  text-decoration: none;
  border-radius: var(--fdt-radius-sm);
}

.mobile-panel__link:hover {
  color: var(--fxd-primary);
  background: var(--fxd-primary-tint);
}

.mobile-drawer__footer {
  padding: var(--fdt-space-3);
  border-top: 1px solid var(--fxd-border);
  flex-shrink: 0;
}

.mobile-drawer__cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* ── Breakpoint: switch from desktop mega-nav to hamburger + drawer ── */
@media (max-width: 900px) {
  .main-nav,
  .search-bar {
    display: none;
  }

  .main-header__inner {
    min-height: 56px;
  }

  .main-header__actions {
    margin-left: auto; /* nav's flex:1 spacer is gone, so push actions right ourselves */
  }

  .main-header__actions .cta-btn {
    display: none; /* shown instead in the drawer footer */
  }

  .search-toggle {
    display: none; /* search now lives in the mobile drawer */
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 400px) {
  .logo-name {
    font-size: 15px;
  }
  .main-header__actions {
    gap: 6px;
  }
}
/* ════════════════════════════════════════════════
   FOOTER
   Colors: --fxd-* (light/dark handled automatically
   via [data-theme] in variables.css). Layout: --fdt-*.
   ════════════════════════════════════════════════ */

.site-footer {
  background: var(--fxd-surface);
  border-top: 1px solid var(--fxd-border);
  color: var(--fxd-text-muted);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--fdt-space-5) var(--fdt-space-3) var(--fdt-space-4);
}

/* ── Grid: brand column + 3 link columns ── */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--fdt-space-4);
  padding-bottom: var(--fdt-space-4);
}

/* ── Brand column ── */
.footer-brand__logo {
  margin-bottom: var(--fdt-space-3);
}

.footer-brand__logo img {
  max-width: 200px;
  height: auto;
  display: block;
}

.footer-brand__logo .logo-text-link {
  font-size: 20px;
  font-weight: 700;
  color: var(--fxd-text);
  text-decoration: none;
}

.footer-brand__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fxd-text-muted);
  margin: 0 0 var(--fdt-space-3);
  max-width: 34ch;
}

.footer-brand__contact {
  display: flex;
  flex-direction: column;
  gap: var(--fdt-space-2);
  margin-bottom: var(--fdt-space-3);
}

.footer-brand__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fxd-text-muted);
  text-decoration: none;
  transition: color .2s ease;
}

a.footer-brand__contact-item:hover {
  color: var(--fxd-primary);
}

.footer-brand__contact-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .8;
}

.footer-brand__socials {
  display: flex;
  gap: 10px;
}

.footer-brand__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--fxd-primary-tint);
  border: 1px solid var(--fxd-border);
  color: var(--fxd-text-muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.footer-brand__social-link svg {
  width: 13px;
  height: 13px;
}

.footer-brand__social-link:hover {
  border-color: var(--fxd-primary);
  color: var(--fxd-primary);
  transform: translateY(-1px);
}

/* ── Link columns ── */
.footer-col__heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fxd-text);
  margin: 0 0 var(--fdt-space-3);
  padding-bottom: var(--fdt-space-2);
  border-bottom: 1px solid var(--fxd-border);
}

.footer-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--fdt-space-1);
}

.footer-col__list a {
  font-size: 14px;
  color: var(--fxd-text-muted);
  text-decoration: none;
  transition: color .2s ease;
}

.footer-col__list a:hover {
  color: var(--fxd-primary);
}

/* ── Risk warning ── */
.footer-risk {
  border-top: 1px solid var(--fxd-border);
  padding-top: var(--fdt-space-4);
  padding-bottom: var(--fdt-space-4);
}

.footer-risk p {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fxd-text-muted);
  margin: 0;
}

.footer-risk__label {
  color: var(--fxd-primary);
  font-weight: 700;
}

/* ── Bottom bar ── */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--fdt-space-2);
  font-size: 13px;
}

.footer-bottom__copyright {
  margin: 0;
  color: var(--fxd-text-muted);
}

.footer-bottom__legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.footer-bottom__legal-list li {
  display: flex;
  align-items: center;
}

.footer-bottom__legal-list li + li::before {
  content: "\00b7";
  color: var(--fxd-border);
  margin: 0 8px;
  font-size: 16px;
}

.footer-bottom__legal-list a {
  color: var(--fxd-text-muted);
  text-decoration: none;
  transition: color .2s ease;
}

.footer-bottom__legal-list a:hover {
  color: var(--fxd-primary);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Forex Daily — Ad Manager banner slots (inc/render-ads.php).
   Each slot's fixed size comes from fordai_ad_slots() via the
   --ad-w/--ad-h inline vars set on .ad-banner. */

.ad-banner {
  display: block;
  width: 100%;
  max-width: var(--ad-w);
  margin: 0 auto;
}

.ad-banner__link {
  display: block;
}

.ad-banner__img {
  display: block;
  width: 100%;
  max-width: var(--ad-w);
  height: auto;
  border-radius: var(--fdt-radius-sm);
  border: 1px solid var(--fxd-border);
}

/* ── Header ad row — slots #1 + #2, side by side below the main header
   (fordai_render_header_ad_row(), called from header.php). Same
   1180px max-width as .main-header__inner so the row lines up with
   the rest of the site instead of stretching full-bleed. ── */
.ad-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--fdt-space-3, 16px);
  padding: var(--fdt-space-3, 16px) var(--fdt-space-3, 16px);
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}
.ad-header-row .ad-banner { flex: 1 1 320px; max-width: 728px; }
@media (max-width: 900px) {
  /* Slot #2 hides on mobile — only the first header banner shows. */
  .ad-header-row .ad-banner[data-ad-slot="2"] { display: none; }
}
@media (max-width: 480px) {
  .ad-header-row { padding: var(--fdt-space-2, 12px); }
}

/* ── Floating side rails — slots #9 (left) + #10 (right), fixed to the
   viewport for the whole page (fordai_render_floating_ad_rails(),
   called once from header.php so it persists on every page). Only
   shown once the viewport is wide enough to fit a 120px rail on each
   side of the 1180px site container without overlapping it; hidden
   entirely on mobile/tablet. ── */
.ad-floating-rail {
  display: block;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  width: 120px;
}
.ad-floating-rail--left  { left: var(--fdt-space-3, 16px); }
.ad-floating-rail--right { right: var(--fdt-space-3, 16px); }
.ad-floating-rail .ad-banner,
.ad-floating-rail .ad-banner__img { max-width: 120px; }

@media (max-width: 1500px) {
  .ad-floating-rail { display: none; }
}
/* Forex Daily — global "Back to Top" button (inc/render-back-to-top.php).
   Fixed bottom-right, hidden until the visitor scrolls past a threshold
   (assets/js/back-to-top.js toggles .is-visible), smooth-scrolls to top
   on click. Colors from --fxd-*, layout/radius from --fdt-* (see
   assets/css/variables.css). */

.back-to-top {
  position: fixed;
  right: var(--fdt-space-3);
  bottom: var(--fdt-space-3);
  z-index: 500;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--fxd-border);
  border-radius: 50%;
  background: var(--fxd-primary);
  color: #fff;
  box-shadow: var(--fdt-shadow-md, 0 6px 16px rgba(0, 0, 0, .18));
  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background-color .2s ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--fxd-primary-hover);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .back-to-top {
    right: var(--fdt-space-2);
    bottom: var(--fdt-space-2);
    width: 40px;
    height: 40px;
  }
  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity .2s ease, visibility .2s ease;
    transform: none;
  }
}
