/* Copyright 2025 Renofy Ltd. All rights reserved. */
/* Job Deep Dive Pages CSS - Extracted from template files */
/* Mobile-first design: base styles for mobile, desktop enhancements in media queries */

/* ============================================================================
   Base Deep Dive Layout (Mobile)
   ============================================================================ */

.job-deep-dive-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.job-sidebar,
.job-main-content {
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 0;
  padding: 0;
}

.job-content-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job-carousel {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100vw; /* Full-bleed on mobile */
}

/* Ensure all carousel children take full width */
.job-carousel > * {
  width: 100%;
  box-sizing: border-box;
}

/* Visibility controls - desktop-only content hidden on mobile */
.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

/* ============================================================================
   Desktop Enhancements
   ============================================================================ */

@media (min-width: 821px) {
  /* Desktop layout: fixed sidebar + scrollable main content */
  .job-deep-dive-layout {
    display: flex;
    flex-direction: row;
  }

  /* Sidebar - fixed to viewport, NOT part of flex flow */
  .job-sidebar {
    position: fixed;
    left: clamp(1rem, 2vw, 2rem);
    top: calc(var(--height-header) + 1rem);
    width: 350px;
    height: calc(100vh - var(--height-header) - 1rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    z-index: 10;
  }

  .sidebar-top {
    display: flex;
    flex-direction: column;
    flex: 1; /* Grow to fill space above sidebar-bottom */
  }

  .sidebar-bottom {
    padding: 1rem 0;
  }

  /* Main content - has margin to clear sidebar */
  .job-main-content {
    margin-left: 366px; /* 350px sidebar + 16px gap */
    flex: 1;
  }

  .job-content-inner {
    gap: 1rem;
  }

  /* Hide mobile-only content on desktop */
  .mobile-only {
    display: none;
  }

  /* Square carousel - 300px x 300px */
  .job-carousel {
    max-height: 300px;
    width: auto;
    position: relative; /* Positioning context for absolute children */
  }

  /* Show desktop-only content */
  .desktop-only {
    display: contents;
  }
}
