/* ──────────────────────────────────────────────────────────────
   GLOBAL PAGE CONTAINER
────────────────────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f9f9f9;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────────────────────────
   HEADER
────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

/* Logo */
.logo img {
  height: 40px;
  display: block;
}

/* Main Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-search-toggle .fa-search {
  vertical-align: middle;
}

.main-nav li + li {
  margin-left: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: #4CAF50;
}

/* Search Icon Button in Header */
.header-search-toggle {
  border: none;
  font-size: 1.25rem;
  color: #4CAF50;
  cursor: pointer;
}
.header-search-toggle:hover {
  color: #388E3C;
}

/* Notification Icon (for seekers) */
.notify-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #4CAF50;
  cursor: pointer;
  position: relative;
}
.notify-btn:hover {
  color: #388E3C;
}
.notify-btn .badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 50%;
}

/* Optional Search Bar */

.form-search {
  display: flex;
  gap: 0.5rem;
}

.form-search input,
.form-search select {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.form-search button {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-search button:hover {
  background-color: #005bb5;
}


.job-page__footer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 1rem 0;
  margin-top: 3rem;
}

/* ──────────────────────────────────────────────────────────────
   HEADER ACTIONS BUTTONS & DROPDOWNS
────────────────────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-outline {
  border: 1px solid #4CAF50;
  color: #4CAF50;
  background: transparent;
}

.btn-outline:hover {
  background: #4CAF50;
  color: #fff;
}

.btn-primary {
  background: #4CAF50;
  color: #fff;
  border: 1px solid #4CAF50;
}

.btn-primary:hover {
  background: #489e4c;
}

.dropdown {
  position: relative;
  display: inline-block;
  margin-right: 1rem;
}
.dropdown-menu {
  position: absolute;
  top: calc(100%);
  left: 0;
  min-width: 10rem;
  padding: 0.25rem 0;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: none;
  z-index: 100;
}
.dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}
.dropdown-menu li a:hover {
  background: #f5f5f5;
}

/* Avatar */
.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

/* Dropdown wrapper */
.account-menu {
  position: relative;
}
.drop-toggle {
  background: none;
  border: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.drop-toggle .avatar-xs {
  margin-right: 0.5rem;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  object-fit: cover;
}
.drop-list {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
  transform-origin: top center;
  transition: 
    opacity 0.3s ease-out, 
    transform 0.3s ease-out;
  z-index: 1000;
  min-width: 200px;
}
.drop-list li {
  list-style: none;
  margin: 0;
}
.drop-list li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
}
.drop-list li a:hover,
.drop-list li a:focus {
  background: rgba(76,175,80,0.1); /* light green */
}
.drop-list.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
/* Divider */
.drop-list li.divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.5rem 0;
}

/*───────────────────────────────────────────────────────────────
  SEARCH OVERLAY (triggered by header icon)
───────────────────────────────────────────────────────────────*/

/* Container around icon + input */
.search-container {
  display: flex;
  align-items: center;
  position: relative;
}

/* Hide the form by default */
.search-form {
  overflow: hidden;
  width: 0;
  transition: width 0.4s ease;
}

/* The text input itself */
.search-input {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  width: 100%;
  font-size: 0.9rem;
  outline: none;
  opacity: 0;
  transition: opacity 0.2s ease 0.1s; /* fade in slightly after width */
}

/* The icon button */
.search-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #333;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

/* Active state: expand form */
.search-container.active .search-form {
  width: 180px; /* adjust as desired */
}

.search-container.active .search-input {
  opacity: 1;
}

/* Optional: smooth collapse when ESC pressed or blur */
.search-form.collapsing {
  transition: width 0.2s ease, opacity 0.1s ease;
}

.nav-search-item {
  position: relative;
}

/*───────────────────────────────────────────────────────────────
  FILTER BAR
───────────────────────────────────────────────────────────────*/
.filter-bar {
  border-bottom: 1px solid #e0e0e0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}
.filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}
.filter-group button {
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.filter-group button:hover {
  background: #388E3C;
}

/* ──────────────────────────────────────────────────────────────
   MAIN CONTENT & FOOTER
────────────────────────────────────────────────────────────── */
.site-content {
  padding: 2rem 0;
  background: #f9f9f9;
}

/* Utility text alignment */
.text-center {
  text-align: center;
}

/* Footer placeholder */
.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
}

/* Job Page Footer */
.job-page__footer {
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 0;
  color: #555;
  font-size: 0.9rem;
}

.job-page__footer .footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.job-page__footer .footer-links a {
  color: #4CAF50;
  text-decoration: none;
  transition: color 0.2s;
}

.job-page__footer .footer-links a:hover {
  color: #388E3C;
}

.job-page__footer .footer-copy {
  text-align: center;
  color: #777;
}


/*────────────────────────────────────────────────────────────────────
   RESPONSIVE: tablets (<992px) and small desktops
────────────────────────────────────────────────────────────────────*/
@media (max-width: 992px) {
  /* NAVIGATION: wrap onto multiple lines */
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .main-nav li {
    flex: 1 1 auto;
    text-align: center;
  }
  .main-nav a,
  .main-nav .search-btn {
    font-size: 0.95rem;
  }
}

/*────────────────────────────────────────────────────────────────────
   RESPONSIVE: phones (<768px)
────────────────────────────────────────────────────────────────────*/
@media (max-width: 768px) {
  .header-inner {
    padding: 0.5rem 1rem;
  }
  .logo img { height: 32px; }

  /* Nav items: center and wrap */
  .main-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  .main-nav li {
    width: auto;
  }

  /* Search morph: full-width on open */
  .search-container {
    justify-content: center;
  }
  .search-container .search-form {
    width: 0;
  }
  .search-container.active .search-form {
    width: calc(100% - 2.5rem); /* icon width + padding */
  }

  /* Header‐actions (login/profile/etc) center & wrap */
  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* FILTER BAR: stack filters & button */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;
  }
  .filter-group {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  .filter-group select,
  .filter-group button {
    width: 100%;
  }

  /* FOOTER LINKS: vertical list */
  .job-page__footer .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* 2) Hide desktop nav + actions on mobile */
@media (max-width: 768px) {
  .main-nav,
  .header-actions {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    margin-left: 0.5rem;
    color: #333;
    cursor: pointer;
  }
  .search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .search-form {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90vw;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    transform: scaleY(0);
    transform-origin: top center;
    z-index: 1200;
  }
  .search-container.active .search-form {
    transform: scaleY(1);
  }
  .search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
  }
  .search-form button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #4CAF50;
    cursor: pointer;
  }
  .search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    outline: none;
    font-size: 0.95rem;
  }
  .account-menu {
    width: 100%; /* make the trigger area full width if desired */
  }
  .drop-list {
    position: static;
    transform: none;
    opacity: 1;
    box-shadow: none;
    border-radius: 0;
    background: #f9f9f9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    min-width: auto;
  }
  .drop-list.show {
    max-height: 500px;
  }
  .drop-list li a {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
  }
  .drop-list li.divider {
    display: none;
  }
}

/* 3) Mobile menu panel */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1100;
}
.mobile-nav.show {
  display: block;
}

/* 4) Style the lists inside */
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem;
}
.mobile-nav ul + ul {
  border-top: 1px solid #e0e0e0;
  margin-top: 0.5rem;
}
.mobile-nav li {
  margin-bottom: 0.5rem;
}
.mobile-nav li:last-child {
  margin-bottom: 0;
}
.mobile-nav a {
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mobile-nav a:hover {
  color: #4CAF50;
}

/* 5) Ensure search + hamburger stay inline */
.nav-actions {
  display: flex;
  align-items: center;
}

.mobile-nav-toggle {
  display: none;
}
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
}

/* hide both panels by default */
.mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 1100;
  overflow: auto;
  max-height: 70vh;
}

/* show on .show */
.mobile-panel.show {
  display: block;
}

/* account panel slides in from right */
@media (max-width: 768px) {
  .mobile-account-panel {
    position: absolute;
    top: 100%;
    bottom: auto;
    width: 80%;
    max-width: 300px;
    right: -100%;
    left: auto;
    max-height: calc(100vh - 3.5rem);
    overflow-y: auto;
    transition: right 0.3s ease;
  }
  .mobile-account-panel.show {
    right: 0;
  }
}

/* style both lists */
.mobile-panel ul {
  list-style: none;
  margin: 0;
  padding: 1rem;
}
.mobile-panel li + li {
  margin-top: 0.5rem;
}
.mobile-panel a {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mobile-panel a:hover {
  color: #4CAF50;
}

.mobile-account-nav .mobile-nav-section {
  margin-top: 1rem;
  padding: 0.5rem 0;
  font-weight: bold;
  color: #4CAF50;
  border-top: 1px solid #eee;
}

/* profile toggle hidden on desktop, visible on phone */
.mobile-account-toggle {
  display: none;
}
@media (max-width: 768px) {
  .mobile-nav-toggle,
  .mobile-account-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    margin-left: 0.5rem;
    color: #333;
    cursor: pointer;
  }
}
