/* =====================================================
   🌈 GLOBAL FONTS & RESET
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  color: #ffffff;
}

/* =====================================================
   🌈 ANIMATED BACKGROUND (SAME AS SELECT TEMPLATE)
===================================================== */
.animated-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 30%, #1c1c33, #0e0e1f);
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.6;
  animation: floatOrbs 10s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px; height: 500px;
  top: 10%; left: 5%;
  background: radial-gradient(circle, #8e2de2, #4a00e0);
}

.orb-2 {
  width: 400px; height: 400px;
  top: 40%; left: 60%;
  background: radial-gradient(circle, #00c9ff, #92fe9d);
}

.orb-3 {
  width: 350px; height: 350px;
  top: 70%; left: 30%;
  background: radial-gradient(circle, #ff6a00, #ee0979);
}

@keyframes floatOrbs {
  from { transform: translateY(0); }
  to   { transform: translateY(-50px) translateX(20px); }
}

/* =====================================================
   📐 LAYOUT VARIABLES
===================================================== */
:root {
  --sidebar-w: 230px;
}

/* =====================================================
   🌐 SIDEBAR (REUSED EXACT STYLE)
===================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 30px 20px;

  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);

  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.sidebar h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 25px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =====================================================
   🔘 SIDEBAR BUTTONS (SAME AS SELECT TEMPLATE)
===================================================== */


/* =====================================================
   📄 MAIN CONTENT AREA
===================================================== */
.jobs-area {
  margin-left: var(--sidebar-w);
  padding: 50px;
  width: calc(100% - var(--sidebar-w));
  position: relative;
  z-index: 2;
}

/* =====================================================
   📝 TITLES & TEXT
===================================================== */
.jobs-title {
  font-family: 'Outfit', sans-serif;
  font-size: 48px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.jobs-subtitle {
  text-align: center;
  font-size: 18px;
  color: #cfcfcf;
  margin-bottom: 50px;
}

/* =====================================================
   🧩 JOBS GRID
===================================================== */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* =====================================================
   💼 JOB CARD
===================================================== */
.job-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 25px;

  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 35px rgba(102, 126, 234, 0.45);
}

.job-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.job-card p {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 12px;
}

/* =====================================================
   ✅ APPLY BUTTON
==================================================== */


/* =====================================================
   🦶 FOOTER SUPPORT

/* ===============================
   JOB CARD – FIX IMAGE & LAYOUT
================================ */

/* Card container */
.job-card {
  width: 360px;                 /* medium-wide */
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;             /* 🔥 prevents image overflow */
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;       /* image top, content bottom */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(102,126,234,0.4);
}

/* ===============================
   IMAGE SECTION
================================ */

.job-card img {
  width: 100%;
  height: 200px;                /* controlled height */
  object-fit: cover;            /* 🔥 fills box correctly */
  display: block;
}

/* ===============================
   CONTENT SECTION
================================ */

.job-card-content {
  padding: 18px;
  text-align: left;
}

.job-card-content h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #ffffff;
}

.job-card-content p {
  font-size: 14px;
  color: #d0d0d0;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* View Details button */

/* ===============================
   JOB LIST GRID – 2 PER ROW
================================ */

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* ✅ ONLY 2 per row */
  gap: 40px;                              /* spacing between cards */
  justify-content: center;
  align-items: stretch;
  max-width: 920px;                      /* keeps layout centered */
  margin: 40px auto;
}

/* ===============================
   WIDER JOB CARD
================================ */

.job-card {
  width: 100%;                           /* fill grid column */
  max-width: 440px;                     /* 🔥 wider cards */
  margin: 0 auto;                       /* center inside column */
}
/* ----------------------------
   Unified Button Styles (Sidebar + Jobs)
   Matches Select Template page look
   ---------------------------- */

/* Sidebar / Primary buttons (menu-btn) */
.menu-btn {
  width: 100%;
  padding: 14px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  color: #fff;

  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;

  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
}

.menu-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.5s ease;
}

.menu-btn:hover::before {
  left: 100%;
}

.menu-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.55);
}

/* Optional pressed state */
.menu-btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

/* Jobs button override (use same visual language but keep it selectable) */
#jobsBtn {
  /* Use same base gradient as menu buttons but you can change tint if needed */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.35);
}

/* ----------------------------
   Apply / View buttons (match the same style)
   ---------------------------- */

.apply-btn,
.job-card-content .view-btn,
.select-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.apply-btn::before,
.job-card-content .view-btn::before,
.select-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.45s ease;
}

.apply-btn:hover::before,
.job-card-content .view-btn:hover::before,
.select-btn:hover::before {
  left: 100%;
}

.apply-btn:hover,
.job-card-content .view-btn:hover,
.select-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* Smaller / secondary view button variant (if you want it visually lighter) */
.job-card-content .view-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
}

/* Accessibility: focus styling */
.menu-btn:focus,
.apply-btn:focus,
.job-card-content .view-btn:focus,
.select-btn:focus {
  outline: 3px solid rgba(102,126,234,0.18);
  outline-offset: 2px;
}


/* =====================================================
   ===================== OVERRIDES FOR JOB DETAIL PAGE
   Use only on detail page by either:
     - rendering <body class="no-sidebar"> OR
     - keeping the page container with class "job-detail-page"
   This block is intentionally scoped and placed at the end
   ===================================================== */

/* Make page white + black when showing detail */
/* Keep the body white, but we will ensure the footer stays dark */
body.job-detail-page {
  background: #ffffff !important;
}

/* Only turn the job content text black, not the footer text */
body.job-detail-page .jobs-area {
  color: #000000 !important;
}

/* Hide animated background for the detail page */
body.no-sidebar .animated-background,
.job-detail-page .animated-background {
  display: none !important;
}

/* Hide the sidebar only when detail page/no-sidebar is used */
body.no-sidebar .sidebar,
.job-detail-page .sidebar {
  display: none !important;
}

/* Ensure jobs-area fills width when sidebar removed */
body.no-sidebar .jobs-area,
.job-detail-page .jobs-area {
  margin-left: 0 !important;
  padding: 20px !important;
  width: 100% !important;
  max-width: 980px;
  box-sizing: border-box;
  margin-right: auto;
  margin-left: auto;
  background: transparent !important;
  color: #000 !important;
  z-index: 2;
}

/* Footer adjustments (keeps footer full width centered when sidebar hidden) */


/* Text & headings forced to black inside the detail page */
body.no-sidebar .job-header h1,
.job-detail-page .job-header h1,
body.no-sidebar .job-sub,
.job-detail-page .job-sub,
body.no-sidebar .job-posted,
.job-detail-page .job-posted,
body.no-sidebar .job-section h2,
.job-detail-page .job-section h2,
body.no-sidebar .job-section h3,
.job-detail-page .job-section h3,
body.no-sidebar .job-section p,
.job-detail-page .job-section p,
body.no-sidebar .job-full,
.job-detail-page .job-full {
  color: #000 !important;
}

/* Override inline colored elements that might be pale */
body.no-sidebar .job-section p[style],
.job-detail-page .job-section p[style],
body.no-sidebar .job-full[style],
.job-detail-page .job-full[style] {
  color: #000 !important;
}

/* Images: keep natural colors, remove filters */
body.no-sidebar .job-detail-image img,
.job-detail-page .job-detail-image img {
  filter: none !important;
  max-width: 100%;
  border-radius: 8px;
}

/* Links: simple black */
body.no-sidebar a,
.job-detail-page a {
  color: #000 !important;
  text-decoration: underline !important;
}

/* Apply button styling for white theme */
body.no-sidebar .apply-btn,
.job-detail-page .apply-btn {
  color: #000 !important;
  background: transparent !important;
  border: 1px solid #000 !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block;
  box-shadow: none !important;
}

/* Disabled apply button */
body.no-sidebar .apply-btn[disabled],
.job-detail-page .apply-btn[disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background: transparent !important;
  border-color: rgba(0,0,0,0.2) !important;
}

/* Small responsive tweak */
@media (max-width: 768px) {
  body.no-sidebar .jobs-area,
  .job-detail-page .jobs-area {
    padding: 14px !important;
  }
}
/* =====================================================
   DETAIL PAGE FOOTER: light grey box with black text
   Scoped to detail page via body.no-sidebar OR .job-detail-page
   ===================================================== */

.jobs-signup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background: rgba(10, 12, 20, 0.35);
  backdrop-filter: blur(6px) saturate(120%);
}

.jobs-signup-box { /* your existing popup box rules */ }

/* blur effect */
.jobs-blurred {
  filter: blur(6px) saturate(80%);
  pointer-events: none;
  user-select: none;
}

/* prevent page scroll while popup visible */
.no-scroll {
  overflow: hidden !important;
}
/* =====================================================
   MOBILE-ONLY OVERRIDES FOR JOBS PAGE
   Sidebar from LEFT + hamburger top-left + close cross
   Paste at the very bottom of jobs.css
===================================================== */
@media (max-width: 768px) {

  /* Page content */
  .jobs-area {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 18px 12px 30px !important;
  }

  .jobs-title {
    font-size: 28px !important;
    margin-bottom: 8px !important;
  }

  .jobs-subtitle {
    font-size: 14px !important;
    margin-bottom: 20px !important;
    padding: 0 6px;
  }

  /* Jobs cards: wider container, one per row */
  .jobs-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 4px !important;
  }

  .job-card {
    width: min(92vw, 520px) !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .job-card img {
    height: 190px !important;
  }

  .job-card-content {
    padding: 14px !important;
  }

  .job-card-content h3 {
    font-size: 17px !important;
  }

  .job-card-content p {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .apply-btn,
  .job-card-content .view-btn,
  .select-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
  }

  /* Top-left hamburger button */
  .mobile-menu-toggle {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    z-index: 1201;
    width: 46px;
    height: 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Sidebar hidden by default on mobile, slides in from LEFT */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: auto;
    width: min(82vw, 290px) !important;
    height: 100vh !important;
    padding: 20px 14px calc(20px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);

    transform: translateX(-105%);
    transition: transform 0.35s ease;
    z-index: 1202 !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar h2 {
    font-size: 1.3rem !important;
    margin-bottom: 18px !important;
  }

  .sidebar ul {
    gap: 12px !important;
  }

  .menu-btn {
    min-height: 46px;
    padding: 12px 14px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
  }

  /* Close (X) button inside sidebar */
  .sidebar .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1203 !important;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    pointer-events: auto !important;
  }

  .sidebar,
  .sidebar * {
    pointer-events: auto !important;
  }

  /* Prevent horizontal scroll on mobile */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
}