.timivra-group-nav-shell {
  position: sticky;
  top: var(--timivra-site-header-height, 64px);
  z-index: 35;
  border-bottom: 0;
  background: transparent;
}

.timivra-group-nav {
  width: min(80rem, 100%);
  margin: 0 auto;
  padding: 0.45rem 1rem;
}

.timivra-group-nav-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.timivra-group-nav-button {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--hf-card-border, #e5e7eb) 72%, transparent);
  border-radius: 1.1rem;
  padding: 0.48rem 0.75rem;
  background: color-mix(in srgb, var(--hf-card, #fff) 58%, transparent);
  color: var(--hf-text, #1f2937);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.timivra-group-nav-button:hover {
  border-color: color-mix(in srgb, var(--hf-accent, #3b82f6) 72%, transparent);
  background: color-mix(in srgb, var(--hf-card, #fff) 72%, transparent);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.timivra-group-nav-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--hf-accent, #3b82f6) 28%, transparent);
  outline-offset: 2px;
}

.timivra-group-nav-button.is-active {
  border-color: var(--hf-accent, #3b82f6);
  background: color-mix(in srgb, var(--hf-accent-soft, #dbeafe) 82%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--hf-accent, #3b82f6) 22%, transparent),
    0 5px 18px color-mix(in srgb, var(--hf-accent, #3b82f6) 16%, transparent);
}

.timivra-group-nav-title {
  display: block;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timivra-group-nav-icon {
  display: none;
}

.timivra-group-nav-subtitle {
  display: block;
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--hf-muted, #64748b);
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timivra-group-nav-button.is-active .timivra-group-nav-title {
  color: var(--hf-accent-strong, #1d4ed8);
}

@media (max-width: 767px) {
  .timivra-group-nav {
    padding: 0.5rem 0.75rem;
  }

  .timivra-group-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .timivra-group-nav-button {
    display: flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.6rem;
    text-align: center;
  }

  .timivra-group-nav-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
  }

  .timivra-group-nav-title {
    overflow: visible;
    font-size: 0.78rem;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .timivra-group-nav-subtitle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timivra-group-nav-button {
    transition: none;
  }
}
