:root {
  /* Voxa Theme: Neon Cyan & Deep Indigo */
  --primary-color: #00e5ff; /* Bright Neon Cyan */
  --primary-dark: #00b8d4; /* Deeper Cyan for hover */
  --bg-body: #0b0c10; /* Deep Indigo/Navy Black */
  --bg-card: #151720; /* Slightly lighter indigo for cards */
  --bg-input: #1a1c28; /* Input fields background */
  --text-main: #f8f9fa; /* White/Light text */
  --text-muted: #9ca3af; /* Gray/Blue-ish text */
  --border-color: #232635; /* Dark indigo borders */
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* =========================================
   0. BASE RESET & FAILSAFE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

html,
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 74px;
  overflow-x: hidden; /* CRITICAL: Prevents horizontal scrolling globally */
  width: 100%;
  max-width: 100vw;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}
img,
video,
audio,
input,
textarea,
select {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* =========================================
   1. NAVBAR
   ========================================= */
.navbar {
  background: var(--bg-card);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.logo span {
  color: var(--primary-color);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}
.auth-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.btn-primary {
  background-color: var(--primary-color);
  color: #000000;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  text-align: center;
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #000000;
}
.btn-text {
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
}
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* =========================================
   2. HERO & HEADERS
   ========================================= */
.hero {
  background: linear-gradient(to bottom, var(--bg-card), var(--bg-body));
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-main);
}
.hero h1 span {
  color: var(--primary-color);
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.search-bar {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  border: 1px solid var(--border-color);
}
.input-group {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}
.input-group i {
  color: var(--text-muted);
  margin-right: 10px;
}
.input-group input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 1rem;
  color: var(--text-main);
}

.popular-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  align-items: center;
}
.popular-tags span {
  color: var(--text-muted);
}
.tag-btn {
  background: var(--bg-card);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}
.tag-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.05);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  cursor: pointer; /* This fixes the unclickable mouse issue */
  text-align: center; /* This fixes the text alignment */
  font-size: 1rem;
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.05); /* Adds a subtle neon glow */
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.1);
  transform: translateY(-1px);
}

.section-padding {
  padding: 4rem 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.section-header h2 {
  color: var(--text-main);
}
.view-options span {
  margin-left: 1rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
}
.view-options span.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}
.page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
}
.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* =========================================
   3. JOB LAYOUT & CARDS (Desktop Base)
   ========================================= */
.jobs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr); /* Prevents layout blowout */
  gap: 2rem;
  align-items: start;
  padding-bottom: 4rem;
}
.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
}
.job-feed-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.job-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.job-card-wide {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.job-card-wide:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.company-logo,
.logo-box {
  background: var(--bg-input);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.company-logo {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}
.logo-box {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.job-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.header-text,
.job-info {
  flex-grow: 1;
  min-width: 0;
  width: 100%;
}
.job-title,
.job-card-wide h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text-main);
  word-wrap: break-word; /* Forces long text to wrap */
}
.company-name,
.company {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.job-card-wide h3 {
  margin-bottom: 0.2rem;
}
.job-card-wide .company {
  margin-bottom: 0.5rem;
}

.job-type {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-color);
  font-weight: 600;
  border: 1px solid var(--primary-color);
  align-self: flex-start;
  margin-bottom: 1rem;
  white-space: normal; /* Allows text to wrap */
}
.job-details,
.meta {
  display: flex;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.job-details {
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.meta {
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.8;
}
.tag {
  display: inline-flex;
  white-space: normal;
  align-items: center;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--primary-color);
  text-align: left;
  word-break: break-word;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
  min-width: 120px;
}
.action-row {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
}
.actions .btn-primary {
  width: 100%;
}
.apply-btn {
  margin-top: auto;
  width: 100%;
  padding: 0.8rem;
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.apply-btn:hover {
  background: var(--primary-color);
  color: #000;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.sort-box select {
  padding: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-left: 5px;
  background: var(--bg-input);
  color: var(--text-main);
}
.btn-save {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}
.btn-save:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.2);
}
.btn-remove {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Filter specifics */
.filter-group h3 {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-item {
  margin-bottom: 1.5rem;
}
.filter-item label {
  color: var(--text-muted);
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.input-with-icon {
  position: relative;
}
.input-with-icon i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.input-with-icon input {
  width: 100%;
  padding: 0.6rem 0.6rem 0.6rem 2.2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  color: var(--text-main);
}
.reset-btn {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
}
.reset-btn:hover {
  color: var(--primary-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.page-btn {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
  color: var(--text-muted);
}
.page-btn.active,
.page-btn:hover:not(.disabled) {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
  font-weight: bold;
}
.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================
   4. COMPANIES & SALARIES
   ========================================= */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}
.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: 0.3s;
}
.company-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
  border-color: var(--primary-color);
}
.company-logo-large {
  width: 80px;
  height: 80px;
  background: var(--bg-input);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0 auto 1rem;
}
.company-rating {
  color: #f59e0b;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.open-jobs-tag {
  display: inline-block;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1rem;
  border: 1px solid var(--primary-color);
}

.salaries-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.salary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.salary-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}
.salary-visual {
  flex: 2;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}
.salary-bar-bg {
  flex-grow: 1;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  position: relative;
}
.salary-bar-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 4px;
  position: relative;
}
.salary-marker {
  position: absolute;
  right: 0;
  top: -6px;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 4px solid var(--primary-color);
  border-radius: 50%;
}
.salary-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* =========================================
   5. FORMS & MODALS
   ========================================= */
.apply-container form, .contact-container form, .main-form { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    padding: 2.5rem; 
    border-radius: 12px; 
    max-width: 700px; 
    margin: 2rem auto; 
    box-sizing: border-box; 
}

/* Removed .auth-box from the shared block above and gave it its own specific rules */
.auth-box { 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    padding: 2.5rem; 
    border-radius: 12px; 
    max-width: 400px; 
    width: 100%;
    margin: 0 auto; 
    box-shadow: var(--shadow);
}
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 2rem;
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-color);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1000;
  backdrop-filter: blur(5px);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  position: relative;
  transform: translateY(20px);
  transition: 0.3s;
  border: 1px solid var(--border-color);
  max-height: 90vh;
  overflow-y: auto;
  color: var(--text-main);
}
.modal-overlay.open .modal-content {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}
.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}
.close-modal:hover {
  color: var(--primary-color);
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-input);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}
.info-box.main-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 1px solid var(--border-color);
  padding-right: 1rem;
}
.text-block {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ddd;
  white-space: pre-wrap;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding-top: 4rem;
  margin-top: auto;
}
footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-col h4,
.footer-col h3 {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: var(--text-main);
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}
.footer-col a:hover {
  color: var(--primary-color);
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================
   📱 COMPREHENSIVE RESPONSIVE FRAMEWORK
   ========================================= */

/* LARGE MONITORS (1440px - 2560px) */
@media (min-width: 1440px) {
  .container {
    max-width: 1350px;
  }
  .jobs-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
  }
}

/* TABLET / SMALL DESKTOP (1024px) */
@media (max-width: 1024px) {
  .jobs-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1rem;
    top: 0;
  }
  footer .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* TABLET PORTRAIT / LARGE MOBILE (768px) */
@media (max-width: 768px) {
  .navbar {
    max-height: 100vh;
    overflow-y: auto;
  }
  .navbar .container {
    flex-wrap: wrap;
  }
  .menu-toggle {
    display: block;
  }

  .nav-links,
  .auth-buttons {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
  }
  .nav-links.show-menu {
    display: flex !important;
    order: 3;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
  }
  .auth-buttons.show-menu {
    display: flex !important;
    order: 4;
    padding-bottom: 1rem;
    gap: 15px;
    justify-content: center;
  }
  .nav-links li {
    margin: 12px 0;
  }
  .nav-links a {
    font-size: 1.1rem;
    display: block;
    padding: 5px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
  .search-bar {
    flex-direction: column;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .input-group {
    width: 100%;
    margin-bottom: 10px;
  }

  footer .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .page-header {
    padding: 2.5rem 1rem;
    text-align: center;
  }
  .page-header h1 {
    font-size: 2rem;
  }
  .section-padding {
    padding: 2rem 1rem;
  }

  .job-card-wide {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
    width: 100%;
    max-width: 100%; /* Force it to obey the screen edge */
    overflow: hidden;
  }
  .job-card-wide .job-info {
    width: 100%;
  }
  .job-card-wide .meta {
    width: 100%;
  }
  .job-card-wide .logo-box {
    margin-bottom: 1rem;
  }
  .job-card-wide .actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: 10px;
    max-height: 85vh;
    overflow-y: auto;
  }
  .modal-grid-2 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .info-box.main-box {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    padding-right: 0;
  }
  .modal-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .modal-header .company-logo {
    margin-bottom: 10px !important;
  }

  /* --- DASHBOARD FIXES --- */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
  }

  .dashboard-header .btn-primary {
    width: 100%; /* Make the button full width on mobile */
    text-align: center;
    justify-content: center;
    display: flex;
    padding: 0.8rem;
  }
}

/* STANDARD MOBILE (480px, 425px, 375px) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.95rem;
  }

  /* Shrink the grid so it fits entirely */
  .jobs-grid,
  .companies-grid {
    grid-template-columns: 1fr;
  }
  .salary-visual {
    min-width: 100%;
  }

  .job-card-wide .meta {
    flex-direction: column;
    gap: 5px;
  }
  .job-card-wide .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .job-card-wide .action-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .job-card-wide .actions button,
  .job-card-wide .actions .btn-primary {
    width: 100%;
    text-align: center;
  }
  .btn-save {
    width: 100%;
    border-radius: 6px;
    margin-top: 0;
  }

  .popular-tags {
    flex-direction: column;
    align-items: center;
  }
  .tag-btn {
    width: 100%;
    text-align: center;
    padding: 8px;
  }

  .apply-container form,
  .contact-container form,
  .main-form,
  .auth-box {
    padding: 1.5rem 1rem;
    margin: 1rem 0;
    width: 100%;
    border-radius: 8px;
  }

  /* --- DASHBOARD SAVED JOBS LIST FIX --- */
  #saved-jobs-container .job-card-wide .actions {
    flex-direction: column; /* Stack the View and Remove buttons */
    width: 100%;
    align-items: stretch;
  }

  #saved-jobs-container .btn-remove {
    justify-content: center;
  }
}

/* VERY SMALL MOBILE (320px) */
@media (max-width: 320px) {
  .container {
    padding: 0 12px;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .logo {
    font-size: 1.1rem;
  }
  .logo img {
    height: 30px !important;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }
  .company-logo-large {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* ROTATED/LANDSCAPE MOBILE */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding-top: 60px;
  }
  .navbar {
    padding: 0.5rem 0;
  }
  .hero {
    padding: 2rem 0;
  }
  .page-header {
    padding: 1.5rem 0;
  }
  .modal-content {
    max-height: 90vh;
  }
  .jobs-layout {
    padding-bottom: 2rem;
  }
}
