/* ===========================================================
    JOBS_BACK_CARD.CSS - BACK CARD STYLES (MOBILE OPTIMIZED)
    Maintains desktop layout on mobile devices
    =========================================================== */

/* ===========================================================
    1) BACK CARD CONTAINER
    =========================================================== */
.back {
  width: 100%;
  height: 100%;
}

.job-card-back-modern {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ===========================================================
    2) HEADER SECTION
    =========================================================== */
.back-card-header-modern {
  background:
    linear-gradient(#0000 23px, rgba(255, 255, 255, 0.08) 24px) 0 0 / 24px 24px,
    linear-gradient(90deg, #0000 23px, rgba(255, 255, 255, 0.08) 24px) 0 0 / 24px 24px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.03)),
    #000066;
  padding: 24px 20px;
  color: #ffffff;
  position: relative;
}

.header-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.header-left-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header-right-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.back-job-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #00FFEA;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.back-salary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(200, 230, 201, 0.95);
  border: 2px solid #28a745;
  border-radius: 50px;
  color: #166534;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-salary-badge i {
  font-size: 1.2rem;
  color: #28a745;
}

.header-industry-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.header-industry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.header-industry-pill i {
  font-size: 0.9rem;
}

.header-industry-pill.primary {
  background: rgba(139, 92, 246, 0.9);
  color: #ffffff;
  border: 1px solid rgba(109, 40, 217, 0.8);
}

.header-industry-pill.primary:hover {
  background: rgba(109, 40, 217, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.3);
}

.header-industry-pill.secondary {
  background: rgba(88, 28, 135, 0.9);
  color: #ffffff;
  border: 1px solid rgba(76, 29, 149, 0.8);
}

.header-industry-pill.secondary:hover {
  background: rgba(76, 29, 149, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(76, 29, 149, 0.3);
}

.back-meta-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.back-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.back-meta-item i {
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.back-meta-item span {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.back-meta-item i.bi-geo-alt-fill {
  color: #dc3545;
}

/* ===========================================================
    3) CARD BODY
    =========================================================== */
.back-card-body-modern {
  flex: 1;
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-card-body-modern::-webkit-scrollbar {
  width: 6px;
}

.back-card-body-modern::-webkit-scrollbar-track {
  background: #f5f7fa;
  border-radius: 10px;
}

.back-card-body-modern::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.back-card-body-modern::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===========================================================
    4) SECTION HEADERS
    =========================================================== */
.section-header-modern {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-header-modern i {
  color: #010080;
  font-size: 1.3rem;
}

.section-title-modern {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===========================================================
    5) QUICK OVERVIEW SECTION
    =========================================================== */
.back-summary-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-left: 4px solid #010080;
  border-radius: 12px;
  padding: 16px 18px;
}

.summary-text-clean {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  margin: 0;
}

/* ===========================================================
    6) BULLETED LIST
    =========================================================== */
.back-bullets-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}

.bullets-list-modern {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bullet-item-modern {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.bullet-item-modern:hover {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bullet-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #010080 0%, #0056b3 100%);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(1, 0, 128, 0.1);
}

.bullet-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #334155;
  font-weight: 500;
}

/* ===========================================================
    7) DETAILS GRID
    =========================================================== */
.back-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-card-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.detail-card-modern:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.detail-icon-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.detail-icon-wrapper i {
  font-size: 1.3rem;
  color: #ffffff;
}

.experience-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.job-type-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.arrangement-icon {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.date-icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===========================================================
    8) SKILLS SECTION
    =========================================================== */
.back-skills-section {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 18px;
}

.skills-grid-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-badge-modern {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #ffffff;
  color: #010080;
  border: 1px solid rgba(1, 0, 128, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.skill-badge-modern:hover {
  background: linear-gradient(135deg, #010080 0%, #0056b3 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(1, 0, 128, 0.2);
}

/* ===========================================================
    9) DESCRIPTION SECTION
    =========================================================== */
.back-description-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}

.description-scroll-container {
  height: 180px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.description-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.description-scroll-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.description-scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
  border-radius: 10px;
  border: 2px solid #f8fafc;
}

.description-scroll-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.description-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #334155;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===========================================================
    10) POSTED DATE
    =========================================================== */
.back-posted-date {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-top: auto;
}

.back-posted-date i {
  color: #94a3b8;
  font-size: 1rem;
}

/* ===========================================================
    11) FOOTER
    =========================================================== */
.back-card-footer-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e2e8f0;
  gap: 12px;
}

.btn-back-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-modern:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateX(-4px);
}

.btn-back-modern i {
  font-size: 1.1rem;
}

.footer-actions-modern {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-like-modern {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-like-modern:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: #fef2f2;
  transform: scale(1.1);
}

.btn-like-modern .bi-heart-fill {
  color: #dc3545;
}

.btn-like-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-view-job-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #010080 0%, #0056b3 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(1, 0, 128, 0.2);
}

.btn-view-job-modern:hover {
  background: linear-gradient(135deg, #000066 0%, #004494 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(1, 0, 128, 0.3);
  color: #ffffff;
}

.btn-view-job-modern i {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-view-job-modern:hover i {
  transform: translateX(4px);
}

.btn-view-job-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===========================================================
    12) RESPONSIVE - MOBILE (MAINTAIN DESKTOP LAYOUT)
    =========================================================== */

/* Tablet and below */
@media (max-width: 991.98px) {
  .job-card-back-modern {
    border-radius: 16px;
  }
}

/* Mobile optimizations - stack header vertically */
@media (max-width: 767.98px) {
  .back-card-header-modern {
    padding: 20px 16px;
  }

  /* Stack header content vertically on mobile */
  .header-content-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .header-left-col {
    gap: 10px;
    width: 100%;
  }

  .header-right-col {
    align-items: flex-start;
    width: 100%;
  }

  .back-job-title {
    font-size: 1.3rem;
    line-height: 1.3;
  }

  .back-salary-badge {
    font-size: 1rem;
    padding: 10px 16px;
    align-self: flex-start;
  }

  .back-salary-badge i {
    font-size: 1.1rem;
  }

  .header-industry-pills {
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .header-industry-pill {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .header-industry-pill i {
    font-size: 0.85rem;
  }

  .back-meta-item {
    font-size: 0.9rem;
  }

  .back-meta-item i {
    font-size: 0.95rem;
  }

  .back-card-body-modern {
    padding: 20px 16px;
    gap: 20px;
  }

  .section-title-modern {
    font-size: 0.95rem;
  }

  .section-header-modern i {
    font-size: 1.15rem;
  }

  .back-summary-section,
  .back-bullets-section,
  .back-skills-section,
  .back-description-section {
    padding: 16px;
  }

  .summary-text-clean {
    font-size: 0.9rem;
  }

  .bullet-item-modern {
    padding: 10px 12px;
    gap: 10px;
  }

  .bullet-text {
    font-size: 0.85rem;
  }

  /* Keep 2-column grid on mobile */
  .back-details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .detail-card-modern {
    padding: 12px 14px;
  }

  .detail-icon-wrapper {
    width: 36px;
    height: 36px;
  }

  .detail-icon-wrapper i {
    font-size: 1.15rem;
  }

  .detail-label {
    font-size: 0.7rem;
  }

  .detail-value {
    font-size: 0.9rem;
  }

  .skill-badge-modern {
    font-size: 0.8rem;
    padding: 7px 12px;
  }

  .description-scroll-container {
    height: 160px;
  }

  .description-text {
    font-size: 0.9rem;
  }

  .back-posted-date {
    font-size: 0.8rem;
    padding: 10px 14px;
  }

  .back-card-footer-modern {
    padding: 14px 16px;
  }

  .btn-back-modern {
    font-size: 0.9rem;
    padding: 9px 16px;
  }

  .btn-like-modern {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .btn-view-job-modern {
    font-size: 0.9rem;
    padding: 10px 20px;
  }

  /* Disable hover effects on mobile */
  .bullet-item-modern:hover,
  .detail-card-modern:hover,
  .skill-badge-modern:hover {
    transform: none;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .back-card-header-modern {
    padding: 18px 14px;
  }

  .header-content-wrapper {
    gap: 12px;
  }

  .back-job-title {
    font-size: 1.15rem;
  }

  .back-salary-badge {
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  .back-salary-badge i {
    font-size: 0.95rem;
  }

  .header-industry-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .back-meta-item {
    font-size: 0.85rem;
  }

  .back-card-body-modern {
    padding: 16px 14px;
    gap: 18px;
  }

  .back-summary-section,
  .back-bullets-section,
  .back-skills-section,
  .back-description-section {
    padding: 14px;
  }

  .section-title-modern {
    font-size: 0.85rem;
  }

  .detail-icon-wrapper {
    width: 32px;
    height: 32px;
  }

  .detail-icon-wrapper i {
    font-size: 1rem;
  }

  .detail-label {
    font-size: 0.65rem;
  }

  .detail-value {
    font-size: 0.85rem;
  }

  .skill-badge-modern {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .description-scroll-container {
    height: 140px;
  }

  .back-card-footer-modern {
    padding: 12px 14px;
  }

  .btn-view-job-modern {
    font-size: 0.85rem;
    padding: 9px 18px;
  }
}

/* Landscape mode on mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
  .description-scroll-container {
    height: 120px;
  }
}

/* ===========================================================
    13) PRINT STYLES
    =========================================================== */
@media print {
  .back-card-footer-modern {
    display: none;
  }

  .back-card-body-modern,
  .description-scroll-container {
    overflow: visible;
    height: auto;
  }
}