/* ==========================================================================
   MyJobAlly — Homepage styles
   ========================================================================== */

/* ---- Header / Nav ---- */
.site-header {
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
}
.logo .logo-my { color: var(--brand-blue); }
.logo .logo-jobally { color: var(--brand-pink); }
.logo .logo-tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: -4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  justify-content: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a:hover { color: var(--brand-pink); }
.nav-item.active > a { color: var(--brand-pink); font-weight: 600; }
.nav-item-home .icon { width: 20px; height: 20px; }
.nav-item-home-label { display: none; }

.nav-item.has-dropdown { position: relative; }
.dropdown-caret { font-size: 10px; margin-left: 2px; }
/* Added on request — Jobs/Users/News and Resource's parent labels no
   longer navigate on click (see includes/header.php's own comment,
   onclick="return false;" on those three specific links), so the
   pointer cursor that implies "this does something" is misleading now.
   Deliberately scoped to just this class, not every .has-dropdown > a
   — Post a Job's own parent link still genuinely navigates and keeps
   its normal pointer cursor. */
.nav-item-no-click-parent > a { cursor: default; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  min-width: 200px;
  padding: 8px;
  display: none;
  /* No margin-top here on purpose — see the ::before bridge below for
     why. A margin here would leave a real, unhoverable gap between the
     nav link and the menu; the instant the cursor crosses it, :hover is
     lost on both the nav item AND the not-yet-reached menu, and the
     menu disappears before anyone can move the mouse down into it. */
}
/* Invisible hover bridge — fills the visual 10px gap (recreated below,
   this element sits where the old margin-top used to be) so the
   hoverable area is continuous from the nav link all the way to the
   menu itself, instead of having a dead zone in between. */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
  display: block;
  margin-top: 10px;
}
.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 400;
}
.dropdown-menu a:hover { background: var(--brand-pink-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-search-toggle-checkbox { display: none; }

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-icon-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-dark);
}
.header-search-icon-btn:hover { background: var(--brand-pink-soft); color: var(--brand-pink); }
.header-search-icon-btn .icon { width: 19px; height: 19px; }

.header-search-form {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  padding: 8px;
  gap: 6px;
  z-index: 101;
}
.header-search-toggle-checkbox:checked ~ .header-inner .header-search-form {
  display: flex;
}
.header-search-form input[type="text"] {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  width: 220px;
}
.header-search-form input[type="text"]:focus { outline: 2px solid var(--brand-pink); outline-offset: -1px; }
.header-search-form button {
  background: var(--brand-pink);
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.header-search-form .icon { width: 16px; height: 16px; }

.link-signin {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-pink);
}

.btn-signup {
  background: var(--brand-pink);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}

/* Push notification subscribe button, added on request — hidden by
   default (both server-side for logged-in employers, and via the
   [hidden] attribute otherwise) until assets/js/push-subscribe.js
   confirms the browser supports this and the visitor isn't already
   subscribed. */
.push-subscribe-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-navy);
  cursor: pointer;
}
.push-subscribe-btn[hidden] { display: none; }
.push-subscribe-btn:hover { border-color: var(--brand-pink); color: var(--brand-pink); }
.push-subscribe-btn .icon { width: 17px; height: 17px; }
@media (max-width: 900px) {
  .push-subscribe-btn-label { display: none; }
  .push-subscribe-btn { padding: 8px; }
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.hero h1 {
  font-size: 60px;
  font-weight: 900;
  color: var(--brand-pink-light);
  margin-bottom: var(--space-sm);
}

.hero-subtext {
  font-size: 22px;
  color: var(--text-body);
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

/* ---- Search bar ---- */
.job-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  max-width: 940px;
  margin: 0 auto;
  padding: 8px;
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-right: 1px solid var(--border-light);
}
.search-field .icon { width: 20px; height: 20px; }
.search-submit .icon { width: 20px; height: 20px; }
.search-field:last-of-type { border-right: none; }

.search-field input,
.search-field select {
  border: none;
  outline: none;
  width: 100%;
  font-size: 15px;
  color: var(--text-dark);
  background: transparent;
}

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

.search-submit {
  background: var(--brand-pink);
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.search-submit:hover { box-shadow: 0 8px 20px rgba(247, 53, 106, 0.3); }

.popular-searches {
  margin-top: var(--space-md);
  font-size: 16px;
  color: var(--text-muted);
}
.popular-searches a {
  color: #4E7FE8;
  margin: 0 4px;
}
.popular-searches a:hover { text-decoration: underline; }

/* ---- Section heading pattern (reused) ---- */
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-lg);
}
.section-heading h2 {
  font-size: 30px;
  margin-bottom: var(--space-xs);
}
.section-heading p {
  color: var(--text-body);
  font-size: 17px;
}
.section-heading.eyebrow-pink h2 {
  color: var(--brand-pink);
  font-size: 22px;
  letter-spacing: 0.02em;
}

/* ---- Choose Your Path ---- */
.path-section { padding: var(--space-xl) 0; }

.path-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.path-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.path-card:hover {
  border-color: #b5b5b5; /* Slightly darker border */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20); /* Light shadow */
  transform: translateY(-2px); /* Optional subtle lift */
}

.path-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--brand-pink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  font-size: 28px;
}

.path-card h3 { font-size: 22px; margin-bottom: var(--space-xs); }
.path-card > p { font-size: 15px; margin-bottom: var(--space-md); }

.path-feature-list {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-md);
}
.path-feature-list li {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-sm);
}
.path-feature-icon {
  color: var(--brand-pink);
  flex-shrink: 0;
  font-size: 16px;
  margin-top: 3px;
}
.path-feature-list strong {
  display: block;
  color: var(--text-dark);
  font-size: 16px;
}
.path-feature-list span {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ---- Stats ---- */
.stats-section {
  padding: var(--space-xl) 0;
  background: var(--bg-alt);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--brand-pink);
}
.stat-label {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- CTA banner ---- */
.cta-banner {
  background: var(--brand-pink);
  color: #fff;
  text-align: center;
  padding: var(--space-xl) 0;
}
.cta-banner h2 {
  color: #fff;
  font-size: 35px;
  margin-bottom: var(--space-sm);
}
.cta-banner p {
  max-width: 800px;
  font-size: 22px;
  margin: 0 auto var(--space-md);
  opacity: 0.92;
}
.cta-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}
.cta-actions .btn-primary {
  background: #fff;
  color: var(--brand-pink);
}

/* ---- Resource center (blog preview grid) ---- */
.resource-section { padding: var(--space-xl) 0; }

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-lg);
}

.resource-card {
  display: flex;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.resource-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-alt);
}

.resource-date {
  text-align: center;
  min-width: 46px;
}
.resource-date .day {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-pink);
  line-height: 1;
}
.resource-date .month {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.resource-content h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.resource-content p {
  font-size: 15px;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-lg);
}
.pagination a, .pagination span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-body);
  background: var(--bg-alt);
}
.pagination a.active {
  background: var(--brand-pink);
  color: #fff;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--brand-navy);
  color: #C4C9D0;
  padding-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: var(--space-sm);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; font-size: 15px; }
.footer-col a:hover { color: #fff; }

.footer-about p { font-size: 15px; margin-bottom: var(--space-sm); line-height: 1.7; }
.footer-contact { font-size: 15px; margin-bottom: 8px; display: flex; gap: 8px; }

.newsletter-form {
  display: flex;
  border-bottom: 1px solid #3A4552;
  margin-bottom: var(--space-md);
}
.newsletter-form input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 0;
  flex: 1;
  outline: none;
}
.newsletter-form input::placeholder { color: #6B7280; }
.newsletter-form button {
  background: none;
  border: none;
  color: var(--brand-pink);
  cursor: pointer;
  font-size: 18px;
}

.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2E3947;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.social-icons a .icon { width: 16px; height: 16px; }

/* ---- Location selector: State + LGA cascading dropdown ---- */
.location-select-group {
  display: flex;
  gap: 8px;
  flex: 1;
}
.location-select-group select {
  flex: 1;
  min-width: 0;
}
.location-select-group select:disabled {
  color: var(--text-muted);
  background: var(--bg-alt);
  cursor: not-allowed;
}
.social-icons a:hover { background: var(--brand-pink); }

.footer-bottom {
  border-top: 1px solid #2E3947;
  padding: var(--space-sm) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-bottom a { color: #C4C9D0; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .legal-links a { margin-right: var(--space-sm); }
.footer-bottom .legal-links a:first-child { color: var(--brand-pink); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .path-cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .job-search-form { flex-direction: column; }
  .search-field { border-right: none; border-bottom: 1px solid var(--border-light); width: 100%; }
  .hero h1 { font-size: 32px; }

  .header-search-form input[type="text"] { width: 55vw; max-width: 220px; }

  /* ---- Mobile nav (CSS-only toggle, no JS) ---- */
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    order: 3;
  }
  .mobile-nav-toggle .icon { width: 22px; height: 22px; }
  .mobile-nav-toggle-checkbox { display: none; }

  .header-inner { flex-wrap: wrap; }
  .main-nav {
    display: block;
    order: 4;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .mobile-nav-toggle-checkbox:checked ~ .header-inner .main-nav {
    max-height: 600px;
    margin-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
  }
  .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .main-nav .nav-item { width: 100%; border-bottom: 1px solid var(--border-light); }
  .main-nav a { padding: 14px 4px; width: 100%; }
  .nav-item-home-label { display: inline; }
  .nav-item-home .icon { display: none; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    display: block;
    margin-top: 0;
    padding-left: var(--space-md);
  }
  .nav-item.has-dropdown .dropdown-menu { display: none; }
  .nav-item.has-dropdown:hover .dropdown-menu,
  .nav-item.has-dropdown:focus-within .dropdown-menu { display: block; }

  .header-actions { order: 2; margin-left: auto; }
  .logo { order: 1; }
}
@media (min-width: 901px) {
  .mobile-nav-toggle, .mobile-nav-toggle-checkbox { display: none; }
}
