/*
 * Riftbound Zone — Design Tokens (Editorial Strong / Deep Navy + Vivid Orange)
 * Adattato da github.com/aaaaaaaaaaa2001/riftbound-boost-buddy (Vite/React/Tailwind/shadcn).
 *
 * STEP 1: definizioni standalone, NON applicate.
 * In Step 2 questi token sostituiscono le palette correnti (--gold/--teal/...).
 * Tutti i valori HSL nel formato `H S% L%` per uso con hsl() / hsl(... / alpha).
 * Forniti anche equivalenti HEX precalcolati per chi non vuole hsl().
 */

:root {
  /* ── Surfaces ── */
  --rbz-background:     222 45% 7%;     /* #0a0e19 deep navy quasi-nero */
  --rbz-foreground:     35 30% 94%;     /* #f4ede0 warm off-white */

  --rbz-card:           222 40% 10%;    /* #131826 */
  --rbz-card-foreground:35 30% 94%;
  --rbz-popover:        222 45% 9%;     /* #0e131f */
  --rbz-popover-foreground:35 30% 94%;
  --rbz-muted:          222 30% 14%;    /* #181f30 */
  --rbz-muted-foreground:220 15% 65%;   /* #97a0b4 */

  /* ── Brand ── */
  --rbz-primary:        22 95% 55%;     /* #f6841f vivid orange */
  --rbz-primary-foreground:222 45% 7%;
  --rbz-primary-glow:   28 100% 62%;    /* #ff9a3d */

  --rbz-secondary:      212 90% 52%;    /* #1a8af0 electric blue */
  --rbz-secondary-foreground:35 30% 96%;

  --rbz-accent:         22 95% 55%;
  --rbz-accent-foreground:222 45% 7%;

  --rbz-destructive:    0 75% 55%;      /* #de4242 */
  --rbz-destructive-foreground:0 0% 100%;

  --rbz-border:         220 25% 18%;    /* #232c3d */
  --rbz-input:          220 25% 18%;
  --rbz-ring:           22 95% 55%;

  /* ── Tier colors (S→D) ── */
  --rbz-tier-s:         0 80% 58%;      /* #e94545 red */
  --rbz-tier-a:         22 95% 55%;     /* #f6841f orange */
  --rbz-tier-b:         45 95% 55%;     /* #f6cc1f yellow */
  --rbz-tier-c:         150 55% 50%;    /* #3acc83 green */
  --rbz-tier-d:         220 15% 55%;    /* #828ca0 grey */

  /* ── Sidebar ── */
  --rbz-sidebar-background:    222 45% 6%;
  --rbz-sidebar-foreground:    35 30% 94%;
  --rbz-sidebar-primary:       22 95% 55%;
  --rbz-sidebar-primary-foreground:222 45% 7%;
  --rbz-sidebar-accent:        222 30% 14%;
  --rbz-sidebar-accent-foreground:35 30% 94%;
  --rbz-sidebar-border:        220 25% 18%;
  --rbz-sidebar-ring:          22 95% 55%;

  /* ── Geometry ── */
  --rbz-radius:         0.25rem;
  --rbz-radius-md:      calc(0.25rem - 2px);
  --rbz-radius-sm:      calc(0.25rem - 4px);

  /* ── Gradients ── */
  --rbz-gradient-hero:    linear-gradient(135deg, hsl(222 50% 8%) 0%, hsl(212 60% 14%) 50%, hsl(22 80% 22%) 100%);
  --rbz-gradient-primary: linear-gradient(135deg, hsl(22 95% 55%), hsl(28 100% 62%));
  --rbz-gradient-cyan:    linear-gradient(135deg, hsl(212 90% 52%), hsl(195 95% 55%));
  --rbz-gradient-card:    linear-gradient(180deg, hsl(222 40% 11%), hsl(222 45% 8%));

  /* ── Shadows / glow ── */
  --rbz-shadow-glow:    0 0 40px hsl(22 95% 55% / 0.35);
  --rbz-shadow-blue:    0 0 30px hsl(212 90% 52% / 0.3);
  --rbz-shadow-card:    0 8px 24px -8px hsl(222 60% 3% / 0.6);

  /* ── Typography ── */
  --rbz-font-display:   'Archivo Black', system-ui, sans-serif;
  --rbz-font-body:      'Hind', system-ui, sans-serif;
  --rbz-feature-body:   "ss01", "cv11";

  /* ── HEX equivalents (lookup veloce, no hsl()) ── */
  --rbz-c-bg:           #0a0e19;
  --rbz-c-fg:           #f4ede0;
  --rbz-c-card:         #131826;
  --rbz-c-muted:        #181f30;
  --rbz-c-border:       #232c3d;
  --rbz-c-primary:      #f6841f;
  --rbz-c-primary-glow: #ff9a3d;
  --rbz-c-secondary:    #1a8af0;
  --rbz-c-destructive:  #de4242;
}

/*
 * Utility classi pronte per Step 2 (homepage pilota).
 * Non vengono usate da nessuna parte ora: zero impatto visivo.
 */
.rbz-bg-hero       { background: var(--rbz-gradient-hero); }
.rbz-bg-primary    { background: var(--rbz-gradient-primary); }
.rbz-bg-cyan       { background: var(--rbz-gradient-cyan); }
.rbz-bg-card-grad  { background: var(--rbz-gradient-card); }
.rbz-shadow-glow   { box-shadow: var(--rbz-shadow-glow); }
.rbz-shadow-blue   { box-shadow: var(--rbz-shadow-blue); }
.rbz-shadow-card   { box-shadow: var(--rbz-shadow-card); }
.rbz-font-display  { font-family: var(--rbz-font-display); letter-spacing: -0.01em; text-transform: uppercase; }
.rbz-font-body     { font-family: var(--rbz-font-body); }
.rbz-text-balance  { text-wrap: balance; }
.rbz-grain { position: relative; }
.rbz-grain::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(hsl(35 30% 94% / 0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
}
/*
 * Riftbound Zone — Design Shim (Step 2)
 * Ridefinisce le var legacy del sito puntandole ai token boost-buddy.
 * Caricato DOPO custom-style.css per vincere in cascade order.
 *
 * Step 2 (28/04/2026): pilot su homepage. Una volta validato, l'enqueue
 * passa da is_front_page() a globale.
 */

/* ── 1. Color vars: legacy → token nuovi ── */
:root {
  /* Surfaces */
  --bg:        hsl(var(--rbz-background));
  --bg2:       hsl(var(--rbz-popover));
  --bg3:       hsl(var(--rbz-muted));
  --card:      hsl(var(--rbz-card));
  --card2:     hsl(var(--rbz-muted));
  --border:    hsl(var(--rbz-border) / 0.7);
  --border2:   hsl(var(--rbz-border));

  /* Brand: gold→orange, teal→blue */
  --gold:      hsl(var(--rbz-primary));
  --gold2:     hsl(var(--rbz-primary-glow));
  --gold-glow: hsl(var(--rbz-primary) / 0.35);
  --teal:      hsl(var(--rbz-secondary));
  --teal2:     hsl(195 95% 55%);
  --teal-glow: hsl(var(--rbz-secondary) / 0.3);

  /* Status */
  --red:       hsl(var(--rbz-destructive));
  --green:     hsl(var(--rbz-tier-c));

  /* Text — testo più caldo (warm white) invece del cool cyan-tinged precedente */
  --text:      hsl(var(--rbz-foreground));
  --text2:     hsl(var(--rbz-muted-foreground));
  --text3:     hsl(var(--rbz-muted-foreground) / 0.7);
  --white:     hsl(var(--rbz-foreground));
}

/* ── 2. Elementor kit override: stessa logica per i widget Elementor ── */
.elementor-kit-7,
[class*="elementor-kit-"] {
  --e-global-color-primary:                  hsl(var(--rbz-primary)) !important;
  --e-global-color-secondary:                hsl(var(--rbz-secondary)) !important;
  --e-global-color-text:                     hsl(var(--rbz-foreground)) !important;
  --e-global-color-accent:                   hsl(var(--rbz-primary-glow)) !important;
  --e-global-typography-primary-font-family: 'Archivo Black', system-ui, sans-serif !important;
  --e-global-typography-secondary-font-family: 'Hind', system-ui, sans-serif !important;
  --e-global-typography-text-font-family:    'Hind', system-ui, sans-serif !important;
}

/* ── 3. Body font: Barlow → Hind ── */
body {
  font-family: var(--rbz-font-body) !important;
  font-feature-settings: "ss01", "cv11";
}

/* ── 4. Headings: Cinzel → Archivo Black ── */
/* Win specificity con !important: il vecchio CSS ha font-family inline su classi specifiche */
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title,
#rbz-nav-logo,
.section-title, .stat-number, .torneo-name,
.guide-title, .profilo-name, .home-hero-title,
.feedback-name, .deck-title, .listing-title,
.dash-section-title, .fb-profile-name {
  font-family: var(--rbz-font-display) !important;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ── 5. Subhead/labels: Barlow Condensed → Hind 700 caps ── */
/* Mantengono caps + letter-spacing già impostati dalle regole originali, solo cambio font */
.stat-label, .section-sub, .badge,
.listing-price, .listing-fav-count, .listing-lang,
.torneo-status, .torneo-meta,
.detail-meta, .info-label,
.guide-card-meta, .guide-card-tag,
.profilo-tier-label, .profilo-stat-label,
.home-hero-sub, .home-section-sub,
.dash-stat-label, .fb-stat-label {
  font-family: var(--rbz-font-body) !important;
}

/* ── 6. Smoothing per la nuova combinazione font ── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/*
 * Riftbound Zone — Block Design (Step 4)
 * Adatta lo stile dei blocchi (card, section, form, button) ai pattern del
 * repo boost-buddy: bordo sottile sempre visibile, hover orange + glow,
 * radius squadrato 4px, eyebrow orange, button gradient.
 *
 * Caricato DOPO rbz-design-shim.css. Le var --gold/--card/--border sono già
 * mappate ai token boost-buddy (vedi shim).
 */

/* ══════════════════════════════════════════════════════════════════
   BATCH A — Card uniformi
   Pattern: border 1px solid var(--border) + bg var(--card)
            + radius 4px + hover border-orange + glow soft
   ══════════════════════════════════════════════════════════════════ */
.listing-card,
.torneo-card,
.guide-card,
.feedback-card,
.profilo-card,
.dash-card,
.dash-fav-card,
.dash-stat-box,
.fb-profile-card,
.creator-card,
.partecipante-card,
.hex-card,
.info-card,
.coll-av-card,
.coll-ov-block,
.dv-gallery-card,
.home-feature-card,
.db-card,
.db-deck-panel,
.db-search-panel,
.discord-widget,
.discord-link-box,
.notif-item,
.msg-conv-item,
.iscrizione-box,
.auth-box,
.feedback-form-box,
.ac-card,
.ap-mock-card {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease !important;
  box-shadow: var(--rbz-shadow-card);
}

/* Hover universale: orange border + soft glow.
   Disattivato per i blocchi non-clickable (form box, panel statico) — ma
   in pratica il glow è abbastanza soft da non disturbare. */
.listing-card:hover,
.torneo-card:hover,
.guide-card:hover,
.feedback-card:hover,
.profilo-card:hover,
.dash-card:hover,
.dash-fav-card:hover,
.fb-profile-card:hover,
.creator-card:hover,
.partecipante-card:hover,
.hex-card:hover,
.info-card:hover,
.coll-av-card:hover,
.dv-gallery-card:hover,
.home-feature-card:hover,
.db-card:hover,
.db-deck-panel:hover,
.discord-link-box:hover,
.notif-item:hover,
.msg-conv-item:hover,
.ac-card:hover,
.ap-mock-card:hover {
  border-color: hsl(var(--rbz-primary) / 0.6) !important;
  box-shadow: 0 0 24px hsl(var(--rbz-primary) / 0.16) !important;
}

/* Dash-list-item / db-deck-item (lista compatta — niente glow su hover) */
.dash-list-item,
.db-deck-item,
.db-load-item,
.dv-item,
.cookie-row,
.fb-rating-row,
.fb-profile-item {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
}
.dash-list-item:hover,
.db-deck-item:hover,
.db-load-item:hover,
.dv-item:hover,
.fb-profile-item:hover {
  border-color: hsl(var(--rbz-primary) / 0.5) !important;
  background: var(--bg3) !important;
}

/* ══════════════════════════════════════════════════════════════════
   BATCH B — Section heading editorial
   Eyebrow arancio uppercase + title display
   ══════════════════════════════════════════════════════════════════ */

/* Eyebrow strip (sopra al titolo di sezione) */
.section-sub,
.page-eyebrow,
.ap-eyebrow {
  font-family: var(--rbz-font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
  margin-bottom: 0.5rem !important;
  display: inline-block;
}

/* Section title — già Archivo Black via shim, qui solo size+weight */
.section-title {
  font-size: 1.875rem !important;
  font-weight: 900 !important;
  color: var(--white) !important;
  line-height: 1.05;
  margin: 0;
}

/* Stat numero — Archivo Black grande arancio */
.stat-number,
.dash-stat-num,
.fb-stat-num,
.profilo-stat-num {
  font-family: var(--rbz-font-display) !important;
  font-weight: 400 !important; /* Archivo Black è già 900 di natura */
  font-size: 1.875rem !important;
  color: var(--gold) !important;
  letter-spacing: -0.01em;
}

/* Stat label — micro caps muted */
.stat-label,
.dash-stat-label,
.fb-stat-label,
.profilo-stat-label {
  font-family: var(--rbz-font-body) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--text3) !important;
  margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════════════
   BATCH C — Form & Button
   Input h-12 + focus ring orange; button gradient primary uppercase
   ══════════════════════════════════════════════════════════════════ */

/* Input/textarea/select — bordo solid + bg card + focus orange */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
input:not([type]),
textarea,
select {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  color: var(--text) !important;
  font-family: var(--rbz-font-body) !important;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input:not([type]):focus,
textarea:focus,
select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px hsl(var(--rbz-primary) / 0.25) !important;
}
input::placeholder,
textarea::placeholder { color: var(--text3); opacity: 0.7; }

/* Elementor button primary → gradient orange */
.elementor-button-link.elementor-button,
.elementor-button.elementor-size-md,
.elementor-button.elementor-size-lg,
.elementor-button.elementor-size-sm,
.elementor-button:not([class*="elementor-size-"]) {
  background: var(--rbz-gradient-primary) !important;
  color: hsl(var(--rbz-primary-foreground)) !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: var(--rbz-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.2s ease, box-shadow 0.2s ease !important;
}
.elementor-button:hover {
  opacity: 0.92 !important;
  box-shadow: var(--rbz-shadow-glow);
}

/* Custom plugin buttons (.btn-primary fattorizzato) */
.btn-primary,
.btn.btn-primary,
button.btn-primary {
  background: var(--rbz-gradient-primary) !important;
  color: hsl(var(--rbz-primary-foreground)) !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: var(--rbz-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  opacity: 0.92;
  box-shadow: var(--rbz-shadow-glow);
}

/* Secondary/outline button — bordo orange su bg trasparente */
.btn-secondary,
.btn.btn-outline {
  background: transparent !important;
  color: var(--gold) !important;
  border: 1px solid var(--gold) !important;
  border-radius: 4px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.15s ease;
}
.btn-secondary:hover,
.btn.btn-outline:hover {
  background: hsl(var(--rbz-primary) / 0.1) !important;
}

/* ══════════════════════════════════════════════════════════════════
   BATCH D (bonus) — Badge editorial
   Mantengono colors esistenti (vendo/cerco/scambio) ma forma squadrata
   ══════════════════════════════════════════════════════════════════ */
.badge {
  font-family: var(--rbz-font-body) !important;
  border-radius: 2px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
}

/* ══════════════════════════════════════════════════════════════════
   BATCH E — Nav "WIP" tag (sezioni in costruzione)
   ══════════════════════════════════════════════════════════════════ */
.nav-wip-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.32rem;
  font-family: var(--rbz-font-body);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--rbz-background));
  background: hsl(var(--rbz-tier-b)); /* yellow ~ in lavorazione */
  border-radius: 2px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* WIP tag inside a section eyebrow on the homepage */
.rbz6-wip-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.4rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--rbz-background));
  background: hsl(var(--rbz-tier-b));
  vertical-align: middle;
}
/*
 * Mega menu — Editorial style (Deep Navy + Vivid Orange)
 * Tokens: --rbz-c-bg, --rbz-c-card, --rbz-c-primary, --rbz-c-fg, etc.
 * Falls back to legacy --bg, --card, --teal, --gold for shim compat.
 */

/* ── Base nav refresh ─────────────────────────────────────────────── */

#rbz-nav.rbz-megamenu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: stretch; justify-content: space-between;
  padding: 0 2rem; height: var(--nav-h, 64px);
  background: rgba(10, 14, 25, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#rbz-nav.rbz-megamenu .nav-logo {
  display: flex; align-items: center;
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 1.5rem; letter-spacing: 0.02em;
  color: var(--rbz-c-fg, #f4ede0);
}
#rbz-nav.rbz-megamenu .nav-logo span {
  color: var(--rbz-c-primary, #f6841f);
}

#rbz-nav.rbz-megamenu .nav-links {
  display: flex; align-items: stretch; gap: 0; list-style: none; margin: 0; padding: 0;
}
#rbz-nav.rbz-megamenu .nav-links > li {
  display: flex; align-items: stretch; position: relative;
}
#rbz-nav.rbz-megamenu .nav-links > li > a,
#rbz-nav.rbz-megamenu .nav-links > li .mega-trigger {
  display: flex; align-items: center;
  padding: 0 1.15rem; height: 100%;
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.9rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--rbz-c-fg-muted, #97a0b4);
  text-decoration: none; cursor: pointer;
  transition: color 0.15s, background 0.15s;
  border: none; background: transparent;
}
#rbz-nav.rbz-megamenu .nav-links > li > a:hover,
#rbz-nav.rbz-megamenu .nav-links > li.open .mega-trigger,
#rbz-nav.rbz-megamenu .nav-links > li:hover .mega-trigger {
  color: var(--rbz-c-primary, #f6841f);
}
#rbz-nav.rbz-megamenu .nav-links > li .mega-trigger span {
  margin-left: 0.35rem; font-size: 0.7rem; opacity: 0.7;
}

/* ── Mega panel ───────────────────────────────────────────────────── */

/* Panel uses position: fixed centered on viewport — independent of which LI triggered it.
 * Avoids horizontal overflow on laptops/narrow viewports where the panel would otherwise
 * extend off-screen if absolute-positioned relative to a trigger LI on the right edge. */
#rbz-nav.rbz-megamenu .mega-panel {
  position: fixed; top: var(--nav-h, 64px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(820px, calc(100vw - 32px));
  background: var(--rbz-c-popover, #0e131f);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.5rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 200;
  margin-top: 4px;
}
#rbz-nav.rbz-megamenu .mega-panel-wide { width: min(1040px, calc(100vw - 32px)); }
#rbz-nav.rbz-megamenu .mega-panel-narrow { width: min(640px, calc(100vw - 32px)); }

/* Hover bridge: invisible strip between trigger and panel to keep hover state alive */
#rbz-nav.rbz-megamenu .mega-panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px;
}

#rbz-nav.rbz-megamenu .nav-mega:hover .mega-panel,
#rbz-nav.rbz-megamenu .nav-mega.open .mega-panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

#rbz-nav.rbz-megamenu .mega-cols {
  display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1.5rem;
}
#rbz-nav.rbz-megamenu .mega-cols-4 {
  grid-template-columns: 1fr 1fr 1fr 1.2fr;
}
#rbz-nav.rbz-megamenu .mega-cols-2 {
  grid-template-columns: 1fr 1fr;
}

#rbz-nav.rbz-megamenu .mega-col {
  display: flex; flex-direction: column; gap: 0.15rem;
}

#rbz-nav.rbz-megamenu .mega-cat {
  display: block;
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rbz-c-primary, #f6841f);
  margin: 0 0 0.6rem 0; padding: 0 0.5rem;
}

#rbz-nav.rbz-megamenu .mega-item {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.12s, transform 0.12s;
  border-left: 2px solid transparent;
}
#rbz-nav.rbz-megamenu .mega-item:hover {
  background: rgba(246, 132, 31, 0.08);
  border-left-color: var(--rbz-c-primary, #f6841f);
}
#rbz-nav.rbz-megamenu .mega-item strong {
  font-family: var(--rbz-font-body, 'Hind'), sans-serif;
  font-weight: 600; font-size: 0.92rem;
  color: var(--rbz-c-fg, #f4ede0);
  line-height: 1.2;
}
#rbz-nav.rbz-megamenu .mega-item em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--rbz-c-fg-muted, #97a0b4);
  line-height: 1.3;
}
#rbz-nav.rbz-megamenu .mega-item[data-lock="1"] strong::after {
  content: ' 🔒'; font-size: 0.7em; opacity: 0.6;
}

/* ── Featured cards ───────────────────────────────────────────────── */

#rbz-nav.rbz-megamenu .mega-featured { padding-left: 1rem; border-left: 1px solid rgba(255,255,255,0.06); }
#rbz-nav.rbz-megamenu .mega-featured .mega-cat { padding-left: 0; }

#rbz-nav.rbz-megamenu .mega-feat-card {
  display: flex; gap: 0.85rem; padding: 0.9rem;
  background: linear-gradient(135deg, rgba(246, 132, 31, 0.06), rgba(26, 138, 240, 0.04));
  border: 1px solid rgba(246, 132, 31, 0.15);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}
#rbz-nav.rbz-megamenu .mega-feat-card:hover {
  background: linear-gradient(135deg, rgba(246, 132, 31, 0.14), rgba(26, 138, 240, 0.08));
  border-color: var(--rbz-c-primary, #f6841f);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(246, 132, 31, 0.18);
}

#rbz-nav.rbz-megamenu .mega-feat-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
#rbz-nav.rbz-megamenu .mega-feat-title {
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.92rem;
  color: var(--rbz-c-fg, #f4ede0);
  line-height: 1.15;
  /* clamp 2 lines */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#rbz-nav.rbz-megamenu .mega-feat-meta {
  font-size: 0.72rem; color: var(--rbz-c-fg-muted, #97a0b4);
  letter-spacing: 0.04em;
}
#rbz-nav.rbz-megamenu .mega-feat-cta {
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rbz-c-primary, #f6841f);
  margin-top: 0.4rem;
}
#rbz-nav.rbz-megamenu .mega-feat-price {
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 1rem; color: var(--rbz-c-primary, #f6841f);
  margin-top: 0.1rem;
}

/* Tournament: date block */
#rbz-nav.rbz-megamenu .mega-feat-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0; width: 56px;
  background: var(--rbz-c-primary, #f6841f);
  color: var(--rbz-c-bg, #0a0e19);
  border-radius: 5px;
  padding: 0.4rem 0;
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  line-height: 1;
}
#rbz-nav.rbz-megamenu .mega-feat-day { font-size: 1.6rem; }
#rbz-nav.rbz-megamenu .mega-feat-mon { font-size: 0.62rem; letter-spacing: 0.12em; margin-top: 0.15rem; }

/* Meta deck: tier badge */
#rbz-nav.rbz-megamenu .mega-feat-tier {
  flex-shrink: 0; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rbz-c-tier-s, #e94545);
  color: #fff;
  border-radius: 5px;
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.72rem; letter-spacing: 0.08em;
  text-align: center;
}

/* Discord: brand color */
#rbz-nav.rbz-megamenu .mega-feat-discord {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12), rgba(88, 101, 242, 0.04));
  border-color: rgba(88, 101, 242, 0.25);
}
#rbz-nav.rbz-megamenu .mega-feat-discord:hover {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.22), rgba(88, 101, 242, 0.08));
  border-color: #5865F2;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.2);
}
#rbz-nav.rbz-megamenu .mega-feat-discord .mega-feat-cta { color: #5865F2; }
#rbz-nav.rbz-megamenu .mega-feat-discord-icon {
  flex-shrink: 0; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #5865F2; color: #fff;
  border-radius: 5px;
}

#rbz-nav.rbz-megamenu .mega-feat-empty {
  font-size: 0.85rem; color: var(--rbz-c-fg-muted, #97a0b4);
  padding: 0.9rem; border: 1px dashed rgba(255,255,255,0.1); border-radius: 6px;
}
#rbz-nav.rbz-megamenu .mega-feat-empty a { color: var(--rbz-c-primary, #f6841f); text-decoration: none; }

/* ── "Ti senti fortunato?" CTA (sotto featured Ispirazione Deck Builder) ── */

#rbz-nav.rbz-megamenu .mega-lucky-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;        /* spinge a fondo colonna così si allinea con altra col */
  padding: 0.7rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(246, 132, 31, 0.35);
  border-radius: 6px;
  color: var(--rbz-c-fg-muted, #97a0b4);
  font-family: var(--rbz-font-display, 'Archivo Black'), sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.18s ease;
}
#rbz-nav.rbz-megamenu .mega-lucky-cta span[aria-hidden] {
  font-size: 1rem;
  transition: transform 0.4s cubic-bezier(.4,2,.6,1);
}
#rbz-nav.rbz-megamenu .mega-lucky-cta:hover {
  background: rgba(246, 132, 31, 0.08);
  border-color: var(--rbz-c-primary, #f6841f);
  color: var(--rbz-c-primary, #f6841f);
}
#rbz-nav.rbz-megamenu .mega-lucky-cta:hover span[aria-hidden] {
  transform: rotate(180deg) scale(1.15);
}

/* ── Featured social mini-cards (stacked under main Discord card) ──── */

#rbz-nav.rbz-megamenu .mega-feat-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  margin-top: 0.5rem;
  background: var(--rbz-c-card, #131826);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}
#rbz-nav.rbz-megamenu .mega-feat-mini:hover {
  border-color: rgba(246, 132, 31, 0.25);
  background: rgba(246, 132, 31, 0.04);
  transform: translateX(2px);
}
#rbz-nav.rbz-megamenu .mega-feat-mini-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}
#rbz-nav.rbz-megamenu .mega-feat-mini--whatsapp .mega-feat-mini-icon {
  background: rgba(37, 211, 102, 0.15); color: #25d366;
}
#rbz-nav.rbz-megamenu .mega-feat-mini--instagram .mega-feat-mini-icon {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(254, 218, 117, 0.18));
  color: #e1306c;
}
#rbz-nav.rbz-megamenu .mega-feat-mini-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 0.05rem;
}
#rbz-nav.rbz-megamenu .mega-feat-mini-body strong {
  font-family: var(--rbz-font-body, 'Hind'), sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--rbz-c-fg, #f4ede0);
  line-height: 1.15;
}
#rbz-nav.rbz-megamenu .mega-feat-mini-body em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--rbz-c-fg-muted, #97a0b4);
  line-height: 1.2;
}

/* ── Featured: Partner card (replaces old Discord featured) ───────── */

#rbz-nav.rbz-megamenu .mega-feat-partner {
  background: linear-gradient(135deg, rgba(246, 132, 31, 0.1), rgba(26, 138, 240, 0.05));
  border-color: rgba(246, 132, 31, 0.25);
}
#rbz-nav.rbz-megamenu .mega-feat-partner:hover {
  background: linear-gradient(135deg, rgba(246, 132, 31, 0.2), rgba(26, 138, 240, 0.1));
  border-color: var(--rbz-c-primary, #f6841f);
  box-shadow: 0 4px 16px rgba(246, 132, 31, 0.2);
}
#rbz-nav.rbz-megamenu .mega-feat-partner-icon {
  flex-shrink: 0; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rbz-c-primary, #f6841f);
  color: var(--rbz-c-bg, #0a0e19);
  border-radius: 5px;
}

/* ── Right side actions ───────────────────────────────────────────── */

#rbz-nav.rbz-megamenu .nav-actions { display: flex; align-items: center; gap: 0.6rem; }

/* ── Layout a 2 righe (≥1181px): riga 1 = logo + azioni · riga 2 = menu full-width ── */

@media (min-width: 1181px) {
  /* Bundle caricato DOPO custom-style → questo :root vince e tutti gli offset
     (padding-top contenuto, top dropdown, sidebar) si riallineano da soli. */
  :root { --nav-h: 100px; }
  #rbz-nav.rbz-megamenu {
    flex-wrap: wrap;
    align-content: center;
    height: var(--nav-h);
    padding: 0 2rem;
  }
  /* Riga 1: logo a sx, azioni a dx (space-between già attivo, per-linea) */
  #rbz-nav.rbz-megamenu .nav-logo    { order: 1; height: 56px; }
  #rbz-nav.rbz-megamenu .nav-actions { order: 2; height: 56px; }
  /* Riga 2: menu a larghezza piena, sotto, con divisore.
     flex-shrink:0 → va SEMPRE a capo sulla sua riga (coerente a ogni larghezza);
     justify-content:center → le voci sono CENTRATE orizzontalmente nella riga. */
  #rbz-nav.rbz-megamenu .nav-links {
    order: 3;
    flex-basis: 100%;
    flex-shrink: 0;
    justify-content: center;
    height: 44px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  #rbz-nav.rbz-megamenu .nav-links > li > a,
  #rbz-nav.rbz-megamenu .nav-links > li .mega-trigger { height: 44px; }
}

/* ── Mobile / laptop piccolo: drawer collassato (≤1180px) ──────────── */

@media (max-width: 1180px) {
  #rbz-nav.rbz-megamenu { padding: 0 1rem; }
  #rbz-nav.rbz-megamenu .mobile-menu-toggle { display: flex; }
  #rbz-nav.rbz-megamenu .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--rbz-c-popover, #0e131f);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem 0;
    max-height: calc(100vh - var(--nav-h, 64px));
    overflow-y: auto;
  }
  #rbz-nav.rbz-megamenu.nav-open .nav-links { display: flex; }
  #rbz-nav.rbz-megamenu .nav-links > li { display: block; }
  #rbz-nav.rbz-megamenu .nav-links > li > a,
  #rbz-nav.rbz-megamenu .nav-links > li .mega-trigger {
    width: 100%; padding: 0.85rem 1.2rem; height: auto;
    font-size: 0.85rem;
  }
  #rbz-nav.rbz-megamenu .mega-panel {
    position: static; transform: none; width: 100%;
    box-shadow: none; border: none; border-radius: 0;
    padding: 0;
    background: transparent;
    opacity: 1; visibility: visible; pointer-events: auto;
    display: none;
  }
  #rbz-nav.rbz-megamenu .nav-mega.open .mega-panel {
    display: block;
    padding: 0.25rem 0 0.6rem 0;
    transform: none;
    position: static;
    width: 100%;
    left: auto; top: auto;
  }
  /* Disabilita hover su mobile/touch */
  #rbz-nav.rbz-megamenu .nav-mega:hover .mega-panel {
    display: none;
    transform: none;
  }
  #rbz-nav.rbz-megamenu .nav-mega.open:hover .mega-panel {
    display: block;
    transform: none;
  }
  /* Body scroll lock quando menu aperto */
  body.nav-open { overflow: hidden; }
  /* Layout pannello mobile: lista verticale pulita */
  #rbz-nav.rbz-megamenu .mega-cols,
  #rbz-nav.rbz-megamenu .mega-cols-2,
  #rbz-nav.rbz-megamenu .mega-cols-4 {
    display: block;
    grid-template-columns: 1fr;
    gap: 0;
  }
  #rbz-nav.rbz-megamenu .mega-col {
    padding: 0.5rem 1.2rem 0.6rem 2.2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  #rbz-nav.rbz-megamenu .mega-cols .mega-col:first-child,
  #rbz-nav.rbz-megamenu .mega-cols-2 .mega-col:first-child,
  #rbz-nav.rbz-megamenu .mega-cols-4 .mega-col:first-child { border-top: none; }
  #rbz-nav.rbz-megamenu .mega-cat {
    padding: 0; font-size: 0.62rem; margin-bottom: 0.3rem;
    color: rgba(255,255,255,0.4);
  }
  #rbz-nav.rbz-megamenu .mega-item {
    padding: 0.5rem 0; height: auto; gap: 0;
  }
  #rbz-nav.rbz-megamenu .mega-item strong { font-size: 0.88rem; }
  #rbz-nav.rbz-megamenu .mega-item em { font-size: 0.72rem; }
  #rbz-nav.rbz-megamenu .mega-featured {
    padding: 0.5rem 1.2rem 0.6rem 2.2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-left: none;
    margin-top: 0;
  }
  #rbz-nav.rbz-megamenu .mega-feat-card { padding: 0.5rem; gap: 0.6rem; }
  #rbz-nav.rbz-megamenu .mega-feat-meta { font-size: 0.7rem; }
  /* Indicatore visivo: freccia ▾ ruota quando aperto */
  #rbz-nav.rbz-megamenu .mega-trigger span[aria-hidden] {
    transition: transform 0.2s ease;
    display: inline-block;
  }
  #rbz-nav.rbz-megamenu .nav-mega.open .mega-trigger span[aria-hidden] {
    transform: rotate(180deg);
  }
  /* Highlight voce aperta */
  #rbz-nav.rbz-megamenu .nav-mega.open > .mega-trigger {
    background: rgba(255,255,255,0.03);
    color: var(--rbz-c-primary, #f6841f);
  }
}
