/* =========================================================
   HEADER COMPONENT — ToolsCraftt
   Reglas de estilo del <header> reutilizable.
   Depende de las variables :root definidas en cada página
   (--bg, --accent, --accent-dark, --ink, --muted, --line).
   ========================================================= */

/* ===== Tipografía global del sitio =====
   header.css se carga en TODAS las páginas (index y subpáginas), así que
   se aprovecha este archivo como único punto para definir la fuente base
   de todo el sitio, sin tener que tocar cada página por separado. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

html, body{
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* ===== Banner de temporada (opcional, vía temas-manager) =====
   Se agrega/quita en tiempo de ejecución desde header.js. Usa el mismo
   var(--accent) que el resto del header, que header.js sobrescribe
   localmente cuando hay un tema activo con color de acento propio. */
.header-banner{
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  letter-spacing: 0.01em;
  transition: background .3s ease;
}

/* ===== Header ===== */
.site-header{
  background: var(--header-bg, #FFFFFF);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background .3s ease;
}

.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px 40px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.logo{
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.logo-emoji{
  font-size: 16px;
  line-height: 1;
}
.logo span{
  color: var(--accent);
  font-style: italic;
  font-weight: 700;
}
.logo-mark{
  height: 32px;
  width: auto;
  margin-right: -4px;
  flex-shrink: 0;
  display: block;
}

/* ===== Nav ===== */
.nav-links{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  grid-column: 2;
}

.nav-links a{
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.72;
  padding: 8px 4px;
  border-radius: 8px;
  transition: opacity .18s ease, color .18s ease;
}

.nav-links a svg{
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.75;
}

.nav-links a.active{
  color: var(--ink);
  opacity: 1;
}

.nav-links a:hover{
  opacity: 1;
}

.nav-links a.active:hover{
  opacity: 1;
}

/* ===== Acciones (buscar / Contacto / CTA) ===== */
.header-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 3;
  justify-self: end;
}

.btn-search{
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.btn-search svg{ width: 16px; height: 16px; }
.btn-search:hover{
  background: var(--bg);
  border-color: rgba(20,21,26,0.16);
}

.btn-login{
  background: rgba(71,127,255,0.1);
  color: var(--accent-dark);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease;
}
.btn-login:hover{
  background: rgba(71,127,255,0.18);
}

.btn-signup{
  background: linear-gradient(135deg, var(--accent2, #7C6AF0), var(--accent));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(92,90,240,0.35);
  transition: filter .2s ease, transform .15s ease, background .3s ease;
}
.btn-signup:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ===== Responsive ===== */
@media (max-width: 800px){
  .header-inner{
    grid-template-columns: 1fr auto;
    flex-wrap: wrap;
    padding: 14px 20px;
    gap: 12px;
  }
  .logo{ grid-column: 1; }
  .header-actions{ grid-column: 2; justify-self: end; order: 2; }
  .nav-links{
    grid-column: 1 / -1;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
    order: 3;
  }
}