/* =====================================================
   CAREERS — Clean & Modern White Theme
   ===================================================== */

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fafafa;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-logo {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: white;
}

.subheading {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.9);
}

.topbar .logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.topbar .logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main Header */
.main-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.main-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.2rem;
  color: #6b7280;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Control Bar */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.search-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.controls-right {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
}

.filter-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.filter-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Career Grid */
.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Career Box */
.career-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.career-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 100%);
  transition: all 0.3s ease;
}

.career-box:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
}

.career-box:hover::before {
  height: 6px;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
}

.card-header {
  padding: 1.5rem 1.5rem 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.company-logo {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.company-info .location {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.card-body {
  padding: 1rem 1.5rem;
  flex: 1;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.job-title a {
  color: inherit;
  text-decoration: none;
}

.job-title a:hover {
  color: #3b82f6;
}

.job-description {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-meta {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.meta-item i {
  width: 14px;
  color: #9ca3af;
}

.apply-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.apply-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

/* Status Badge */
.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  z-index: 10;
  color: white;
}

.status-open {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.status-closing {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.status-closed {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.empty-state-icon {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 1.5rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: #111827;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #6b7280;
  max-width: 400px;
  margin: 0 auto;
}

/* Floating Actions */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.fab:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.fab-scroll {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.fab-scroll:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

/* Hide bell button */
.fab .fa-bell {
  display: none;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader {
  width: 60px;
  height: 60px;
  position: relative;
}

.loader-inner {
  width: 100%;
  height: 100%;
  border: 3px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.preloader-text {
  margin-top: 1.5rem;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
  .career-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
      padding: 1rem;
      flex-direction: column;
      gap: 1rem;
      text-align: center;
  }
  
  .topbar-left {
      flex-direction: column;
      gap: 0.75rem;
  }
  
  .main-header {
      padding: 2rem 1rem 1.5rem;
  }
  
  .main-title {
      font-size: 2rem;
  }
  
  .control-bar {
      flex-direction: column;
      align-items: stretch;
  }
  
  .search-wrapper {
      min-width: 100%;
  }
  
  .controls-right {
      justify-content: center;
  }
  
  .career-grid {
      grid-template-columns: 1fr;
  }
  
  .floating-actions {
      bottom: 1.5rem;
      right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .card-header {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }
  
  .card-footer {
      flex-direction: column;
      gap: 1rem;
      align-items: stretch;
  }
  
  .apply-btn {
      justify-content: center;
  }
  
  .fab {
      width: 48px;
      height: 48px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
      background: #111827;
      color: #f9fafb;
  }
  
  .career-box,
  .empty-state,
  .control-bar {
      background: #1f2937;
      border-color: #374151;
  }
  
  .search-input,
  .filter-btn {
      background: #374151;
      border-color: #4b5563;
      color: #f9fafb;
  }
  
  .search-input:focus {
      border-color: #60a5fa;
  }
  
  .filter-btn.active {
      background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  }
  
  .job-title,
  .company-info h4 {
      color: #f9fafb;
  }
  
  .job-description,
  .location,
  .meta-item {
      color: #d1d5db;
  }
  
  .main-title {
      background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
  }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.career-box {
    animation: fadeIn 0.6s ease backwards;
}

.career-box:nth-child(1) { animation-delay: 0.1s; }
.career-box:nth-child(2) { animation-delay: 0.2s; }
.career-box:nth-child(3) { animation-delay: 0.3s; }
.career-box:nth-child(4) { animation-delay: 0.4s; }
.career-box:nth-child(5) { animation-delay: 0.5s; }
.career-box:nth-child(n+6) { animation-delay: 0.6s; }