/* Modern Job Portal Styles - Child Theme */

/* Global Variables */
:root {
  --primary-red: #E1211C;
  --primary-black: #000000;
  --text-gray: #6b7280;
  --light-gray: #f3f4f6;
  --border-gray: #e5e7eb;
  --success-green: #10b981;
  --error-red: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

/* Job Portal Container */
.job-portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.job-portal-title {
  text-align: center;
  color: var(--primary-black);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
}

.job-portal-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-black));
  border-radius: 2px;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
}

.step {
  display: flex;
  align-items: center;
  color: var(--text-gray);
  font-weight: 500;
  font-size: 0.875rem;
}

.step.active {
  color: var(--primary-red);
}

.step.completed {
  color: var(--success-green);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  border: 2px solid var(--border-gray);
  background: white;
}

.step.active .step-number {
  background: var(--primary-red);
  color: white;
  border-color: var(--primary-red);
}

.step.completed .step-number {
  background: var(--success-green);
  color: white;
  border-color: var(--success-green);
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--border-gray);
  margin: 0 1rem;
}

.step.completed + .step .step-connector {
  background: var(--success-green);
}

/* Job Listings */
.job-listings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.job-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-gray);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-black));
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.job-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-black);
  margin: 0 0 0.5rem 0;
}

.job-meta {
  display: flex;
  align-items: center;
  color: var(--text-gray);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.job-meta i {
  margin-right: 0.5rem;
  color: var(--primary-red);
}

.job-description {
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.apply-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 1rem;
}

.apply-btn:hover {
  background: #c41e1a;
  transform: translateY(-1px);
}

/* Modern Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-radius: 20px 20px 0 0;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-black);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-gray);
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--light-gray);
  color: var(--primary-red);
}

.modal-body {
  padding: 2rem;
}

/* Job Information Display */
.job-info-section {
  margin-bottom: 2rem;
}

.job-info-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-red), var(--primary-black));
  color: white;
  border-radius: 12px;
}

.job-info-header h3 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.job-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-card {
  background: var(--light-gray);
  padding: 1rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary-red);
}

.info-card h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-black);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-card p {
  margin: 0;
  color: var(--text-gray);
}

.job-details-section {
  margin-bottom: 2rem;
}

.job-detail-block {
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.job-detail-block h4 {
  color: var(--primary-black);
  font-size: 1.1rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
}

.job-detail-block h4 i {
  margin-right: 0.5rem;
  color: var(--primary-red);
}

/* PDF Viewer */
.pdf-viewer-container {
  margin: 2rem 0;
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  overflow: hidden;
  background: var(--light-gray);
}

.pdf-viewer-header {
  background: var(--primary-black);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-viewer {
  width: 100%;
  height: 500px;
  border: none;
}

.pdf-download-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Questions Section */
.questions-section {
  background: linear-gradient(135deg, #fef7f7, #fef2f2);
  border: 2px solid var(--primary-red);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.questions-title {
  color: var(--primary-black);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.question-group {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-gray);
}

.question-text {
  font-weight: 600;
  color: var(--primary-black);
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.radio-option:hover {
  border-color: var(--primary-red);
  background: #fef7f7;
}

.radio-option input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: var(--primary-red);
}

.radio-option.selected {
  border-color: var(--primary-red);
  background: var(--primary-red);
  color: white;
}

/* Form Styles */
.application-form {
  margin-top: 2rem;
}

.form-section {
  margin-bottom: 2rem;
}

.section-title {
  color: var(--primary-black);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-red);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  color: var(--primary-black);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-label.required::after {
  content: ' *';
  color: var(--primary-red);
}

.form-input {
  padding: 0.75rem;
  border: 2px solid var(--border-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(225, 33, 28, 0.1);
}

.form-input:invalid {
  border-color: var(--error-red);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.75rem;
  accent-color: var(--primary-red);
  transform: scale(1.2);
}

/* Employment History */
.employment-entry {
  background: var(--light-gray);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.employment-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.employment-entry-title {
  font-weight: 600;
  color: var(--primary-black);
}

.remove-employment {
  background: var(--error-red);
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

.add-employment-btn {
  background: var(--success-green);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

/* Buttons */
.primary-btn {
  background: var(--primary-red);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.primary-btn:hover:not(:disabled) {
  background: #c41e1a;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.primary-btn:disabled {
  background: var(--text-gray);
  cursor: not-allowed;
}

.secondary-btn {
  background: var(--primary-black);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.secondary-btn:hover {
  background: #333;
}

/* Progress and Loading */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-red), var(--primary-black));
  transition: width 0.3s ease;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fed7aa;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .job-portal-container {
    padding: 1rem;
  }
  
  .job-portal-title {
    font-size: 2rem;
  }
  
  .step-indicator {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-connector {
    width: 2px;
    height: 30px;
    margin: 0.5rem 0;
  }
  
  .job-listings {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .modal-header,
  .modal-body {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .job-info-grid {
    grid-template-columns: 1fr;
  }
  
  .radio-group {
    flex-direction: column;
  }
}