/* Shared site header: logo on the left; country, search and account button on the right */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #e1e8ed;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-logo-img {
  display: block;
  height: 40px;
  width: auto;
}
.site-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}
.site-country {
  flex: 0 0 auto;
  max-width: 170px;
  padding: 0.55rem 0.5rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  color: #333;
}
.site-search {
  flex: 1 1 360px;
  display: flex;
  min-width: 0;
  max-width: 560px;
}
.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d0d7de;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  font: inherit;
  font-size: 0.95rem;
  background: #ffffff;
}
.site-search input:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: -1px;
}
.site-search-btn {
  padding: 0 1rem;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  border-radius: 0 8px 8px 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.site-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: #0b1f4a;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.site-cta:hover {
  background: #142f66;
}
.site-cta .account-icon[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .site-nav {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
  }
  .site-tools {
    flex-wrap: wrap;
    justify-content: stretch;
    width: 100%;
  }
  .site-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .site-country {
    flex: 1 1 40%;
    max-width: none;
  }
  .site-cta {
    flex: 1 1 40%;
    justify-content: center;
  }
}

/* Jobs by country: six equal columns on desktop, so 54 countries make nine full rows */
.country-links { padding: 2.5rem 0 1rem; background: #ffffff; border-top: 1px solid #e1e8ed; }
.country-links h2 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.country-links-note { color: #555; margin-bottom: 1rem; font-size: 0.95rem; }
.country-links-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1rem; line-height: 1.35; }
.country-links-grid a { color: #1d4ed8; text-decoration: none; font-size: 0.95rem; }
.country-links-grid a:hover { text-decoration: underline; }
@media (min-width: 640px) { .country-links-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .country-links-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Most recent jobs: home page and country pages, above "Jobs by country" */
.recent-jobs { padding: 2.5rem 0 2rem; background: #f5f7fa; border-top: 1px solid #e1e8ed; }
.recent-jobs h2 { font-size: 1.4rem; margin-bottom: 0.3rem; }
.recent-jobs-note { color: #555; margin-bottom: 1rem; font-size: 0.95rem; }
.recent-jobs-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.recent-job { position: relative; background: #ffffff; border: 1px solid #e1e8ed; border-radius: 10px; padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; transition: transform 0.2s ease, border-color 0.2s ease; }
.recent-job a { color: #1a1a1a; text-decoration: none; font-weight: 600; }
.recent-job a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.recent-job a:hover { color: #1d4ed8; text-decoration: underline; }
.recent-job:hover, .recent-job:active, .recent-job:focus-within { transform: scale(1.02); border-color: #1d4ed8; }
@media (prefers-reduced-motion: reduce) { .recent-job { transition: none; } .recent-job:hover, .recent-job:active, .recent-job:focus-within { transform: none; } }
.recent-job-meta { color: #555; font-size: 0.9rem; }
.recent-jobs-empty { color: #555; padding: 0.8rem 0; }
.recent-jobs-all { display: inline-block; margin-top: 1rem; color: #1d4ed8; font-weight: 600; text-decoration: none; }
.recent-jobs-all:hover { text-decoration: underline; }
@media (min-width: 640px) { .recent-jobs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .recent-jobs-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
