/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Custom styles to complement Bootstrap */
:root {
  --color-navy: #1e3a8a;
  --color-navy-light: #3b82f6;
  --color-navy-dark: #1e40af;
  --color-blue-accent: #2563eb;
  --color-light-gray: #f8fafc;
  --color-soft-gray: #f1f5f9;
  --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  --color-accent: #1e3a8a;
  --color-accent-hover: #3b82f6;
  --color-primary: #1e3a8a;
}

/* Enhanced body for better cross-browser compatibility */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  background-color: white !important;
  color: var(--color-navy) !important;
}

/* Custom navbar styling */
.navbar-navy {
  background-color: var(--color-navy) !important;
}

/* Light navbar styling */
.navbar-light .navbar-brand {
  color: var(--color-navy) !important;
  font-weight: bold;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--color-navy) !important;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: var(--color-navy-light) !important;
}

/* Dropdown styling for light navbar */
.navbar-light .dropdown-menu {
  border: 1px solid rgba(0,0,0,.1);
}

.navbar-light .dropdown-toggle::after {
  border-top-color: #495057;
}

.navbar-light .navbar-toggler {
  border-color: rgba(0,0,0,.1);
}

.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(73, 80, 87, 0.75)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Custom button styles */
.btn-navy {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: white;
}

.btn-navy:hover {
  background-color: var(--color-navy-light);
  border-color: var(--color-navy-light);
  color: white;
}

.btn-blue {
  background-color: var(--color-blue-accent);
  border-color: var(--color-blue-accent);
  color: white;
}

.btn-blue:hover {
  background-color: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
  color: white;
}

.btn-soft-gray {
  background-color: var(--color-soft-gray);
  border-color: var(--color-soft-gray);
  color: var(--color-navy);
}

.btn-soft-gray:hover {
  background-color: var(--color-light-gray);
  border-color: var(--color-light-gray);
  color: var(--color-navy);
}

/* Override Bootstrap button colors to match our theme */
.btn-primary {
  background-color: var(--color-navy) !important;
  border-color: var(--color-navy) !important;
}

.btn-primary:hover {
  background-color: var(--color-navy-light) !important;
  border-color: var(--color-navy-light) !important;
}

.btn-primary:focus, .btn-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25) !important;
}

.btn-success {
  background-color: var(--color-blue-accent) !important;
  border-color: var(--color-blue-accent) !important;
}

.btn-success:hover {
  background-color: var(--color-navy-dark) !important;
  border-color: var(--color-navy-dark) !important;
}

.btn-success:focus, .btn-success.focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25) !important;
}

.btn-secondary {
  background-color: var(--color-soft-gray) !important;
  border-color: var(--color-soft-gray) !important;
  color: var(--color-navy) !important;
}

.btn-secondary:hover {
  background-color: var(--color-light-gray) !important;
  border-color: var(--color-light-gray) !important;
  color: var(--color-navy) !important;
}

.btn-outline-secondary {
  color: var(--color-navy) !important;
  border-color: var(--color-soft-gray) !important;
}

.btn-outline-secondary:hover {
  background-color: var(--color-soft-gray) !important;
  border-color: var(--color-soft-gray) !important;
  color: var(--color-navy) !important;
}

/* Update badge colors to match theme */
.badge.bg-primary {
  background-color: var(--color-navy) !important;
}

.badge.bg-success {
  background-color: var(--color-blue-accent) !important;
}

.text-primary {
  color: var(--color-navy) !important;
}

.bg-primary {
  background-color: var(--color-navy) !important;
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding-top: 80px; /* Account for fixed navbar */
}

/* Remove any potential margin/padding gaps */
.navbar + .hero-section {
  margin-top: 0;
}

/* Ensure proper spacing on different screen sizes */
@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 70px !important;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding-top: 60px !important;
  }
}

/* Fix for backdrop-filter in older browsers */
.image-placeholder {
  width: 100%;
  max-width: 500px;
  height: 400px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  /* Fallback for browsers that don't support backdrop-filter */
  background-color: rgba(255, 255, 255, 0.1);
}

/* Support for older browsers without backdrop-filter */
@supports not (backdrop-filter: blur()) {
  .image-placeholder {
    background: rgba(255, 255, 255, 0.2);
  }
}

/* Custom button styles using Bootstrap utility classes */
.cta-button-primary {
  background-color: var(--color-navy) !important;
  border-color: var(--color-navy) !important;
  font-weight: 600;
  transition: all 0.3s ease;
  color: white !important;
}

.cta-button-primary:hover {
  background-color: var(--color-navy-light) !important;
  border-color: var(--color-navy-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
  color: white !important;
}

.cta-button-secondary {
  background-color: var(--color-soft-gray) !important;
  color: var(--color-navy) !important;
  border: 2px solid var(--color-soft-gray) !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button-secondary:hover {
  background-color: var(--color-light-gray) !important;
  color: var(--color-navy) !important;
  border-color: var(--color-light-gray) !important;
}

/* Section backgrounds */
.how-it-works {
  background-color: var(--color-light-gray);
}

/* Enhanced transition effects */
.transition-hover {
  transition: all 0.3s ease;
}

.worker-benefit:hover {
  border-color: var(--color-navy) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.2) !important;
}

/* Ensure compatibility with flexbox in older browsers */
.d-flex {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
}

.flex-wrap {
  -ms-flex-wrap: wrap !important;
  flex-wrap: wrap !important;
}

.align-items-center {
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
}

.justify-content-center {
  -webkit-box-pack: center !important;
  -ms-flex-pack: center !important;
  justify-content: center !important;
}

/* Grid fallback for older browsers */
@supports not (display: grid) {
  .row {
    display: table;
    width: 100%;
    table-layout: fixed;
  }
  
  .col-lg-6,
  .col-md-4,
  .col-lg-4 {
    display: table-cell;
    vertical-align: top;
  }
}

/* Fix for CSS custom properties in older browsers */
.text-danger {
  color: #dc3545 !important;
}

/* Ensure proper spacing and sizing */
.min-vh-100 {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* Fix for mobile viewport units */
@supports (-webkit-touch-callout: none) {
  .min-vh-100 {
    min-height: -webkit-fill-available;
  }
}

/* Better font rendering across browsers */
h1, h2, h3, h4, h5, h6 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure consistent box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Fix for button focus states in Chrome */
.btn:focus,
.btn.focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

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

/* Hero section for detail pages */
.hero-section-small {
  background: var(--gradient-primary);
  color: white;
}

/* Sticky positioning for sidebar elements */
.sticky-top {
  top: 100px !important;
}

/* Featured Offers Section */
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Offer Cards */
.offer-card {
  transition: all 0.3s ease;
  border: none !important;
}

.offer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

.offer-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* How It Works specific styling for offers */
.how-it-works-offers .step-circle {
  transition: all 0.3s ease;
}

.how-it-works-offers .step-circle:hover {
  transform: scale(1.1);
}

/* Testimonial Cards */
.testimonial-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-4px);
}

.user-avatar {
  min-width: 40px;
  min-height: 40px;
}

/* Enhanced button hover effects for offer cards */
.offer-card .btn {
  transition: all 0.3s ease;
  font-weight: 600;
}

.offer-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

/* Badge styling improvements */
.badge {
  font-weight: 500;
  padding: 0.5em 0.8em;
}

/* Bonus highlight styling */
.offer-bonus {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile responsiveness for offer cards */
@media (max-width: 768px) {
  .offer-card {
    margin-bottom: 2rem;
  }
  
  .how-it-works-offers .col-md-3 {
    margin-bottom: 2rem;
  }
  
  .testimonials-section .col-lg-4 {
    margin-bottom: 1.5rem;
  }
}

/* Enhanced focus states for accessibility */
.offer-card .btn:focus,
.offer-card .btn.focus {
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

/* Improved text contrast for better readability */
.offer-features {
  line-height: 1.6;
}

.testimonial-card p {
  line-height: 1.5;
}

/* Remote Jobs Access Options Styling */
.access-options {
  max-width: 400px;
}

/* New horizontal layout for access options */
.access-option.h-100 {
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.access-option .mt-auto {
  margin-top: auto !important;
}

.decision-chart {
  border: 2px dashed #dee2e6;
  background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%), 
              linear-gradient(-45deg, #f8f9fa 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #f8f9fa 75%), 
              linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.access-option {
  transition: all 0.3s ease;
}

.access-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-badge {
  z-index: 10;
}

.option-badge .badge {
  font-size: 0.8rem;
  font-weight: 600;
}

/* Decision toggle visual enhancements */
.decision-arrow {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Pricing display enhancements */
.pricing-display {
  background: rgba(30, 58, 138, 0.05);
  border-radius: 8px;
  padding: 1rem;
}

.offer-highlight {
  background: rgba(25, 135, 84, 0.05);
  border-radius: 8px;
  padding: 1rem;
}

/* Popular offers badges */
.popular-offers .badge {
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid #dee2e6 !important;
  transition: all 0.2s ease;
}

.popular-offers .badge:hover {
  background-color: rgba(25, 135, 84, 0.1) !important;
  border-color: rgba(25, 135, 84, 0.3) !important;
  transform: scale(1.05);
}

/* Enhanced button styling for access options */
.access-option .btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.access-option .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Value proposition footer styling */
.access-options .bg-light:last-child {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile responsiveness for access options */
@media (max-width: 992px) {
  .access-options {
    max-width: 100%;
    margin-top: 2rem;
  }
  
  .decision-chart {
    font-size: 0.9rem;
  }
  
  .popular-offers .d-flex {
    justify-content: center;
  }
  
  /* Horizontal layout mobile adjustments */
  .access-option.h-100 {
    min-height: auto;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  /* Stack access options vertically on mobile */
  .access-option.h-100 {
    min-height: auto;
  }
  
  .decision-chart {
    margin-bottom: 2rem;
  }
  
  .access-option .pricing-display .display-5 {
    font-size: 2.5rem;
  }
}

/* Enhanced OR divider */
.access-options hr {
  border-top: 2px solid #dee2e6;
}

.access-options hr + span {
  background: white;
  color: #6c757d;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 50px;
}

/* Feature icons enhancement */
.features-mini .text-success {
  font-weight: bold;
}

/* Offer explanation box */
.offer-explanation {
  border: 1px solid rgba(25, 135, 84, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* FAQ Section Styling */
.faq-accordion {
  max-width: 100%;
}

.faq-item {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.faq-header {
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.faq-header:hover {
  background-color: rgba(30, 58, 138, 0.05);
}

.faq-header[aria-expanded="true"] {
  background-color: rgba(30, 58, 138, 0.08);
}

.faq-toggle {
  transition: transform 0.3s ease;
  font-weight: bold;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(30, 58, 138, 0.1);
  border-radius: 50%;
  font-size: 1.2rem !important;
}

.faq-header[aria-expanded="true"] .faq-toggle {
  transform: rotate(45deg);
  background-color: rgba(30, 58, 138, 0.2);
}

.faq-content {
  background-color: #fafbfc;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-content p {
  line-height: 1.6;
}

/* Job categories badges in FAQ */
.job-categories .badge {
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
}

/* FAQ Contact CTA styling */
.faq-accordion + div .btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.faq-accordion + div .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness for FAQ */
@media (max-width: 768px) {
  .faq-header h4 {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .faq-content {
    padding: 1rem !important;
  }
  
  .job-categories .row {
    gap: 0.5rem;
  }
  
  .job-categories .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* FAQ animation enhancements */
.collapse {
  transition: all 0.35s ease;
}

.collapsing {
  transition: height 0.35s ease;
}

/* Ensure FAQ items have proper spacing */
.faq-item:last-child {
  margin-bottom: 0;
}

/* Vendor Partners Section */
.vendor-partners {
  background-color: var(--color-soft-gray);
}

.vendor-card {
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.vendor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--color-navy);
}

.vendor-logo {
  transition: all 0.3s ease;
  font-size: 0.7rem;
}

.vendor-card:hover .vendor-logo {
  background-color: rgba(30, 58, 138, 0.1) !important;
}

.custom-group-buying {
  border: 2px dashed #dee2e6;
}

.process-explanation .badge {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Many More vendor cards */
.vendor-card[style*="dashed"] {
  border-color: #dee2e6 !important;
  background: rgba(30, 58, 138, 0.02) !important;
}

.vendor-card[style*="dashed"]:hover {
  border-color: var(--color-navy) !important;
  background: rgba(30, 58, 138, 0.05) !important;
}

/* Remote Jobs Section */
.remote-jobs {
  background-color: white;
}

.remote-jobs .feature-item {
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.remote-jobs .feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--color-blue-accent);
}

.remote-jobs .text-success {
  color: var(--color-blue-accent) !important;
}

.remote-jobs .cta-section {
  border: 2px dashed #dee2e6;
}
