/* header.css - Updated with Tactical Glow & Text Logo */

:root {
  --forest-green: #1b1c17;     /* Darker, more rugged forest */
  --earth-tan: #c2a382;       /* Leather/Tan */
  --accent-orange: #d97706;   /* Ember Orange */
  --white: #e5e5e0;           /* Bone White */
  --glow-flashlight: rgba(194, 163, 130, 0.4); /* Tan glow */
}

.site-header {
  background-color: var(--forest-green);
  padding: 1rem 0;
  border-bottom: 2px solid #33332e; /* Rugged divider */
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* --- TEXT LOGO --- */
.site-logo {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}

.logo-text {
  font-family: 'Arvo', serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -1px;
}

.logo-text span {
  color: var(--earth-tan);
}

/* --- NAVIGATION WITH GLOW EFFECT --- */
.main-nav {
  flex: 2;
  display: flex;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
}

/* Flashlight Beam Hover Effect */
.main-nav a:hover {
  color: var(--earth-tan);
  text-shadow: 0 0 8px var(--glow-flashlight);
}

/* --- SEARCH BAR & ACTIONS --- */
.header-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  gap: 15px;
}

.search-form {
  display: flex;
  background: #1a1a17;
  border: 1px solid #33332e;
  border-radius: 2px; /* Sharper edges for rugged feel */
  padding: 2px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Glowing Search Box when focused */
.search-form:focus-within {
  border-color: var(--earth-tan);
  box-shadow: 0 0 12px var(--glow-flashlight);
}

.search-form input {
  background: transparent;
  border: none;
  color: white;
  padding: 5px 10px;
  outline: none;
  width: 150px;
  font-family: 'JetBrains Mono', monospace;
}

.search-form button {
  background: var(--earth-tan);
  border: none;
  color: #121212;
  padding: 5px 15px;
  border-radius: 0;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.7rem;
}

/* Mobile Toggle Glow */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--earth-tan);
  color: var(--earth-tan);
  padding: 5px 10px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
}

.menu-toggle:hover {
  box-shadow: 0 0 10px var(--glow-flashlight);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
  .search-form { display: none; }
  .menu-toggle { display: block; }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--forest-green);
    padding: 20px 0;
    border-bottom: 2px solid var(--earth-tan);
  }

  .main-nav.active {
    display: block !important;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
}

/* Header Active State */
.nav-link.active {
    color: var(--accent-tan) !important;
    border-bottom: 2px solid var(--accent-tan);
    padding-bottom: 5px;
}

/* If you're using the dark header theme */
.page-header.tactical-header .nav-link.active {
    color: #ffffff !important;
    border-bottom-color: #c2a382;
}

/* --- UNIVERSAL ACTIVE STATE FIX --- */

/* This targets any link inside your nav that gets the .active class from JS */
.main-nav ul li a.active {
    color: #c2a382 !important; 
    font-weight: 700 !important;
    border-bottom: 2px solid #c2a382 !important;
    padding-bottom: 2px;
    opacity: 1 !important;
}

/* Specific fix for the About page if it's using the dark tactical-header */
.tactical-header .main-nav ul li a.active {
    color: #ffffff !important;
    border-bottom-color: #c2a382 !important;
}