/* ============================================================
   TalentBridge — jobs.css (self-contained, full-detail cards)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --teal: #1A5F5F;
  --teal-light: #238B8B;
  --teal-dark: #0E3D3D;
  --teal-soft: #E8F3F3;

  --ink: #0F1F1F;
  --ink-soft: #43595A;
  --line: #D6E4E4;
  --bg: #FFFFFF;
  --bg-alt: #F6FAFA;
  --accent: #E9B44C;
  --accent-ink: #3A2A08;
  --danger: #C0392B;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(14, 61, 61, 0.08);
  --shadow-lg: 0 18px 50px rgba(14, 61, 61, 0.16);
  --maxw: 1140px;
  --gutter: 20px;
  --header-h: 68px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6px, 3.5vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(40px, 6vw, 72px); }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 95, 95, 0.28);
}
.btn-primary:hover { background: var(--teal-dark); }

.btn-outline {
  background: transparent;
  color: var(--teal-dark);
  border: 2px solid var(--teal);
}
.btn-outline:hover { background: var(--teal-soft); }

.btn-light {
  background: #fff;
  color: var(--teal-dark);
}
.btn-light:hover { background: var(--teal-soft); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--teal-dark);
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.logo-text { letter-spacing: -0.02em; }

.logo-img {
  display: block;
  height: 55px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 10px;
  padding: 0 10px;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--teal-dark);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.primary-nav { display: flex; align-items: center; gap: 24px; }
.nav-list { display: flex; align-items: center; gap: 6px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-soft);
  transition: color .15s, background .15s;
}
.nav-link:hover,
.nav-link.active { color: var(--teal-dark); background: var(--teal-soft); }

.has-dropdown { position: relative; }
.caret {
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.dropdown-toggle[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-2px); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.dropdown.open { display: flex; }
.dropdown a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.dropdown a:hover { background: var(--teal-soft); color: var(--teal-dark); }

.nav-cta { display: inline-flex; }

/* ---------- Page hero ---------- */
.page-hero {
  background:
    radial-gradient(900px 420px at 85% -10%, var(--teal-soft) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  padding-block: clamp(48px, 7vw, 88px) clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner { max-width: 760px; }
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a { color: var(--teal); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero-sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  margin-top: 16px;
  max-width: 60ch;
}
.jobs-count {
  margin-top: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-dark);
}

/* ---------- Filters ---------- */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.filters-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  padding-block: 16px;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.filter-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.input-wrap { position: relative; }
.filters input[type="search"],
.filters select {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.filters select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2343595A' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.filters input[type="search"]:focus,
.filters select:focus {
  outline: none;
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(35, 139, 139, 0.15);
}
.filters input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  transition: background .15s, color .15s;
}
.clear-btn:hover { background: var(--teal-soft); color: var(--teal-dark); }

.filter-reset {
  align-self: end;
  padding: 11px 20px;
  min-height: 44px;
  white-space: nowrap;
}

/* ---------- Jobs grid ---------- */
.jobs-section { background: var(--bg); }
.job-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

/* ============================================================
   JOB CARD — full detail
   ============================================================ */
.job-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--teal-light);
}
.job-card .job-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.job-card h3 {
  color: var(--teal-dark);
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Meta row: location + salary */
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-salary { font-weight: 700; color: var(--teal); }

/* Section labels inside the card */
.job-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 6px;
  display: block;
}
.job-section {
  margin-bottom: 14px;
}
.job-section:last-of-type {
  margin-bottom: 0;
}

/* JD text */
.job-description {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 0;
}

/* Requirements list */
.job-requirements {
  display: grid;
  gap: 5px;
  padding-left: 0;
}
.job-requirements li {
  position: relative;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.job-requirements li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-light);
  font-weight: 800;
  font-size: 0.75rem;
}

/* Footer: closing date + apply */
.job-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.job-closing {
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.job-closing strong {
  color: var(--teal-dark);
  font-weight: 700;
}
.job-closing.urgent strong { color: var(--danger); }
.job-closing.closed strong { color: var(--ink-soft); text-decoration: line-through; }

.job-apply {
  width: 100%;
}
.job-apply .btn {
  width: 100%;
  padding: 12px 18px;
  min-height: 44px;
  font-size: 0.92rem;
}
.job-apply .btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--ink-soft);
  box-shadow: none;
  pointer-events: none;
}

/* Small print under apply */
.job-apply-note {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 6px;
  opacity: 0.85;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  max-width: 520px;
  margin-inline: auto;
}
.empty-icon { font-size: 2.4rem; margin-bottom: 14px; }
.empty-state h3 { color: var(--teal-dark); margin-bottom: 8px; }
.empty-state p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }
.empty-state a { color: var(--teal); font-weight: 600; }

/* ---------- Final CTA ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  color: #fff;
  text-align: center;
}
.cta-inner h2 { color: #fff; }
.cta-inner p { color: rgba(255,255,255,0.85); margin-top: 12px; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}
.cta-final .btn-primary { background: #fff; color: var(--teal-dark); box-shadow: none; }
.cta-final .btn-primary:hover { background: var(--teal-soft); }
.cta-final .btn-light { background: rgba(255,255,255,0.15); color: #fff; }
.cta-final .btn-light:hover { background: rgba(255,255,255,0.25); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.75);
  padding-top: 56px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand .logo-mark { background: var(--teal-light); }
.footer-brand p { font-size: 0.9rem; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 0.9rem; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
}
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .filters-inner {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .filters-inner .filter-field:first-child { grid-column: 1 / -1; }
  .filter-reset { grid-column: 1 / -1; justify-self: start; }
  .job-card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px var(--gutter) 28px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform .3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .primary-nav.open { transform: translateY(0); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { padding: 14px 12px; width: 100%; font-size: 1rem; }
  .nav-cta { margin-top: 12px; width: 100%; }

  .has-dropdown { position: static; }
  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--teal-soft);
    border-radius: 0;
    margin-left: 12px;
    padding-left: 8px;
    background: transparent;
  }
  .dropdown a { padding: 10px 12px; }
}

@media (max-width: 600px) {
  .filters-inner { grid-template-columns: 1fr; }
  .filters-inner .filter-field:first-child { grid-column: auto; }
  .filter-reset { grid-column: auto; width: 100%; }
  .job-card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-actions .btn { flex: 1 1 100%; }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--teal-light);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
/* ============================================================
   Floating WhatsApp button
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;                /* WhatsApp green */
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35),
              0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background: #1ebe5b;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45),
              0 6px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-float:active {
  transform: translateY(-1px) scale(0.98);
}

.whatsapp-float:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* Tooltip that slides out to the left on hover */
.whatsapp-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  background: var(--teal-dark, #0E3D3D);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--teal-dark, #0E3D3D);
  border-radius: 2px;
}

.whatsapp-float:hover .whatsapp-tooltip,
.whatsapp-float:focus-visible .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: keep it slightly smaller and out of the way */
@media (max-width: 600px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 16px;
    right: 16px;
  }
  .whatsapp-icon { width: 28px; height: 28px; }
  .whatsapp-tooltip { display: none; }   /* tooltips don't work well on touch */
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float,
  .whatsapp-tooltip { transition: none; }
}