/* ==========================================================================
   Code Regime - Career & Job Application Stylesheet
   ========================================================================== */

:root {
  --primary-blue: #0062d2;
  --primary-hover: #0051b3;
  --accent-blue: #e8f2fe;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #0062d2;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --error-color: #ef4444;
  --success-color: #10b981;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 30px rgba(0, 98, 210, 0.12);
  --transition: all 0.25s ease-in-out;

  /* Typography matching index.html */
  --font-family: 'Open Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Page Layout */
.career-page {
  background-color: #ffffff;
  color: var(--text-dark);
  font-family: var(--font-family);
  min-height: 100vh;
}

/* Headings font matching index.html */
h1, h2, h3, h4, h5, h6,
.career-title,
.locations-title,
.location-name,
.thank-you-title,
.timeline-heading,
.step-title {
  font-family: var(--header-family);
}

/* Body and UI elements font matching index.html */
p, span, label, input, select, textarea, button,
.form-input, .form-select, .form-textarea, .submit-btn,
.upload-instruction, .upload-helper-text, .location-address,
.step-desc, .career-subtitle, .career-breadcrumb,
.hr-text a, .hr-text span, .btn-secondary {
  font-family: var(--font-family);
}

.career-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Breadcrumb */
.career-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.career-breadcrumb a {
  color: var(--primary-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.career-breadcrumb a:hover {
  text-decoration: underline;
}

.career-breadcrumb .separator {
  color: var(--text-subtle);
  font-size: 0.75rem;
}

.career-breadcrumb .current {
  color: var(--text-muted);
  font-weight: 500;
}

/* Page Heading */
.career-header {
  margin-bottom: 36px;
}

.career-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.career-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.6;
}

/* Form Container */
.job-form-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 0;
}

.job-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-group label .req {
  color: var(--error-color);
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background-color: #fff;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 98, 210, 0.12);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* Phone Input with Country Code Selector */
.phone-input-group {
  display: flex;
  gap: 10px;
}

.country-code-select {
  width: 150px;
  flex-shrink: 0;
  cursor: pointer;
}

.phone-number-input {
  flex-grow: 1;
}

/* Radio Group: Sex */
.radio-group {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 4px;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #334155;
  user-select: none;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-blue);
  cursor: pointer;
  margin: 0;
}

/* Total Experience Dual Dropdown */
.experience-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Hero Resume Upload Card (Dynamic Step 1) */
.hero-upload-group {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.hero-upload-group:focus-within,
.hero-upload-group:hover {
  border-color: #94a3b8;
}

.upload-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.upload-badge-tag i {
  color: #00ab15;
}

.upload-heading {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.45;
}

/* Section divider */
.form-section-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 28px 0 20px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.form-section-divider span {
  padding: 0 16px;
  background: #ffffff;
}

/* Parsing Scanning State */
.parsing-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 14px;
  animation: fadeIn 0.3s ease;
}

.parsing-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #bfdbfe;
  border-top-color: #0062d2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.parsing-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e3a8a;
}

.parsing-sub {
  font-size: 0.8rem;
  color: #3b82f6;
  margin-top: 2px;
}

/* Auto-fill Alert */
.autofill-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  color: #166534;
  animation: slideDown 0.4s ease;
}

.autofill-alert i {
  color: #15803d;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.autofill-alert-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.autofill-alert-content strong {
  color: #14532d;
  font-weight: 700;
}

.autofill-alert-content span {
  color: #166534;
  font-size: 0.82rem;
}

/* Auto-filled input highlight pulse */
.auto-filled-glow {
  border-color: #00ab15 !important;
  background-color: #f0fdf4 !important;
  box-shadow: 0 0 0 3px rgba(0, 171, 21, 0.15) !important;
  transition: all 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Drag & Drop File Upload Box */
.file-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  background-color: #fafbfc;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
  border-color: var(--primary-blue);
  background-color: var(--accent-blue);
}

.upload-icon-wrapper {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--primary-blue);
}

.upload-icon-wrapper svg {
  width: 26px;
  height: 26px;
}

.upload-instruction {
  font-size: 0.95rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 4px;
}

.upload-instruction .browse-link {
  color: var(--primary-blue);
  text-decoration: underline;
  font-weight: 600;
}

.upload-helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Selected File Preview Box */
.selected-file-card {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.selected-file-icon {
  color: var(--primary-blue);
  flex-shrink: 0;
}

.selected-file-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.selected-file-size {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.remove-file-btn {
  background: none;
  border: none;
  color: var(--error-color);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.remove-file-btn:hover {
  background-color: #fee2e2;
}

/* Submit Action Button */
.form-actions {
  margin-top: 10px;
}

.submit-btn {
  background-color: #0056b3;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
}

.submit-btn:hover:not(:disabled) {
  background-color: #004494;
  box-shadow: 0 6px 16px rgba(0, 86, 179, 0.35);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Error Highlighting */
.has-error .form-input,
.has-error .form-select,
.has-error .form-textarea,
.has-error .file-upload-zone {
  border-color: var(--error-color) !important;
  background-color: #fff8f8;
}

.error-message {
  font-size: 0.8rem;
  color: var(--error-color);
  font-weight: 500;
  display: none;
}

.has-error .error-message {
  display: block;
}

/* ==========================================================================
   Explore Our Locations Section
   ========================================================================== */

.locations-section {
  padding: 80px 20px 100px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-color);
}

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

.locations-title {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 50px;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
}

.location-card {
  background: transparent;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.location-icon-box {
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 20px;
  opacity: 0.85;
  transition: var(--transition);
}

.location-card:hover .location-icon-box {
  opacity: 1;
  transform: translateY(-4px);
}

.location-icon-box svg {
  max-height: 80px;
  width: auto;
  stroke: #475569;
  fill: none;
  stroke-width: 1.5;
}

.location-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.location-address {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 290px;
  margin: 0 auto;
}

/* ==========================================================================
   Thank You Page Styles
   ========================================================================== */

.thank-you-wrapper {
  max-width: 800px;
  margin: 60px auto 100px;
  padding: 0 20px;
  text-align: center;
}

.thank-you-badge {
  width: 80px;
  height: 80px;
  background: #ecfdf5;
  color: var(--success-color);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.thank-you-badge svg {
  width: 44px;
  height: 44px;
}

.thank-you-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
}

.thank-you-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 650px;
  margin: 0 auto 40px;
}

/* Timeline Pipeline */
.timeline-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  margin-bottom: 40px;
}

.timeline-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 24px;
  text-align: center;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.timeline-step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* HR Contact Card */
.hr-contact-box {
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
}

.hr-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hr-icon {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.hr-text {
  text-align: left;
}

.hr-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

.hr-text a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.hr-text a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.thank-you-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .career-title {
    font-size: 2rem;
  }
  .career-container {
    padding: 30px 16px 60px;
  }
  .phone-input-group {
    flex-direction: column;
  }
  .country-code-select {
    width: 100%;
  }
  .experience-row {
    grid-template-columns: 1fr;
  }
  .locations-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .timeline-steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
