/* ================================================
   Neoglass Header — unified header.css
   Combines theme vars + header styles (no duplicates)
   ================================================ */

/* ----------------------------------------
   THEME VARIABLES (dark default, light override)
   ---------------------------------------- */
:root {
  --ng-bg: #0f0f10;
  --ng-card: rgba(255,255,255,0.04);
  --ng-accent: #00b7ff;
  --ng-text: #e6eef8;
  --header-text: var(--ng-text);
}

/* Light mode overrides */
body.light-mode {
  --ng-bg: #ffffff;
  --ng-card: rgba(0,0,0,0.05);
  --ng-accent: #007bff;
  --ng-text: #111111;
  --header-text: var(--ng-text);
}

/* Quick safety for madara classes (avoid their transitions/themes) */
body[class*="madara"] {
  transition: none !important;
}
.madara-dark-mode,
.madara-dark-theme {
  background: none !important;
  color: inherit !important;
}

/* ----------------------------------------
   BODY THEME (applies colors)
   ---------------------------------------- */
body.dark-mode {
  background-color: var(--ng-bg) !important;
  color: var(--ng-text) !important;
}
body.light-mode {
  background-color: var(--ng-bg) !important;
  color: var(--ng-text) !important;
}

/* ----------------------------------------
   HEADER (sticky, full-bleed, responsive)
   ---------------------------------------- */
.ng-header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100vw;
  margin-left: calc(50% - 50vw); /* full-bleed across viewport */
  background: rgba(17, 17, 17, 0.7);
  color: var(--header-text);
  border-bottom: 1px solid var(--ng-card);
  padding: 8px 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Light mode header tweak */
body.light-mode .ng-header {
  background: rgba(255,255,255,0.85);
  color: var(--header-text);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Inner container */
.ng-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Logo */
.ng-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.ng-logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--header-text);
  transition: color 0.18s ease;
}
.ng-logo-text:hover {
  color: var(--ng-accent);
}

/* Actions */
.ng-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons / icons */
.ng-theme-btn,
.ng-search-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
  padding: 6px;
  line-height: 1;
}
.ng-theme-btn:hover,
.ng-search-btn:hover {
  color: var(--ng-accent);
}

/* Icon visibility logic */
.light-icon { display: none; }
body.light-mode .light-icon { display: inline; }
body.light-mode .dark-icon { display: none; }

/* Small utilities */
.ng-home { text-decoration: none; color: inherit; }

/* Responsive adjustments */
@media (max-width: 800px) {
  .ng-header { padding: 6px 14px; }
  .ng-logo-text { font-size: 1rem; }
  .ng-theme-btn, .ng-search-btn { font-size: 1.05rem; padding: 5px; }
}
@media (max-width: 500px) {
  .ng-header { padding: 5px 10px; }
  .ng-logo-text { font-size: 0.95rem; }
  .ng-theme-btn, .ng-search-btn { font-size: 1rem; padding: 4px; }
}
