/* If style1.css is linked from www.funxon.co.in, no @import needed here */

/* --- General Careers Area --- */
main.careers-content-area {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background-color: rgba(38, 38, 38, 0.5);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  text-align: left;
}

main.careers-content-area h1 {
  font-size: clamp(2rem, 6vw, 2.5rem);
  color: #ffffff;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #555;
  padding-bottom: 0.5rem;
}

.careers-intro {
  text-align: center;
  color: #cccccc;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* --- Job Listings Container --- */
#job-listings-container {
  display: grid; /* Using grid for card layout */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
  gap: 1.5rem;
}

/* --- Job Card --- */
.job-card {
  background-color: rgba(50, 50, 50, 0.7);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #4a4a4a;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(175, 64, 255, 0.2);
}

.job-card h2 { /* Job Title */
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  color: var(--hover-btn-color, #af40ff);
  margin: 0 0 0.75rem 0;
  font-family: 'Yatra One', sans-serif;
  line-height: 1.3;
}

.job-meta {
  font-size: 0.9rem;
  color: #b5b5b5;
  margin-bottom: 1rem;
  font-family: 'Arial', sans-serif;
  display: flex;
  flex-direction: column; /* Stack meta items */
  gap: 0.4rem;
}

.job-meta span {
  display: block; /* Each meta item on a new line */
}

.job-meta .label {
  font-weight: 600;
  color: #c5c5c5;
  margin-right: 0.4em;
}

.job-card .ui-btn { /* Button styling specific to card if needed */
  margin-top: auto; /* Pushes button to the bottom of the card */
  align-self: flex-start; /* Align button to the left */
  min-width: 180px;
}

/* --- Modal for Job Details & Form --- */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
  padding-top: 30px; /* Location of the box */
  padding-bottom: 30px;
}

.modal-content {
  background-color: #282828; /* Darker modal background */
  margin: auto;
  padding: 25px;
  border: 1px solid #555;
  width: 90%;
  max-width: 750px; /* Max width of modal */
  border-radius: 10px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  color: #e0e0e0;
}

.close-modal-btn {
  color: #aaa;
  float: right;
  font-size: 32px;
  font-weight: bold;
  line-height: 1;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

#modal-job-detail-content h3 { /* Title inside modal */
  font-size: clamp(1.6rem, 5vw, 2rem);
  color: var(--hover-btn-color, #af40ff);
  margin-top: 0;
  margin-bottom: 1rem;
}

#modal-job-detail-content .job-full-description {
  font-family: 'Arial', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  white-space: pre-line; /* Respect newlines from Firestore */
  max-height: 30vh; /* Limit description height, make it scrollable */
  overflow-y: auto; /* Add scroll for long descriptions */
  padding-right: 10px; /* Space for scrollbar */
  border: 1px solid #3a3a3a;
  padding: 10px;
  border-radius: 5px;
  background-color: #1e1e1e;
}

/* Webkit scrollbar styling for description */
#modal-job-detail-content .job-full-description::-webkit-scrollbar {
  width: 8px;
}

#modal-job-detail-content .job-full-description::-webkit-scrollbar-track {
  background: #2a2a2a;
  border-radius: 4px;
}

#modal-job-detail-content .job-full-description::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

#modal-job-detail-content .job-full-description::-webkit-scrollbar-thumb:hover {
  background: #777;
}

#modal-job-detail-content .apply-form-container h4 {
  font-size: 1.2rem;
  color: #e0e0e0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-top: 1px dashed #555;
  padding-top: 1rem;
}

#modal-job-detail-content .google-form-embed {
  width: 100%;
  height: 500px; /* Adjust as needed, or make responsive */
  border: none;
  border-radius: 5px;
}

/* Loading/Error Messages */
.loading-message,
.error-message {
  text-align: center;
  font-style: italic;
  color: #ccc;
  padding: 2rem 0;
  font-size: 1.1rem;
  grid-column: 1 / -1; /* Span all columns if inside grid */
}

.error-message {
  color: #ff6b6b;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  main.careers-content-area {
    padding: 1rem 1.5rem;
    margin: 1.5rem auto;
  }

  #job-listings-container {
    grid-template-columns: 1fr; /* Single column on smaller screens */
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }

  #modal-job-detail-content .google-form-embed {
    height: 70vh; /* Taller form on mobile if needed */
  }
}