/*--------------------------------------------------
                common for all pages:
--------------------------------------------------*/

:root {
  --ink: #2B2D31;
  --ink-soft: #55575C;
  --paper: #ECEDEE;
  --paper-raised: #F7F7F8;
  --line: #CFD0D3;
  --accent: #2B2D31;
  --accent-soft: #FFF1C7;
  --cta: #FFC93C;
  --cta-hover: #F2B71F;
  --cta-ink: #2B2D31;
  --mark: #FFC93C;
  --focus: #2B2D31;
  --text-main: #2B2D31;
  --text-muted: #55575C;
  --border-color: #CFD0D3;
  --card-bg: #F7F7F8;
  --footer-bg: #D9DADC;
  --primary: #2B2D31;
  --radius: 6px;                      /* one radius for the whole site */
  --font-heading: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 73px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-bottom-color: var(--line);
  background: var(--paper);
}

.header-inner {
  padding: 0 24px;
  display: flex;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: space-between; 
  width: 100%;
  gap: 1.5rem; /* Ensures breathing room between logo, search, and toggle */
}

/* Allows search bar to scale cleanly on pages where it exists */
.header-inner > .search-bar-container {
  flex: 1;
  max-width: 38rem;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0; /* Adjusts spacing between the green H and eyst */
  text-decoration: none;
}

.logo-icon {
  height: 40px; /* Scales the green H cleanly */
  width: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-stretch: 112%;
  color: var(--ink);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--accent-soft);
}

.icon-moon { display: none; }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

[data-theme="dark"] {
  --ink: #ECEDEE;
  --ink-soft: #B4B6BA;
  --paper: #1E1F22;
  --paper-raised: #2B2D31;
  --line: #3A3C40;
  --accent: #ECEDEE;
  --accent-soft: #3A3424;
  --cta: #FFC93C;
  --cta-hover: #FFD466;
  --cta-ink: #2B2D31;
  --mark: #FFC93C;
  --focus: #FFC93C;
  --text-main: #ECEDEE;
  --text-muted: #B4B6BA;
  --border-color: #3A3C40;
  --card-bg: #2B2D31;
  --footer-bg: #26282C;
  --primary: #ECEDEE;
}

[data-theme="dark"] body {
  color: var(--text-main);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.fact-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}
.fact-link:hover {
  text-decoration: underline;
}



/*--------------------------------------------------
        common between list and hubpage
--------------------------------------------------*/

.job-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink);
}

.job-company-line {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.company-name {
  font-weight: 600;
  color: var(--ink);
}

.dot {
  margin: 0 8px;
  color: var(--line);
}

.job-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.pay-pill {
  background: var(--ink);
  color: var(--paper-raised);
}

.job-description h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0 0 16px;
}

.description-body {
  white-space: pre-line;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.sidebar-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}

.sidebar-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0 0 18px;
}

.company-facts {
  margin: 0 0 18px;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-row dt {
  color: var(--ink-soft);
}

.fact-row dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: var(--ink);
}
.meta-pill-muted {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-weight: 500;
}

.company-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 4px;
}

@media (max-width: 720px) {
  .listing-layout {
    grid-template-columns: 1fr;
    padding: 32px 20px 64px;
  }

  .job-sidebar {
    position: static;
  }

  .job-title {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}



/*--------------------------------------------------
        common between hubpage and homepage:
----------------------------------------------------*/

.search-bar-container {
  display: flex;
  align-items: center;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  flex: 1;
  max-width: 30rem;
  min-width: 100px;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0 0.5rem;
  color: var(--ink-soft);
}

.search-input-group input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  outline: none;
}

.search-input-group input::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

.search-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--line);
  margin: 0 0.25rem;
}

.search-submit-btn {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-ink);
  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-submit-btn:hover {
  background: var(--cta-hover);
}

.search-input-group { position: relative; }
.suggest-list {
  position: absolute; top: calc(100% + 0.75rem); left: 0;
  min-width: 16rem; max-width: 24rem; width: max-content;
  margin: 0; padding: 0.25rem; list-style: none;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: 0.375rem; box-shadow: none; z-index: 20;
}
.suggest-list[hidden] { display: none; }
.suggest-item {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0.75rem; border-radius: 0.25rem; cursor: pointer;
  color: var(--ink); font-size: 0.95rem;
}
.suggest-item:hover, .suggest-item[aria-selected="true"] { background: var(--accent-soft); }
.suggest-count { color: var(--ink-soft); font-size: 0.8rem; }


/*--------------------------------------------------
              for listing pages:
--------------------------------------------------*/

.listing-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 24px 96px;
  align-items: start;
}

.companyURL-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 3px;
  transition: background 0.15s ease;
}

.companyURL-button:hover {
  background: var(--cta-hover);
}

.companyURL-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.job-sidebar {
  position: sticky;
  top: 125px;
}

.company-link {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
  margin-bottom: 16px;
}

.company-link:hover {
  text-decoration: underline;
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
  transition: background 0.15s ease;
}

.social-icon:hover {
  background: var(--mark);
  color: var(--ink);
}

.social-icon:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.sidebar-company-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.sidebar-company-header h3 {
  margin: 0;
}

.expired-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-soft);
  border-radius: 3px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}


/*------------------------------------------------
                    for hubpages:
--------------------------------------------------*/



/* --- RESPONSIVE HUB LAYOUT --- */
.hub-container {
  display: grid;
  grid-template-columns: minmax(22rem, 28rem) 1fr; /* Fluid scaling columns */
  gap: 1.5rem;
  max-width: 90rem; /* ~1440px equivalent using rem */
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  align-items: start;
}

/* Left List Pane */
.job-list-pane {
  overflow-y: visible;
}

.list-header {
  margin-bottom: 1.25rem;
}

.list-header h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.job-cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Job Card Item - Fully Responsive & Fixes Text Clipping */
.job-card-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  text-decoration: none;
  color: var(--ink);
  height: auto; /* Ensures card expands based on content */
  min-height: 5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.job-card-item:hover {
  border-color: var(--mark);
}

.job-card-item.active {
  border: 2px solid var(--mark);
  background: var(--accent-soft);
}

.card-company-logo {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.25rem;
  flex-shrink: 0;
}

.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Allow multi-line titles with clean clamping instead of disappearing text */
.card-job-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  white-space: normal; /* Allows wrapping instead of staying on one line */
  overflow: visible;   /* Prevents cutting off extra lines */
  text-overflow: clip;
  display: block;      /* Removes line clamp restrictions so it grows freely */
  line-height: 1.35;
}

.card-company-line {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0 0 0.25rem;
}

.card-location {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.card-meta-row {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.card-meta-row .meta-pill {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}

/* --- RIGHT DETAIL PANE --- */
.job-detail-pane {
  position: sticky;
  top: 6rem; /* Responsive sticky offset based on header height */
  height: calc(100vh - 8rem);
  overflow: hidden;
}

.detailed-view-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 1.5rem;
}

/* Persistent Top Header - Fixed height control to prevent shifting boxes */
.detail-header-fixed {
  flex-shrink: 0;
  background: var(--paper-raised);
}

.detail-header-fixed .job-title {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

/* Scrollable Bottom Body */
.detail-scroll-body {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Inline Company URL Pill Button */
.company-url-pill {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-ink);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.company-url-pill:hover {
  background: var(--cta-hover);
}


/* Responsive breakpoint for smaller viewports/screens */
@media (max-width: 56rem) {
  .hub-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .job-detail-pane {
    position: static;
    height: auto;
    overflow: visible;
  }
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0.75rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.page-btn:hover {
  border-color: var(--accent);
}

.page-btn.active {
  background: var(--cta);
  color: var(--cta-ink);
  border-color: var(--cta);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--ink-soft);
  padding: 0 0.25rem;
  font-weight: 600;
}



/*--------------------------------------------------
                    for main page:
--------------------------------------------------*/

[data-theme="dark"] .footer {
  background-color: var(--footer-bg);
  border-top-color: var(--border-color);
  color: var(--text-muted);
}

[data-theme="dark"] .footer-heading {
  color: var(--ink);
}

[data-theme="dark"] .footer-list a,
[data-theme="dark"] .sub-footer-links a,
[data-theme="dark"] .legal-links a,
[data-theme="dark"] .sub-footer-legal {
  color: var(--text-muted);
}

[data-theme="dark"] .hero-logo-text {
  color: var(--text-main);
}

[data-theme="dark"] .region-select,
[data-theme="dark"] .nav-btn-text {
  color: var(--text-main);
  border-color: var(--border-color);
}
[data-theme="dark"] .region-select {
  background-color: var(--card-bg);
  color: var(--text-main);
  border-color: var(--border-color);
}


/* --- Homepage Specific Layouts --- */

.homepage-header {
  border-bottom: 1px solid var(--border-color);
}

.homepage-header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 75px;
  max-width: 1400px; 
  margin: 0 auto;
  padding: 0 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 3rem; /* Gives breathing room between logo and nav links */
}

.header-nav-right {
  display: flex;
  align-items: center;
}
.header-sub-nav .nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.header-sub-nav .nav-link.active {
  color: var(--text-main);
  border-bottom: 2px solid var(--mark);
  padding-bottom: 4px;
}

.header-divider-vertical {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

/* Region Selector Styling */
.region-select {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Header Action Buttons */
.nav-btn-text {
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px 12px;
  font-size: 0.95rem;
}

.nav-btn-action {
  background-color: var(--cta);
  color: var(--cta-ink);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-btn-action:hover {
  background-color: var(--cta-hover);
}

/* Centered Hero Section */
.hero-section-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1rem 3rem 1rem;
}

.hero-content-centered {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-brand-block {
  margin-bottom: 2.5rem;
}

.hero-logo-text {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Large Centered Search Bar Override */
.hero-search-bar-large {
  width: 100%;
  max-width: 840px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  box-shadow: none;
  margin-bottom: 1.5rem;
}

.hero-search-bar-large .search-input-group {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 10px;
  gap: 10px;
}

.hero-search-bar-large input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  width: 100%;
  color: var(--text-main);
}

.search-submit-btn-large {
  background-color: var(--cta);
  border-color: var(--cta);
  color: var(--cta-ink);
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-submit-btn-large:hover {
  opacity: 0.9;
  background-color: var(--cta-hover);
}

.primary-pill-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section with Bounded Background Image & Dark Overlay */
.hero-with-bg {
  position: relative;
  /* Radial gradient vignette (darker borders/corners) + linear darkening overlay + background image */
  background-image: 
    radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.65) 100%),
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4)),
    url('/static/images/pexels-mart-production-8885429_1.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 480px; /* Keeps it contained strictly to the top hero block */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  margin-bottom: 0;
}

/* Ensure text stays crisp and high contrast over the image */
.hero-with-bg .hero-logo-text,
.hero-with-bg .hero-tagline,
.hero-with-bg .hero-subtext {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-with-bg .hero-subtext {
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto 2.5rem auto;
}


/* Multi-Column Footer */
.footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 4rem 1.5rem 2rem 1.5rem;
  margin-top: 5rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ink);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.65rem;
}

.footer-list a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.15s;
}

.footer-list a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.sub-footer {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sub-footer-links, .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.sub-footer-links a, .legal-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.sub-footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/*--------------------------------------------------
               MOBILE RESPONSIVENESS 
--------------------------------------------------*/

/* 1. Hub Page Sizing & 780px Dual-Pane to Single-Pane Threshold */
.hub-container {
  display: grid;
  grid-template-columns: 37% 63%;
  gap: 1.5rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  align-items: start;
}

.job-card-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  text-decoration: none;
  color: var(--ink);
  height: auto;
  min-height: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* 2. Listing Page 750px Breakpoint for Company Facts */
@media (max-width: 46.875rem) { /* 750px */
  .listing-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 1rem 3rem;
  }

  .job-sidebar {
    position: static;
  }
}

/* 3. Header 2-Row Switch & Mobile Layout at 850px or lower */
@media (max-width: 53.125rem) { /* 850px */
  
  .site-header {
    height: auto;
    padding: 0.75rem 0;
  }

  /* Switch header to a 2-row Grid */
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.75rem 1rem;
    padding: 0 1rem;
    align-items: center;
  }

  /* Row 1, Left: Logo */
  .logo-brand {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 0;
  }

  /* Row 1, Right: Dark Mode Toggle anchored securely */
  .header-nav-right {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    display: flex;
    align-items: center;
  }

  /* Row 2, Full Width & Centered: Search Bar */
  .search-bar-container {
    grid-row: 2;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 0.375rem;
  }

  .search-divider {
    display: none;
  }

  .search-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.25rem 0.5rem;
  } 

  .search-input-group input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    outline: none;
  }

  .search-submit-btn,
  .search-submit-btn-large {
    width: 100%;
    padding: 0.75rem;
    text-align: center;
  }

  /* Footer Reflow */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* 4. Hub Page Switch to Single Pane at 780px or lower */
@media (max-width: 48.75rem) { /* 780px */
  .hub-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .job-detail-pane {
    display: none;
  }
}


.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.static-page h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 16px;
}

.static-page h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 40px 0 12px;
}

.static-page p {
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0 0 12px;
}

.static-page .lead {
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.static-page a {
  color: var(--accent);
}

.static-page a:hover {
  text-decoration: underline;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.info-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-bottom: 15px solid var(--mark);
  border-radius: var(--radius);
  padding: 28px;
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.info-card p {
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.contact-email {
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 46.875rem) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}



/*------------------------------------------------
*       BROWSE JOBS BY TITLE AND LOCATION
------------------------------------------------*/

.browse-page { padding-top: 2rem; padding-bottom: 4rem; }

.alpha-index {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem;
  margin: 1rem 0 1.5rem;
}
.alpha-index a {
  color: var(--accent); font-weight: 600; text-decoration: none;
}

.browse-letter {
  font-family: var(--font-heading);
  margin: 1.5rem 0 0.75rem;
  scroll-margin-top: 120px;
}

.browse-grid {
  list-style: none; margin: 0 0 1rem; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
}
.browse-grid a { color: var(--accent); text-decoration: none; }
.browse-grid a:hover { text-decoration: underline; }
.browse-count { color: var(--ink-soft); font-size: 0.85rem; margin-left: 0.25rem; }

@media (max-width: 56rem) {
  .browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.25rem; }
}
@media (max-width: 46.875rem) {
  .browse-grid { grid-template-columns: 1fr; gap: 0.5rem 1rem; }
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

::selection {
  background: var(--mark);
  color: #2B2D31;
}
