:root {
  --primary-color: #ff6600;
  --secondary-color: #2c3e50;
  --accent-color: #27ae60;
  --light-bg: #f8f9fa;
  --gradient-primary: linear-gradient(135deg,
      #ff6600 0%,
      #ff8533 50%,
      #ffaa66 100%);
  --gradient-secondary: linear-gradient(135deg,
      #2c3e50 0%,
      #34495e 50%,
      #4a6741 100%);
  --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.page-header {
  text-align: center;
  padding: 80px 20px;
  background: var(--gradient-secondary);
  color: white;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.page-header h1 {
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
  font-size: 1.3rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Culture Section */
.culture-section {
  margin-bottom: 80px;
}

.culture-section h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 60px;
  color: var(--secondary-color);
  position: relative;
}

.culture-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.culture-item {
  background: white;
  padding: 50px 35px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 102, 0, 0.1);
}

.culture-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  transition: left 0.6s ease;
}

.culture-item:hover::before {
  left: 100%;
}

.culture-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-heavy);
}

.culture-icon {
  width: 90px;
  height: 90px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2.2rem;
  color: white;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(255, 102, 0, 0.3);
}

.culture-item h3 {
  font-size: 1.6rem;
  margin-bottom: 18px;
  color: var(--secondary-color);
  position: relative;
  z-index: 1;
}

.culture-item p {
  color: #666;
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
}

/* Jobs Section */
.jobs-section h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color);
  position: relative;
}

.jobs-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  display: none;
}

.job-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  color: #374151;
  box-shadow: var(--shadow-light);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.job-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: var(--shadow-light);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 102, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.job-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--gradient-primary);
}

.job-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 10px;
}

.job-header h3 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 0;
  line-height: 1.3;
}

.job-type {
  background: var(--gradient-primary);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(255, 102, 0, 0.3);
}

.job-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9rem;
}

.job-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  padding: 6px 12px;
  border-radius: 15px;
}

.job-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.job-details p {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 0.95rem;
  flex: 1;
}

.job-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  margin-top: auto;
}

.skill-tag {
  background: #fee2e2;
  color: #b91c1c;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.skill-tag:hover {
  background: #fecaca;
  color: #991b1b;
  transform: translateY(-2px);
}

.apply-btn {
  background: linear-gradient(135deg, #000000, #333333);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.apply-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.apply-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s ease;
}

.apply-btn:hover::before {
  left: 100%;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 80px;
  /* Account for header height */
  left: 0;
  width: 100%;
  height: calc(100vh - 80px);
  /* Full height minus header */
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: flex-start;
  /* Align to top instead of center */
  padding-top: 20px;
  /* Small padding from top */
  padding-bottom: 20px;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
  /* Allow scrolling overlay if needed */
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: calc(100vh - 120px);
  /* Account for header + padding */
  overflow-y: auto;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-heavy);
  margin: auto;
  /* Center vertically within overlay */
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 30px 15px;
  border-bottom: 2px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gradient-primary);
  color: white;
  border-radius: 20px 20px 0 0;
}

.modal-header h2 {
  font-size: 1.3rem;
  padding-left: 10px;
  margin: 0;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
  padding: 8px 12px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Application Info Section */
.application-info {
  padding: 20px 25px;
  background-color: white;
}

.email-instruction {
  text-align: center;
}

.email-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 8px 20px rgba(255, 102, 0, 0.3);
}

.email-instruction h3 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 6px;
}

.email-instruction p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 10px;
}

.email-address {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 10px;
  margin: 10px 0;
  border-left: 4px solid var(--primary-color);
}

.email-address strong {
  font-size: 1.1rem;
  color: var(--secondary-color);
}

.subject-line {
  background: #fff8f0;
  padding: 10px;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid rgba(255, 102, 0, 0.2);
}

.subject-line p {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.application-tips {
  text-align: left;
  margin: 12px 0 0 0;
  background: #f8f9fa;
  padding: 14px;
  border-radius: 10px;
}

.application-tips h4 {
  color: var(--secondary-color);
  margin-bottom: 8px;
  font-size: 1rem;
}

.application-tips ul {
  margin-left: 20px;
  color: #555;
}

.application-tips li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.email-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 0;
  flex-wrap: wrap;
}

.email-btn {
  background: linear-gradient(135deg, #000000, #333333);
  color: white;
  padding: 12px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.email-btn:hover {
  color: white;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.close-info-btn {
  background: #6c757d;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.close-info-btn:hover {
  background: #5a6268;
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.loading-spinner {
  display: none;
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.job-card.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-jobs-message {
  text-align: center;
  padding: 2rem;
  font-size: 1.2rem;
  color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2.5rem;
  }

  .culture-section h2,
  .jobs-section h2 {
    font-size: 2.2rem;
  }

  .culture-grid,
  .jobs-grid {
    grid-template-columns: 1fr;
  }

  .job-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-meta {
    flex-direction: column;
    gap: 15px;
  }

  .modal-overlay {
    top: 40px;
    /* Smaller header on mobile */
    height: calc(100vh - 40px);
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
    max-height: calc(100vh - 60px);
  }

  .modal-header {
    padding: 15px 20px 10px;
  }

  .modal-header h2 {
    font-size: 1.1rem;
  }

  .application-info {
    padding: 20px;
  }

  .email-buttons {
    flex-direction: column;
    align-items: center;
  }

  .email-btn,
  .close-info-btn {
    width: 100%;
    max-width: 250px;
  }
}