/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #8a9a3c;
  --color-primary-dark: #6b7a2e;
  --color-primary-light: #f2f5e8;
  --color-accent: #b33a1e;
  --color-accent-light: #fdf0ec;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --max-width: 1120px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #8b2a12; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img { height: 40px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 0; }

.nav-item { position: relative; }

.nav-item > a {
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s;
  display: block;
}

.nav-item > a:hover,
.nav-item > a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 200;
  list-style: none;
}

.nav-dropdown.nav-dropdown-wide {
  min-width: 480px;
  columns: 2;
  column-gap: 0;
}

.nav-item:hover > .nav-dropdown { display: block; }

.nav-dropdown li a {
  display: block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text);
  transition: all 0.15s;
  break-inside: avoid;
}

.nav-dropdown li a:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.nav-dropdown .dropdown-header {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  break-inside: avoid;
}

.nav-dropdown .dropdown-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 0.35rem 0;
}

.nav-dropdown .dropdown-viewall {
  border-top: 1px solid var(--color-border-light);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.nav-dropdown .dropdown-viewall a {
  font-weight: 600;
  color: var(--color-accent);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle svg { width: 24px; height: 24px; color: var(--color-text); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #3d4a1a 0%, #6b7a2e 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-sm { padding: 2.5rem 0; }
.hero-sm h1 { font-size: 2rem; margin-bottom: 0.5rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.breadcrumbs a { color: var(--color-text-light); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs span { margin: 0 0.4rem; }

/* ===== Content ===== */
.content-section { padding: 3rem 0; }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.main-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--color-text);
}

.main-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-text);
}

.main-content p { margin-bottom: 1rem; }

.main-content ul, .main-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.main-content li {
  margin-bottom: 0.4rem;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s;
  background: var(--color-bg);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card h3 a { color: var(--color-text); }
.card h3 a:hover { color: var(--color-primary); }

.card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  margin-bottom: 0.75rem;
}

/* ===== Sidebar ===== */
.sidebar { position: sticky; top: 80px; }

.sidebar-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.sidebar-block h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.sidebar-block ul { list-style: none; }

.sidebar-block li { margin-bottom: 0.4rem; }

.sidebar-block a {
  font-size: 0.9rem;
  color: var(--color-text);
  display: block;
  padding: 0.3rem 0;
}

.sidebar-block a:hover { color: var(--color-primary); }

/* ===== Job Description Page ===== */
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.job-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.job-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
}

.job-meta-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ===== Key Info Box ===== */
.info-box {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.info-box p { margin-bottom: 0; font-size: 0.95rem; }

/* ===== Table ===== */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.content-table th,
.content-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.content-table th {
  font-weight: 600;
  background: var(--color-bg-alt);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-light);
}

.content-table tr:hover td { background: var(--color-bg-alt); }

/* ===== Category Section (Homepage) ===== */
.category-section { margin-bottom: 2.5rem; }

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-primary-light);
}

.category-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.category-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.job-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  font-size: 0.875rem;
  color: var(--color-text);
  transition: all 0.2s;
}

.job-link:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== Footer ===== */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col p { font-size: 0.875rem; line-height: 1.6; }

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: #9ca3af;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 2.5rem 0; }
  .hero-sm { padding: 1.75rem 0; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open { display: flex; }

  .nav-toggle { display: block; }

  .nav-dropdown { position: static; box-shadow: none; border: none; min-width: 0; padding-left: 0.75rem; columns: 1 !important; }
  .nav-dropdown.nav-dropdown-wide { min-width: 0; }
  .nav-item:hover > .nav-dropdown { display: none; }
  .nav-item.mobile-open > .nav-dropdown { display: block; }

  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .job-meta { flex-direction: column; gap: 0.75rem; }
}
