/* ============================================================
   STYLE.CSS — ALU Job Search Aggregator
   Theme: Pure Black + Gold + White (Luxury/Premium)
   
   Table of Contents:
   1. CSS Variables (colors, fonts, spacing)
   2. Reset & Base Styles
   3. Header
   4. Search Section
   5. Controls (Filters & Sort)
   6. Job Cards Grid
   7. Individual Job Card
   8. Loading Spinner
   9. Error Box
   10. Empty & Welcome States
   11. Footer
   12. Animations
   13. Responsive (Mobile)
============================================================ */

/* ============================================================
   1. CSS VARIABLES
   Gold & Black luxury color palette
============================================================ */
:root {
  /* Core colors */
  --bg-primary: #0a0a0a;              /* Pure black background */
  --bg-secondary: #111111;            /* Slightly lighter black */
  --bg-card: #141414;                 /* Job card background */
  --bg-card-hover: #1c1c1c;          /* Job card hover state */

  /* Gold palette */
  --gold: #D4AF37;                    /* Classic rich gold */
  --gold-bright: #FFD700;             /* Bright shiny gold */
  --gold-light: #F5E17A;              /* Light gold for hover */
  --gold-glow: rgba(212, 175, 55, 0.2); /* Gold glow effect */
  --gold-border: rgba(212, 175, 55, 0.35); /* Gold border */

  /* Text colors */
  --text-primary: #FFFFFF;            /* Pure white text */
  --text-secondary: #B0B0B0;         /* Muted grey text */
  --text-muted: #666666;             /* Very muted text */

  /* Border */
  --border: rgba(255, 255, 255, 0.07); /* Subtle white border */

  /* Status colors */
  --success: #D4AF37;                 /* Gold for salary */
  --error: #FF6B6B;                   /* Red for errors */

  /* Typography */
  --font-heading: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --radius: 16px;
  --radius-sm: 8px;
}

/* ============================================================
   2. RESET & BASE STYLES
============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  /* Subtle gold dot grid background pattern */
  background-image: radial-gradient(circle, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

/* ============================================================
   3. HEADER
============================================================ */
.header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 20px 24px;
  background: rgba(10, 10, 10, 0.95);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 400px;
  text-align: right;
}

/* ============================================================
   4. SEARCH SECTION
============================================================ */
.search-section {
  padding: 64px 24px 48px;
  display: flex;
  justify-content: center;
}

.search-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 700px;
  box-shadow:
    0 0 80px rgba(212, 175, 55, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Gold shimmer line at top of search card */
.search-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright), var(--gold), transparent);
}

.search-title {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.search-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 16px 16px 16px 46px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

/* Gold focus ring */
.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Gold gradient search button */
.search-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.search-btn:hover {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-light) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.35);
}

.search-btn:active {
  transform: translateY(0);
}

.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   5. CONTROLS SECTION
============================================================ */
.controls-section {
  padding: 0 24px 24px;
}

.controls-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius);
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-color: transparent;
  color: #0a0a0a;
  font-weight: 700;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.sort-select {
  padding: 7px 12px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.sort-select:focus {
  border-color: var(--gold);
}

.results-count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   6. JOB CARDS GRID
============================================================ */
.main-content {
  padding: 0 24px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ============================================================
   7. INDIVIDUAL JOB CARD
============================================================ */
.job-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.4s ease both;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

/* Gold shimmer top border on hover */
.job-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-bright), var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.job-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(212, 175, 55, 0.2),
    0 0 30px rgba(212, 175, 55, 0.05);
}

.job-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  padding: 4px;
}

.company-initial {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: #0a0a0a;
  flex-shrink: 0;
}

.card-header-info {
  flex: 1;
  min-width: 0;
}

.company-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.posted-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.job-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.job-card:hover .meta-tag {
  border-color: rgba(212, 175, 55, 0.2);
  color: var(--text-primary);
}

/* Salary in gold */
.salary {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.2px;
}

.job-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gold outlined apply button */
.apply-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.apply-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-color: transparent;
  color: #0a0a0a;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

/* ============================================================
   8. LOADING SPINNER
============================================================ */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(212, 175, 55, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ============================================================
   9. ERROR BOX
============================================================ */
.error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px;
  text-align: center;
}

.error-icon { font-size: 48px; }

.error-message {
  color: var(--error);
  font-size: 15px;
  max-width: 400px;
}

.retry-btn {
  padding: 10px 24px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.retry-btn:hover { opacity: 0.85; }

/* ============================================================
   10. EMPTY & WELCOME STATES
============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 80px 24px;
  text-align: center;
}

.empty-icon { font-size: 56px; }

.empty-text {
  color: var(--text-secondary);
  font-size: 16px;
}

.welcome-state {
  padding: 16px 0 48px;
}

.welcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tip-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

.tip-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.tip-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #FFFFFF, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tip-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   11. FOOTER
============================================================ */
.footer {
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.footer a { color: var(--gold); }
.footer a:hover { color: var(--gold-bright); }

/* ============================================================
   12. ANIMATIONS
============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* ============================================================
   13. RESPONSIVE (MOBILE)
============================================================ */
@media (max-width: 768px) {
  .search-title { font-size: 28px; }
  .search-card { padding: 32px 20px; }
  .header-tagline { display: none; }
  .controls-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sort-group { margin-left: 0; }
  .jobs-grid { grid-template-columns: 1fr; }
}
