/* CareerHyre - shared stylesheet. Mobile-first. */

:root {
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e3a8a;
  --color-accent: #f97316;
  --color-accent-dark: #c2410c;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --radius: 10px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; color: var(--color-primary-dark); }
h1 { font-size: 1.6rem; margin: 1.25rem 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}
.logo span { color: var(--color-accent); }
.site-nav a {
  margin-left: 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb span { color: var(--color-text); }

/* Tier badge */
.tier-badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

/* Job summary + description cards - stacked, full width */
.job-details-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}
.job-summary-card, .job-description-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0;
  width: 100%;
}
.job-summary-card h2, .job-description-card h2 { margin-top: 0; }
.job-summary-card { border-top: 3px solid var(--color-accent); }
.job-description-card { border-top: 3px solid var(--color-primary); }

.salary-highlight {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 1rem;
}
.salary-highlight span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.85rem;
  background: var(--color-bg);
  border-radius: 8px;
}
.summary-label { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.summary-value { font-weight: 600; }

.hiring-line {
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-top: 0;
}

/* Related jobs (internal links) */
.related-jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.related-jobs-grid h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--color-border); }
.related-list li:last-child { border-bottom: none; }

@media (min-width: 500px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .related-jobs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 700px) {
  .salary-highlight { font-size: 1.75rem; }
}

.skills-list, .role-list { padding-left: 1.25rem; }
.role-list { list-style: none; padding-left: 0; }
.role-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.salary-hint { color: var(--color-text-muted); font-size: 0.85rem; }

.sector-block { margin-bottom: 1.5rem; }

/* Apply button */
.apply-btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0.5rem 0 1rem;
}
.apply-btn:hover { background: var(--color-accent-dark); }

/* FAQ */
.faq-list { margin: 0.5rem 0 1.5rem; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}
.faq-item h3 { font-size: 1rem; margin: 0 0 0.25rem; color: var(--color-text); }
.faq-item p { margin: 0; color: var(--color-text-muted); }

.closing-cta { font-weight: 600; }

/* Local language card */
.lang-card {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
}
.lang-card-label { font-weight: 700; margin: 0 0 0.25rem; color: var(--color-accent-dark); }
.lang-card-phrase { margin: 0 0 0.5rem; font-size: 1.05rem; }
.lang-card-phrase:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: #cbd5e1;
  margin-top: 3rem;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}
.site-footer a { color: #fff; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
}
.modal-box iframe {
  width: 100%;
  height: 70vh;
  border: none;
}

/* Homepage specific */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 2rem; margin-bottom: 0.5rem; }
.hero p.subtitle { color: #dbeafe; max-width: 600px; margin: 0 auto 1.75rem; }

/* Search bar */
.search-form {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.7rem 1.1rem;
  font-size: 1rem;
  border-radius: 999px;
  color: var(--color-text);
}
.search-btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.search-btn:hover { background: var(--color-accent-dark); }
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  text-align: left;
  overflow: hidden;
  display: none;
  z-index: 30;
  max-height: 340px;
  overflow-y: auto;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  font-weight: 500;
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--color-bg); text-decoration: none; }
.search-results .result-meta { display: block; font-size: 0.8rem; color: var(--color-text-muted); font-weight: 400; }
.search-results .no-results { padding: 0.75rem 1rem; color: var(--color-text-muted); }

/* Stats strip */
.stats-strip {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.stats-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat-item .stat-number { display: block; font-size: 1.5rem; font-weight: 700; color: var(--color-primary-dark); }
.stat-item .stat-label { font-size: 0.85rem; color: var(--color-text-muted); }

/* Section headings on homepage */
.section-heading { text-align: center; margin-bottom: 0.25rem; }
.section-subheading { text-align: center; color: var(--color-text-muted); margin: 0 0 1.5rem; }

/* Sector cards */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.sector-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--color-text);
}
.sector-card:hover { border-color: var(--color-primary); text-decoration: none; }
.sector-card .sector-icon { font-size: 1.6rem; }
.sector-card h3 { margin: 0.5rem 0 0.25rem; font-size: 1.05rem; }
.sector-card p { margin: 0; color: var(--color-text-muted); font-size: 0.85rem; }

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.step-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step-item h3 { margin: 0.25rem 0; font-size: 1rem; }
.step-item p { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.grid a {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  color: var(--color-text);
  font-weight: 600;
}
.grid a:hover { border-color: var(--color-primary); text-decoration: none; }

/* Improved footer */
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 1rem;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.35rem; }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 0.8rem;
}

@media (min-width: 700px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.4rem; }
  .header-inner { padding-top: 1rem; padding-bottom: 1rem; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
