/* Premium mobile overlay nav (Variante 4) */

html.mobile-nav-open,
html.mobile-nav-open body {
  overflow: hidden;
  touch-action: none;
}

.mobile-drawer--premium {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 15%, rgba(168, 85, 247, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(99, 102, 241, 0.12), transparent 55%),
    #070814;
  transform: translateY(-104%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
  visibility: hidden;
  pointer-events: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer__backdrop {
  display: none;
}

[data-theme="light"] .mobile-drawer--premium {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(124, 58, 237, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 15%, rgba(168, 85, 247, 0.08), transparent 50%),
    #f7f6fb;
}

.mobile-drawer--premium.open,
.nav-toggle:checked ~ .mobile-drawer--premium {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer--premium .mobile-drawer__sheet {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.mobile-drawer--premium .mobile-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.mobile-drawer--premium .mobile-drawer__brand .brand-logo img {
  width: 36px;
  height: 36px;
}

.mobile-drawer--premium .mobile-drawer__close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #e9ecff;
  cursor: pointer;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__close {
  color: #1a1630;
}

.mobile-drawer--premium .mobile-drawer__close i,
.mobile-drawer--premium .mobile-drawer__close svg {
  width: 22px;
  height: 22px;
}

.mobile-drawer--premium .mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}

.mobile-drawer--premium .mobile-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #e9ecff;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 0;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__link {
  color: #15122a;
}

.mobile-drawer--premium a.mobile-drawer__link.is-active {
  color: #fff;
  box-shadow: inset 0 -3px 0 0 var(--cntx-primary);
  align-self: flex-start;
  padding-bottom: 8px;
  margin-bottom: 4px;
}

[data-theme="light"] .mobile-drawer--premium a.mobile-drawer__link.is-active {
  color: #15122a;
}

.mobile-drawer--premium .mobile-drawer__accordion {
  border: none;
}

.mobile-drawer--premium .mobile-drawer__accordion > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-drawer--premium .mobile-drawer__accordion > summary::-webkit-details-marker {
  display: none;
}

.mobile-drawer--premium .mobile-drawer__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.mobile-drawer--premium .mobile-drawer__accordion[open] > summary .mobile-drawer__chevron {
  transform: rotate(180deg);
}

.mobile-drawer--premium .mobile-drawer__sublinks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 12px 8px;
}

.mobile-drawer--premium .mobile-drawer__sublink {
  display: block;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(233, 236, 255, 0.72);
  text-decoration: none;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__sublink {
  color: rgba(21, 18, 42, 0.7);
}

.mobile-drawer--premium .mobile-drawer__sublink.is-active,
.mobile-drawer--premium .mobile-drawer__sublink:hover {
  color: #fff;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__sublink.is-active,
[data-theme="light"] .mobile-drawer--premium .mobile-drawer__sublink:hover {
  color: var(--cntx-primary);
}

.mobile-drawer--premium .mobile-drawer__utils {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__utils {
  border-top-color: rgba(21, 18, 42, 0.1);
  border-bottom-color: rgba(21, 18, 42, 0.1);
}

.mobile-lang-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mobile-lang-inline__item {
  color: rgba(168, 176, 216, 0.7);
  text-decoration: none;
}

.mobile-lang-inline__item.is-current {
  color: var(--cntx-primary);
}

[data-theme="light"] .mobile-lang-inline__item {
  color: rgba(21, 18, 42, 0.45);
}

[data-theme="light"] .mobile-lang-inline__item.is-current {
  color: var(--cntx-primary);
}

.mobile-lang-inline__sep {
  color: rgba(168, 176, 216, 0.35);
}

.mobile-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .mobile-theme-pill {
  border-color: rgba(21, 18, 42, 0.12);
  background: rgba(21, 18, 42, 0.04);
}

.mobile-theme-pill__btn {
  width: 36px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(168, 176, 216, 0.55);
  cursor: pointer;
}

.mobile-theme-pill__btn.is-current,
.mobile-theme-pill__btn[aria-pressed="true"] {
  color: #e9ecff;
  background: rgba(124, 58, 237, 0.22);
}

[data-theme="light"] .mobile-theme-pill__btn.is-current,
[data-theme="light"] .mobile-theme-pill__btn[aria-pressed="true"] {
  color: var(--cntx-primary);
  background: rgba(124, 58, 237, 0.12);
}

.mobile-theme-pill__btn i,
.mobile-theme-pill__btn svg {
  width: 16px;
  height: 16px;
}

.mobile-theme-pill__sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .mobile-theme-pill__sep {
  background: rgba(21, 18, 42, 0.12);
}

.mobile-drawer--premium .mobile-drawer__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 8px;
}

.mobile-drawer--premium .mobile-drawer__signin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  font-size: 16px;
  font-weight: 600;
  color: #e9ecff;
  text-decoration: none;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__signin {
  color: #15122a;
}

.mobile-drawer--premium .mobile-drawer__signin i,
.mobile-drawer--premium .mobile-drawer__signin svg {
  width: 18px;
  height: 18px;
  color: var(--cntx-primary);
}

.mobile-drawer--premium .mobile-drawer__usecase,
.mobile-drawer--premium .mobile-drawer__cta {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  font-size: 15px;
  gap: 10px;
}

.mobile-drawer--premium .mobile-drawer__usecase {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #e9ecff;
}

[data-theme="light"] .mobile-drawer--premium .mobile-drawer__usecase {
  border-color: rgba(21, 18, 42, 0.35);
  color: #15122a;
}

.mobile-drawer--premium .mobile-drawer__usecase i,
.mobile-drawer--premium .mobile-drawer__usecase svg,
.mobile-drawer--premium .mobile-drawer__cta i,
.mobile-drawer--premium .mobile-drawer__cta svg {
  width: 16px;
  height: 16px;
}

.mobile-drawer--premium a.mobile-drawer__link:hover,
.mobile-drawer--premium a.mobile-drawer__link:focus,
.mobile-drawer--premium a.mobile-drawer__signin:hover,
.mobile-drawer--premium a.mobile-drawer__sublink:hover {
  background: transparent;
}

.mobile-drawer--premium .panel,
.mobile-drawer--premium .mobile-drawer-head,
.mobile-drawer--premium .mobile-drawer-overlay {
  display: none !important;
}

@media (min-width: 860px) {
  .mobile-drawer--premium {
    display: none !important;
  }
}

/* Tablet / mid widths: right panel + blurred page behind */
@media (min-width: 640px) and (max-width: 859px) {
  .mobile-drawer--premium {
    background: transparent !important;
    overflow: hidden !important;
    transform: none !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
  }

  .mobile-drawer--premium.open,
  .nav-toggle:checked ~ .mobile-drawer--premium {
    transform: none !important;
  }

  .mobile-drawer__backdrop {
    display: block !important;
    position: absolute;
    inset: 0;
    border: none;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(7, 8, 20, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .mobile-drawer--premium.open .mobile-drawer__backdrop,
  .nav-toggle:checked ~ .mobile-drawer--premium .mobile-drawer__backdrop {
    opacity: 1;
  }

  .mobile-drawer--premium .mobile-drawer__sheet {
    position: absolute !important;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(400px, 48vw) !important;
    max-width: 420px !important;
    margin: 0 !important;
    min-height: 100%;
    padding: max(18px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
    background:
      radial-gradient(ellipse 80% 50% at 10% 0%, rgba(124, 58, 237, 0.28), transparent 55%),
      radial-gradient(ellipse 70% 45% at 90% 15%, rgba(168, 85, 247, 0.18), transparent 50%),
      #070814;
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.35);
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  [data-theme="light"] .mobile-drawer--premium .mobile-drawer__sheet {
    background:
      radial-gradient(ellipse 80% 50% at 10% 0%, rgba(124, 58, 237, 0.12), transparent 55%),
      #f7f6fb;
    box-shadow: -18px 0 48px rgba(20, 16, 40, 0.18);
  }

  .mobile-drawer--premium.open .mobile-drawer__sheet,
  .nav-toggle:checked ~ .mobile-drawer--premium .mobile-drawer__sheet {
    transform: translateX(0);
  }

  .mobile-drawer--premium .mobile-drawer__link {
    font-size: 24px;
  }
}

