/* ==========================================================================
   MACTEC Global - Careers Open Jobs & Detail Modal Styling
   ========================================================================== */

/* Section Container */
.mactec-jobs-section {
  background: #f8fafc;
  padding: 70px 0 80px;
  position: relative;
  border-bottom: 1px solid #e2e8f0;
}

.mactec-jobs-section .mactec-inner-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mactec-jobs-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.mactec-jobs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 114, 17, 0.12);
  color: #e87211;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.mactec-jobs-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e87211;
  box-shadow: 0 0 0 3px rgba(232, 114, 17, 0.25);
  animation: mactecPulse 2s infinite;
}

@keyframes mactecPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 114, 17, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(232, 114, 17, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(232, 114, 17, 0); }
}

.mactec-jobs-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: #081b30;
  line-height: 1.25;
  margin: 0 0 14px;
}

.mactec-jobs-desc {
  font-size: 16px;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* Jobs Grid */
.mactec-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 26px;
}

@media (max-width: 480px) {
  .mactec-jobs-grid {
    grid-template-columns: 1fr;
  }
}

/* Job Card (List View - Less Content) */
.mactec-job-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(8, 27, 48, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mactec-job-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e87211, #ff9442);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mactec-job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(8, 27, 48, 0.1);
  border-color: rgba(232, 114, 17, 0.35);
}

.mactec-job-card:hover::before {
  opacity: 1;
}

.mactec-job-card.mactec-job-hidden {
  display: none !important;
}

.mactec-job-card.mactec-job-revealed {
  animation: mactecCardFadeIn 0.35s ease forwards;
}

@keyframes mactecCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mactec-job-card-top {
  margin-bottom: 20px;
}

.mactec-job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mactec-job-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #081b30;
  line-height: 1.35;
  margin: 0;
}

.mactec-job-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.mactec-job-pill-fulltime {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.mactec-job-pill-parttime {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Card Metadata (Less Content) */
.mactec-job-card-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.mactec-job-meta-row {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
}

.mactec-job-meta-label {
  font-weight: 600;
  color: #64748b;
  min-width: 105px;
  flex-shrink: 0;
}

.mactec-job-meta-value {
  color: #0f172a;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mactec-job-meta-value.mactec-salary-value {
  color: #081b30;
  font-weight: 700;
}

.mactec-job-meta-value svg {
  color: #e87211;
  flex-shrink: 0;
}

/* Card Button */
.mactec-job-card-bottom {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.mactec-btn-view-detail {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: #081b30;
  border: 1.5px solid #081b30;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.mactec-btn-view-detail:hover,
.mactec-btn-view-detail:focus {
  background: #081b30;
  color: #ffffff;
  border-color: #081b30;
  box-shadow: 0 4px 14px rgba(8, 27, 48, 0.2);
}

.mactec-btn-view-detail svg {
  transition: transform 0.2s ease;
}

.mactec-btn-view-detail:hover svg {
  transform: translateX(4px);
}

/* View All Action */
.mactec-jobs-actions {
  text-align: center;
  margin-top: 40px;
}

.mactec-btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #081b30;
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(8, 27, 48, 0.2);
  transition: all 0.25s ease;
}

.mactec-btn-view-all:hover,
.mactec-btn-view-all:focus {
  background: #e87211;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(232, 114, 17, 0.35);
}

.mactec-btn-view-all-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.mactec-btn-view-all-icon {
  transition: transform 0.3s ease;
}

.mactec-btn-view-all.is-expanded .mactec-btn-view-all-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   Full Screen Popup / Modal Dialog
   ========================================================================== */
.mactec-job-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 27, 48, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mactec-job-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mactec-job-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mactec-job-modal-backdrop.is-open .mactec-job-modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.mactec-job-modal-header {
  background: #081b30;
  color: #ffffff;
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  border-bottom: 2px solid #e87211;
}

.mactec-job-modal-kicker {
  display: inline-block;
  color: #ff9442;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.mactec-job-modal-title {
  color: #ffffff;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  margin: 0;
  line-height: 1.25;
}

.mactec-job-modal-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mactec-job-modal-close:hover,
.mactec-job-modal-close:focus {
  background: #e87211;
  transform: rotate(90deg);
}

/* Modal Body */
.mactec-job-modal-body {
  padding: 30px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(90vh - 190px);
}

.mactec-job-modal-body::-webkit-scrollbar {
  width: 8px;
}

.mactec-job-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.mactec-job-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.mactec-job-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal Details Grid */
.mactec-modal-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 640px) {
  .mactec-modal-details-grid {
    grid-template-columns: 1fr;
  }
}

.mactec-modal-detail-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.mactec-modal-detail-item.mactec-detail-full {
  grid-column: 1 / -1;
}

.mactec-modal-detail-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mactec-modal-detail-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.55;
  white-space: pre-line;
}

.mactec-modal-detail-value.mactec-val-highlight {
  color: #081b30;
  font-weight: 700;
  font-size: 17px;
}

.mactec-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
}

.mactec-modal-badge-yes {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.mactec-modal-badge-no {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Modal Footer */
.mactec-job-modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 520px) {
  .mactec-job-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

.mactec-btn-modal-close-secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mactec-btn-modal-close-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.mactec-btn-modal-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #e87211;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(232, 114, 17, 0.3);
  transition: all 0.25s ease;
  text-decoration: none;
}

.mactec-btn-modal-apply:hover,
.mactec-btn-modal-apply:focus {
  background: #cf5e05;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 114, 17, 0.4);
}

.mactec-btn-modal-apply svg {
  transition: transform 0.2s ease;
}

.mactec-btn-modal-apply:hover svg {
  transform: translateX(4px);
}

/* Applied Position Banner in Career Form */
.mactec-applied-role-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mactec-applied-role-text {
  font-size: 14px;
  color: #1e3a8a;
  font-weight: 600;
}

.mactec-applied-role-name {
  color: #e87211;
  font-weight: 800;
}

.mactec-applied-role-clear {
  background: #dbeafe;
  color: #1e40af;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mactec-applied-role-clear:hover {
  background: #bfdbfe;
}
