@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:wght@500;600&display=swap');

:root {
  --ink: #142033;
  --ink-soft: #3c4a63;
  --paper: #FAF8F3;
  --paper-alt: #F1ECE0;
  --amber: #E8A23D;
  --amber-dark: #C77F1F;
  --teal: #2F6F6D;
  --line: #E1DACB;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(20, 32, 51, 0.06);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.2;
}
h1 { font-size: 2.4rem; font-weight: 600; }
h2 { font-size: 1.7rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
button, .btn-apply {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.logo img { height: 42px; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--amber-dark); text-decoration: none; }
.nav-toggle { display: none; background: none; font-size: 1.5rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, #223559 100%);
  color: var(--white);
  padding: 68px 0 84px;
  text-align: left;
}
.hero h1 { color: var(--white); font-size: 2.8rem; max-width: 640px; }
.hero p { color: #cfd8ea; font-size: 1.1rem; max-width: 560px; }
.search-form {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 720px;
  margin-top: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.search-form input, .search-form select {
  border: none;
  padding: 16px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
}
.search-form input[type=text] { flex: 1.4; border-right: 1px solid var(--line); }
.search-form select { flex: 1; border-right: 1px solid var(--line); background: var(--white); }
.search-form button {
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  padding: 0 30px;
  transition: background 0.15s;
}
.search-form button:hover { background: var(--amber-dark); color: var(--white); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--paper-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.see-all { font-weight: 600; }
.page-header { background: var(--paper-alt); padding: 40px 0; border-bottom: 1px solid var(--line); }
.page-header h1 { margin-bottom: 6px; }

/* ---------- Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.category-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.category-card:hover { border-color: var(--amber); transform: translateY(-2px); text-decoration: none; }

/* ---------- Job cards ---------- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.job-list { display: flex; flex-direction: column; gap: 14px; }
.job-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.job-card:hover { box-shadow: var(--shadow); border-color: #d2c9b3; }
.job-card-link { display: flex; gap: 14px; padding: 18px; color: inherit; }
.job-card-link:hover { text-decoration: none; }
.job-card-logo img { width: 52px; height: 52px; object-fit: contain; border-radius: 4px; border: 1px solid var(--line); background: var(--white); }
.job-card-logo-placeholder {
  width: 52px; height: 52px; border-radius: 4px; background: var(--teal); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem;
}
.job-card-logo-placeholder.large { width: 76px; height: 76px; font-size: 2rem; }
.job-card-body h3 { font-size: 1.05rem; margin-bottom: 2px; }
.job-card-company { color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; font-size: 0.92rem; }
.job-card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--ink-soft); }
.job-card-tag {
  position: absolute; top: 14px; right: 16px;
  background: var(--paper-alt); border: 1px solid var(--line); border-radius: 20px;
  padding: 3px 12px; font-size: 0.75rem; font-weight: 700; color: var(--teal);
}

/* ---------- Listing layout & filters ---------- */
.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 90px; }
.filters label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); }
.filters input, .filters select { width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; font-family: inherit; }
.filters button { width: 100%; background: var(--ink); color: var(--white); padding: 11px; border-radius: 4px; font-weight: 700; margin-top: 4px; }
.filters button:hover { background: var(--amber-dark); }
.clear-filters { display: block; text-align: center; margin-top: 10px; font-size: 0.85rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); }
.pagination a.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination a:hover { text-decoration: none; border-color: var(--amber); }

/* ---------- Single Job ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin: 24px 0; }
.job-single-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 30px; }
.job-single-logo img { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.job-single-company { color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }
.job-single-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.job-description { line-height: 1.7; }
.job-description ul { padding-left: 20px; }
.job-facts { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.job-facts ul { list-style: none; padding: 0; margin: 0; }
.job-facts li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.job-facts li:last-child { border-bottom: none; }
.btn-apply {
  display: block; text-align: center; background: var(--amber); color: var(--ink);
  padding: 15px; border-radius: var(--radius); font-weight: 700; margin-bottom: 16px;
}
.btn-apply:hover { background: var(--amber-dark); color: var(--white); text-decoration: none; }
.apply-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.apply-form input, .apply-form textarea { width: 100%; margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; font-family: inherit; }
.apply-form button { width: 100%; background: var(--ink); color: var(--white); padding: 12px; border-radius: 4px; font-weight: 700; }
.apply-form button:hover { background: var(--amber-dark); }
.file-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.company-website { margin-top: 12px; font-weight: 600; }
.related-jobs { margin-top: 50px; }
.alert { padding: 14px 18px; border-radius: 4px; margin-bottom: 20px; font-weight: 600; }
.alert-warning { background: #FCEED9; color: #8A5A00; }
.alert-success { background: #DEF2EA; color: #1B6B4E; }
.alert-error { background: #FBE1DF; color: #9E2B25; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; display: block; }
.post-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.post-card img { width: 100%; height: 170px; object-fit: cover; }
.post-card-body { padding: 16px 18px; }
.post-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); font-weight: 700; }
.blog-layout { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
.blog-sidebar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.blog-sidebar ul { list-style: none; padding: 0; margin: 0; }
.blog-sidebar li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.single-post { padding: 10px 0 40px; }
.single-post h1 { max-width: 760px; }
.post-meta { color: var(--ink-soft); margin-bottom: 20px; }
.post-hero { border-radius: var(--radius); margin-bottom: 24px; max-height: 420px; object-fit: cover; width: 100%; }
.post-content { max-width: 760px; line-height: 1.75; }
.post-content img { border-radius: var(--radius); margin: 16px 0; }
.post-content h2 { margin-top: 1.6em; }

/* Table of contents */
.toc-box { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; max-width: 760px; margin: 0 0 28px; }
.toc-title { font-size: 1rem; margin-bottom: 10px; }
.toc-list, .toc-sublist { margin: 0; padding-left: 20px; }
.toc-list { list-style: decimal; }
.toc-sublist { list-style: lower-alpha; margin-top: 4px; }
.toc-list li { margin-bottom: 6px; font-size: 0.92rem; }

/* Ad slots */
.ad-slot { text-align: center; margin: 20px 0; }
.ad-slot:empty { display: none; }

/* ---------- Static page ---------- */
.static-page { padding: 10px 0 50px; }
.static-page .post-content { max-width: 820px; }
.contact-block { max-width: 480px; margin-top: 30px; }
.contact-form input, .contact-form textarea { width: 100%; margin-bottom: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; font-family: inherit; }
.contact-form button { background: var(--ink); color: var(--white); padding: 12px 24px; border-radius: 4px; font-weight: 700; }
.contact-form button:hover { background: var(--amber-dark); }

.not-found { text-align: center; padding: 100px 0; }
.not-found .btn-apply { display: inline-block; max-width: 220px; margin: 20px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d2e3; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding: 50px 24px 30px; }
.footer-logo { height: 34px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-col h4 { color: var(--white); font-family: 'Manrope'; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #c9d2e3; }
.footer-col a:hover { color: var(--amber); }
.alert-form { display: flex; }
.alert-form input { flex: 1; padding: 10px; border: none; border-radius: 4px 0 0 4px; font-family: inherit; }
.alert-form button { background: var(--amber); color: var(--ink); padding: 10px 16px; border-radius: 0 4px 4px 0; font-weight: 700; }
.footer-bottom { border-top: 1px solid #2a3a5c; padding: 18px 24px; font-size: 0.85rem; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .listing-layout, .job-single-layout, .blog-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-inner { position: relative; }
  .nav-toggle { display: block; }
  .main-nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 16px 24px; border-bottom: 1px solid var(--line); gap: 14px; }
  .main-nav ul.open { display: flex; }
  .hero h1 { font-size: 2rem; }
  .search-form { flex-direction: column; }
  .search-form input, .search-form select { border-right: none; border-bottom: 1px solid var(--line); }
  .job-single-header { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
}
