:root {
  --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --light-bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(148, 163, 184, 0.2);
  --accent-green: #10b981;
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

body {
  /* Relief Theme: Sunlight-to-Sky Gradient (Subtle) */
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Glassmorphism Classes - Lighter version */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.08);
}

.glass-navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-dark);
}

/* Premium Buttons */
.btn-primary-premium {
  background: var(--primary-gradient);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  color: white;
}

/* Glass Table */
.glass-table {
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  border-color: var(--glass-border);
}

.glass-table> :not(caption)>*>* {
  background-color: transparent;
  border-bottom-width: 1px;
  box-shadow: inset 0 0 0 9999px transparent;
}

.glass-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

.glass-table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem;
}

.glass-table td {
  padding: 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

/* Glass Modal & Light Theme Overrides */
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid white;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header,
.modal-footer {
  border-color: var(--glass-border);
}

.modal-header .btn-close {
  filter: none;
}

.modal-title {
  color: var(--text-dark);
  font-weight: 700;
}

.form-floating>.form-control {
  background-color: white !important;
  color: var(--text-dark) !important;
  border: 1px solid #cbd5e1 !important;
}

.form-floating>label {
  color: var(--text-muted) !important;
}

/* Form overrides - Light theme */
.form-control,
.form-select {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: var(--text-dark) !important;
}

.form-control:focus {
  background-color: #ffffff !important;
  border-color: var(--accent-green) !important;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15) !important;
}

.form-control::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}

/* Layout */
.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-green) !important;
}

/* Dropdown menu - Light theme */
.dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
  color: var(--text-dark) !important;
}

.dropdown-item:hover {
  background-color: #f1f5f9 !important;
  color: var(--accent-green) !important;
}

/* Reduce container padding by 50% */
.container,
.container-fluid {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

@media (min-width: 576px) {

  .container,
  .container-fluid {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Small screen optimizations (based on browser size, not device) */
@media (max-width: 767px) {

  /* Hero section adjustments - minimal padding */
  .hero-section {
    min-height: auto !important;
    padding: 1rem 0 0.5rem !important;
  }

  /* Hide "Sound Familiar?" section on small screens */
  .hero-section .col-lg-6:last-child .mt-3 {
    display: none !important;
  }

  /* Hide the stressed worker image on small screens */
  .hero-section .col-lg-6:last-child img {
    display: none !important;
  }

  /* Show social proof as sentence, hide badges */
  .social-proof-text {
    display: block !important;
  }

  .social-proof-badges {
    display: none !important;
  }

  /* Buttons side-by-side with smaller padding */
  .hero-buttons {
    flex-direction: row !important;
    gap: 0.5rem !important;
  }

  .hero-buttons .btn {
    flex: 1;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    width: auto !important;
    margin-bottom: 0 !important;
  }

  /* Smaller display headings on mobile */
  .display-3 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .display-5 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }

  /* Adjust lead text */
  .lead {
    font-size: 1rem !important;
  }

  /* Welcome message */
  p[style*="font-size: 1.5rem"] {
    font-size: 1.2rem !important;
  }

  /* Touch-friendly buttons - adjusted for side-by-side */
  .btn-lg {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Images - better sizing - smaller for less scrolling */
  .hero-section img {
    max-width: 240px !important;
    margin: 1rem auto !important;
  }

  /* Step images - smaller */
  section img[style*="max-width: 200px"] {
    max-width: 140px !important;
  }

  /* Success image - smaller */
  img[style*="max-width: 420px"] {
    max-width: 260px !important;
  }

  /* Reduce section padding even more */
  .py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* Much tighter spacing */
  .mb-4 {
    margin-bottom: 0.5rem !important;
  }

  .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  .mt-4 {
    margin-top: 0.5rem !important;
  }

  .mt-3 {
    margin-top: 0.5rem !important;
  }

  .pt-3 {
    padding-top: 0.5rem !important;
  }

  /* Reduce gap in step sections */
  .row.g-4 {
    gap: 0.5rem !important;
  }

  /* Step numbers and emojis */
  div[style*="font-size: 2.5rem"] span {
    font-size: 2rem !important;
  }

  div[style*="font-size: 2rem"] span {
    font-size: 1.5rem !important;
  }

  /* Better text readability */
  h3,
  h4,
  h5 {
    font-size: 1.25rem !important;
  }

  /* List items spacing */
  .list-unstyled li {
    margin-bottom: 0.75rem !important;
  }

  /* Feature icons */
  .bi-check-circle-fill {
    font-size: 1rem !important;
  }

  /* Navbar improvements */
  .navbar-brand {
    font-size: 1.25rem !important;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
  }

  /* Card spacing */
  .glass-card {
    padding: 1.5rem !important;
    margin-bottom: 1rem;
  }

  /* Remove excessive margins on mobile - tighter horizontal spacing */
  .container {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Better table responsiveness */
  .table {
    font-size: 0.875rem !important;
  }

  /* Form controls */
  .form-control,
  .form-select {
    font-size: 16px !important;
    /* Prevents zoom on iOS */
    padding: 0.75rem !important;
  }

  /* Modal improvements */
  .modal-content {
    margin: 1rem;
  }

  /* Footer text */
  footer {
    font-size: 0.875rem !important;
    padding: 2rem 0 !important;
  }

  /* Hide decorative background shapes on mobile */
  .hero-section>div[style*="position: absolute"] {
    display: none !important;
  }

  /* Center text on mobile */
  .hero-section .col-lg-6:first-child {
    text-align: center;
  }

  .hero-section .col-lg-6:first-child .d-flex {
    justify-content: center;
  }

  /* Better spacing for "Sound Familiar" section */
  .hero-section .col-lg-6:last-child .mt-3 {
    margin-top: 1rem !important;
  }

  /* Problem section - side-by-side layout on small screens */
  .problem-section {
    text-align: center !important;
  }

  .problem-section .container {
    max-width: 100% !important;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  /* Heading stays at top, centered */
  .problem-heading {
    display: block !important;
    text-align: center !important;
    font-size: 1.25rem !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 0.75rem !important;
  }

  /* Side-by-side layout for image and content - tighter spacing */
  .problem-section .row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .problem-section .col-md-6 {
    flex: 0 0 auto !important;
    max-width: 50% !important;
    padding: 0 0.5rem !important;
    margin: 0 !important;
  }

  /* Image on left */
  .problem-image-col {
    order: 1 !important;
  }

  /* Content on right */
  .problem-content-col {
    order: 2 !important;
    text-align: left !important;
    padding-left: 0 !important;
  }

  /* Bullet points next to image */
  .problem-bullets {
    display: block !important;
    font-size: 0.7rem !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
  }

  .problem-bullets li {
    margin-bottom: 0.25rem !important;
    line-height: 1.2 !important;
  }

  .problem-bullets i {
    font-size: 0.7rem !important;
  }

  /* Image sizing - move left - full width of its column */
  .problem-section img {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block !important;
  }


  /* Optimize CTA section */
  section[style*="background: linear-gradient(135deg, #10b981"] {
    padding: 2.5rem 0 !important;
  }

  section[style*="background: linear-gradient(135deg, #10b981"] h2 {
    font-size: 1.75rem !important;
    margin-bottom: 1rem !important;
  }

  section[style*="background: linear-gradient(135deg, #10b981"] .lead {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* Global Problem Bullets Styling */
.problem-bullets i {
  font-size: 1.1rem;
  position: relative;
  top: 1px;
}

/* Hide hero image when it wraps (below large screen) */
@media (max-width: 991px) {
  .hero-section .col-lg-6:last-child img {
    display: none !important;
  }

  /* Hide success wrapper image on smaller screens */
  img[src*="mailpros_success.png"] {
    display: none !important;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 991px) {

  .display-3 {
    font-size: 2.5rem !important;
  }


  .display-5 {
    font-size: 2rem !important;
  }

  .hero-section img {
    max-width: 350px !important;
  }

  .btn-lg {
    padding: 0.75rem 2.5rem !important;
  }
}

/* Improve touch targets across all devices */
@media (hover: none) and (pointer: coarse) {

  /* Touch-friendly links and buttons */
  a,
  button,
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Larger tap targets for navigation */
  .nav-link {
    padding: 1rem !important;
  }

  /* Prevent text selection on buttons */
  .btn {
    -webkit-user-select: none;
    user-select: none;
  }

  /* Glassmorphism Theme Additions */
  .glass-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }

  .glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  /* Subtle global background for portal pages */
  body {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    min-height: 100vh;
  }
}