/* JOBS.CSS - Ultra Premium "Apple Pro" Level UI */

:root {
  --bg-deep: #050505;
  --bg-surface: #111111;
  --bg-glass: rgba(20, 20, 20, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --text-main: #F5F5F7;
  --text-muted: #86868B;
  --accent-pro: linear-gradient(135deg, #2997FF, #5E5CE6);
  --accent-solid: #2997FF;
  --radius-sm: 12px;
  --radius-md: 20px;
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body[data-page="jobs"] {
  background-color: var(--bg-deep);
  color: var(--text-main);
}

/* Page Layout */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding-top: 120px;
  padding-bottom: 5rem;
  position: relative;
}

/* Ambient Background Glow */
.page-layout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 50vh;
  background: radial-gradient(ellipse at top, rgba(41, 151, 255, 0.08) 0%, rgba(5, 5, 5, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    /* Add a toggle in JS later if you want mobile filters */
  }
}

/* Sidebar Glass Card */
.sidebar-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 1.8rem;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.filter-group-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
  letter-spacing: -0.01em;
}

/* Premium Form Controls */
.form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2386868B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
  transition: all 0.2s ease;
}

.form-select:focus {
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 2px rgba(41, 151, 255, 0.2);
}

.form-select option {
  background: var(--bg-surface);
  color: #fff;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.checkbox-label:hover,
.radio-label:hover {
  color: #fff;
}

/* Custom Sleek Radio Buttons */
.checkbox-label input,
.radio-label input {
  appearance: none;
  background-color: rgba(255, 255, 255, 0.05);
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1.15em;
  height: 1.15em;
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
}

.radio-label input::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--accent-solid);
}

.radio-label input:checked {
  border-color: var(--accent-solid);
}

.radio-label input:checked::before {
  transform: scale(1);
}

.main-content {
  width: 100%;
}

/* Inline Top Search Form */
.top-search-glass {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.search-flex {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.search-input-sleek {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input-sleek:focus {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--accent-solid);
}

@media (max-width: 768px) {
  .search-flex {
    flex-direction: column;
  }

  .search-input-sleek,
  .search-flex .btn-primary {
    width: 100%;
  }
}

/* Job Listing Header */
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.listing-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-clear {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.btn-clear:hover {
  color: #fff;
}

/* Ensure buttons match brand */
.btn-primary {
  background: var(--accent-pro);
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 15px rgba(41, 151, 255, 0.4);
}