/* 
 * ==========================================
 * COMPONENT: Site Header
 * ==========================================
 */

/* 1. Container & Layout */
.d1-site-header {
  background-color: rgba(255, 255, 255, 0.9); /* Translucid for modern feel */
  border-bottom: 1px solid var(--dig-color-border);
  backdrop-filter: blur(8px); /* The "Glassmorphism" effect */
  position: sticky;
  top: 0;
  z-index: var(--dig-z-index-sticky);
  width: 100%;
}

.d1-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--dig-header-height, 70px);
  padding-top: 0;
  padding-bottom: 0;
}

/* 2. Branding (Logo) */
.d1-branding {
  flex-shrink: 0;
  margin-right: var(--dig-spacing-xl);
}

.d1-logo-text {
  font-family: var(--dig-font-primary);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dig-color-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* 3. Navigation (Desktop) */
.d1-header-nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: space-between; /* Pushes Menu to left, Actions to right */
}

.d1-nav-list {
  display: none; /* Mobile first: Hidden by default */
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--dig-spacing-lg);
}

.d1-nav-list.is-open {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;

  display: flex;
  flex-direction: column;
  gap: 0;

  margin: 0;
  padding: 0;

  background: var(--dig-color-bg);
  border-bottom: 1px solid var(--dig-color-border);
  box-shadow: var(--dig-shadow-lg);
}

.d1-nav-list.is-open .d1-nav-item {
  width: 100%;
}

.d1-nav-list.is-open .d1-nav-link {
  width: 100%;
  height: auto;
  padding: 1rem var(--dig-spacing-md);
}

.d1-nav-list.is-open .d1-nav-link::after {
  display: none;
}

.d1-nav-item {
  display: flex;
}

.d1-nav-link {
  position: relative;

  display: inline-flex;
  align-items: center;
  height: var(--dig-header-height, 70px);

  color: var(--dig-color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;

  transition: color 160ms ease;
}

.d1-nav-link::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;

  height: 2px;

  background: var(--dig-color-secondary);
  transform: scaleX(0);
  transform-origin: center;

  transition: transform 160ms ease;
}

.d1-nav-link:hover,
.d1-nav-link.is-active {
  color: var(--dig-color-primary);
}

.d1-nav-link.is-active::after {
  transform: scaleX(1);
}

/* 4. Actions (Buttons) */
.d1-header-actions {
  display: none; /* Hidden on mobile by default, or maybe flex? let's see media query */
  align-items: center;
  gap: var(--dig-spacing-sm);
}

/* 5. Mobile Toggle */
.d1-mobile-toggle__icon {
  font-size: 1.5rem;
}

.d1-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: var(--dig-spacing-xs);
  cursor: pointer;
  color: var(--dig-color-text);
}

/* --- RESPONSIVE: DESKTOP (lg breakpoint) --- */
@media (min-width: 992px) {
  .d1-nav-list,
  .d1-nav-list.is-open {
    position: static;

    display: flex;
    flex-direction: row;
    gap: var(--dig-spacing-lg);

    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .d1-header-actions {
    display: flex;
  }

  .d1-mobile-toggle {
    display: none;
  }
}

