/* Banner Start */
.banner {
  position: relative;
  overflow: hidden;
}

.banner img {
  width: 100%;
}

.banner h1 {
  position: absolute;
  bottom: 4rem;
  left: 8%;
  color: #fff;
  font-size: calc(4rem + 1vw);
  font-weight: 700;
}

/* For 100% in 15 inch screens */
@media screen and (min-width: 1400px) {
  .banner h1 {
    bottom: 4rem;
    font-size: calc(4.7rem + 1vw);
  }
}

/* For small screens */
@media screen and (max-width: 767px) {
  .banner h1 {
    bottom: 0.2rem;
    left: 1rem;
    font-size: calc(1.3rem + 0.5vw);
  }
}

/* Banner End */

.job-page-container {
  background-color: white;
  color: #1a1a1a;
  font-family: 'Segoe UI', sans-serif;
  padding-left: 8%;
  padding-right: 8%;
  padding-top: 2rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

/* Your existing styles below */

.back-link {
  color: #3A739B;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.job-main-section {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  align-items: flex-start;
}

.job-description-card {
  flex: 1;
  background-color: #f6f6f6;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.job-tags {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* aligns items top */
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Left group: close spacing */
.job-tags-left {
  display: flex;
  gap: 0.5rem;
  /* smaller gap between first two spans */
}

/* Right tag aligned top right */

.job-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.job-subtitle {
  color: #444;
  margin-bottom: 1.5rem;
}

.divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 1.5rem 0;
}

.job-section-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.job-body {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
}

.apply-card {
  background-color: #f6f6f6;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;

  align-items: flex-start;
  /* align content to left */
  text-align: left;
  /* left-align text */

  gap: 1rem;
  width: 100%;
  max-width: 300px;
}

.apply-icon {
  font-size: 2rem;
  background-color: #f6f6f6;
  color: black;
  padding: 1rem;
  border-radius: 0.75rem;
  align-self: flex-start;
  border: 2px solid #3A739B;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.apply-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.apply-btn {
  background-color: #3A739B;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  /* button will follow container alignment */
}

.apply-btn:hover {
  background-color: #315d7e;
}

.section-heading {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin: 2rem 0 1rem;
}

.other-positions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 2rem 8%;
  /* Adjusted padding for better spacing */
  box-sizing: border-box;
}


.job-card {
  max-width: 48%;
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: rgba(0, 0, 0, 0.553) 0px 3px 8px;
  padding: 2rem !important;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: rgba(0, 0, 0, 0.704) 0px 3px 8px;
}

.job-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.job-card p {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.8rem;
}

.job-divider {
  height: 1px;
  background-color: #ccc;
  margin: 0.5rem 0 1rem;
  width: 100%;
}

.job-meta-apply {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #777;
}

.job-meta-apply .job-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.job-meta-apply .text-link {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.job-meta-apply .text-link:hover {
  color: #2e5e7b;
  text-decoration: underline;
}

.browse-all {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  /* Add this for spacing below */
}

.browse-btn {
  background-color: #3A739B;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
}

.browse-btn:hover {
  background-color: #2c5e82;
}

@media screen and (max-width: 768px) {
  .job-page-container {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .job-card {
    width: 100%;
  }
  .job-main-section {
    gap: 1.2rem;
    margin-bottom: 2rem;
  }
  .job-description-card {
    padding: 1rem 0.6rem;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.289);
  }
  .job-title {
    font-size: calc(1.2rem + 0.5vw);
  }
  .job-section-title {
    font-size: calc(1rem + 0.5vw);
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  .job-body {
    font-size: calc(0.8rem + 0.5vw);
    line-height: normal;
  }
  .apply-card {
    padding: 1rem 0.6rem;
    border-radius: 1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.289);
    width: 100%;
    max-width: 100%;
  }
  .apply-btn {
    width: 100%;
    padding: 0.7rem 0;
  }
  .section-heading {
    font-size: calc(1.25rem + 0.5vw);
    margin: 2.5rem 0 0 0;
  }
  .other-positions {
    margin-top: 0;
    padding: 1.5rem 0;
  }
  .job-card {
    max-width: 100%;
    border-radius: 10px;
    padding: 1rem !important;
    min-height: 260px;
    margin-bottom: 1.3rem;
  }
  .job-card h4 {
    font-size: calc(1.1rem + 0.5vw);
    margin-bottom: 0;
  }

  .job-card p {
    font-size: calc(0.9rem + 0.5vw);
    margin-bottom: 0;
  }
  .browse-all {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
}


/* Overlay */
#popupOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
}

/* Popup form */
.popup-form {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 90vw;
  max-width: 800px;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  z-index: 999;
  box-sizing: border-box;
  max-height: 90vh;
  overflow-y: auto;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #3A739B;
  cursor: pointer;
  user-select: none;
}

/* Form title */
.popup-form h2 {
  color: #3A739B;
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

/* Form rows */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: nowrap;
}

.form-row label {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-weight: bold;
  font-size: 14px;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row input[type="file"] {
  margin-top: 5px;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

small {
  font-weight: normal;
  font-size: 11px;
  color: #555;
  margin-top: 3px;
  display: block;
}

.submit-btn {
  background-color: #3A739B;
  color: white;
  border: none;
  padding: 12px 18px;
  margin-top: 15px;
  cursor: pointer;
  border-radius: 6px;
  width: 100%;
  font-size: 16px;
}

/* Ensure no hidden form content */
form {
  padding-bottom: 20px;
}

/* Mobile-Friendly Layout */
@media screen and (max-width: 767px) {
  .popup-form {
    width: 95vw;
    max-width: none;
    padding: 20px 15px;
    border-radius: 15px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-row label {
    width: 100%;
    font-size: 15px;
  }

  .form-row input,
  .popup-form input[type="tel"],
  .popup-form input[type="text"],
  .popup-form input[type="file"] {
    width: 100%;
    padding: 10px;
    font-size: 15px;
    border-radius: 6px;
  }

  .popup-form h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  small {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
  }

  .submit-btn {
    padding: 12px;
    font-size: 16px;
    margin-top: 15px;
    border-radius: 8px;
  }

  .close-btn {
    top: 8px;
    right: 10px;
    font-size: 24px;
  }
}