/* Career Page Dedicated Styles */

/* Scroll Reveal Animations */
.reveal-section {
  opacity: 0;
  transform: translateX(0);
  transition: transform 700ms ease, opacity 700ms;
  will-change: transform, opacity;
}

.reveal-left {
  transform: translateX(-60px);
}

.reveal-right {
  transform: translateX(60px);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger support */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(10px);
  transition: transform 600ms ease, opacity 600ms;
}

.reveal-stagger.is-visible>* {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.is-visible>*:nth-child(1) {
  transition-delay: 50ms;
}

.reveal-stagger.is-visible>*:nth-child(2) {
  transition-delay: 120ms;
}

.reveal-stagger.is-visible>*:nth-child(3) {
  transition-delay: 190ms;
}

.reveal-stagger.is-visible>*:nth-child(4) {
  transition-delay: 260ms;
}

.reveal-stagger.is-visible>*:nth-child(5) {
  transition-delay: 330ms;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

  .reveal-section,
  .reveal-stagger>* {
    transition: none !important;
    animation: none !important;
  }
}

/* Hero Section */
.career-hero {
  height: 24vh;
  background-image: url('../images/heroimg5.jpeg');
  background-repeat: no-repeat;
  background-size: cover;           /* OPTIONS: cover | contain | 100% | 150% etc. */
  background-position: center center; /* TUNE: "left top" | "center 30%" | "right bottom" | "50% 70%" */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
  .career-hero {
    min-height: 40vh;
    padding: 60px 15px;
  }
}

@media screen and (max-width: 480px) {
  .career-hero {
    min-height: 44vh;
    padding: 40px 15px;
  }

  .hero-content {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    max-width: 90%;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  position: relative;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 300;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

/* Layout */
.page-section {
  min-height: auto;
  padding: 50px 20px 70px;
  background: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero */
.page-section h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #2c3e50;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Intro block */
.career-intro {
  text-align: center;
  margin-bottom: 60px;
  padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(135deg, rgba(8, 156, 68, 0.08), rgba(6, 122, 53, 0.06));
  border: 1px solid #eaf4ee;
  border-radius: 20px;
}

.career-intro h2 {
  color: #089c44;
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.career-intro p {
  color: #6c757d;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

/* Benefits */
.benefits-section {
  margin-bottom: 60px;
}

.benefits-section h2,
.openings-section h2 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.benefits-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.benefit-item {
  flex: 1 1 240px;
  max-width: 320px;
  background: #ffffff;
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid #eef2f3;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.benefit-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.benefit-item h4 {
  color: #089c44;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.benefit-item p {
  color: #6c757d;
  line-height: 1.65;
}

/* Job listings */
.job-listings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.job-card {
  background: #ffffff;
  padding: 30px 26px;
  border-radius: 18px;
  border: 1px solid #eef2f3;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.job-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(8, 156, 68, 0.12), transparent 60%);
  transform: rotate(25deg);
}

.job-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.job-card h3 {
  color: #2c3e50;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 1.25rem;
}

.job-location {
  color: #089c44;
  font-weight: 600;
  margin-bottom: 14px;
}

.job-description {
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Force consistent color and font - overrides any browser-injected inline styles */
.job-description * {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

.job-description ul,
.job-description ol {
  margin: 6px 0;
  padding-left: 20px;
}

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

.job-description strong,
.job-description b {
  font-weight: 700;
  color: #2c3e50;
}

.job-description em,
.job-description i {
  font-style: italic;
}

.job-description u {
  text-decoration: underline;
}

.apply-btn {
  background: linear-gradient(135deg, #089c44, #067a35);
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(8, 156, 68, 0.28);
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .page-section {
    padding: 110px 16px 60px;
  }
}

@media screen and (max-width: 768px) {
  .page-section {
    padding: 100px 14px 50px;
  }

  /* Inherit flex layout for benefits grid natively */

  .job-listings {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 520px) {
  .benefit-item {
    max-width: 100%;
  }

  .job-card {
    padding: 24px 20px;
  }
}

/* ==========================
   Apply Now Modal Styles
   ========================== */
#applyModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

#applyModal.open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

#applyModal .modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  /* keep dialog within viewport */
  overflow: hidden;
  position: relative;
  display: flex;
  /* enable sticky header + scrollable body */
  flex-direction: column;
  overscroll-behavior: contain;
  /* avoid body pull-to-refresh/scroll chaining */
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#applyModal .modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.apply-header {
  padding: 22px 24px 8px;
  border-bottom: 1px solid #f1f3f4;
  position: sticky;
  /* remain visible during scroll */
  top: 0;
  background: #ffffff;
  z-index: 2;
}

.apply-header h3 {
  margin: 0 0 6px;
  color: #2c3e50;
}

.apply-header p {
  margin: 0 0 6px;
  color: #6c757d;
}

.apply-form {
  padding: 18px 24px 24px;
  overflow: auto;
  /* scroll form content */
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  /* fill remaining height */
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #8aa197 #f1f3f4;
}

/* Custom scrollbar (WebKit) */
.apply-form::-webkit-scrollbar {
  width: 10px;
  /* thicker for visibility */
}

.apply-form::-webkit-scrollbar-track {
  background: #f1f3f4;
  border-radius: 10px;
}

.apply-form::-webkit-scrollbar-thumb {
  background: #8aa197;
  /* darker for contrast */
  border-radius: 10px;
}

.apply-form::-webkit-scrollbar-thumb:hover {
  background: #6f8a82;
}

.apply-form .form-row {
  margin-bottom: 14px;
}

.apply-form input[type="text"],
.apply-form input[type="email"],
.apply-form input[type="tel"],
.apply-form input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: #2c3e50;
}

.apply-form .file-row label {
  display: block;
  margin-bottom: 6px;
  color: #2c3e50;
  font-weight: 600;
}

.apply-form .form-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-start;
}

.apply-form .submit-btn {
  background: #089c44;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.apply-form .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(8, 156, 68, 0.28);
}

@media screen and (max-width: 480px) {
  #applyModal .modal-dialog {
    max-width: 96%;
    border-radius: 12px;
  }
}

/* ── Two-column Apply Modal ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}

.modal-overlay[aria-hidden="true"] {
  display: none;
}

.modal-overlay[aria-hidden="false"] {
  display: flex;
}

.apply-modal-2col {
  display: flex;
  width: min(900px, 96vw);
  max-width: none !important;
  /* override global .modal-dialog max-width: 520px */
  max-height: 92vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Close button — sits above both columns */
.apply-modal-2col .modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.apply-modal-2col .modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* LEFT — job details */
.apply-job-panel {
  flex: 0 0 42%;
  background: linear-gradient(145deg, #089c44 0%, #045f2b 100%);
  color: #fff;
  padding: 48px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.apply-job-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 4px;
}

.apply-job-title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
}

.apply-job-location {
  font-size: 0.95rem;
  opacity: 0.85;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.apply-job-location::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

.apply-job-desc {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.9;
}

.apply-job-desc ul,
.apply-job-desc ol {
  padding-left: 18px;
  margin: 6px 0;
}

.apply-job-desc li {
  margin-bottom: 4px;
}

.apply-job-desc * {
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
}

/* RIGHT — form */
.apply-form-panel {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.apply-form-panel .apply-header {
  padding: 28px 28px 10px;
  border-bottom: 1px solid #f1f3f4;
}

.apply-form-panel .apply-header h3 {
  margin: 0 0 4px;
  color: #2c3e50;
  font-size: 1.2rem;
}

.apply-form-panel .apply-header p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.apply-form-panel .apply-form {
  padding: 18px 28px 28px;
  flex: 1;
}

.apply-form-panel .apply-form .form-row {
  margin-bottom: 12px;
}

.apply-form-panel .apply-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  font-size: 14px;
  background: #f9fafb;
  color: #2c3e50;
  box-sizing: border-box;
}

.apply-form-panel .apply-form input:focus {
  outline: none;
  border-color: #089c44;
  background: #fff;
}

.apply-form-panel .apply-form .file-row label {
  display: block;
  margin-bottom: 6px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 13px;
}

.apply-form-panel .apply-form .form-actions {
  margin-top: 8px;
}

.apply-form-panel .submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #089c44, #067a35);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.apply-form-panel .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(8, 156, 68, 0.3);
}

/* ── Mobile: full-screen modal, no scrollbar ── */
@media screen and (max-width: 700px) {

  /* Make the overlay fill the whole screen edge-to-edge */
  #careerApply.modal-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }

  .apply-modal-2col {
    flex-direction: column;
    width: 100vw;
    max-width: 100vw !important;
    height: 100dvh;
    /* full device height */
    max-height: 100dvh;
    border-radius: 0;
    /* edge-to-edge */
    overflow: hidden;
  }

  /* Green job panel — compact, no internal scroll */
  .apply-job-panel {
    flex: 0 0 auto;
    padding: 48px 20px 20px;
    overflow: hidden;
    max-height: 42dvh;
    overflow-y: auto;
    /* hide scrollbar */
    scrollbar-width: none;
  }

  .apply-job-panel::-webkit-scrollbar {
    display: none;
  }

  /* Form panel — takes remaining height, scrolls internally */
  .apply-form-panel {
    flex: 1 1 auto;
    overflow-y: auto;
    /* hide scrollbar */
    scrollbar-width: none;
  }

  .apply-form-panel::-webkit-scrollbar {
    display: none;
  }

  .apply-form-panel .apply-header {
    padding: 20px 20px 8px;
  }

  .apply-form-panel .apply-form {
    padding: 14px 20px 28px;
  }

  .apply-modal-2col .modal-close {
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
  }
}