/* ===========================
   JobHunt Portal - style.css
   =========================== */

:root {
  --primary:     #1a56db;
  --primary-dark:#1040a8;
  --accent:      #f97316;
  --bg-light:    #f8f9fc;
  --text-main:   #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --card-shadow: 0 2px 12px rgba(0,0,0,.08);
  --radius:      10px;
}

/* ── Base ── */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-main);
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }

/* ── Navbar ── */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary) !important;
  letter-spacing: -0.5px;
}

.navbar-brand span { color: var(--accent); }
.navbar-brand img { width:140px; }

.nav-link {
  font-weight: 500;
  color: var(--text-main) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: background .15s;
}

.nav-link:hover, .nav-link.active {
  background: #eff6ff;
  color: var(--primary) !important;
}

.btn-post-job {
  background: var(--primary);
  color: #fff !important;
  border-radius: 8px;
  padding: 0.45rem 1.1rem !important;
  font-weight: 600;
  transition: background .2s;
}

.btn-post-job:hover { background: var(--primary-dark); }

/* ── Hero ── */
.hero-section {
  background: linear-gradient(135deg, #1a56db 0%, #1940a0 60%, #0f2d7a 100%);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.hero-section p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
}

.hero-stats span {
  color: rgba(255,255,255,.9);
  font-size: .9rem;
}

.hero-stats strong { color: #fff; }

/* Search Box */
.search-box {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}

.search-box .form-control,
.search-box .form-select {
  border: none;
  font-size: .95rem;
  padding: .7rem 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.search-box .form-control:focus,
.search-box .form-select:focus {
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
  background: #fff;
}

.search-divider {
  width: 1px;
  background: var(--border);
  margin: 6px 0;
}

.btn-search {
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  padding: .7rem 2rem;
  font-size: 1rem;
  border: none;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.btn-search:hover { background: var(--primary-dark); transform: translateY(-1px); }

.popular-tags a {
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: .2rem .75rem;
  font-size: .82rem;
  transition: all .2s;
}

.popular-tags a:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ── Section Headings ── */
.section-heading { font-weight: 800; color: var(--text-main); }
.section-sub { color: var(--text-muted); }

.section-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .5rem;
}

/* ── Category Cards ── */
.category-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all .25s;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.category-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.category-card h6 { font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.category-card small { color: var(--text-muted); }

/* ── Job Cards ── */
.job-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: all .25s;
  position: relative;
}

.job-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
  transform: translateY(-3px);
}

.company-logo {
  width: 52px; height: 52px;
  border: 1px solid var(--border);
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}

.company-logo-lg {
  width: 80px; height: 80px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

.job-title { font-weight: 700; font-size: 1rem; color: var(--text-main); }
.job-title:hover { color: var(--primary); }
.company-name { font-weight: 600; color: var(--text-muted); font-size: .9rem; }

.badge-type {
  font-size: .73rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 20px;
}

.badge-fulltime  { background: #dcfce7; color: #15803d; }
.badge-parttime  { background: #fef9c3; color: #854d0e; }
.badge-remote    { background: #ede9fe; color: #6d28d9; }
.badge-contract  { background: #fee2e2; color: #b91c1c; }
.badge-internship{ background: #e0f2fe; color: #0369a1; }
.badge-featured  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

.job-meta span {
  font-size: .8rem;
  color: var(--text-muted);
}

.job-meta i { font-size: .75rem; }

.save-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
  color: var(--text-muted);
}

.save-btn:hover, .save-btn.saved {
  background: #fff7ed;
  border-color: var(--accent);
  color: var(--accent);
}

.salary-tag {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
}

/* ── Filters Sidebar ── */
.filter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 75px;
}

.filter-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.filter-section { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem; }
.filter-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.form-check-label { font-size: .88rem; cursor: pointer; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ── Pagination ── */
.page-link {
  color: var(--primary);
  border-radius: 8px !important;
  margin: 0 2px;
  border: 1px solid var(--border);
}

.page-link:hover { background: #eff6ff; }
.page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── Company Cards ── */
.company-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: all .25s;
  text-align: center;
}

.company-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
  transform: translateY(-3px);
}

.company-card .jobs-count {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: 20px;
}

/* ── Stats ── */
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-number { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label  { color: var(--text-muted); font-size: .88rem; }

/* ── Job Detail ── */
.detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.detail-meta-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-meta-item:last-child { border-bottom: none; }

.detail-meta-icon {
  width: 38px; height: 38px;
  background: #eff6ff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  font-size: .9rem;
}

.detail-meta-item label { font-size: .75rem; color: var(--text-muted); margin-bottom: .1rem; }
.detail-meta-item span  { font-weight: 600; font-size: .9rem; }

.job-desc ul { padding-left: 1.2rem; }
.job-desc li { margin-bottom: .4rem; color: var(--text-muted); }

.skill-tag {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-main);
  border-radius: 6px;
  padding: .25rem .75rem;
  font-size: .82rem;
  font-weight: 500;
  margin: .2rem;
}

/* ── Apply Form ── */
.apply-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-label { font-weight: 600; font-size: .88rem; color: var(--text-main); }
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  padding: .65rem 1rem;
  transition: all .2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}

.form-control.is-invalid { border-color: #dc3545; }
.invalid-feedback { font-size: .8rem; }

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f8fafc;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: #eff6ff;
}

.upload-area i { font-size: 2rem; color: var(--text-muted); }
.upload-area.has-file i  { color: var(--primary); }

.upload-thumb-box {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #f8fafc;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-thumb-box:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

/* ── Company Header ── */
.company-banner {
  height: 200px;
  background: linear-gradient(135deg, #1a56db, #6d28d9);
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}

.company-header-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.company-info-bar {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.company-logo-wrap {
  width: 90px; height: 90px;
  border-radius: 14px;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  margin-top: -45px;
  flex-shrink: 0;
}

.rating-stars { color: #f59e0b; }

/* ── Reviews ── */
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.reviewer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn-primary-custom {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: .75rem 2rem;
  font-size: 1rem;
  transition: background .2s, transform .15s;
}

.btn-primary-custom:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-custom {
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 8px;
  font-weight: 600;
  padding: .65rem 1.5rem;
  background: transparent;
  transition: all .2s;
}

.btn-outline-custom:hover {
  background: var(--primary);
  color: #fff;
}

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  border-radius: 16px;
  padding: 3.5rem;
  text-align: center;
  color: #fff;
}

.cta-section h2 { font-weight: 800; }
.cta-section p  { opacity: .9; }

/* ── Footer ── */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 0 1.5rem;
}

.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; }
.footer-brand span { color: var(--accent); }
.footer-brand img {width: 140px;}

.footer-heading { color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 1rem; }
.footer-links a  { display: block; color: #94a3b8; margin-bottom: .5rem; font-size: .88rem; transition: color .2s; }
.footer-links a:hover { color: #fff; }

.footer-divider { border-color: #1e293b; margin: 2rem 0 1.5rem; }

.social-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #1e293b;
  display: inline-flex; align-items: center; justify-content: center;
  color: #94a3b8;
  transition: all .2s;
  font-size: .9rem;
  margin-right: .3rem;
}

.social-icon:hover { background: var(--primary); color: #fff; }

/* ── Carousel ── */
.job-carousel .carousel-item { padding: 0 .5rem; }

/* ── Sort Bar ── */
.sort-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
}

/* ── View Toggle ── */
.view-toggle .btn { border-radius: 8px !important; }
.view-toggle .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── List View Job Card ── */
.job-card-list { flex-direction: row; align-items: center; gap: 1rem; }
.job-card-list .job-title { font-size: 1.05rem; }

/* ── Progress Bars (for skills match) ── */
.progress { border-radius: 20px; height: 6px; }
.progress-bar { background: var(--primary); border-radius: 20px; }

/* ── Success Modal ── */
.success-icon {
  width: 80px; height: 80px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: #16a34a;
  margin: 0 auto 1.5rem;
}

/* ── Breadcrumb ── */
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 991px) {
  .filter-card { position: static; }
  .hero-section { padding: 50px 0 60px; }
  .cta-section { padding: 2.5rem 1.5rem; }
}

@media (max-width: 767px) {
  .search-box { padding: 8px; }
  .search-divider { display: none; }
  .company-info-bar { flex-direction: column; align-items: flex-start; }
}

/* ── Skeleton Loading Animation ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}

/* ── Scroll to Top ── */
#scrollTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,86,219,.4);
  z-index: 999;
  transition: all .2s;
}

#scrollTop:hover { background: var(--primary-dark); transform: translateY(-2px); }
#scrollTop.visible { display: flex; }

/* ── Tooltip override ── */
.tippy-box { font-size: .82rem; border-radius: 6px; }
