/* Header and footer built with Blocksy's builders: layout and finish.
   Loaded last. Element order and content come from Customize → Header / Footer. */

/* ── Header ── */
#header { position: relative; z-index: 100; }
#header [data-row] {
  --height: 0px;
  height: auto !important;
  min-height: 0 !important;
  background: var(--cream) !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(17, 16, 16, .1) !important;
}
#header [data-row] .ct-container {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none !important;
  min-height: 0 !important;
  padding: 1.2rem 4rem !important;
}
#header [data-column] { display: flex; align-items: center; min-height: 0; flex: 0 0 auto; }
#header [data-items] { display: flex; align-items: center; gap: 1rem; margin: 0; }
#header .ct-header-text .entry-content { margin: 0; padding: 0; }

#header .jh-logo { font-size: 1.4rem; color: var(--ink); text-decoration: none; }
#header .jh-logo .logo-accent { color: var(--amber); }

#header .menu { display: flex; align-items: center; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
#header .menu li { margin: 0; }
#header .menu a, #header .menu .ct-menu-link {
  display: inline; height: auto; min-height: 0; padding: 0; line-height: normal;
  font-size: .85rem; font-weight: 400; color: var(--muted); text-decoration: none;
}
#header .menu a:hover, #header .menu li.current-menu-item > a { color: var(--ink); }
#header .menu li.current-menu-item > a { font-weight: 500; border-bottom: 1px solid var(--amber); padding-bottom: 1px; }

#header .nav-cta, #offcanvas .nav-cta { display: inline-flex; padding: .55rem 1.5rem; font-size: .85rem; font-weight: 600; }

/* ── Mobile header + off-canvas menu ── */
#header .ct-header-trigger { color: var(--ink); }
#offcanvas .ct-panel-inner { background: var(--cream); }
#offcanvas .menu a, #offcanvas .mobile-menu a { color: var(--ink); font-size: 1rem; }
#offcanvas .ct-header-text { margin-top: 1rem; }
@media (max-width: 999px) {
  #header [data-row] .ct-container { padding: 1rem 1.5rem !important; }
}

/* ── Footer ── */
#footer {
  background: var(--ink) !important;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .35);
  padding: 0;
}
#footer [data-row] { background: transparent !important; border: 0 !important; padding: 0 !important; min-height: 0 !important; }
#footer [data-row="middle"] { padding: 4rem 4rem 0 !important; }
#footer [data-row="middle"] .ct-container {
  display: grid !important;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  width: 100%;
  max-width: none !important;
  padding: 0 0 3rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
#footer [data-row="bottom"] { padding: 2rem 4rem 2.5rem !important; font-size: .78rem; }
#footer [data-row="bottom"] .ct-container {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
}
#footer [data-column] { margin: 0; padding: 0; min-width: 0; }
#footer .ct-footer-copyright { font-size: .78rem; color: inherit; }
#footer [data-row="bottom"] .jh-logo { font-size: 1rem; color: var(--cream); }
#footer .footer-brand .jh-logo { color: var(--cream); }

@media (max-width: 1100px) {
  #footer [data-row="middle"] .ct-container { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 900px) {
  #footer [data-row="middle"] { padding: 3rem 1.5rem 0 !important; }
  #footer [data-row="middle"] .ct-container { grid-template-columns: 1fr; gap: 2rem; padding: 0 0 3rem !important; }
  #footer [data-row="bottom"] { padding: 2rem 1.5rem 2rem !important; }
  #footer [data-row="bottom"] .ct-container { flex-direction: column; gap: .7rem; text-align: center; }
}

/* Iteration 3: full width on mobile, line-height matches the old header */
#header, #footer { width: 100%; }
#header .ct-header-text { line-height: 1.6; }

/* Iteration 4: mobile header = logo, button, bordered menu toggle (as before); menu panel in the site colours */
#header [data-device="mobile"] .ct-header-trigger {
  width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(17, 16, 16, .2); border-radius: 6px; background: transparent;
}
#header [data-device="mobile"] .nav-cta { padding: .55rem 1rem; font-size: .75rem; }
#offcanvas .ct-panel-inner { background: var(--cream) !important; }
#offcanvas .ct-toggle-close { color: var(--ink); }
#offcanvas .mobile-menu a { display: block; padding: 1rem 0; border-top: 1px solid rgba(17, 16, 16, .06); color: var(--ink); }
#offcanvas .mobile-menu li:first-child a { border-top: 0; }
@media (max-width: 900px) {
  #footer [data-row="middle"] .ct-container { padding: 3rem 0 3rem !important; }
}
#offcanvas .mobile-menu a { font-weight: 400; font-size: 1rem; }

/* Iteration 5: sub-pixel alignment with the previous footer */
@media (min-width: 901px) {
  #footer [data-row="middle"] { padding-top: calc(4rem + 1px) !important; }
  #footer [data-row="bottom"] { padding-bottom: calc(2.5rem - 1px) !important; }
}

/* Iteration 6: mobile header spacing and footer length match the previous build */
#header .ct-header-trigger { margin: 0 !important; }
@media (max-width: 999px) {
  #header [data-row] .ct-container { padding: 1rem 2.7rem !important; }
}
@media (max-width: 900px) {
  #footer [data-row="bottom"] { padding-bottom: calc(2rem + 4px) !important; }
}

/* Iteration 7 */
@media (max-width: 999px) {
  #header [data-row] .ct-container { padding: 1rem 43px 1rem 41px !important; }
}
#header [data-device="mobile"] .ct-header-trigger { border: 1px solid rgba(17, 16, 16, .2) !important; box-sizing: border-box; }
#header [data-column] { margin: 0 !important; }

/* Iteration 8: spacing between the button and the menu toggle, toggle icon size */
#header [data-items] > * { margin: 0 !important; }
#header [data-device="mobile"] .ct-header-trigger .ct-icon { width: 20px; height: 15.5px; }

/* Footer widgets (real widgets: Navigation Menu + block widgets) styled like the original columns */
#footer .ct-widget { margin: 0; }
#footer .widget_block > p:empty { display: none; }
#footer .widget-title {
  font-size: .72rem; font-weight: 500; line-height: 1; color: rgba(255, 255, 255, .85);
  margin: 0 0 1.2rem; padding: 0;
}
#footer .widget-menu { list-style: none; margin: 0; padding: 0; }
#footer .widget-menu li { margin: 0; padding: 0; }
#footer .widget-menu a { display: block; font-size: .85rem; line-height: 1.6; color: rgba(255, 255, 255, .3); text-decoration: none; margin-bottom: .7rem; }
#footer .widget-menu a:hover { color: var(--amber-lt); }

/* Block-widget paragraphs inherit the footer row's type, so they match the old markup */
#footer .widget_block > p { font-size: inherit; line-height: inherit; margin: 0; }
#footer [data-row*="bottom"] .widget_block > p { line-height: 1.3; }
#footer [data-row="bottom"] .jh-logo { line-height: 1.4; }
#footer .widget_block { color: rgba(255, 255, 255, .35); }

/* fine alignment with the original footer metrics */
#footer .widget-title { margin-bottom: calc(1.2rem + 1px); }
#footer .footer-brand { margin-top: -2px; }
@media (max-width: 900px) { #footer .footer-brand { margin-top: -1px; margin-bottom: calc(1.5rem - 3px); }
  #footer .widget-title { margin-bottom: calc(1.2rem + 2px); }
  #footer [data-row="bottom"] .ct-container { gap: calc(.7rem + 2px); }
  #footer [data-row="middle"] .ct-container { padding-bottom: calc(3rem + 2px) !important; }
  #footer [data-row="bottom"] { padding-top: calc(2rem + 2px) !important; padding-bottom: calc(2rem + 3px) !important; } }
@media (min-width: 901px) {
  #footer [data-row="middle"] .ct-container { padding-bottom: calc(3rem + 2px) !important; }
  #footer [data-row="bottom"] { padding-bottom: calc(2.5rem + 1px) !important; }
}

/* ── Mobile fixes ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Page wrappers never wider than the screen (were 398px on a 390px phone) */
  main.site-main, [class^="hireug-"], .hireug-home { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .hireug-home > * { max-width: 100%; box-sizing: border-box; }

  /* Search box: fields fill the card */
  .jh-search-box .search-field { margin: 0 !important; width: 100%; padding: 0 1rem; min-height: 52px; box-sizing: border-box; }
  .jh-search-box .search-field input { width: 100%; min-width: 0; }
  .jh-search-box .search-btn { width: 100%; box-sizing: border-box; margin: 4px 0 0; }

  /* Stats: three equal columns */
  .jh-stats-bar { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 2rem 1.5rem; }
  .jh-stats-bar .stat { min-width: 0; text-align: left; }
  .jh-stats-bar .stat-num, .jh-stats-bar .stat-number { font-size: 2.2rem; }
  .jh-stats-bar .stat-label { font-size: .78rem; }
}
@media (max-width: 600px) {
  /* Job cards: logo + title on one line, salary / place / date underneath */
  .job-card { grid-template-columns: auto 1fr; gap: .9rem 1rem; padding: 1.1rem 1.1rem; align-items: start; }
  .job-card:hover { transform: none; }
  .job-logo { width: 44px; height: 44px; font-size: 1rem; }
  .job-main h3 { font-size: 1.05rem; line-height: 1.3; }
  .job-meta { gap: .35rem .6rem; }
  .job-right { grid-column: 1 / -1; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .9rem; padding-top: .8rem; border-top: 1px solid rgba(17, 16, 16, .08); }
  .job-right .job-salary { font-size: .95rem; white-space: nowrap; }
  .job-right > * { margin: 0; }

  /* Section rhythm */
  .jh-categories, .jh-featured, .jh-how, .jh-cta-section { padding: 3rem 1.25rem; }
  .jh-hero { padding-left: 1.25rem; padding-right: 1.25rem; }
  .jh-jobs-list { margin-top: 2rem; }
}
@media (max-width: 900px) {
  .jh-jobs-list { align-items: stretch !important; }
  .jh-jobs-list > .job-card, .job-card { width: 100%; box-sizing: border-box; }
  .search-tags { justify-content: flex-start !important; gap: .5rem; }
  .search-tags > span { flex-basis: 100%; }
}
@media (max-width: 600px) {
  .job-right { justify-content: flex-start; text-align: left; }
}
@media (max-width: 600px) {
  .job-card { justify-items: stretch; }
  .job-card > * { justify-self: stretch; width: auto; max-width: none; margin: 0; }
  .job-card > .job-logo { justify-self: start; width: 44px; }
}
@media (max-width: 600px) { .job-meta { justify-content: flex-start; } .job-meta > * { margin: 0; } }
/* Grid items were shrinking to their content on phones; make them fill their cell */
@media (max-width: 900px) {
  .jh-cat-grid > *, .how-grid > *, .jh-t-grid > *, .jh-values-grid > *, .jh-team-grid > *, .jh-advice-grid > *,
  .advice-grid > *, .trust-grid > *, .jh-jobs-list > * { width: 100%; box-sizing: border-box; min-width: 0; }
}
@media (max-width: 900px) {
  .jh-cat-grid > *, .how-grid > *, .jh-t-grid > *, .jh-values-grid > *, .jh-team-grid > * { align-self: stretch; justify-self: stretch; }
  .cat-card { padding: 1.25rem; gap: .5rem; align-items: stretch; }
  .cat-card > * { width: 100%; }
}
@media (max-width: 900px) {
  .jh-cat-grid > *, .jh-t-grid > *, .jh-values-grid > *, .jh-team-grid > * { height: 100%; }
  .jh-cat-grid { gap: .75rem; }
}
@media (max-width: 900px) {
  .section-header { flex-direction: column; align-items: flex-start !important; gap: .75rem; text-align: left; }
  .section-header > * { width: auto; margin: 0; }
  .advice-card { align-items: stretch; text-align: left; padding: 1.25rem; }
  .advice-card > * { width: 100%; text-align: left; }
  .jh-advice-grid > * { width: 100%; box-sizing: border-box; }
}
@media (max-width: 900px) {
  .jh-stripe, .jh-cta-section { margin-left: 20px; margin-right: 20px; padding: 2.5rem 1.5rem; }
  .stripe-left, .stripe-right { width: 100%; }
  .stripe-right .btn-amber, .stripe-right a, .jh-cta-section .btn-primary, .jh-cta-section .btn-ink, .cta-btns a { display: block; width: 100%; text-align: center; box-sizing: border-box; }
  .cta-btns { display: flex; flex-direction: column; gap: .75rem; width: 100%; }
  .trust-item { text-align: left; align-items: stretch; }
  .trust-item > * { width: 100%; text-align: left; }
}

/* Jobs archive (WP Job Manager list markup: li > a > .job-logo/.position/.job-right) */
@media (max-width: 600px) {
  ul.job_listings li > a { display: grid; grid-template-columns: auto 1fr; gap: .9rem 1rem; padding: 1.1rem; align-items: start; justify-items: stretch; width: 100%; box-sizing: border-box; text-decoration: none; }
  ul.job_listings li > a > * { justify-self: stretch; width: auto; max-width: none; margin: 0; }
  ul.job_listings li > a > .job-logo { justify-self: start; width: 44px; height: 44px; font-size: 1rem; }
  ul.job_listings li > a h3 { font-size: 1.05rem; line-height: 1.3; margin: 0; text-decoration: none; }
  ul.job_listings li > a .job-meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; justify-content: flex-start; }
  ul.job_listings li > a .job-right { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .9rem; text-align: left; padding-top: .8rem; border-top: 1px solid rgba(17, 16, 16, .08); }
  ul.job_listings li > a .job-right > * { margin: 0; }
}
@media (max-width: 900px) {
  ul.job_listings { align-items: stretch !important; }
  ul.job_listings > li { width: 100%; box-sizing: border-box; }
  .job_filters .job_types { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 1rem; margin: 0; list-style: none; }
  .job_filters .job_types li { margin: 0; width: auto; background: none; border: 0; }
}
@media (max-width: 900px) {
  .job_filters.jh-search-box { flex-direction: column; align-items: stretch; padding: 12px; gap: 0; }
  .job_filters .search_jobs { display: block; width: 100%; margin: 0; padding: 0; }
  .job_filters .search_jobs > div { width: 100% !important; margin: 0 0 .5rem !important; padding: 0 !important; float: none !important; box-sizing: border-box; }
  .job_filters .search_jobs input[type="text"], .job_filters .search_jobs select { width: 100% !important; margin: 0 !important; box-sizing: border-box; padding: .9rem 1rem; }
  .job_filters .search_jobs .search_submit, .job_filters .search_jobs input[type="submit"] { width: 100%; }
  .job_filters .job_types { background: transparent !important; padding: .25rem 0 .5rem; border: 0; }
  .job_filters .job_types li { padding: 0; }
  .job_filters .job_types label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
  .job_filters .showing_jobs, .job_filters .rss_link { background: transparent !important; text-align: left; padding: 0; margin: 0; }
  .job_filters .rss_link, .job_filters a.rss_link { display: inline-block; font-size: .85rem; }
}
@media (max-width: 900px) {
  ul.job_listings { gap: .75rem; }
  ul.job_listings > li { border: 1px solid rgba(17, 16, 16, .12) !important; border-radius: var(--hireug-radius) !important; background: #fff; margin: 0 !important; overflow: hidden; }
}

/* Contact / submit-vacancy forms on phones */
@media (max-width: 900px) {
  .jh-contact-grid, .jh-submit-grid { display: block; width: 100%; }
  .form-side, .info-side { width: 100%; box-sizing: border-box; padding: 2rem 1.25rem; margin: 0; }
  .form-side > *, .info-side > *, .hireug-contact-form, .hireug-contact-form > *, .form-row > *, .form-group, .info-cards, .info-card { width: 100%; max-width: none; box-sizing: border-box; margin-left: 0; margin-right: 0; }
  .form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
  .form-group { display: block; margin-bottom: 1rem; padding: 0; }
  .form-group input, .form-group select, .form-group textarea { width: 100%; box-sizing: border-box; min-height: 48px; padding: .75rem 1rem; line-height: 1.4; height: auto; }
  .form-group textarea { min-height: 140px; }
  .form-side h2, .form-side .form-title { text-align: left; font-size: 1.6rem; }
  .submit-btn { width: 100%; }
  .info-card { padding: 1.1rem; }
  hr.rule { margin-left: 20px; margin-right: 20px; }
}
@media (max-width: 900px) { .form-side, .info-side { width: calc(100% - 40px); margin: 0 auto 1rem; } }
@media (max-width: 900px) { .job_filters select, .job_filters .select2-container, .job_filters .chosen-container { max-width: 100% !important; width: 100% !important; box-sizing: border-box; } }
@media (max-width: 900px) {
  .jh-single-job, .single_job_listing { padding-left: 20px !important; padding-right: 20px !important; }
  .single_job_listing .job-listing-meta li, .single_job_listing .meta-pill, .jh-single-job li, .company, .job-company-box, .jh-company-box { border-radius: var(--hireug-radius-sm); }
}

/* Single job: use the full phone width with one small gutter (was ~47px each side) */
@media (max-width: 900px) {
  .single-job_listing .hero-section, .job_listing > .hero-section { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding: 1.5rem 16px 0 !important; box-sizing: border-box; }
  .single_job_listing.jh-single-job, .jh-single-job { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; padding: 1rem 16px 2.5rem !important; box-sizing: border-box; }
  .job_listing .entry-content { padding: 0; }
}

/* Wide screens: the page column is capped at 1290px; let the dark footer band run edge to edge */
#main-container { overflow: visible !important; }
#footer { box-shadow: 0 0 0 100vmax var(--ink) !important; clip-path: inset(0 -100vmax); }

/* Live-data fixes (found on hireug.com at phone width) */
.search-tags > a { margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 900px) {
  .job_filters select, .job_filters .search_categories, .job_filters .search-fields { min-width: 0 !important; max-width: 100% !important; width: 100% !important; box-sizing: border-box; }
  .job_filters .job_types li { flex: 0 0 auto; max-width: 100%; }
}
.job_filters select.select2-hidden-accessible, .job_filters select.chosen-hidden { width: 1px !important; min-width: 0 !important; max-width: 1px !important; }
@media (max-width: 900px) {
  body.single-job_listing main > .ct-container, body.single-job_listing main .ct-container-full { width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
}

/* Legal pages: no sidebar, one readable column */
body.hireug-legal #sidebar { display: none !important; }
body.hireug-legal main .ct-container[data-sidebar], body.hireug-legal #main .ct-container { grid-template-columns: minmax(0, 1fr) !important; }
body.hireug-legal article { max-width: 760px; }
body.hireug-legal .entry-content ul { list-style: disc; padding-left: 1.4rem; }
body.hireug-legal .entry-content li { margin-bottom: .5rem; }

/* Header stays in normal flow: ignore leftover transparent/sticky options so hero content is never covered */
#header [data-device][data-transparent] { position: relative !important; }
#header [data-sticky] { position: relative !important; top: auto !important; transform: none !important; }
#header .ct-sticky-container { height: auto !important; }
