/* ==========================================================================
   ENOS CAREERS - Clean & Optimized
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --navy: #002E5D;
  --navy-dark: #001a38;
  --green: #26C485;
  --green-hover: #1fab72;
  --green-glow: rgba(38, 196, 133, 0.3);
  --green-subtle: rgba(38, 196, 133, 0.08);
  --white: #FFFFFF;
  --black: #000000;

  /* Light Theme */
  --grey-50: #FAFAFA;
  --grey-200: #E8E8E8;
  --grey-500: #888888;
  --grey-600: #555555;
  --grey-800: #333333;

  /* Typography */
  --font-display: 'Lato', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey-800);
  background: var(--white);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--navy);
  color: var(--white);
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles */
a:focus,
button:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

p {
  color: var(--grey-600);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 40px;
  width: auto;
}

/* Centered Header for Homepage */
.header-centered {
  position: relative;
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: none;
}

.header-centered .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-centered .logo-link {
  display: block;
  margin-bottom: 1.5rem;
}

.header-centered .logo-large {
  height: 80px;
  width: auto;
}

.header-centered .page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Section
   -------------------------------------------------------------------------- */
.section {
  padding: 2rem 0 4rem;
  position: relative;
}

/* --------------------------------------------------------------------------
   Job Cards Grid
   -------------------------------------------------------------------------- */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

/* Job Card */
.job-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.5s ease forwards;
}

.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.15s; }
.job-card:nth-child(3) { animation-delay: 0.2s; }
.job-card:nth-child(4) { animation-delay: 0.25s; }

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-card:hover {
  border-color: var(--green);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.job-card-header {
  margin-bottom: var(--space-sm);
}

.job-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
}

.job-card:hover .job-title {
  color: var(--green);
}

.job-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--green-subtle);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.job-badge-icon {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.job-summary {
  color: var(--grey-600);
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-footer {
  display: flex;
  align-items: center;
}

.job-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green);
  transition: gap var(--transition-fast);
}

.job-card:hover .job-cta {
  gap: var(--space-sm);
  color: var(--green-hover);
}

.job-cta-arrow {
  transition: transform var(--transition-fast);
}

.job-card:hover .job-cta-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Job Detail Page
   -------------------------------------------------------------------------- */
.job-page {
  min-height: 100vh;
  padding-top: 80px;
}

.job-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
}

@media (max-width: 900px) {
  .job-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.job-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  padding: var(--space-lg) 0;
}

@media (max-width: 900px) {
  .job-sidebar {
    position: relative;
    top: 0;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--grey-600);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-fast);
}

.back-link:hover {
  color: var(--green);
  gap: var(--space-sm);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

.back-link svg {
  transition: transform var(--transition-fast);
}

.job-page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--navy);
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--green);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.apply-btn:hover {
  background: var(--green-hover);
  box-shadow: 0 4px 12px var(--green-glow);
}

/* Job Content */
.job-content {
  padding: 2rem 0 4rem;
}

.job-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--grey-200);
}

.job-section:last-of-type {
  border-bottom: none;
}

.job-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--navy);
}

.job-section p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--grey-600);
}

.job-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

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

.job-section ul {
  margin-left: 0;
  margin-bottom: 1rem;
}

.job-section li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey-600);
}

.job-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}

/* Apply Section */
.apply-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grey-200);
}

.apply-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.form-embed {
  background: var(--white);
  min-height: 400px;
}

.form-embed iframe {
  border: none;
}

/* --------------------------------------------------------------------------
   Iframe Styles
   -------------------------------------------------------------------------- */
iframe {
  border: none;
}
