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

:root {
  --primary-color: #0070f3;
  --primary-dark: #005fcc;
  --secondary-color: #1f2937;
  --text-color: #374151;
  --light-gray: #f3f4f6;
  --border-color: #e5e7eb;
  --success-color: #10b981;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: #fff;
  color: var(--text-color);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation */
header {
  background-color: var(--secondary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.8rem;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 6rem 2rem;
  margin: -2rem -1rem 2rem -1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: calc(-50vw + 1rem);
  margin-right: calc(-50vw + 1rem);
}

.hero-section h1 {
  color: white;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero-section p {
  font-size: 1.35rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Search & Filters */
.search-filters {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-box i {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.search-box input {
  flex: 1;
  border: none;
  padding: 0.75rem 0;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

.search-box input::placeholder {
  color: #9ca3af;
}

/* Job Stats */
.jobs-stats {
  color: #6b7280;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.jobs-stats span {
  font-weight: 600;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

/* Job List */
.jobs-container {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.job-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  overflow: hidden;
  position: relative;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.job-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(0,112,243,0.15);
  transform: translateY(-4px);
}

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

.job-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.job-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.job-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  font-size: 1.75rem;
}

.job-title-section {
  flex: 1;
}

.job-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.job-company {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.job-meta-item i {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.job-actions {
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
  justify-content: flex-start;
}

.view-details-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.95rem;
}

.view-details-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0,112,243,0.3);
  transform: translateY(-2px);
}

/* Job Details Page */
.job-details {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.job-details h1 {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
}

.job-details-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 8px;
}

.meta-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.meta-item i {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.meta-item strong {
  display: block;
  color: var(--secondary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-item span {
  display: block;
  font-size: 1.1rem;
  color: var(--text-color);
}

.job-description {
  margin: 2rem 0;
  line-height: 1.8;
  color: var(--text-color);
}

.job-description p {
  margin-bottom: 1rem;
}

.apply-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.apply-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0,112,243,0.3);
  transform: translateY(-2px);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.back-button:hover {
  color: var(--primary-dark);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  color: #d1d5db;
  font-size: 0.9rem;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

.error {
  padding: 1rem;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 6px;
  border-left: 4px solid #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 2rem 1.5rem;
  }

  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .header-container {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--secondary-color);
    padding: 1rem;
    gap: 0;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-nav-toggle {
    display: block;
  }

  .job-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .job-actions {
    flex-direction: row;
    gap: 0.5rem;
  }

  .view-details-btn {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 1rem;
  }

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

  .search-box {
    min-width: 100%;
  }

  .job-details-meta {
    grid-template-columns: 1fr;
  }

  .job-details {
    padding: 1.5rem;
  }

  main {
    padding: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

  .job-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .job-title {
    font-size: 1.1rem;
  }

  .view-details-btn {
    font-size: 0.9rem;
    padding: 0.65rem 0.75rem;
  }

  main {
    padding: 0.5rem;
  }

  .jobs-stats {
    font-size: 0.85rem;
  }
}
