/* =========================================================
   ZGZWEB - CONTEXT NAV V8
   Liquid glass minimal: compact bookmark by default, expands on tap/click,
   no duplicated Inicio, can collapse again.
   ========================================================= */

:root {
  --zgz-context-top: 108px;
  --zgz-context-ink: rgba(27, 28, 32, 0.86);
  --zgz-context-ink-strong: rgba(14, 15, 18, 0.94);
  --zgz-context-ink-soft: rgba(38, 39, 44, 0.56);
}

.zgz-context,
.zgz-context * {
  box-sizing: border-box;
}

.zgz-context {
  position: fixed;
  top: var(--zgz-context-top, 108px);
  left: 50%;
  z-index: 9985;
  width: min(880px, calc(100vw - 34px));
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    width 0.24s cubic-bezier(.2,.8,.2,1),
    transform 0.24s cubic-bezier(.2,.8,.2,1);
}

.zgz-context.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.zgz-context.is-compact {
  width: auto;
  max-width: calc(100vw - 34px);
}

.zgz-context__glass {
  --zgz-glass-x: 50%;
  --zgz-glass-y: 50%;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  color: var(--zgz-context-ink);

  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.10),
    0 18px 46px rgba(0, 0, 0, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);

  transform: translateY(0);
  transition:
    min-height 0.22s cubic-bezier(.2,.8,.2,1),
    padding 0.22s cubic-bezier(.2,.8,.2,1),
    border-radius 0.22s cubic-bezier(.2,.8,.2,1),
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.zgz-context.is-compact .zgz-context__glass {
  min-height: 42px;
  padding: 0 13px;
}

.zgz-context__glass:hover,
.zgz-context.is-open .zgz-context__glass,
.zgz-context__glass:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 7px 12px rgba(0, 0, 0, 0.12),
    0 24px 58px rgba(0, 0, 0, 0.13),
    inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.zgz-context__effect,
.zgz-context__tint,
.zgz-context__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.zgz-context__effect {
  z-index: 0;
  overflow: hidden;
  backdrop-filter: blur(5px) saturate(150%) contrast(102%);
  -webkit-backdrop-filter: blur(5px) saturate(150%) contrast(102%);
  filter: url(#zgz-context-glass-distortion);
  -webkit-filter: url(#zgz-context-glass-distortion);
}

.zgz-context__tint {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.028) 48%, rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.025);
}

.zgz-context__shine {
  z-index: 2;
  overflow: hidden;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.62),
    inset -1px -1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -10px 26px rgba(255, 255, 255, 0.04);
}

.zgz-context__shine::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  left: calc(var(--zgz-glass-x) - 105px);
  top: calc(var(--zgz-glass-y) - 105px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 64%);
  opacity: 0.34;
  mix-blend-mode: screen;
}

.zgz-context__compact,
.zgz-context__text {
  position: relative;
  z-index: 3;
  align-items: center;
  min-width: 0;
  color: var(--zgz-context-ink);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

.zgz-context__compact {
  display: none;
  gap: 8px;
  max-width: calc(100vw - 58px);
}

.zgz-context.is-compact .zgz-context__compact {
  display: flex;
}

.zgz-context.is-compact .zgz-context__text {
  display: none;
}

.zgz-context:not(.is-compact) .zgz-context__compact {
  display: none;
}

.zgz-context__compact-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.38),
    inset -1px -1px 0 rgba(0, 0, 0, 0.035);
}

.zgz-context__compact-icon svg {
  width: 13px;
  height: 13px;
  display: block;
  fill: rgba(18, 19, 23, 0.75);
}

.zgz-context__compact-label {
  display: block;
  max-width: min(220px, 46vw);
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--zgz-context-ink-strong);
  font-size: 0.78rem;
  font-weight: 720;
}

.zgz-context__compact-hint {
  display: block;
  margin-left: 2px;
  color: var(--zgz-context-ink-soft);
  font-size: 0.67rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zgz-context__text {
  display: flex;
  gap: 8px;
  width: 100%;
  font-size: clamp(0.76rem, 0.88vw, 0.84rem);
}

.zgz-context__home,
.zgz-context__parent,
.zgz-context__page,
.zgz-context__section {
  color: var(--zgz-context-ink) !important;
  font-weight: 660;
  text-decoration: none !important;
}

.zgz-context__home {
  flex: 0 0 auto;
  margin-left: -7px;
  padding: 8px 9px;
  border-radius: 999px;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.zgz-context__home:hover,
.zgz-context__home:focus-visible {
  color: var(--zgz-context-ink-strong) !important;
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.42),
    inset -1px -1px 0 rgba(0, 0, 0, 0.045);
}

.zgz-context__parent {
  flex: 0 0 auto;
  max-width: 180px;
}

.zgz-context__page {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 240px;
}

.zgz-context__dot {
  flex: 0 0 auto;
  color: var(--zgz-context-ink-soft);
  font-weight: 900;
}

.zgz-context__dot--section {
  margin-left: auto;
}

.zgz-context__section {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 210px;
}

.zgz-context__page,
.zgz-context__section,
.zgz-context__parent {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zgz-context__chev {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-left: 1px;
  border-right: 2px solid rgba(27, 28, 32, 0.58);
  border-bottom: 2px solid rgba(27, 28, 32, 0.58);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.zgz-context.is-open .zgz-context__chev {
  border-color: rgba(14, 15, 18, 0.90);
  transform: translateY(1px) rotate(225deg);
}

.zgz-context__collapse {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  margin-left: 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(18, 19, 23, 0.68);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.38),
    inset -1px -1px 0 rgba(0, 0, 0, 0.045);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.zgz-context__collapse:hover,
.zgz-context__collapse:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  color: rgba(8, 9, 12, 0.92);
  transform: scale(1.04);
}

.zgz-context__panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 10;
  width: min(390px, calc(100vw - 34px));
  max-height: min(430px, calc(100vh - var(--zgz-context-top, 108px) - 72px));
  overflow: hidden auto;
  padding: 10px;
  border-radius: 26px;
  color: var(--zgz-context-ink);
  isolation: isolate;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.985);

  box-shadow:
    0 7px 12px rgba(0, 0, 0, 0.12),
    0 26px 74px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.26);

  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.22s cubic-bezier(.2,.8,.2,1);
}

.zgz-context__panel::before,
.zgz-context__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.zgz-context__panel::before {
  z-index: -2;
  backdrop-filter: blur(7px) saturate(150%) contrast(102%);
  -webkit-backdrop-filter: blur(7px) saturate(150%) contrast(102%);
  filter: url(#zgz-context-glass-distortion);
  -webkit-filter: url(#zgz-context-glass-distortion);
}

.zgz-context__panel::after {
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.038) 52%, rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.62),
    inset -1px -1px 0 rgba(255, 255, 255, 0.24);
}

.zgz-context.is-open:not(.is-compact) .zgz-context__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.zgz-context__panel-title {
  margin: 7px 9px 9px;
  color: rgba(27, 28, 32, 0.52);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.26);
}

.zgz-context__link {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 13px;
  border-radius: 17px;
  color: rgba(27, 28, 32, 0.78) !important;
  font-size: 0.91rem;
  font-weight: 680;
  line-height: 1.24;
  text-decoration: none !important;
  white-space: normal;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.30);
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.zgz-context__link:hover,
.zgz-context__link:focus-visible,
.zgz-context__link.is-active {
  color: rgba(10, 11, 14, 0.94) !important;
  background: rgba(255, 255, 255, 0.30);
  transform: translateX(2px);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.42),
    inset -1px -1px 0 rgba(0, 0, 0, 0.055);
}

.zgz-context__link.is-active {
  background: rgba(28, 29, 34, 0.12);
}

.zgz-context__empty {
  margin: 0;
  padding: 12px 10px;
  color: rgba(27, 28, 32, 0.74);
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .zgz-context:not(.is-compact) {
    width: min(780px, calc(100vw - 26px));
  }

  .zgz-context__parent {
    max-width: 140px;
  }

  .zgz-context__page {
    max-width: 210px;
  }

  .zgz-context__section {
    max-width: 180px;
  }
}

@media (max-width: 620px) {
  .zgz-context {
    max-width: calc(100vw - 20px);
  }

  .zgz-context.is-compact {
    width: auto;
  }

  .zgz-context:not(.is-compact) {
    width: min(430px, calc(100vw - 20px));
  }

  .zgz-context.is-compact .zgz-context__glass {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }

  .zgz-context.is-compact .zgz-context__compact {
    gap: 0;
  }

  .zgz-context.is-compact .zgz-context__compact-label,
  .zgz-context.is-compact .zgz-context__compact-hint {
    display: none;
  }

  .zgz-context.is-compact .zgz-context__compact-icon {
    width: 24px;
    height: 24px;
  }

  .zgz-context:not(.is-compact) .zgz-context__glass {
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 25px;
  }

  .zgz-context__text {
    flex-wrap: wrap;
    gap: 7px;
    row-gap: 8px;
    font-size: 0.79rem;
    line-height: 1.12;
  }

  .zgz-context__home,
  .zgz-context__parent,
  .zgz-context__text > .zgz-context__dot:not(.zgz-context__dot--section) {
    display: none !important;
  }

  .zgz-context__page {
    display: block;
    flex: 1 1 calc(100% - 36px);
    max-width: calc(100vw - 86px);
    color: var(--zgz-context-ink-strong) !important;
  }

  .zgz-context__dot--section {
    display: none !important;
  }

  .zgz-context__section {
    flex: 1 1 calc(100% - 36px);
    max-width: calc(100vw - 86px);
    font-weight: 720;
  }

  .zgz-context__section::before {
    content: "Seccion: ";
    color: var(--zgz-context-ink-soft);
    font-weight: 760;
  }

  .zgz-context__chev {
    position: absolute;
    right: 50px;
    top: 18px;
  }

  .zgz-context__collapse {
    position: absolute;
    right: 14px;
    top: 14px;
    margin-left: 0;
  }

  .zgz-context__panel {
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(58vh, 430px);
    border-radius: 24px;
  }

  .zgz-context__link {
    padding: 13px 13px;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zgz-context,
  .zgz-context * {
    transition: none !important;
    animation: none !important;
  }
}
