/* General Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1001;
}

.logo img {
  height: 40px;
}

 /* Profile */
.profile-icon {
  width: auto;
  min-width: 36px;
  height: auto;
  padding: 4px 8px;
  background: #ccc;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.profile-icon img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.profile-icon div {
  font-size: 10px;
  color: #333;
  margin-top: 2px;
  text-align: center;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Profile Menu */
.profile-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 15px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px;
  width: 200px;
  z-index: 1002;
}

.profile-menu a {
  display: block;
  padding: 8px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.profile-menu a:hover {
  background-color: #f0f0f0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 250px;
  height: calc(100% - 60px);
  background: #fff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}

.sidebar.active {
  display: block;
}

.sidebar h3 {
  margin-top: 0;
}

.sidebar label {
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.sidebar select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Main Content */
main {
  flex: 1;
  margin-top: 60px;
  padding: 15px;
  transition: margin-left 0.3s;
}

.main-content {
  margin-left: 0;
}

@media (min-width: 768px) {
  .sidebar {
    display: block;
  }

  .main-content {
    margin-left: 270px;
  }
}

/* Job Cards */
.job-card {
  background: #fff;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
}

.job-card h3 {
  margin-bottom: 5px;
}

.job-card p {
  font-size: 14px;
  margin: 4px 0;
}

.job-card time {
  font-size: 13px;
  color: #888;
}

.job-card .buttons {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
}

.job-card .buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

.job-card .buttons .apply-btn {
  background-color: #007bff;
  color: white;
}

.job-card .apply-info,
.job-card .valid-info {
  margin-top: 10px;
  font-size: 12px;
  color: #555;
}

.job-card .time-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: lightgray;
  color: black;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* Apply Button - Positioned at the bottom right */
.job-card .buttons .apply-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.job-card .buttons .apply-btn:hover {
  background-color: #0056b3;
}

/* Footer */
.mobile-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  z-index: 1000;
}

.mobile-footer a {
  text-align: center;
  flex: 1;
  font-size: 12px;
  color: #333;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-footer a i {
  font-size: 20px;
}

.mobile-footer a.active,
.mobile-footer a:hover {
  color: #007bff;
}

/* Search Toggle */
#footerSearchBox {
  display: none;
  padding: 10px;
  background: #fff;
}

#footerSearchBox.active-search-box {
  display: block;
}

/* 🔧 Fix content overlapping with footer */
main,
#jobList, 
.content-wrapper {
  padding-bottom: 80px; /* ensure enough space above footer */
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #eee;
}

body.dark-mode header,
body.dark-mode .job-card,
body.dark-mode .sidebar,
body.dark-mode .mobile-footer {
  background-color: #1e1e1e;
  color: #eee;
  border-color: #444;
}

body.dark-mode .mobile-footer a {
  color: #ccc;
}

body.dark-mode .mobile-footer a:hover {
  color: #4dabf7;
}

body.dark-mode .sidebar select,
body.dark-mode .sidebar label {
  color: #eee;
}

body.dark-mode .profile-menu {
  background: #1e1e1e;
  border-color: #444;
}

body.dark-mode .profile-menu a {
  color: #ddd;
}

body.dark-mode .profile-menu a:hover {
  background-color: #333;
}

/* Ensure search box is visible and nicely placed */
#footerSearchBox {
  display: none;
  transition: all 0.3s ease;
  margin-top: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

/* Make it visible when active */
#footerSearchBox.active {
  display: block;
}

/* Style for the input box */
#jobSearch {
  padding: 10px;
  width: 280px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

/* Search icon style */
#searchIcon {
  cursor: pointer;
  font-size: 20px;
  margin-left: 10px;
}

    /* Style the Apply Now button */
.apply-btn {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px;
  background-color: #007bff;
  color: white;
  text-decoration: none; /* Remove the underline */
  border-radius: 5px;
  text-align: center;
  transition: background-color 0.3s ease;
}

/* Hover effect for Apply Now button */
.apply-btn:hover {
  background-color: #0056b3;
}
 
    .toast {
      position: fixed;
      top: 20px;
      right: 20px;
      background-color: #333;
      color: white;
      padding: 15px 20px;
      border-radius: 8px;
      z-index: 9999;
      opacity: 0.9;
      font-size: 14px;
      transition: opacity 0.5s ease-in-out;
    }

    .toast.success { background-color: #28a745; }
    .toast.error { background-color: #dc3545; 
}
  .description-sidebar {
  display: none; /* Hide by default (mobile) */
  position: fixed;
  top: 60px;
  right: 0;
  width: 300px;
  height: calc(100% - 60px);
  background: #fff;
  padding: 20px;
  overflow-y: auto;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
  z-index: 9;
}

@media (min-width: 768px) {
  .description-sidebar {
    display: block;
  }
}

/* Adjust main content on desktop to make space for description */
@media (min-width: 768px) {
  .main-content {
    margin-right: 320px; /* Shift content left to make room */
  }
}

.validity-green {
  background-color: #e6ffe6;
  color: green;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.validity-red {
  background-color: #ffe6e6;
  color: red;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.validity-expired-text {
  color: red;
  font-size: 14px;
  font-weight: normal;
  margin-top: 6px;
}

.expired-card {
  opacity: 0.85;
  border: 1px solid #ffb3b3;
  background-color: #fff5f5;
}

.contact-now-btn {
  background-color: #d9534f;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  transition: background-color 0.3s ease;
}

.contact-now-btn:hover {
  background-color: #c9302c;
}

.apply-btn {
  background-color: #007bff;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  font-weight: normal;
  transition: background-color 0.3s ease;
}

.apply-btn:hover {
  background-color: #0056b3;
}

.job-title {
  color: #007bff;
  text-decoration: none;
}

.job-title:hover {
  color: #0056b3;
  text-decoration: none;
}
