/*
 * bridge.css — maps HTML class names to the design system defined in style.css
 * Resolves naming mismatches between style.css (foundation) and the HTML pages.
 * Also contains the vertical sidenav component.
 */

/* ══════════════════════════════════════════════════════════════
   VERTICAL SIDENAV
   ══════════════════════════════════════════════════════════════ */

/* Hide the old horizontal navbar — sidenav replaces it */
nav.navbar,
nav[class*="navbar"][id="navbar"] {
  display: none !important;
}

/* Page offset so content doesn't hide under the sidebar */
body {
  padding-left: 72px;
}

/* ── Core shell ───────────────────────────────────────────── */
.sidenav {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 72px;
  background: rgba(7, 7, 14, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 900;
  display: flex;
  flex-direction: column;
  transition: width 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  will-change: width;
}

.sidenav:hover,
.sidenav.expanded {
  width: 240px;
}

/* Animated left-edge accent */
.sidenav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    #8b5cf6 35%,
    #22d3ee 65%,
    transparent 100%
  );
  opacity: 0.75;
}

/* ── Logo header ──────────────────────────────────────────── */
.sidenav-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.sidenav-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-width: 100%;
}

.sidenav-logo-img {
  height: 36px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  display: block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.sidenav-logo-link:hover .sidenav-logo-img {
  opacity: 1;
}

/* ── Nav body ─────────────────────────────────────────────── */
.sidenav-body {
  flex: 1;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidenav-body::-webkit-scrollbar {
  display: none;
}

/* Shared base for links and toggle buttons */
.sidenav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  color: rgba(176, 168, 210, 0.75);
  white-space: nowrap;
  overflow: hidden;
  transition:
    color 0.18s,
    background 0.18s;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font-family: var(--font-ui, "Inter", sans-serif);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.sidenav-link:hover {
  color: #f0eeff;
  background: rgba(255, 255, 255, 0.05);
}

.sidenav-link.active {
  color: #f0eeff;
  background: rgba(139, 92, 246, 0.16);
}

.sidenav-link.active .sidenav-icon {
  background: rgba(139, 92, 246, 0.25);
  color: #a78bfa;
}

/* ── Icon wrapper ─────────────────────────────────────────── */
.sidenav-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  transition:
    background 0.18s,
    color 0.18s;
}

.sidenav-link:hover .sidenav-icon {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* ── Label ────────────────────────────────────────────────── */
.sidenav-label {
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity 0.28s 0.07s ease,
    transform 0.28s 0.07s ease;
  flex: 1;
  white-space: nowrap;
}

.sidenav:hover .sidenav-label,
.sidenav.expanded .sidenav-label {
  opacity: 1;
  transform: translateX(0);
}

/* ── Services group ───────────────────────────────────────── */
.sidenav-chevron {
  font-size: 10px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  transition:
    opacity 0.28s 0.07s ease,
    transform 0.22s ease;
}

.sidenav:hover .sidenav-chevron,
.sidenav.expanded .sidenav-chevron {
  opacity: 0.5;
}

.sidenav:hover .sidenav-group.open .sidenav-chevron,
.sidenav.expanded .sidenav-group.open .sidenav-chevron {
  transform: rotate(90deg);
  opacity: 0.8;
}

/* Sub-menu */
.sidenav-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidenav:hover .sidenav-group.open .sidenav-sub,
.sidenav.expanded .sidenav-group.open .sidenav-sub {
  max-height: 400px;
}

.sidenav-sub-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(176, 168, 210, 0.65);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-ui, "Inter", sans-serif);
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.25s 0.1s ease,
    transform 0.25s 0.1s ease,
    color 0.15s,
    background 0.15s;
}

.sidenav:hover .sidenav-sub-link,
.sidenav.expanded .sidenav-sub-link {
  opacity: 1;
  transform: translateX(0);
}

.sidenav-sub-link:hover,
.sidenav-sub-link.active {
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.1);
}

.sidenav-sub-link i {
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Divider ──────────────────────────────────────────────── */
.sidenav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 10px;
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
.sidenav-footer {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Lang row */
.sidenav-lang {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 12px;
  overflow: hidden;
}

.sidenav-lang-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(176, 168, 210, 0.75);
  flex-shrink: 0;
}

/* Language code text (EN/FR) shown in collapsed state */
.sidenav-lang-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #a78bfa;
  font-family: var(--font-ui, "Inter", sans-serif);
}

.sidenav-lang-btns {
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity 0.28s 0.07s ease,
    transform 0.28s 0.07s ease;
}

.sidenav:hover .sidenav-lang-btns,
.sidenav.expanded .sidenav-lang-btns {
  opacity: 1;
  transform: translateX(0);
}

/* CTA */
.sidenav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-family: var(--font-ui, "Inter", sans-serif);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  transition:
    filter 0.18s,
    transform 0.18s;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.sidenav-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sidenav-cta .sidenav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sidenav-cta .sidenav-label {
  color: #fff;
}

/* ── Tooltip (collapsed state) ────────────────────────────── */
.sidenav-link[data-tip]:not(:hover) .sidenav-tip,
.sidenav:hover .sidenav-tip {
  display: none;
}

/* ── Mobile — bottom tab bar ──────────────────────────────── */
@media (max-width: 768px) {
  body {
    padding-left: 0;
    padding-bottom: 66px;
  }

  .sidenav {
    width: 100% !important;
    height: 66px;
    top: auto;
    bottom: 0;
    left: 0;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: none;
  }

  .sidenav::before {
    display: none;
  }

  .sidenav-header,
  .sidenav-divider,
  .sidenav-footer {
    display: none;
  }

  .sidenav-body {
    flex-direction: row;
    padding: 0 6px;
    justify-content: space-around;
    align-items: center;
    height: 66px;
    gap: 0;
    width: 100%;
  }

  .sidenav-group {
    display: contents;
  }

  .sidenav-link,
  .sidenav-group-toggle {
    flex-direction: column;
    gap: 3px;
    padding: 8px 8px 0;
    width: auto;
    min-width: 56px;
    align-items: center;
    border-radius: 10px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
  }

  .sidenav-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 10px;
    text-align: center;
    color: inherit;
  }

  .sidenav-icon {
    background: transparent !important;
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 17px;
  }

  .sidenav-chevron {
    display: none;
  }
  .sidenav-sub {
    display: none;
  }
}

/* ── Page Loader ──────────────────────────────────────────── */
#page-loader,
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

#page-loader.loaded,
.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Navbar brand / logo ──────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-0);
  flex-shrink: 0;
}

.logo-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: inline-block;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-brand .nav-logo-img {
  height: 44px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ── Nav links — apply .nav-link styles to bare <a> inside <ul class="nav-links"> */
ul.nav-links > li > a {
  position: relative;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-1);
  border-radius: var(--r-md);
  transition:
    color var(--t-base),
    background var(--t-base);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

ul.nav-links > li > a:hover,
ul.nav-links > li > a.active {
  color: var(--text-0);
  background: rgba(255, 255, 255, 0.05);
}

ul.nav-links > li > a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 2rem);
  height: 2px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  transition: transform var(--t-bounce);
}

ul.nav-links > li > a:hover::after,
ul.nav-links > li > a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ── Dropdown — .has-dropdown maps to .nav-item-dropdown ──── */
li.has-dropdown {
  position: relative;
}

li.has-dropdown .dropdown {
  position: absolute;
  top: calc(100% + var(--sp-3));
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 220px;
  background: var(--glass-bg-hi);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--t-base),
    transform var(--t-base),
    visibility var(--t-base);
  box-shadow: var(--shadow-lg);
  list-style: none;
}

li.has-dropdown:hover .dropdown,
li.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

li.has-dropdown .dropdown li a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--text-1);
  transition:
    color var(--t-fast),
    background var(--t-fast);
}

li.has-dropdown .dropdown li a:hover {
  color: var(--text-0);
  background: rgba(139, 92, 246, 0.15);
}

/* ── Section helpers (if pages omit base .section class) ──── */
.section {
  padding-block: var(--sp-32);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: var(--sp-16);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--violet);
  margin-bottom: var(--sp-5);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-0);
  margin-bottom: var(--sp-5);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.7;
}

/* ── Navbar scrolled padding fix (matches new padding-inline) */
.navbar.scrolled {
  padding-inline: max(1.5rem, calc((100vw - 1280px) / 2 + 1.5rem));
}

/* ── Mobile nav — ensure hamburger is always visible ─────── */
@media (max-width: 768px) {
  ul.nav-links {
    display: none;
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--bg-1);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
    z-index: calc(var(--z-nav) - 1);
    padding-top: 80px;
  }

  ul.nav-links.open {
    display: flex;
  }

  li.has-dropdown .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: var(--sp-2) 0 0 var(--sp-6);
    text-align: center;
  }
}

/* ── Responsive: Mobile/Tablet overrides ──────────────────── */
@media (max-width: 1024px) {
  .section {
    padding-block: var(--sp-20); /* 5rem instead of 8rem */
  }
  .section-header {
    margin-bottom: var(--sp-12);
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--sp-16); /* 4rem */
  }
  .section-header {
    margin-bottom: var(--sp-10);
    text-align: center;
  }
  .section-subtitle {
    margin-inline: auto;
  }
  /* Reset hero right padding — sidenav is bottom bar on mobile */
  section.hero,
  .hero {
    padding-right: 0 !important;
  }
  /* Section title tighter on mobile */
  .section-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: var(--sp-12); /* 3rem */
  }
}

/* ── Hide section numbering across all pages ──────────────── */
.overview-card-num,
.an-num,
.pillar-card-num,
.mgmt-num,
.aom2-num,
.pao-obj-num,
.insight-num,
.intent-sec-num,
.tech-ch-num,
.toc-num,
.section-num-badge,
.cookie-step-num {
  display: none !important;
}

/* Fix grid rows where the number was the first column.
   Without .an-num / .mgmt-num, the separator shifts into the
   3.25rem col and the body ends up in the 1px col — collapsing
   text to one word per line. Override to a single 1fr column. */
.an-sep,
.mgmt-sep {
  display: none !important;
}
.an-row,
.mgmt-row {
  grid-template-columns: 1fr !important;
}
/* ==========================================================================
   SEPARARE PERFECTĂ: DESKTOP vs MOBILE BOTTOM BAR
   ========================================================================== */

/* ── DESKTOP (Ecrane Mari) ── */
@media (min-width: 769px) {
  .mobile-only-item {
    display: none !important;
  }

  /* Restaurăm fix design-ul de desktop (la hover se afișează steagurile) */
  .sidenav-lang {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border-radius: 12px;
    overflow: hidden;
  }
  .sidenav-lang .sidenav-label {
    opacity: 0;
    transform: translateX(-10px);
    transition:
      opacity 0.28s 0.07s ease,
      transform 0.28s 0.07s ease;
    flex: 1;
    white-space: nowrap;
  }
  .sidenav:hover .sidenav-lang .sidenav-label {
    opacity: 1;
    transform: translateX(0);
  }
  .sidenav-lang-btns {
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateX(-10px);
    transition:
      opacity 0.28s 0.07s,
      transform 0.28s 0.07s;
  }
  .sidenav:hover .sidenav-lang-btns {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── MOBILE (Bottom Bar cu Switch) ── */
@media (max-width: 768px) {
  .desktop-only-item {
    display: none !important;
  }
  .mobile-only-item {
    display: flex !important;
  }

  .sidenav {
    width: 100% !important;
    height: 66px !important;
    top: auto !important;
    bottom: 0 !important;
    flex-direction: row !important;
    padding: 0 !important;
  }

  .sidenav-header {
    display: none !important;
  }

  /* Elementele vor curge natural: 1.Home, 2.About, 3.Lang, 4.Services, 5.Contact */
  .sidenav-body {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 4px !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  .sidenav-link,
  .sidenav-group-toggle {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: 20% !important;
    height: 100% !important;
    padding: 12px 2px 4px !important;
    background: transparent !important;
    border-radius: 8px !important;
    color: rgba(176, 168, 210, 0.75) !important;
    text-decoration: none !important;
    position: relative;
    border: none !important;
  }

  /* Stilizarea Iconițelor Standard */
  .sidenav-icon:not(.lang-icon-wrapper) {
    background: transparent !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 20px !important;
    color: inherit !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Textul butoanelor pe 2 rânduri */
  .sidenav-label {
    opacity: 1 !important;
    transform: none !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    width: 100% !important;
  }

  .sidenav-chevron {
    display: none !important;
  }

  /* ── Switcher-ul Personalizat ── */
  .lang-icon-wrapper {
    background: transparent !important;
    width: auto !important;
    min-width: 44px !important;
    height: 24px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .lang-switch-wrapper {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    box-sizing: border-box;
  }

  .lang-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #8b5cf6;
    border-radius: 50%;
    transition: transform 0.3s ease;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  .lang-switch-thumb.is-fr {
    transform: translateX(20px);
  }

  .lang-flag {
    width: 14px;
    height: 10px;
    z-index: 2;
    pointer-events: none;
    border-radius: 1px;
  }

  /* ── Popup-ul pentru Servicii ── */
  .sidenav-sub {
    display: flex !important;
    flex-direction: column;
    position: absolute !important;
    top: auto !important;
    bottom: 76px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(15px) scale(0.95) !important;
    background: rgba(20, 20, 40, 0.98) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 8px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
    z-index: 99999 !important;
    min-width: 240px !important;
  }

  .sidenav-group.open .sidenav-sub {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
  }

  .sidenav-sub-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    color: #f0eeff !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    margin-bottom: 2px !important;
  }
  .sidenav-sub-link:active {
    background: rgba(139, 92, 246, 0.2) !important;
  }

  /* ── Lang switcher: center vertically (no label, unlike other nav items) ── */
  #langSwitchBtnMobile {
    justify-content: center !important;
    padding-top: 0 !important;
  }

  /* ── Culori Active ── */
  .sidenav-link.active,
  .sidenav-group.open .sidenav-group-toggle,
  .mobile-only-item:active {
    color: #a78bfa !important;
  }
}
/* ==========================================================================
   FIX DEFINITIV: BUTONUL "SERVICES" PE MOBIL ȘI POP-UP-UL
   ========================================================================== */

@media (max-width: 768px) {
  /* 1. Deblocăm containerul principal să nu mai taie/ascundă pop-up-ul */
  .sidenav {
    overflow: visible !important;
  }

  /* 2. Containerul de servicii ocupă exact 20% din bară */
  .sidenav-group {
    width: 20% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important; /* Ancoră liberă pentru popup-ul fix */
  }

  /* 3. Butonul efectiv "Explore Services" se întinde pe tot containerul */
  .sidenav-group-toggle {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  /* 4. Pop-up-ul îl fixăm clar pe ecran (exact deasupra barei) */
  .sidenav-sub {
    position: fixed !important;
    top: auto !important;
    bottom: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(15px) scale(0.95) !important;
    z-index: 999999 !important;
  }

  /* Animația de ridicare când dai tap */
  .sidenav-group.open .sidenav-sub {
    transform: translateX(-50%) translateY(0) scale(1) !important;
  }
}
/* ==========================================================================
   FIX HERO MOBILE: REPOZIȚIONARE DINAMICĂ "SCROLL TO EXPLORE"
   ========================================================================== */
@media (max-width: 768px) {
  /* Schimbăm fluxul secțiunii pentru a stivui elementele natural */
  html body section.hero {
    flex-direction: column !important;
    justify-content: center !important;
  }

  /* Desprindem textul de marginea de jos și îl așezăm sub butoane */
  html body section.hero .hero-scroll-hint {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    margin-top: 50px !important; /* Spațiul de respirație între butoane și text */

    /* Rescriem animația pentru a nu fi afectată de centrarea veche */
    animation: mobileScrollFloat 2.4s ease-in-out infinite !important;
  }
}

/* Animație dedicată doar pentru mobil (păstrează săritura, dar evită devierea la stânga) */
@keyframes mobileScrollFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(7px);
    opacity: 0.85;
  }
}
/* ==========================================================================
   FIX: UNIFICARE DIMENSIUNI BUTOANE PLUTITOARE (READABLER & SCROLL TOP)
   ========================================================================== */

/* 1. Forțăm ambele butoane la aceeași dimensiune strictă pe toate ecranele */
html body .scroll-top,
html body #mdp-readabler-trigger-button {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

/* 2. Ajustăm iconița din butonul "Scroll to Top" să fie centrată și proporțională */
html body .scroll-top i {
  font-size: 16px !important;
  margin: 0 !important;
  display: block !important;
}

/* 3. Ajustăm iconița din butonul Readabler să fie perfect centrată */
html body #mdp-readabler-trigger-button .mdp-readabler-trigger-button-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

/* Redimensionăm omulețul albastru ca să arate proporțional cu săgeata */
html body #mdp-readabler-trigger-button .mdp-readabler-trigger-button-icon svg {
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  display: block !important;
}
/* Restore cursor on readabler popup interactive elements.
   The readabler popup z-index (99999) is above the custom cursor layer (10001),
   so we must explicitly restore the native cursor there. */
#mdp-readabler-popup-close,
#mdp-readabler-close-statement-btn,
#mdp-readabler-online-dictionary-search-close,
button#mdp-readabler-voice-navigation-close-button,
#mdp-readabler-popup button,
#mdp-readabler-sidebar button,
#mdp-readabler-popup a,
#mdp-readabler-sidebar a {
  cursor: pointer !important;
}

/* Desktop only: strip all hover/active visual effects from "Explore Services"
   so it looks like a label, not a link. Higher specificity (.sidenav .sidenav-group-toggle
   = 0,3,0) beats .sidenav-link:hover (0,2,0). */
@media (min-width: 769px) {
  .sidenav .sidenav-group-toggle {
    cursor: default !important;
  }
  .sidenav .sidenav-group-toggle:hover,
  .sidenav:hover .sidenav-group-toggle,
  .sidenav.expanded .sidenav-group-toggle {
    background: transparent !important;
    color: rgba(176, 168, 210, 0.75) !important;
  }
  .sidenav .sidenav-group-toggle:hover .sidenav-icon,
  .sidenav:hover .sidenav-group-toggle .sidenav-icon,
  .sidenav.expanded .sidenav-group-toggle .sidenav-icon {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(176, 168, 210, 0.75) !important;
  }
}

/* 1. Prevenirea Scroll-ului Orizontal (Global) */
html,
body {
  overflow-x: clip !important; /* Modificat din hidden în clip */
  max-width: 100vw;
}
