/* =========================================================
   mhub Academy — Global Styles
   Mobile-first • Theme-aware (light/dark) • Apple glass
   ========================================================= */

/* =========================================================
   1. THEME VARIABLES
   ========================================================= */

:root,
[data-theme="light"] {
  /* Backgrounds */
  --bg:              #fafafa;
  --bg-elevated:     #ffffff;
  --bg-subtle:       #f2f2f5;
  --bg-sunken:       #ececef;
  --bg-glass:        rgba(255, 255, 255, 0.72);
  --bg-glass-edge:   rgba(255, 255, 255, 0.95);

  /* Text */
  --text:            #1d1d1f;
  --text-secondary:  #6e6e73;
  --text-tertiary:   #86868b;
  --text-inverse:    #ffffff;

  /* Borders */
  --border:          rgba(0, 0, 0, 0.08);
  --border-strong:   rgba(0, 0, 0, 0.14);

  /* Accent (mov din logo) */
  --accent:          #7c3aed;
  --accent-hover:    #6d28d9;
  --accent-soft:     rgba(124, 58, 237, 0.10);
  --accent-glow:     rgba(124, 58, 237, 0.35);
  --accent-text:     #ffffff;

  /* Semantic */
  --success:         #16a34a;
  --success-soft:    rgba(22, 163, 74, 0.10);
  --danger:          #dc2626;
  --danger-soft:     rgba(220, 38, 38, 0.10);

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:  0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 20px 48px rgba(0, 0, 0, 0.12);

  /* Glass */
  --glass-blur: 24px;
  --glass-sat:  180%;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg:              #000000;
  --bg-elevated:     #0c0c0d;
  --bg-subtle:       #161617;
  --bg-sunken:       #060607;
  --bg-glass:        rgba(18, 18, 20, 0.68);
  --bg-glass-edge:   rgba(255, 255, 255, 0.08);

  --text:            #f5f5f7;
  --text-secondary:  #a1a1a6;
  --text-tertiary:   #86868b;
  --text-inverse:    #0a0a0b;

  --border:          rgba(255, 255, 255, 0.08);
  --border-strong:   rgba(255, 255, 255, 0.16);

  --accent:          #a855f7;
  --accent-hover:    #b975f9;
  --accent-soft:     rgba(168, 85, 247, 0.16);
  --accent-glow:     rgba(168, 85, 247, 0.45);
  --accent-text:     #ffffff;

  --success:         #4ade80;
  --success-soft:    rgba(74, 222, 128, 0.12);
  --danger:          #f87171;
  --danger-soft:     rgba(248, 113, 113, 0.12);

  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md:  0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-lg:  0 24px 60px rgba(0, 0, 0, 0.75);

  --glass-blur: 28px;
  --glass-sat:  200%;

  color-scheme: dark;
}

/* Shared tokens */
:root {
  --radius-xs:  8px;
  --radius-sm:  12px;
  --radius:     16px;
  --radius-lg:  22px;
  --radius-xl:  28px;
  --radius-pill: 999px;

  --container:  1200px;
  --gutter:     20px;

  --header-h:   58px;
  --header-top: 10px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Code", monospace;

  --ease:      cubic-bezier(.4, 0, .2, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

html, body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}

/* Compensează header fixed */
body { padding-top: calc(var(--header-h) + var(--header-top) + 16px); }

main { flex: 1; }

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.022em;
  font-weight: 700;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

::selection {
  background: var(--accent);
  color: var(--accent-text);
}

/* Scrollbar subtil (Chromium + Firefox) */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* Focus vizibil pentru accesibilitate */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================================================
   3. LAYOUT
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   4. ICONS
   ========================================================= */

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon--primary, .icon--accent { color: var(--accent); }
.icon--muted { color: var(--text-tertiary); }

/* =========================================================
   5. BUTTONS
   ========================================================= */

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition:
    background .2s var(--ease),
    color .2s var(--ease),
    border-color .2s var(--ease),
    box-shadow .25s var(--ease),
    transform .15s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 6px 20px var(--accent-soft);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 12px 30px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:active { transform: translateY(0) scale(.98); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
}
.btn-icon:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}
.btn-icon:active { transform: scale(.95); }
.btn-success:hover { color: var(--success); border-color: var(--success); }
.btn-danger:hover  { color: var(--danger);  border-color: var(--danger); }

/* =========================================================
   6. FLASH MESSAGES
   ========================================================= */

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 16px auto;
  max-width: calc(var(--container) - var(--gutter) * 2);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
  animation: flashIn .35s var(--ease-out);
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 25%, transparent);
}
.flash--error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

/* =========================================================
   7. HEADER — Liquid Glass Premium
   ========================================================= */

.site-header {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - var(--gutter));
  max-width: var(--container);
  pointer-events: none;
  transition: top .35s var(--ease);
}
.site-header.is-scrolled { top: 6px; }

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: var(--header-h);
  padding: 0 8px 0 12px;
  border-radius: var(--radius-lg);
  pointer-events: auto;

  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));

  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 var(--bg-glass-edge),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03),
    var(--shadow-md);

  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.site-header.is-scrolled .header-shell {
  box-shadow:
    inset 0 1px 0 var(--bg-glass-edge),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03),
    var(--shadow-lg);
}

/* Fallback pentru browsere fără backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-shell { background: var(--bg-elevated); }
}

/* ---------- LOGO ---------- */
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: transform .25s var(--ease);
}
.logo:hover { transform: translateY(-1px); color: var(--text); }

.logo img {
  width: 26px;
  height: 26px;
  transition: transform .4s var(--ease-out);
}
.logo:hover img { transform: scale(1.08) rotate(-4deg); }

.logo-glow {
  position: absolute;
  left: 6px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0;
  filter: blur(10px);
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.logo:hover .logo-glow { opacity: .55; }

.logo-text { white-space: nowrap; }
.logo-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-left: 2px;
}

/* ---------- DESKTOP NAV ---------- */
.nav-desktop {
  display: none; /* mobile-first */
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-link:active { transform: scale(.97); }

.nav-link.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 14px var(--accent-soft);
}
.nav-link.is-active:hover { color: var(--accent-text); }

.nav-link .icon { opacity: .85; }
.nav-link.is-active .icon { opacity: 1; }

/* ---------- NAV DROPDOWN (Categorii) ---------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  user-select: none;
}
.nav-chevron {
  transition: transform .25s var(--ease);
  opacity: .6;
}
.nav-dropdown.is-open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-dropdown.is-open .nav-dropdown-trigger {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 300px;
  max-width: 380px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;

  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--bg-glass-edge),
    var(--shadow-lg);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity .22s var(--ease),
    visibility .22s var(--ease),
    transform .22s var(--ease-out);

  z-index: 20;
}
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-dropdown-menu { background: var(--bg-elevated); }
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.nav-dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--text);
  transform: translateX(2px);
}

.nav-dd-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-dd-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nav-dd-text strong {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}
.nav-dd-text small {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- NAV SEARCH ---------- */
.nav-search {
  display: none; /* mobile-first */
  position: relative;
  flex: 1;
  max-width: 320px;
  margin: 0 8px;
}

.nav-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: inline-flex;
}

.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-search input::placeholder { color: var(--text-tertiary); }
.nav-search input:hover { border-color: var(--border-strong); }
.nav-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- BTN CREATE (CTA) ---------- */
.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 4px 14px var(--accent-soft);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
}
.btn-create:hover {
  color: var(--accent-text);
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 22px var(--accent-glow);
}
.btn-create:active { transform: translateY(0); }

/* ---------- MOBILE SEARCH ---------- */
.mobile-search {
  position: relative;
  margin-bottom: 18px;
}
.mobile-search input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.mobile-search input::placeholder { color: var(--text-tertiary); }
.mobile-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.mobile-search .nav-search-icon {
  left: 14px;
  color: var(--text-tertiary);
}

/* ---------- MOBILE GROUP (categorii) ---------- */
.mobile-group {
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform .5s var(--ease-out) calc(var(--i) * 55ms),
    opacity .5s var(--ease) calc(var(--i) * 55ms);
}
.mobile-menu.is-open .mobile-group {
  transform: translateY(0);
  opacity: 1;
}

.mobile-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 10px;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mobile-group-title .icon { color: var(--accent); }

.mobile-group-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-link--sub {
  padding: 12px 14px;
  font-size: 0.92rem;
}
.mobile-link--sub .mobile-icon {
  width: 32px;
  height: 32px;
}
/* ---------- HEADER ACTIONS ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
  overflow: hidden;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-subtle); }
.theme-toggle:active { transform: scale(.94); }

.tt-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .5s var(--ease-out), opacity .35s var(--ease);
}
.tt-sun  { opacity: 1;  transform: rotate(0deg)   scale(1); }
.tt-moon { opacity: 0;  transform: rotate(-90deg) scale(.5); }

[data-theme="dark"] .tt-sun  { opacity: 0; transform: rotate(90deg) scale(.5); }
[data-theme="dark"] .tt-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* Hide text labels on mobile */
.header-actions .nav-label { display: none; }

/* Mobile menu button */
.menu-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all .2s var(--ease);
}
.menu-toggle:hover { color: var(--text); background: var(--bg-subtle); }
.menu-toggle:active { transform: scale(.94); }

.mt-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s var(--ease-out), opacity .25s var(--ease);
}
.mt-open  { opacity: 1; transform: rotate(0deg)   scale(1); }
.mt-close { opacity: 0; transform: rotate(-90deg) scale(.5); }

.menu-toggle[aria-expanded="true"] .mt-open  { opacity: 0; transform: rotate(90deg) scale(.5); }
.menu-toggle[aria-expanded="true"] .mt-close { opacity: 1; transform: rotate(0deg) scale(1); }

/* ---------- MOBILE MENU ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  backdrop-filter: blur(32px) saturate(180%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
  padding-top: calc(var(--header-h) + var(--header-top) + 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mobile-menu { background: var(--bg); }
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px var(--gutter) 40px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform .5s var(--ease-out) calc(var(--i) * 55ms),
    opacity .5s var(--ease) calc(var(--i) * 55ms),
    border-color .2s var(--ease),
    background .2s var(--ease);
}
.mobile-menu.is-open .mobile-link { transform: translateY(0); opacity: 1; }
.mobile-link:hover { border-color: var(--accent); background: var(--bg-subtle); }

.mobile-link.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: 0 10px 24px var(--accent-soft);
}

.mobile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--accent);
  flex-shrink: 0;
}
.mobile-link.is-active .mobile-icon {
  background: rgba(255, 255, 255, 0.18);
  color: var(--accent-text);
}

.mobile-label { flex: 1; }

.mobile-arrow {
  opacity: .35;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.mobile-link:hover .mobile-arrow { opacity: 1; transform: translateX(4px); }

.mobile-menu-footer {
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  padding: 0 6px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 48px 22px 40px;
}

/* Brand column */
.footer-col--brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
}
.footer-logo img {
  width: 28px;
  height: 28px;
  transition: transform .3s var(--ease-out);
}
.footer-logo:hover img {
  transform: scale(1.08) rotate(-4deg);
}
.footer-logo .logo-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.footer-tagline {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-tertiary);
  max-width: 320px;
}

/* Social */
.footer-social {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.footer-social a:hover {
  color: var(--accent-text);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--accent-soft);
}

/* Link columns */
.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links li { margin: 0; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .15s var(--ease), transform .15s var(--ease);
  width: fit-content;
}
.footer-links a:hover {
  color: var(--accent);
  transform: translateX(2px);
}
.footer-links a .icon {
  color: var(--text-tertiary);
  transition: color .15s var(--ease);
}
.footer-links a:hover .icon { color: var(--accent); }

.footer-cat-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
  margin-right: 2px;
}

/* Bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 18px 22px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.footer-credit {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.footer-heart {
  color: #ef4444;
  display: inline-block;
  animation: heartBeat 1.6s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 640px) {
  .footer-main {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 24px 48px;
  }
}

@media (min-width: 900px) {
  .footer-main { gap: 56px; }
  .footer-tagline { font-size: 0.9rem; }
}

@media (max-width: 639px) {
  .site-footer { margin-top: 60px; }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
  .footer-col--brand {
    grid-column: 1 / -1;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}
/* =========================================================
   9. FORMS
   ========================================================= */

.form-group { margin-bottom: 18px; }

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-tertiary); }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: var(--border-strong); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-group textarea { min-height: 160px; resize: vertical; }

.form-group select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.87rem;
  margin-bottom: 18px;
}
.hint .icon { color: var(--accent); margin-top: 2px; }

/* =========================================================
   10. UTILITY
   ========================================================= */

.empty {
  color: var(--text-tertiary);
  padding: 28px 0;
  font-style: italic;
  font-size: 0.93rem;
}

/* =========================================================
   11. RESPONSIVE (mobile-first → min-width)
   ========================================================= */

/* Tabletă mică */
@media (min-width: 480px) {
  body { font-size: 15.5px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.15rem; }

  .header-shell { padding: 0 10px 0 14px; }
  .logo { font-size: 1.02rem; }
  .logo img { width: 28px; height: 28px; }
  .logo-glow { width: 28px; height: 28px; left: 8px; }
}

/* Tabletă */
@media (min-width: 640px) {
  :root { --gutter: 24px; --header-h: 62px; }
  body { font-size: 16px; }

  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.2rem; }

  .header-actions .nav-label { display: inline; }

  .header-shell { padding: 0 12px 0 16px; gap: 12px; border-radius: var(--radius-xl); }
  .logo { font-size: 1.05rem; gap: 10px; }
  .logo img { width: 30px; height: 30px; }
  .logo-glow { width: 30px; height: 30px; left: 8px; }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Desktop */
@media (min-width: 860px) {
  :root { --header-h: 64px; --header-top: 14px; }

  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.25rem; }

  /* Arată nav desktop, ascunde hamburger */
  .nav-desktop { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none; }

  .nav-link { padding: 8px 14px; font-size: 0.88rem; }

  .header-shell { padding: 0 14px 0 18px; gap: 16px; }
  .logo { font-size: 1.08rem; }

  .site-footer { margin-top: 96px; padding: 36px 0 30px; }
}

/* Desktop mare */
@media (min-width: 1200px) {
  :root { --gutter: 28px; --header-h: 66px; }

  h1 { font-size: 3.2rem; }

  .header-shell {
    padding: 0 16px 0 20px;
    gap: 20px;
  }
  .nav-link { padding: 9px 16px; font-size: 0.9rem; }
}

/* Reducere mișcare pentru utilizatori care preferă */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   AMBIENT BACKGROUND
   Orb-uri gradient blurate + grain subtil
   ========================================================= */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
  transition: background-color .4s var(--ease);
}

/* ---------- Orb-uri ---------- */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
  transition: opacity .4s var(--ease), background .4s var(--ease);
}

/* Orb 1 — mov (accentul principal) */
.ambient-orb--1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: orbFloat1 22s ease-in-out infinite alternate;
}

/* Orb 2 — violet / roz (complementar) */
.ambient-orb--2 {
  width: 620px;
  height: 620px;
  top: 30%;
  right: -180px;
  background: radial-gradient(circle, #d946ef 0%, transparent 70%);
  opacity: .40;
  animation: orbFloat2 26s ease-in-out infinite alternate;
}

/* Orb 3 — albastru rece pentru contrast */
.ambient-orb--3 {
  width: 480px;
  height: 480px;
  bottom: -140px;
  left: 30%;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  opacity: .30;
  animation: orbFloat3 30s ease-in-out infinite alternate;
}

/* Light mode — orb-urile mai discrete */
[data-theme="light"] .ambient-orb { opacity: .30; }
[data-theme="light"] .ambient-orb--2 { opacity: .22; }
[data-theme="light"] .ambient-orb--3 { opacity: .18; }

/* Dark mode — orb-uri mai vii */
[data-theme="dark"] .ambient-orb  { opacity: .50; }
[data-theme="dark"] .ambient-orb--2 { opacity: .35; }
[data-theme="dark"] .ambient-orb--3 { opacity: .28; }

/* ---------- Animații organice ---------- */
@keyframes orbFloat1 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(80px, 60px, 0) scale(1.1); }
  100% { transform: translate3d(40px, 120px, 0) scale(.95); }
}

@keyframes orbFloat2 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-100px, 80px, 0) scale(1.15); }
  100% { transform: translate3d(-40px, -60px, 0) scale(.9); }
}

@keyframes orbFloat3 {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(120px, -80px, 0) scale(1.08); }
  100% { transform: translate3d(-60px, -40px, 0) scale(.92); }
}

/* ---------- Grain subtil peste orbs ---------- */
.ambient-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

[data-theme="dark"] .ambient-grain { opacity: .06; }

/* =========================================================
   NAV — Desktop activation
   ========================================================= */

@media (min-width: 900px) {
  .nav-desktop { display: inline-flex; }
  .nav-search { display: block; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* Sub 900px — ascunde search și CTA, rămâne hamburger */
@media (max-width: 899px) {
  .btn-create .nav-label { display: none; }
  .btn-create { padding: 8px 10px; }
  .btn-create::after { content: none; }
}

/* =========================================================
   BOTTOM NAV — Mobile only
   ========================================================= */

.bottom-nav {
  display: none; /* ascuns pe desktop */
}

@media (max-width: 899px) {

  /* Spațiu jos ca să nu acopere conținutul */
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;

    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 2px;

    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);

    border-top: 1px solid var(--border);
    box-shadow:
      inset 0 1px 0 var(--bg-glass-edge),
      0 -8px 32px rgba(0, 0, 0, 0.08);
  }

  [data-theme="dark"] .bottom-nav {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.06),
      0 -8px 32px rgba(0, 0, 0, 0.5);
  }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .bottom-nav { background: var(--bg-elevated); }
  }

  /* Item */
  .bn-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 14px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition:
      color .2s var(--ease),
      background .2s var(--ease),
      transform .18s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
  }

  .bn-item:hover,
  .bn-item:focus-visible {
    color: var(--text);
    background: var(--bg-subtle);
  }

  .bn-item:active {
    transform: scale(.94);
  }

  .bn-item.is-active {
    color: var(--accent);
  }

  .bn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s var(--ease-out);
  }
  .bn-item.is-active .bn-icon {
    transform: translateY(-1px);
  }

  .bn-label {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1;
  }

  /* ---- FAB central (Creează) ---- */
    .bn-item--fab {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    margin-top: -8px;
    padding: 0;
    border-radius: 50%;
    color: var(--accent-text);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      0 8px 22px var(--accent-glow),
      0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--bg);
    position: relative;
  }

  .bn-item--fab:hover,
  .bn-item--fab:focus-visible {
    color: var(--accent-text);
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.08);
  }

  .bn-item--fab:active {
    transform: translateY(0) scale(.95);
  }

  .bn-item--fab .bn-icon {
    transform: translateY(0);
  }

  /* Ascunde hamburger pe mobil — bottom nav îl înlocuiește */
  .menu-toggle { display: none !important; }

  /* Ascunde CTA Creează din header (e deja în bottom nav) */
  .header-actions .btn-create { display: none; }
}


/* =========================================================
   NAV MEGA MENU
   ========================================================= */

.nav-mega {
  position: relative;
}

.nav-mega-trigger { user-select: none; }

.nav-mega.is-open .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}
.nav-mega.is-open .nav-mega-trigger {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-mega-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 30;
  width: min(720px, calc(100vw - 40px));

  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 var(--bg-glass-edge),
    var(--shadow-lg);

  opacity: 0;
  visibility: hidden;
  transition:
    opacity .22s var(--ease),
    visibility .22s var(--ease),
    transform .25s var(--ease-out);
  overflow: hidden;
}
.nav-mega.is-open .nav-mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-mega-panel { background: var(--bg-elevated); }
}

/* Search */
.nav-mega-search {
  position: relative;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.nav-mega-search-icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: inline-flex;
  margin-top: -2px;
}
.nav-mega-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: all .18s var(--ease);
}
.nav-mega-search input::placeholder { color: var(--text-tertiary); }
.nav-mega-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Grid */
.nav-mega-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4px;
  padding: 14px;
}

.nav-mega-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-mega-fire { font-size: 0.8rem; }

/* Lista categorii */
.nav-mega-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mega-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.nav-mega-cat:hover {
  background: var(--accent-soft);
  transform: translateX(2px);
  color: var(--text);
}

.nav-mega-cat-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform .25s var(--ease-out);
}
.nav-mega-cat:hover .nav-mega-cat-icon {
  transform: scale(1.06) rotate(-4deg);
}

.nav-mega-cat-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-mega-cat-text strong {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.nav-mega-cat-text small {
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.nav-mega-cat-arrow {
  color: var(--text-tertiary);
  opacity: 0;
  transition: opacity .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
  font-size: 0.9rem;
}
.nav-mega-cat:hover .nav-mega-cat-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--accent);
}

.nav-mega-empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Populare */
.nav-mega-pop-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mega-pop-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background .15s var(--ease);
}
.nav-mega-pop-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.nav-mega-pop-rank {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
}
.nav-mega-pop-item:nth-child(1) .nav-mega-pop-rank {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.nav-mega-pop-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mega-pop-text strong {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nav-mega-pop-text small {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.nav-mega-pop-empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Footer */
.nav-mega-footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.nav-mega-footer-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all .15s var(--ease);
}
.nav-mega-footer-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Ascunde mega menu pe mobil (e deja în mobile menu) */
@media (max-width: 899px) {
  .nav-mega { display: none; }
}

/* =========================================================
   SEARCH TRIGGER (nav)
   ========================================================= */

.nav-search-trigger {
  gap: 8px;
}

.nav-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  line-height: 1;
  margin-left: 2px;
}

/* =========================================================
   SEARCH OVERLAY
   ========================================================= */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.search-overlay-panel {
  position: relative;
  max-width: 640px;
  margin: 120px auto 0;
  padding: 0 20px;
  transform: translateY(-12px);
  transition: transform .3s var(--ease-out);
}
.search-overlay.is-open .search-overlay-panel {
  transform: translateY(0);
}

.search-overlay-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.search-overlay-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: inline-flex;
}

.search-overlay-input {
  width: 100%;
  height: 64px;
  padding: 0 60px 0 58px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  transition: all .2s var(--ease);
}
.search-overlay-input::placeholder { color: var(--text-tertiary); }
.search-overlay-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.3),
    0 0 0 4px var(--accent-soft);
}

.search-overlay-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.search-overlay-close:hover {
  color: var(--text);
  background: var(--bg-sunken);
}

.search-overlay-body {
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.search-overlay-section { margin-bottom: 4px; }

.search-overlay-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.search-overlay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-overlay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all .15s var(--ease);
}
.search-overlay-chip:hover {
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.search-overlay-chip .icon { color: var(--accent); }

.search-overlay-hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.search-overlay-hint kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  line-height: 1;
}
.search-overlay-hint-sep { opacity: .5; }

/* =========================================================
   NOTIFICĂRI — buton + panel
   ========================================================= */

.nav-notif {
  position: relative;
}

.nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease), transform .15s var(--ease);
}
.nav-icon-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
.nav-icon-btn:active { transform: scale(.94); }

.nav-notif.is-open .nav-notif-trigger {
  color: var(--text);
  background: var(--bg-subtle);
}

/* Badge roșu */
.nav-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-glass);
}

/* Panel */
.nav-notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));

  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 var(--bg-glass-edge),
    var(--shadow-lg);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity .2s var(--ease),
    visibility .2s var(--ease),
    transform .22s var(--ease-out);
  overflow: hidden;
}
.nav-notif.is-open .nav-notif-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.nav-notif-head h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-notif-clear {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .15s var(--ease);
}
.nav-notif-clear:hover { background: var(--accent-soft); }

.nav-notif-body {
  max-height: 400px;
  overflow-y: auto;
}

.nav-notif-empty {
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nav-notif-empty-icon {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  margin-bottom: 8px;
}
.nav-notif-empty p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.nav-notif-empty small {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 899px) {
  .nav-search-trigger { display: none; }
  .nav-notif { display: none; }
  .nav-kbd { display: none; }
}

/* Ascunde textul de la Search pe tabletă */
@media (min-width: 900px) and (max-width: 1100px) {
  .nav-search-trigger .nav-label { display: none; }
  .nav-search-trigger { padding: 8px 12px; }
}

/* Search overlay pe mobil */
@media (max-width: 640px) {
  .search-overlay-panel {
    margin-top: 80px;
    padding: 0 12px;
  }
  .search-overlay-input {
    height: 56px;
    font-size: 0.95rem;
    padding: 0 52px 0 48px;
  }
  .search-overlay-icon { left: 16px; }
  .search-overlay-close { right: 10px; width: 32px; height: 32px; }
  .search-overlay-body { padding: 16px; }
  .search-overlay-chip { font-size: 0.8rem; padding: 7px 12px; }
  .nav-notif-panel { right: -8px; }
}

/* Badge pe butonul din bottom nav */
.bn-item--notif {
  position: relative;
}

.bn-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(6px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-glass);
  pointer-events: none;
}

/* Badge în mobile menu */
.mobile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: auto;
  margin-right: 6px;
}

/* =========================================================
   AVATAR ÎN HEADER
   ========================================================= */

.btn-user {
  padding: 4px 12px 4px 4px;
  gap: 8px;
}

.btn-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.btn-user-avatar--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
}

/* Mobile menu avatar */
.mobile-icon--avatar {
  overflow: hidden;
  background: transparent !important;
  color: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.mobile-icon--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Bottom nav avatar */
.bn-icon--avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.bn-icon--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .btn-user .nav-label { display: none; }
  .btn-user { padding: 4px; }
}

/* =========================================================
   AVATAR ÎN HEADER
   ========================================================= */

.btn-user {
  padding: 4px 12px 4px 4px;
  gap: 8px;
}

.btn-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.btn-user-avatar--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
}

/* Mobile menu avatar */
.mobile-icon--avatar {
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.mobile-icon--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Bottom nav avatar */
.bn-icon--avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.bn-icon--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .btn-user .nav-label { display: none; }
  .btn-user { padding: 4px; }
}
/* ---------- Respectă prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ambient-orb { animation: none !important; }
}

/* ---------- Mobile: orbs mai mici și mai discrete ---------- */
@media (max-width: 640px) {
  .ambient-orb { filter: blur(70px); }
  .ambient-orb--1 { width: 340px; height: 340px; }
  .ambient-orb--2 { width: 380px; height: 380px; }
  .ambient-orb--3 { width: 300px; height: 300px; }
}

/* =========================================================
   PWA — Install banner + Update toast
   ========================================================= */

.pwa-install-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .3s var(--ease);
  max-width: 480px;
  margin: 0 auto;
}

.pwa-install-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.pwa-install-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.pwa-install-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.pwa-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.pwa-install-text small {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.pwa-install-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-install-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 12px var(--accent-soft);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease);
}

.pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 16px var(--accent-glow);
}

.pwa-install-btn:active {
  transform: scale(.96);
}

.pwa-install-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s var(--ease), color .15s var(--ease);
}

.pwa-install-close:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

/* Update toast */
.pwa-update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 5000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  animation: pwaToastIn .3s var(--ease-out);
}

@keyframes pwaToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.pwa-update-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.pwa-update-btn:hover {
  background: var(--accent-hover);
}

/* Când rulează în mod standalone (instalat) — ascunde banner-ul */
.pwa-standalone .pwa-install-banner {
  display: none;
}

/* Pe desktop poziționează banner-ul mai jos (nu e bottom nav) */
@media (min-width: 900px) {
  .pwa-install-banner {
    bottom: 24px;
    left: auto;
    right: 24px;
    max-width: 400px;
  }
}

