@import url('/frontend/typography-standard.css');

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                         GLOBAL HEADER — NAVBAR UNIFICADO                      */
/*                    Navegação compartilhada entre todos os sites                */
/* ═════════════════════════════════════════════════════════════════════════════ */

.global-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--bg-surface, white);
  border-bottom: 1px solid var(--border-default, #e5e7eb);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: var(--cs-font-family, var(--font-sans, "Times New Roman", Times, serif));
  letter-spacing: 1pt;
}

.global-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          LOGO & BRANDING                                      */
/* ═════════════════════════════════════════════════════════════════════════════ */

.global-header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary, #1f2937);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1pt;
  transition: color 0.3s ease;
}

.global-header-logo:hover {
  color: var(--brand-olive, #3caa6e);
}

.global-header-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3caa6e, #0693e3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          NAVEGAÇÃO PRINCIPAL                                  */
/* ═════════════════════════════════════════════════════════════════════════════ */

.global-header-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-header-nav-item {
  position: relative;
}

.global-header-nav-link {
  text-decoration: none;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-family: var(--cs-font-family, var(--font-sans, "Times New Roman", Times, serif));
  letter-spacing: 1pt;
}

.global-header-nav-link:hover,
.global-header-nav-link[aria-current="page"] {
  color: var(--brand-olive, #3caa6e);
  border-bottom-color: var(--brand-olive, #3caa6e);
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          AÇÕES DIREITA (Dark mode, etc)                       */
/* ═════════════════════════════════════════════════════════════════════════════ */

.global-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.global-header-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  pointer-events: none;
}

.global-header-theme-toggle {
  background: linear-gradient(135deg, #ffffff, #f3f4f6);
  border: 1px solid rgba(31, 41, 55, 0.10);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: #1f2937;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 -2px 0 rgba(0,0,0,0.08), 0 3px 0 rgba(0,0,0,0.14), 0 8px 18px rgba(0,0,0,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.global-header-theme-toggle:hover {
  background: #f3f4f6;
  color: #3caa6e;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -3px 0 rgba(0,0,0,0.10), 0 5px 0 rgba(0,0,0,0.16), 0 14px 28px rgba(0,0,0,0.16);
}

.global-header-menu-toggle {
  display: none;
  background: linear-gradient(135deg, #ffffff, #f3f4f6);
  border: 1px solid rgba(31, 41, 55, 0.10);
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 6px;
  color: #1f2937;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), inset 0 -2px 0 rgba(0,0,0,0.08), 0 3px 0 rgba(0,0,0,0.14), 0 8px 18px rgba(0,0,0,0.12);
  align-items: center;
  justify-content: center;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          DARK MODE                                            */
/* ═════════════════════════════════════════════════════════════════════════════ */

[data-theme="dark"] .global-header {
  background: var(--bg-surface, #111b3c);
  border-bottom-color: var(--border-default, rgba(148, 163, 184, 0.1));
}

[data-theme="dark"] .global-header-logo {
  color: var(--text-primary, #e8ecf1);
}

[data-theme="dark"] .global-header-logo:hover {
  color: var(--brand-olive-light, #34d399);
}

[data-theme="dark"] .global-header-nav-link {
  color: var(--text-secondary, #a0aec0);
}

[data-theme="dark"] .global-header-nav-link:hover,
[data-theme="dark"] .global-header-nav-link[aria-current="page"] {
  color: var(--brand-olive-light, #34d399);
  border-bottom-color: var(--brand-olive-light, #34d399);
}

[data-theme="dark"] .global-header-theme-toggle {
  color: #e8ecf1;
}

[data-theme="dark"] .global-header-theme-toggle:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #34d399;
}

[data-theme="dark"] .global-header-theme-toggle,
[data-theme="dark"] .global-header-menu-toggle {
  background: linear-gradient(135deg, #172554, #0f172a);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -2px 0 rgba(0,0,0,0.35), 0 3px 0 rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.28);
}

[data-theme="dark"] .global-header-menu-toggle {
  color: #e8ecf1;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          MOBILE MENU                                          */
/* ═════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .global-header-content {
    padding: 1rem;
  }

  .global-header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
  }

  .global-header-nav.active {
    display: flex;
  }

  .global-header-nav-item {
    width: 100%;
  }

  .global-header-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: none;
    border-left: 4px solid transparent;
  }

  .global-header-nav-link:hover,
  .global-header-nav-link[aria-current="page"] {
    background: #f9fafb;
    border-left-color: #3caa6e;
    border-bottom-color: transparent;
  }

  .global-header-menu-toggle {
    display: block;
  }

  [data-theme="dark"] .global-header-nav {
    background: var(--bg-surface, #111b3c);
  }

  [data-theme="dark"] .global-header-nav-link:hover,
  [data-theme="dark"] .global-header-nav-link[aria-current="page"] {
    background: var(--bg-elevated, #0f1729);
    border-left-color: var(--brand-olive-light, #34d399);
  }
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ACESSIBILIDADE                                       */
/* ═════════════════════════════════════════════════════════════════════════════ */

.global-header-theme-toggle:focus-visible,
.global-header-menu-toggle:focus-visible {
  outline: 2px solid #3caa6e;
  outline-offset: 2px;
}

.global-header-nav-link:focus-visible {
  outline: 2px solid #3caa6e;
  outline-offset: -2px;
}
