/* ==============================
   CSS VARIABLES & RESET
   ============================== */
:root {
  --ng-red:           #e74c3c;
  --ng-red-hover:     #c0392b;
  --ng-dark-blue:     #1a2a4a;
  --ng-blue:          #0047cc;
  --ng-blue-hover:    #0035a0;
  --ng-orange:        #f57c00;
  --ng-white:         #ffffff;
  --ng-bg-light:      #f5f6f8;
  --ng-bg-section:    #f0f3f8;
  --ng-border:        #e0e4ea;
  --ng-text-dark:     #333333;
  --ng-text-medium:   #666666;
  --ng-text-light:    #999999;
  --ng-header-h:      60px;
  --ng-container:     1200px;
  --ng-font-primary:  'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--ng-font-primary);
  font-size: 14px;
  color: var(--ng-text-dark);
  background: var(--ng-bg-light);
  line-height: 1.5;
}

a { color: var(--ng-blue); text-decoration: none; }
a:hover { color: var(--ng-blue-hover); text-decoration: underline; }

ul { list-style: none; }

img { max-width: 100%; display: block; }

.ng-container {
  max-width: var(--ng-container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ==============================
   TOPBAR
   ============================== */
.ng-topbar {
  background: var(--ng-dark-blue);
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
  text-align: center;
  position: relative;
}
.ng-topbar .ng-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.ng-topbar-text { color: #ccd6f0; }
.ng-topbar-link {
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
}
.ng-topbar-link:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.ng-topbar-close {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  cursor: pointer; color: #aaa; font-size: 14px;
}
.ng-topbar-close:hover { color: #fff; }

/* ==============================
   BUTTONS
   ============================== */
.ng-btn-red {
  background: #1e61db;
  color: #fff;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  display: inline-block;
  font-family: inherit;
  transition: background 0.15s;
}
.ng-btn-red:hover { background: #1a56db; color: #fff; text-decoration: none; }

.ng-btn-outline {
  background: transparent;
  color: #1e61db;
  padding: 8px 20px;
  border: 2px solid #1e61db;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  transition: all 0.15s;
}
.ng-btn-outline:hover { background: #1e61db; color: #fff; text-decoration: none; }

.ng-btn-outline-sm {
  background: transparent;
  color: var(--ng-blue);
  padding: 5px 14px;
  border: 1px solid var(--ng-blue);
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  display: inline-block;
}

.ng-btn-text {
  background: none;
  border: none;
  color: var(--ng-text-dark);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 10px;
  display: inline-block;
}
.ng-btn-text:hover { color: #1e61db; text-decoration: none; }

/* ==============================
   BADGES
   ============================== */
.ng-badge-new {
  background: var(--ng-orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}
.ng-badge-free {
  background: #27ae60;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  margin-left: 4px;
}
.ng-badge-featured {
  background: #f0a500;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
}

/* ==============================
   SECTION HEADINGS
   ============================== */
.ng-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ng-text-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ng-border);
  position: relative;
}
.ng-section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: #1e61db;
}

/* ==============================
   UTILITY
   ============================== */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-red    { color: #e74c3c; }
.text-ngblue { color: #1e61db; }
.text-blue   { color: var(--ng-blue); }
.text-light  { color: var(--ng-text-light); }
.text-medium { color: var(--ng-text-medium); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }

/* ==============================
   GRID UTILITIES
   ============================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-dash { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.grid-dash-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }

/* Page-specific grids — base definitions */
.ng-cat-grid      { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ng-jobs-grid     { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ng-blog-grid     { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ng-companies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }


/* ==============================
   RESPONSIVE — TABLET (≤992px)
   ============================== */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-dash { grid-template-columns: 1fr; }
  .grid-dash-main { grid-template-columns: 1fr; }
  .ng-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .ng-jobs-grid { grid-template-columns: 1fr; }
  .ng-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .ng-footer-grid { grid-template-columns: repeat(3, 1fr); }
  .ng-search-layout { grid-template-columns: 1fr; }
  .ng-filter-sidebar { position: static; }
  .ng-stats-inner { gap: 24px; flex-wrap: wrap; }
  .ng-mega-menu { width: 100%; left: 0; }
}

/* ==============================
   RESPONSIVE — MOBILE (≤768px)
   ============================== */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  
  .ng-header-inner { padding: 0 12px; }
  .ng-nav-primary { display: none; }
  .ng-nav-primary.open { display: block; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: #fff; overflow-y: auto; z-index: 998; padding: 16px; }
  .ng-nav-list { flex-direction: column; height: auto; }
  .ng-nav-link { height: auto; padding: 12px 0; border-bottom: 1px solid var(--ng-border); border-left: none; }

  .ng-search-box { flex-direction: column; padding: 12px; }
  .ng-search-divider { display: none; }
  .ng-search-submit { width: 100%; }

  .ng-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .ng-blog-grid { grid-template-columns: 1fr; }
  .ng-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .ng-companies-strip { gap: 8px; }
  .ng-company-logo-box { width: 80px; height: 48px; }

  .ng-jd-layout { flex-direction: column; }
  .ng-app-inner { flex-direction: column; text-align: center; }
  .ng-app-badges { justify-content: center; }

  .ng-stats-inner { flex-direction: column; gap: 16px; }
  .ng-footer-grid { grid-template-columns: 1fr; }
  .ng-hero-title { font-size: 20px; }
}
