/* ================================================================
   HIREHUB — GLOBAL DESIGN SYSTEM
   ================================================================ */

/* ── 1. Design Tokens ── */
:root {
  /* Brand */
  --hh-brand:        #1a1a2e;
  --hh-brand-mid:    #2d2d5e;
  --hh-brand-light:  #4a5490;

  /* Accent (indigo) */
  --hh-accent:       #4f46e5;
  --hh-accent-dark:  #3730a3;
  --hh-accent-bg:    #eef2ff;

  /* Blue */
  --hh-blue:         #2563eb;
  --hh-blue-bg:      #dbeafe;

  /* Semantic */
  --hh-green:        #059669;
  --hh-green-bg:     #d1fae5;
  --hh-orange:       #d97706;
  --hh-orange-bg:    #fef3c7;
  --hh-red:          #dc2626;
  --hh-red-bg:       #fee2e2;
  --hh-purple:       #7c3aed;
  --hh-purple-bg:    #ede9fe;
  --hh-sky:          #0284c7;
  --hh-sky-bg:       #e0f2fe;
  --hh-teal:         #0d9488;
  --hh-teal-bg:      #ccfbf1;

  /* Text */
  --hh-text:         #0f172a;
  --hh-text-2:       #475569;
  --hh-text-muted:   #94a3b8;

  /* Surface */
  --hh-bg:           #f8fafc;
  --hh-surface:      #ffffff;
  --hh-border:       #e2e8f0;
  --hh-border-light: #f1f5f9;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-brand: 0 8px 32px rgba(26,26,46,0.28);
  --shadow-accent: 0 8px 28px rgba(79,70,229,0.30);

  /* Border radius */
  --r-xs:  6px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Easing */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);

  /* Timing */
  --t-fast: 150ms;
  --t-base: 220ms;
  --t-slow: 360ms;
}

/* ── 2. Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--hh-text);
  background: var(--hh-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hh-text);
  letter-spacing: -0.025em;
}

a { text-decoration: none; transition: color var(--t-base) var(--ease); }
a:hover { text-decoration: none; }

/* ── 3. Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.5); }
}
@keyframes blobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.06); }
  66%       { transform: translate(-20px, 20px) scale(0.96); }
}
@keyframes blobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-35px, 20px) scale(1.04); }
  66%       { transform: translate(25px, -25px) scale(0.98); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ── 4. Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }

/* ── 5. Navbar ── */
.main-navbar {
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--hh-border-light);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1040;
  transition:
    background var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}
.main-navbar.scrolled {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 4px 24px rgba(0,0,0,0.07);
  border-bottom-color: rgba(0,0,0,0.05);
}
.main-navbar .container-fluid { padding: 14px 28px; }

.nav-brand {
  font-size: 20px;
  font-weight: 900;
  color: var(--hh-brand);
  text-decoration: none;
  letter-spacing: -0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: 'Inter', sans-serif;
}
.nav-brand .accent { color: var(--hh-accent); }

.navbar-nav .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--hh-text-2) !important;
  padding: 7px 12px !important;
  border-radius: var(--r-sm);
  transition: color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.navbar-nav .nav-link:hover  { color: var(--hh-text) !important; background: var(--hh-border-light); }
.navbar-nav .nav-link.active-link {
  color: var(--hh-brand) !important;
  font-weight: 600;
  background: var(--hh-accent-bg);
}

.btn-nav-login {
  font-size: 14px; font-weight: 600; color: var(--hh-text-2);
  border: 1.5px solid var(--hh-border); border-radius: var(--r-sm);
  padding: 7px 16px; text-decoration: none;
  transition: all var(--t-base) var(--ease); background: var(--hh-surface);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-login:hover { border-color: var(--hh-brand); color: var(--hh-brand); background: var(--hh-border-light); }

.btn-nav-signup {
  font-size: 14px; font-weight: 700; color: #fff;
  background: var(--hh-brand); border: 1.5px solid var(--hh-brand);
  border-radius: var(--r-sm); padding: 7px 16px; text-decoration: none;
  transition: all var(--t-base) var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-signup:hover { background: var(--hh-brand-mid); border-color: var(--hh-brand-mid); color: #fff; }

.btn-nav-post {
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--hh-accent) 0%, var(--hh-purple) 100%);
  border-radius: var(--r-sm); padding: 8px 18px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 10px rgba(79,70,229,0.30);
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-bounce), box-shadow var(--t-base);
  border: none;
}
.btn-nav-post:hover { opacity: 0.92; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(79,70,229,0.42); }

.btn-nav-logout {
  font-size: 14px; font-weight: 600; color: var(--hh-red);
  border: 1.5px solid #fca5a5; border-radius: var(--r-sm);
  padding: 7px 16px; text-decoration: none;
  transition: all var(--t-base) var(--ease); background: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-nav-logout:hover { background: var(--hh-red); color: #fff; border-color: var(--hh-red); }

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hh-border-light); border-radius: var(--r-full);
  padding: 5px 12px 5px 5px; font-size: 13px;
  font-weight: 600; color: var(--hh-text);
  border: 1px solid var(--hh-border);
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hh-brand) 0%, var(--hh-accent) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}

.nav-divider { width: 1px; height: 20px; background: var(--hh-border); }

/* ── 6. Cards ── */
.card {
  border-radius: var(--r-md);
  border: 1px solid var(--hh-border);
  background: var(--hh-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79,70,229,0.14);
}
.card h5 { font-weight: 700; color: var(--hh-text); }
.card p   { color: var(--hh-text-2); }
.card .badge { border-radius: var(--r-xs); font-weight: 600; }

/* ── 7. Tags / Badges ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600;
}
.tag-blue   { background: var(--hh-blue-bg);   color: var(--hh-blue);   }
.tag-green  { background: var(--hh-green-bg);  color: var(--hh-green);  }
.tag-orange { background: var(--hh-orange-bg); color: var(--hh-orange); }
.tag-purple { background: var(--hh-purple-bg); color: var(--hh-purple); }
.tag-sky    { background: var(--hh-sky-bg);    color: var(--hh-sky);    }
.tag-teal   { background: var(--hh-teal-bg);   color: var(--hh-teal);   }
.tag-accent { background: var(--hh-accent-bg); color: var(--hh-accent); }

/* ── 8. Buttons (global reusable) ── */
.btn-hh-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--hh-brand); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 11px 24px;
  font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background var(--t-base) var(--ease), transform var(--t-base) var(--ease-bounce), box-shadow var(--t-base);
  box-shadow: 0 2px 8px rgba(26,26,46,0.22);
}
.btn-hh-primary:hover { background: var(--hh-brand-mid); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,26,46,0.32); }

.btn-hh-accent {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--hh-accent), var(--hh-purple)); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 11px 24px;
  font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: opacity var(--t-base), transform var(--t-base) var(--ease-bounce), box-shadow var(--t-base);
  box-shadow: var(--shadow-accent);
}
.btn-hh-accent:hover { opacity: 0.92; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(79,70,229,0.42); }

.btn-hh-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--hh-brand);
  border: 1.5px solid var(--hh-brand); border-radius: var(--r-sm);
  padding: 10px 24px; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--t-base) var(--ease);
}
.btn-hh-outline:hover { background: var(--hh-brand); color: #fff; }

.btn-hh-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25); border-radius: var(--r-sm);
  padding: 10px 24px; font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: all var(--t-base) var(--ease);
}
.btn-hh-ghost:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* ── 9. Forms ── */
.form-control {
  border: 1.5px solid var(--hh-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--hh-text);
  background: var(--hh-surface);
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.form-control:focus {
  border-color: var(--hh-accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  outline: none;
}
.form-control::placeholder { color: var(--hh-text-muted); }
.form-label { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 5px; font-family: 'Inter', sans-serif; }

/* ── 10. Footer ── */
.main-footer { background: var(--hh-brand); color: rgba(255,255,255,0.65); padding: 52px 0 0; margin-top: 60px; }
.footer-brand { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -0.04em; margin-bottom: 10px; font-family: 'Inter', sans-serif; }
.footer-brand span { color: var(--hh-accent); }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 20px; }
.footer-socials { display: flex; gap: 10px; }
.social-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65); font-size: 15px; text-decoration: none;
  transition: all var(--t-base) var(--ease);
}
.social-icon:hover { background: rgba(255,255,255,0.18); color: #fff; transform: translateY(-2px); }
.footer-heading { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.58); text-decoration: none; font-size: 14px; transition: color var(--t-base) var(--ease); display: inline-flex; align-items: center; gap: 7px; }
.footer-links a:hover { color: #fff; }
.footer-divider { border-top: 1px solid rgba(255,255,255,0.07); margin-top: 40px; padding: 18px 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom span { font-size: 13px; color: rgba(255,255,255,0.3); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,0.3); text-decoration: none; transition: color var(--t-base); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ── 11. Feature box (home page) ── */
.feature-box {
  background: var(--hh-surface); padding: 2rem 1.5rem; border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--hh-border-light);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.feature-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-box i { font-size: 2.2rem; color: var(--hh-accent); margin-bottom: 1rem; }

/* ── 12. Utility ── */
.text-brand  { color: var(--hh-brand); }
.text-accent { color: var(--hh-accent); }
.text-muted-hh { color: var(--hh-text-muted); }
.bg-brand    { background: var(--hh-brand); }
.bg-surface  { background: var(--hh-surface); }
.bg-page     { background: var(--hh-bg); }
.border-hh   { border: 1px solid var(--hh-border); }

/* ── 13. Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hh-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--hh-text-muted); }

/* ── 14. Selection ── */
::selection { background: rgba(79,70,229,0.15); color: var(--hh-accent-dark); }

/* ── 15. Legacy overrides (Bootstrap compat) ── */
.job-search { border-top: 1px solid var(--hh-border); padding: 2rem 0; }
.cta-section { background: linear-gradient(135deg, var(--hh-brand), var(--hh-brand-mid)); color: #fff; padding: 3rem 1rem; text-align: center; }

/* ── 16. Responsive ── */

/* Global small-screen base */
@media (max-width: 575.98px) {
  body { font-size: 14px; }
}

/* ---- NAVBAR (collapses at md = 768px) ---- */
@media (max-width: 767.98px) {
  .main-navbar .container-fluid { padding: 10px 16px; }

  /* Collapsed dropdown area */
  #navbarNav {
    padding: 8px 0 14px;
    border-top: 1px solid var(--hh-border-light);
    margin-top: 6px;
  }

  .navbar-nav .nav-link { padding: 10px 6px !important; margin-bottom: 2px; }

  /* Stack right-side buttons vertically when collapsed */
  .navbar-collapse .d-flex {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px !important;
    padding-top: 12px;
    border-top: 1px solid var(--hh-border-light);
  }

  .btn-nav-login,
  .btn-nav-signup,
  .btn-nav-post,
  .btn-nav-logout {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
  }

  .user-chip   { justify-content: center; width: 100%; }
  .nav-divider { display: none !important; }
}

/* ---- FOOTER ---- */
@media (max-width: 575.98px) {
  .main-footer   { padding: 36px 0 0; margin-top: 36px; }
  .footer-brand  { font-size: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-bottom-links { gap: 12px; }
}

/* ---- CHAT FAB ---- */
@media (max-width: 575.98px) {
  .chat-fab         { bottom: 18px; right: 18px; width: 48px; height: 48px; }
  .chat-fab-tooltip { display: none; }
}
