:root {
  --primary-color: #00a859;
  --secondary-color: #2d3e50;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-dark: #212529;
  --text-light: #6c757d;
  --border-color: #f1f1f1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.site-header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

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

.nav-menu ul {
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Layout */
.main-wrapper {
  padding: 2rem 0;
}

.layout-grid {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.col-main {
  flex: 7;
  min-width: 0;
}

.col-sidebar {
  flex: 3;
  min-width: 0;
}

.ad-slot {
  background-color: #e9ecef;
  text-align: center; /* safer than flex */
  color: var(--text-light);
  font-size: 0.8rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
}

.top-banner-container {
  margin-top: 2rem;
  display: block; /* avoid flex unless needed */
  text-align: center;
  /* remove overflow hidden */
}

.ad-slot.top-banner {
  min-height: 250px;
}

.ad-slot.sidebar-skyscraper {
  min-height: 600px;
  padding: 10px;
  margin: 2rem auto;
  /* remove overflow hidden */
}

.ad-slot.in-feed {
  min-height: 100px;
  margin: 2rem auto;
  padding: 10px;
  /* remove overflow hidden */
}

/* Job Details Layout Specifics */
.job-header-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.jh-top-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.jh-logo-box {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.jh-logo-box img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.jh-title {
  font-size: 1.75rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.jh-company {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
}

.jh-meta-row {
  display: flex;
  justify-content: center; /* Centered meta row */
  flex-wrap: wrap;
  column-gap: 3rem;
  row-gap: 1.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.jh-meta-item {
  color: var(--text-light);
  font-size: 0.95rem;
  text-align: center;
}

.jh-meta-label {
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

/* Make icon green */
.jh-meta-label i {
  color: var(--primary-color);
}

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

.job-desc-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.job-desc {
  line-height: 1.7;
  color: var(--text-dark);
  text-align: justify;
}

.job-desc p {
  margin-bottom: 1rem;
}

.job-desc p.mb-large {
  margin-bottom: 1.5rem;
}

.job-desc ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.job-desc li {
  margin-bottom: 0.5rem;
}

.apply-btn-wrapper {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.btn-lg {
  padding: 12px 40px;
  font-size: 16px;
}

.newsletter-text {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #adb5bd;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: #e2e8f0;
}

/* Job Cards */
.job-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.job-logo {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
}

.job-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.job-details {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.job-title {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  word-wrap: break-word;
}

.job-title:hover {
  text-decoration: underline;
}

.job-company {
  color: var(--text-light);
  font-size: 0.9rem;
}

.job-meta {
  color: var(--text-light);
  font-size: 0.85rem;
}

.job-action {
  width: auto;
  margin-left: auto;
  flex-shrink: 0;
}

.btn {
  display: inline-block;
  text-align: center;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn:hover {
  background-color: #008c44;
  color: #fff;
}

/* Sidebar Widgets */
.sidebar-widget {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-title {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sidebar-item:last-child {
  margin-bottom: 0;
}

.sidebar-item img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  object-fit: contain;
}

.sidebar-item-info {
  flex-grow: 1;
}

.sidebar-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  display: block;
}

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

.sidebar-item-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

.footer-col ul a {
  color: #adb5bd;
  font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 50px;
    padding-top: 25px;
    text-align: center;
    color: #ced4da;
    font-size: 14px;
}

.newsletter-form {
  display: flex;
  margin-top: 1rem;
}

.newsletter-form input {
  padding: 0.5rem;
  border: none;
  border-radius: 4px 0 0 4px;
  flex-grow: 1;
  outline: none;
}

.newsletter-form button {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background-color: #008c44;
}

/* Deals List Page Layout */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.deal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.deal-card-img-wrap {
  width: 100%;
  height: 200px;
  background-color: #f1f5f9;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.deal-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.deal-card:hover .deal-card-img-wrap img {
  transform: scale(1.05);
}

.deal-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.deal-card-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.deal-card-title {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.deal-card-title:hover {
  text-decoration: underline;
  color: var(--primary-color);
}
.deal-filters {
  display: flex;
  justify-content: center; /* center horizontally */
  align-items: center;
  gap: 0.5rem; /* space between buttons */
  flex-wrap: wrap; /* prevents overflow on small screens */
  text-align: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.deal-image-wrap {
  width: 100%;
}

.deal-main-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
  object-fit: cover;
}

/* Thumbnails container */
.deal-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ALWAYS 4 */
  gap: 8px;
}

/* Thumbnail images */
.deal-thumbnails .thumb {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s;
}

.deal-thumbnails .thumb:hover {
  transform: scale(1.05);
}

/* Active thumbnail */
.deal-thumbnails .thumb.active {
  border-color: var(--primary-color);
}

.deal-header-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.deal-title-main {
  font-size: 2rem;
  color: var(--text-dark);
  font-weight: 700;
  margin: 0;
}

.deal-price-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.deal-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
}

.d-meta-box {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 120px;
}

.d-meta-title {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
}

.d-meta-val {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.badge-success {
  background-color: #d1fae5;
  color: #059669;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: inline-block;
  align-self: flex-start;
}

.btn-call-seller {
  font-size: 1.25rem;
  padding: 1rem 3rem;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 168, 89, 0.3);
}

.btn-call-seller:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 168, 89, 0.4);
}

.hover-deal {
  transition: transform 0.2s ease;
}

.hover-deal:hover {
  transform: translateX(5px);
}

.deal-sidebar-title {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 40px 0;
    clear: both;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    color: #212529;
    background-color: #fff;
    border-radius: 4px;
    font-weight: 500;
}

.pagination a.active,
.pagination a:hover {
    background-color: #00a859;
    color: #fff;
    border-color: #00a859;
}

/* Responsive */
@media (max-width: 991px) {
  .layout-grid {
    flex-direction: column;
  }
  .col-main, .col-sidebar {
    width: 100%;
    flex: 0 0 100%;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-md);
    padding: 1rem 15px;
    border-top: 1px solid var(--border-color);
  }
  .nav-menu ul {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
  }
  .nav-toggle {
    display: block;
  }
  .job-action {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    margin-left: 0;
  }
  .newsletter-form {
    justify-content: center;
  }
  .jh-top-section {
    flex-direction: row;
    text-align: left;
    gap: 1rem;
  }
  .jh-title {
    font-size: 1.4rem;
  }
  .jh-meta-row {
    column-gap: 1.5rem;
    row-gap: 1rem;
  }
}
