
/* =========================================
   SingaporeJobs
   Main stylesheet
========================================= */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;

  --background: #f8fafc;
  --surface: #ffffff;

  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --success: #15803d;
  --success-light: #f0fdf4;

  --error: #b91c1c;
  --error-light: #fef2f2;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);

  --container-width: 1200px;
}

/* =========================================
   Reset
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 14px;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(
    calc(100% - 48px),
    var(--container-width)
  );

  margin: 0 auto;
}

/* =========================================
   Header
========================================= */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);

  position: relative;
  z-index: 10;
}

.header-inner {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  background: var(--primary);
  color: #ffffff;

  font-size: 13px;
  font-weight: 800;

  border-radius: 9px;
}

.brand-name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.6px;
}

.brand-name span {
  color: var(--primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;

  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

/* =========================================
   Hero
========================================= */

.hero {
  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(37, 99, 235, 0.08),
      transparent 35%
    ),
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fafc 100%
    );

  border-bottom: 1px solid var(--border);
}

.hero-content {
  padding-top: 70px;
  padding-bottom: 64px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--primary);

  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.2px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: var(--primary);
}

.hero h1 {
  margin: 20px 0 18px;

  font-size: clamp(38px, 5vw, 60px);
  font-weight: 800;

  letter-spacing: -2.8px;
  line-height: 1.1;
}

.hero h1 span {
  color: var(--primary);
}

.hero-description {
  max-width: 560px;

  margin: 0;

  color: var(--text-secondary);

  font-size: 16px;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  align-items: center;

  gap: 28px;
  margin-top: 36px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-stat strong {
  font-size: 20px;
  font-weight: 750;
}

.hero-stat span {
  color: var(--text-secondary);
  font-size: 12px;
}

.hero-stat-divider {
  height: 38px;
  width: 1px;

  background: var(--border);
}

/* =========================================
   Jobs section
========================================= */

.jobs-section {
  padding: 64px 0 72px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;

  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.9px;
}

.section-heading p {
  margin: 7px 0 0;

  color: var(--text-secondary);
  font-size: 14px;
}

.listing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 7px 11px;

  border: 1px solid #dbeafe;
  border-radius: 30px;

  background: var(--primary-light);
  color: #1d4ed8;

  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.listing-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: var(--primary);
}

/* =========================================
   Search panel
========================================= */

.search-panel {
  padding: 22px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
}

.search-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  flex: 1;

  min-width: 0;
  height: 48px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 0 14px;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  background: #ffffff;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
  width: 19px;
  height: 19px;

  flex-shrink: 0;

  stroke: var(--text-muted);
  stroke-width: 1.8;
}

.search-input-wrapper input {
  width: 100%;
  min-width: 0;

  border: 0;
  outline: 0;

  color: var(--text);
  background: transparent;

  font-size: 13px;
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.button {
  min-height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 18px;

  border: 1px solid transparent;
  border-radius: var(--radius-md);

  font-size: 13px;
  font-weight: 700;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.button-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--primary-light);
  border-color: #bfdbfe;
  color: var(--primary);
}

.search-button {
  min-width: 125px;
  height: 48px;
}

/* =========================================
   Filters
========================================= */

.filters-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;

  margin-top: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.filter-group label {
  color: var(--text-secondary);

  font-size: 11px;
  font-weight: 700;
}

.filter-group select {
  width: 100%;
  height: 42px;

  padding: 0 12px;

  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  color: var(--text);

  font-size: 12px;

  outline: none;
}

.filter-group select:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.08);
}

.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-top: 20px;
  padding-top: 16px;

  border-top: 1px solid var(--border-light);
}

#filter-summary {
  color: var(--text-secondary);
  font-size: 12px;
}

.clear-filters {
  padding: 4px 0;

  background: transparent;
  border: 0;

  color: var(--primary);

  font-size: 12px;
  font-weight: 700;
}

.clear-filters:hover {
  color: var(--primary-hover);
}

/* =========================================
   Results header
========================================= */

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin: 38px 0 18px;
}

.results-header h3 {
  margin: 0;

  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.results-header p {
  margin: 4px 0 0;

  color: var(--text-secondary);
  font-size: 12px;
}

/* =========================================
   Table
========================================= */

.table-container {
  overflow-x: auto;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
}

.jobs-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.jobs-table thead {
  background: #f8fafc;
}

.jobs-table th {
  padding: 15px 16px;

  color: var(--text-secondary);

  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  white-space: nowrap;

  border-bottom: 1px solid var(--border);
}

.jobs-table td {
  padding: 17px 16px;

  border-bottom: 1px solid var(--border-light);

  vertical-align: middle;
}

.jobs-table tbody tr:last-child td {
  border-bottom: 0;
}

.job-row {
  cursor: pointer;

  transition: background 0.15s ease;
}

.job-row:hover {
  background: #f8fbff;
}

.job-row.expanded {
  background: var(--primary-light);
}

.job-column {
  width: 58%;
}

.salary-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
}

.company-column {
  width: 16%;
}

.location-column {
  width: 15%;
}

.salary-column {
  width: 24%;
}

.type-column {
  width: 12%;
}

.date-column {
  width: 18%;
}

.apply-column {
  width: 8%;
}

.job-title-cell {
  min-width: 220px;
}

.job-title {
  display: block;

  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.job-title:hover {
  color: var(--primary);
}

.job-subtitle {
  display: block;

  margin-top: 5px;

  color: var(--text-muted);
  font-size: 10px;
}

.company-name {
  color: #334155;

  font-size: 12px;
  font-weight: 600;
}

.location-text {
  color: var(--text-secondary);
  font-size: 12px;
}

.salary-text {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.salary-period {
  display: block;

  margin-top: 3px;

  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
}

.job-type-badge {
  display: inline-flex;
  align-items: center;

  padding: 5px 8px;

  background: #f1f5f9;
  border-radius: 5px;

  color: #475569;

  font-size: 10px;
  font-weight: 650;

  white-space: nowrap;
}

.posted-date {
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.apply-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 32px;
  padding: 0 11px;

  background: var(--primary-light);
  border: 1px solid #dbeafe;
  border-radius: 6px;

  color: var(--primary);

  font-size: 11px;
  font-weight: 750;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.apply-button:hover {
  background: var(--primary);
  color: #ffffff;
}

/* =========================================
   Expanded job details
========================================= */

.job-details-row {
  background: #f8fbff;
}

.job-details-row td {
  padding: 0;

  border-bottom: 1px solid var(--border);
}

.job-details-content {
  padding: 24px 28px 28px;

  border-top: 1px solid #dbeafe;
}

.job-details-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 22px;
}

.job-details-heading {
  margin: 0 0 18px;

  font-size: 17px;
  font-weight: 800;
}

.job-details-company {
  margin-top: 5px;

  color: var(--text-secondary);
  font-size: 12px;
}

.job-details-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 20px;

  margin-bottom: 24px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-label {
  color: var(--text-muted);

  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.detail-value {
  color: var(--text);

  font-size: 12px;
  font-weight: 650;
}

.job-description-section {
  margin-top: 20px;
}

.job-description-section h4 {
  margin: 0 0 9px;

  font-size: 12px;
  font-weight: 800;
}

.job-description {
  margin: 0;

  color: var(--text-secondary);

  font-size: 12px;
  line-height: 1.8;

  white-space: pre-line;
  overflow-wrap: anywhere;
}

.job-detail-list {
  margin: 8px 0 0;
  padding-left: 18px;

  color: var(--text-secondary);

  font-size: 12px;
  line-height: 1.8;
}

.job-detail-list li {
  margin-bottom: 4px;
}

.job-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 10px;
}

.skill-tag {
  display: inline-flex;

  padding: 5px 9px;

  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 5px;

  color: #475569;
  font-size: 10px;
}

.job-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;

  margin-top: 24px;
  padding-top: 20px;

  border-top: 1px solid var(--border);
}



.job-original-post {
  color: var(--text-secondary);

  font-size: 13px;
  line-height: 1.85;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.telegram-mention {
  color: var(--primary);
  font-weight: 650;
  text-decoration: none;
}

.telegram-mention:hover {
  text-decoration: underline;
}



/* =========================================
   Table messages
========================================= */

.table-message {
  padding: 48px 24px !important;

  text-align: center;

  color: var(--text-secondary);
  font-size: 13px;
}

.table-message.error {
  color: var(--error);
}

.table-message.empty {
  color: var(--text-secondary);
}

/* =========================================
   Pagination
========================================= */

.mobile-hint {
  display: none;

  margin-top: 10px;

  color: var(--text-muted);
  font-size: 11px;
}

.pagination-section {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 22px;
}

.pagination-section p {
  margin: 0;

  color: var(--text-secondary);
  font-size: 12px;
}

.load-more-button {
  min-height: 40px;
}

/* =========================================
   About
========================================= */

.about-section {
  padding: 55px 0;

  background: #ffffff;
  border-top: 1px solid var(--border);
}

.about-content {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 60px;
  align-items: center;
}

.about-eyebrow {
  color: var(--primary);

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

.about-content h2 {
  margin: 10px 0 0;

  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.7px;
}

.about-content > p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 13px;
  line-height: 1.9;
}

/* =========================================
   Footer
========================================= */

.site-footer {
  padding: 26px 0;

  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.footer-brand {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.footer-inner p {
  margin: 0;

  color: var(--text-muted);
  font-size: 11px;
}

#footer-year {
  color: var(--text-muted);
  font-size: 11px;
}

/* =========================================
   Responsive: tablet
========================================= */

@media (max-width: 900px) {

  .hero-content {
    padding-top: 55px;
    padding-bottom: 50px;
  }

  .filters-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .job-details-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .jobs-section {
    padding-top: 48px;
  }

}

/* =========================================
   Responsive: mobile
========================================= */

@media (max-width: 600px) {

  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-name {
    font-size: 16px;
  }

  .header-nav {
    gap: 18px;
  }

  .nav-link {
    font-size: 12px;
  }

  .hero-content {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .hero h1 {
    font-size: 42px;
    letter-spacing: -2px;
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-stats {
    gap: 20px;
    margin-top: 28px;
  }

  .hero-stat strong {
    font-size: 17px;
  }

  .hero-stat span {
    font-size: 10px;
  }

  .jobs-section {
    padding: 40px 0 50px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .section-heading p {
    max-width: 260px;
    font-size: 12px;
  }

  .listing-badge {
    padding: 6px 8px;
    font-size: 9px;
  }

  .search-panel {
    padding: 15px;
  }

  .search-main {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .search-button {
    width: 100%;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .filter-group select {
    height: 44px;
  }

  .filter-footer {
    align-items: flex-start;
  }

  .results-header {
    margin-top: 30px;
  }

  .mobile-hint {
    display: block;
  }

  .pagination-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .load-more-button {
    width: 100%;
  }

  .job-details-content {
    padding: 20px 16px;
  }

  .job-details-top {
    flex-direction: column;
  }

  .job-details-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .job-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-detail-actions .button {
    width: 100%;
  }

  .about-section {
    padding: 40px 0;
  }

  .about-content h2 {
    font-size: 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

}


/* Contact actions inside expanded job details */

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
}

.email-contact {
  color: var(--primary);
  font-size: 12px;
  font-weight: 650;

  overflow-wrap: anywhere;
}

.email-contact:hover {
  text-decoration: underline;
}


.job-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;

  margin-top: 24px;
  padding-top: 20px;

  border-top: 1px solid var(--border);
}


.sort-control {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sort-control label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sort-control select {
  height: 34px;
  padding: 0 10px;

  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  color: var(--text);
  font-size: 11px;
}

@media (max-width: 600px) {
  .filter-footer {
    flex-wrap: wrap;
  }

  .sort-control {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .sort-control select {
    flex: 1;
  }
}