/* Base font family — inherit to children (avoids universal * selector reflow cost) */
.job-detail-layout {
  font-family: inherit;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.job-detail-layout > * {
  min-width: 0;
  max-width: 100%;
}

.job-detail-layout .card {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.job-detail-layout code,
.job-detail-layout pre {
  font-family: 'Courier New', monospace !important;
}

.job-detail-content {
  font-family: inherit;
}

/* Keep code elements as monospace */
.job-detail-content code,
.job-detail-content pre,
.job-detail-content pre code {
  font-family: 'Courier New', monospace !important;
}

/* Job title styling */
.job-detail-layout h1 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2c3e50;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Posted/updated dateline */
.job-detail-dateline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
  padding: 0.625rem 0.875rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #667eea;
}

/* Job tags container */
.job-tags-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Featured image at the top of the job detail page */
.job-detail-featured-figure {
  margin: 0 0 1.75rem;
}

.job-detail-featured-image {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f3f5;
}

@media (max-width: 768px) {
  .job-detail-featured-image {
    max-height: 320px;
    border-radius: 8px;
  }
}

/* Rich text editor content styling */
.job-detail-content {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.job-detail-content p,
.job-detail-content li,
.job-detail-content span,
.job-detail-content div {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Headings in rich text */
.job-detail-content h1,
.job-detail-content h2,
.job-detail-content h3,
.job-detail-content h4,
.job-detail-content h5,
.job-detail-content h6 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-weight: 600;
  color: #2c3e50;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.job-detail-content h1 {
  font-size: 1.625rem;
}

.job-detail-content h2 {
  font-size: 1.375rem;
}

.job-detail-content h3 {
  font-size: 1.1875rem;
}

.job-detail-content h4 {
  font-size: 1.0625rem;
}

.job-detail-content h5 {
  font-size: 0.9375rem;
}

.job-detail-content h6 {
  font-size: 0.875rem;
}

/* Paragraphs */
.job-detail-content p {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 0.875rem;
}

/* Lists */
.job-detail-content ul,
.job-detail-content ol {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 0.875rem;
  padding-left: 1.5rem;
}

.job-detail-content li {
  margin-bottom: 0.4rem;
}

/* Links */
.job-detail-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.job-detail-content a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Strong and bold */
.job-detail-content strong,
.job-detail-content b {
  font-weight: 600;
  color: #2c3e50;
}

/* Emphasis and italic */
.job-detail-content em,
.job-detail-content i {
  font-style: italic;
}

/* Blockquotes */
.job-detail-content blockquote {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: #6c757d;
  font-style: italic;
}

/* Code */
.job-detail-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #e83e8c;
}

.job-detail-content pre {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.job-detail-content pre code {
  background: none;
  padding: 0;
  color: #495057;
}

/* Tables — fit mobile; wrap cell text instead of clipping */
.job-detail-content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 0.9375rem;
  table-layout: fixed;
}

.job-detail-content table th,
.job-detail-content table td {
  padding: 0.75rem;
  border: 1px solid #e9ecef;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.job-detail-content table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

/* Images */
.job-detail-content img {
  max-width: 100% !important;
  width: auto;
  height: auto !important;
  border-radius: 8px;
  margin: 1.25rem 0;
}

/* Kill fixed inline widths from editor that overflow mobile */
.job-detail-content [style*="width"],
.job-detail-content [width] {
  max-width: 100% !important;
}

/* Horizontal rule */
.job-detail-content hr {
  border: none;
  border-top: 1px solid #e9ecef;
  margin: 1.5rem 0;
}

/* Sidebar headings */
.job-detail-layout .card h3 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.job-detail-layout .card h4 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

/* Recent jobs sidebar */
.recent-job-item {
  border-bottom: 1px solid #e9ecef;
}

.recent-job-item:not(:last-child) {
  margin-bottom: 1rem;
}

.recent-job-link {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.recent-job-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .job-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin-top: 1rem;
  }
  
  .job-detail-layout .card {
    margin-bottom: 1rem;
    padding: 1.15rem !important;
  }
  
  .job-detail-layout h1 {
    font-size: 1.35rem !important;
    line-height: 1.35 !important;
  }
  
  .job-detail-content {
    font-size: 0.875rem;
  }

  .job-detail-content table th,
  .job-detail-content table td {
    padding: 0.5rem 0.55rem;
    font-size: 0.8125rem;
  }
  
  .job-detail-content h1 {
    font-size: 1.25rem;
  }
  
  .job-detail-content h2 {
    font-size: 1.125rem;
  }
  
  .job-detail-content h3 {
    font-size: 1.0625rem;
  }
}

@media (max-width: 480px) {
  .job-detail-layout .card {
    padding: 0.9rem !important;
  }

  .job-detail-layout h1 {
    font-size: 1.2rem !important;
  }
  
  .job-detail-layout .tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  
  .job-detail-content {
    font-size: 0.875rem;
  }
  
  .job-detail-content h1 {
    font-size: 1.15rem;
  }
  
  .job-detail-content h2 {
    font-size: 1.05rem;
  }
  
  .job-detail-content h3 {
    font-size: 1rem;
  }

  .job-detail-content table th,
  .job-detail-content table td {
    padding: 0.4rem 0.45rem;
  }
}

/* FAQ Section Styling */
.job-faqs {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 2px solid #e9ecef;
}

.job-faqs h2 {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.job-faqs h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

/* Accordion Custom Styling */
#jobFaqAccordion {
  border: none;
}

#jobFaqAccordion .accordion-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

#jobFaqAccordion .accordion-item:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

#jobFaqAccordion .accordion-item:last-child {
  margin-bottom: 0;
}

#jobFaqAccordion .accordion-header {
  margin-bottom: 0;
}

#jobFaqAccordion .accordion-button {
  font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  background-color: #ffffff;
  border: none;
  padding: 1.25rem 1.5rem;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: none;
}

#jobFaqAccordion .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#jobFaqAccordion .accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
  transform: rotate(180deg);
}

#jobFaqAccordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232c3e50'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

#jobFaqAccordion .accordion-button:hover {
  background-color: #f8f9fa;
  color: #667eea;
}

#jobFaqAccordion .accordion-button:not(.collapsed):hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  color: #ffffff;
}

#jobFaqAccordion .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

#jobFaqAccordion .accordion-collapse {
  border-top: 1px solid #e9ecef;
}

#jobFaqAccordion .accordion-body {
   font-family: var(--rp-font-sans, 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
   font-size: 0.875rem;
   line-height: 1.7;
   color: #495057;
   padding: 1.5rem;
   background: #f8f9fa;
}

#jobFaqAccordion .accordion-body p {
   margin-bottom: 0.75rem;
   color: #495057;
   font-size: 0.875rem;
}

#jobFaqAccordion .accordion-body p:last-child {
  margin-bottom: 0;
}

#jobFaqAccordion .accordion-body ul,
#jobFaqAccordion .accordion-body ol {
   margin-top: 0.75rem;
   margin-bottom: 0.75rem;
   padding-left: 1.5rem;
   font-size: 0.875rem;
}

#jobFaqAccordion .accordion-body li {
   margin-bottom: 0.5rem;
   color: #495057;
   font-size: 0.875rem;
}

#jobFaqAccordion .accordion-body strong {
  color: #2c3e50;
  font-weight: 600;
}

#jobFaqAccordion .accordion-body a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

#jobFaqAccordion .accordion-body a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive FAQ adjustments */
@media (max-width: 768px) {
  .job-faqs {
    margin-top: 2rem;
    padding-top: 2rem;
  }
  
  .job-faqs h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  #jobFaqAccordion .accordion-button {
    font-size: 0.9375rem;
    padding: 1rem 1.25rem;
  }
  
   #jobFaqAccordion .accordion-body {
     padding: 1.25rem;
     font-size: 0.8125rem;
   }
   
   #jobFaqAccordion .accordion-body p,
   #jobFaqAccordion .accordion-body li {
     font-size: 0.8125rem;
   }
}

@media (max-width: 480px) {
  .job-faqs h2 {
    font-size: 1.1rem;
    margin-bottom: 0.875rem;
  }
  
  #jobFaqAccordion .accordion-button {
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }
  
   #jobFaqAccordion .accordion-body {
     padding: 1rem;
     font-size: 0.75rem;
   }
   
   #jobFaqAccordion .accordion-body p,
   #jobFaqAccordion .accordion-body li {
     font-size: 0.75rem;
   }
}
