/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
  --blue-50:  #eff8ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  --sky-50:  #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--sky-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.btn--primary:hover { background: var(--blue-700); box-shadow: 0 4px 14px rgba(37,99,235,.45); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--blue-600);
  border: 1.5px solid var(--blue-200);
}
.btn--ghost:hover { background: var(--blue-50); border-color: var(--blue-400); }

.btn--outline {
  background: transparent;
  color: var(--blue-600);
  border: 1.5px solid var(--blue-300);
  padding: 9px 20px;
}
.btn--outline:hover { background: var(--blue-50); }

.btn--search {
  background: var(--blue-600);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
  flex-shrink: 0;
}
.btn--search:hover { background: var(--blue-700); transform: translateY(-1px); }

.btn--full { width: 100%; }

/* ===========================
   Header
   =========================== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--blue-100);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(37,99,235,.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--gray-800);
  letter-spacing: -0.3px;
}
.logo-text strong { color: var(--blue-600); font-weight: 800; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--blue-600); background: var(--blue-50); }
.nav-link--active { color: var(--blue-600); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* ===========================
   Hero Section
   =========================== */
.hero {
  background: linear-gradient(135deg, #dbeafe 0%, #bae6fd 50%, #e0f2fe 100%);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(96,165,250,.25) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(14,165,233,.18) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.hero-highlight {
  color: var(--blue-600);
  position: relative;
}
.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-400), var(--sky-400));
  border-radius: 2px;
  opacity: 0.5;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

/* ===========================
   Search Bar
   =========================== */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px 8px 8px 0;
  max-width: 860px;
  border: 2px solid var(--blue-100);
  position: relative;
  z-index: 1;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--blue-400); }

.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 20px;
}
.search-icon {
  width: 20px; height: 20px;
  color: var(--blue-400);
  flex-shrink: 0;
  margin-right: 10px;
}
.search-input {
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--gray-800);
  background: transparent;
  width: 100%;
}
.search-input::placeholder { color: var(--gray-400); }

.search-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
  flex-shrink: 0;
}

/* ===========================
   Hero Suggestions
   =========================== */
.hero-suggestions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.suggestion-label { font-size: 0.875rem; color: var(--gray-500); font-weight: 500; }
.suggestion-tag {
  padding: 6px 14px;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid var(--blue-200);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-700);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}
.suggestion-tag:hover {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
  transform: translateY(-1px);
}

/* ===========================
   Stats Bar
   =========================== */
.stats-bar {
  background: var(--blue-700);
  padding: 18px 0;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
}
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--white); }
.stat-label { font-size: 0.8rem; color: var(--blue-200); font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.2); }

/* ===========================
   Main Content Grid
   =========================== */
.main-content { flex: 1; padding: 40px 0 60px; }

.main-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* ===========================
   Sidebar / Filters
   =========================== */
.filter-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blue-100);
  margin-bottom: 20px;
}

.filter-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-100);
}

.filter-group { margin-bottom: 20px; }
.filter-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.filter-options { display: flex; flex-direction: column; gap: 8px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: color var(--transition);
}
.filter-option:hover { color: var(--blue-600); }
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: var(--blue-500);
  width: 15px; height: 15px;
}

/* Companies widget */
.companies-card { }
.company-list { display: flex; flex-direction: column; gap: 14px; }
.company-item { display: flex; align-items: center; gap: 12px; }
.company-badge {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: var(--white);
  flex-shrink: 0;
}
.company-badge--blue   { background: var(--blue-500); }
.company-badge--green  { background: #16a34a; }
.company-badge--orange { background: #ea580c; }
.company-badge--teal   { background: #0891b2; }
.company-badge--purple { background: #7c3aed; }
.company-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-800); }
.company-jobs { font-size: 0.775rem; color: var(--gray-500); }

/* ===========================
   Job Section
   =========================== */
.job-section { }

.job-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title { font-size: 1.35rem; font-weight: 700; color: var(--gray-900); }
.results-count { font-size: 0.875rem; color: var(--gray-500); margin-top: 2px; }

.sort-controls { display: flex; align-items: center; gap: 10px; }
.sort-label { font-size: 0.875rem; color: var(--gray-600); }
.sort-select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-700);
  background: var(--white);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--blue-400); }

/* ===========================
   Job Cards
   =========================== */
.job-list { display: flex; flex-direction: column; gap: 14px; }

.job-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--blue-100);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.job-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue-400), var(--sky-400));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 4px 0 0 4px;
}
.job-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.job-card:hover::before { opacity: 1; }

.job-card-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }

.job-logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--blue-100);
  color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900;
  flex-shrink: 0;
  border: 1.5px solid var(--blue-200);
}

.job-main { flex: 1; min-width: 0; }

.job-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 4px;
  transition: color var(--transition);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-card:hover .job-title { color: var(--blue-600); }

.job-company { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }

.job-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.job-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--gray-500);
}
.job-meta-icon { width: 14px; height: 14px; color: var(--blue-400); }

.job-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.job-posted { font-size: 0.775rem; color: var(--gray-400); white-space: nowrap; }
.save-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: var(--gray-400);
  font-size: 1.1rem;
}
.save-btn:hover { border-color: var(--blue-400); color: var(--blue-500); background: var(--blue-50); }
.save-btn.saved { background: var(--blue-50); border-color: var(--blue-400); color: var(--blue-600); }

.job-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.job-tag {
  padding: 4px 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.job-salary {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-700);
}

.apply-btn {
  padding: 9px 22px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(37,99,235,.3);
}
.apply-btn:hover { background: var(--blue-700); transform: translateY(-1px); }

/* No results state */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.no-results-icon { font-size: 3rem; margin-bottom: 16px; }
.no-results h3 { font-size: 1.2rem; color: var(--gray-700); margin-bottom: 8px; }

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--blue-100);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================
   Pagination
   =========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
}
.page-btn {
  min-width: 38px; height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--white);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--blue-50); }
.page-btn--active { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); font-weight: 700; }
.page-btn--next { padding: 0 16px; }
.page-ellipsis { color: var(--gray-400); padding: 0 4px; }

/* ===========================
   Modal
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--blue-100); color: var(--blue-600); }

.modal-header { display: flex; gap: 16px; margin-bottom: 24px; }
.modal-logo {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 1.6rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--blue-200);
  flex-shrink: 0;
}
.modal-title { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.modal-company { font-size: 1rem; font-weight: 600; color: var(--blue-600); margin-bottom: 8px; }
.modal-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.modal-meta-item { font-size: 0.85rem; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }

.modal-section { margin-bottom: 20px; }
.modal-section-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gray-500); margin-bottom: 10px; }
.modal-section p { font-size: 0.925rem; color: var(--gray-700); line-height: 1.7; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.modal-tag {
  padding: 6px 14px;
  background: var(--blue-50);
  color: var(--blue-700);
  border: 1px solid var(--blue-200);
  border-radius: 20px;
  font-size: 0.8rem; font-weight: 500;
}

.modal-actions { display: flex; gap: 12px; margin-top: 28px; }
.modal-actions .btn { flex: 1; }

/* ===========================
   Footer
   =========================== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding-top: 48px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gray-800);
}
.footer-brand { }
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-text strong { color: var(--blue-400); }
.footer-tagline { font-size: 0.875rem; margin-top: 10px; color: var(--gray-500); }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-heading { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--white); margin-bottom: 4px; }
.footer-col a { font-size: 0.875rem; color: var(--gray-500); transition: color var(--transition); }
.footer-col a:hover { color: var(--blue-400); }

.footer-bottom {
  padding: 18px 0;
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray-600);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--gray-600); transition: color var(--transition); }
.footer-legal a:hover { color: var(--blue-400); }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-inner { gap: 8px; }
  .stat { padding: 0 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .search-bar { flex-direction: column; padding: 12px; gap: 8px; }
  .search-divider { display: none; }
  .search-field { padding: 8px 12px; border: 1.5px solid var(--blue-200); border-radius: var(--radius-md); }
  .btn--search { width: 100%; }
  .header-inner { gap: 16px; }
  .nav { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 1.75rem; }
  .stats-bar .stat-divider { display: none; }
  .stat { padding: 8px 16px; }
  .footer-links { grid-template-columns: 1fr; }
}
