/* Custom CSS for Remote InfoSec Jobs */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

/* Job card hover effect - optimized for horizontal layout */
.job-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 180px;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

/* Ensure cards stack vertically on mobile */
@media (max-width: 768px) {
  .job-card {
    min-height: auto;
  }
}

/* Apply button hover */
.apply-btn {
  transition: all 0.3s ease;
}

.apply-btn:hover {
  transform: scale(1.05);
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Stagger animation for job cards */
.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.2s; }
.job-card:nth-child(3) { animation-delay: 0.3s; }
.job-card:nth-child(4) { animation-delay: 0.4s; }
.job-card:nth-child(5) { animation-delay: 0.5s; }
.job-card:nth-child(6) { animation-delay: 0.6s; }

/* Job Description Formatting */
.job-description {
  font-size: 16px;
  line-height: 1.8;
  color: #374151;
}

.job-description p {
  margin-bottom: 1.25rem;
}

.job-description h1,
.job-description h2,
.job-description h3,
.job-description h4,
.job-description h5,
.job-description h6 {
  font-weight: 800;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.job-description h1 {
  font-size: 2rem;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.5rem;
}

.job-description h2 {
  font-size: 1.625rem;
  color: #667eea;
}

.job-description h3 {
  font-size: 1.375rem;
  color: #4b5563;
}

.job-description h4 {
  font-size: 1.25rem;
  color: #6b7280;
  font-weight: 700;
}

.job-description h5 {
  font-size: 1.125rem;
  color: #6b7280;
  font-weight: 700;
}

.job-description h6 {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.job-description ul,
.job-description ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  padding-left: 0.5rem;
}

.job-description ul {
  list-style-type: disc;
}

.job-description ol {
  list-style-type: decimal;
}

.job-description li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.job-description strong,
.job-description b {
  font-weight: 600;
  color: #111827;
}

.job-description a {
  color: #667eea;
  text-decoration: underline;
}

.job-description a:hover {
  color: #764ba2;
}

.job-description code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.875em;
}

.job-description pre {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.job-description blockquote {
  border-left: 4px solid #667eea;
  padding-left: 1rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: #4b5563;
}

/* Enhanced Description Formatting */

/* Section Headings */
.job-section-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: -0.025em;
}

.job-section-heading:first-child {
  margin-top: 0;
}

/* Paragraphs */
.job-paragraph {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #4b5563;
}

/* Lists */
.job-list {
  margin: 1.25rem 0 1.5rem 0;
  padding-left: 0;
  list-style: none;
}

.job-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: #4b5563;
}

.job-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #10b981;
  font-weight: 700;
  font-size: 1.1em;
}

/* Links */
.job-link {
  color: #667eea;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.job-link:hover {
  color: #764ba2;
  text-decoration-thickness: 2px;
}

/* Read More/Less */
.description-preview {
  position: relative;
}

.description-preview.truncated .description-full {
  display: none;
}

.description-preview.expanded .description-preview-content {
  display: none;
}

.description-fade {
  position: relative;
}

.description-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, white);
  pointer-events: none;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.read-more-btn:active {
  transform: translateY(0);
}

.read-more-btn svg {
  transition: transform 0.3s ease;
}

.read-more-btn.expanded svg {
  transform: rotate(180deg);
}

/* Quick Info Summary */
.quick-info {
  background: linear-gradient(135deg, #f0f4ff 0%, #f5f3ff 100%);
  border-left: 4px solid #667eea;
  padding: 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.quick-info-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.quick-info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quick-info-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: white;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #4b5563;
  font-weight: 500;
}

.quick-info-item svg {
  width: 1rem;
  height: 1rem;
  color: #667eea;
}

/* Benefit/Perk Highlighting */
.job-description:has(.benefit-keyword) .job-list li:has(.benefit-keyword) {
  background: #f0fdf4;
  padding: 0.5rem 0.75rem 0.5rem 1.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  border-radius: 0.375rem;
}

/* Improved Typography */
.job-description {
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
