/* ================================================
   CALL TO ACTION SECTION - MOBILE PRO STYLES
   Professional & Elegant Mobile Design
   ================================================ */

/* ===================================
   1. MOBILE VARIABLES & SETUP
   =================================== */
:root {
  --cta-mobile-padding: 20px;
  --cta-mobile-radius: 24px;
  --cta-mobile-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. TABLET STYLES (769px - 1024px)
   =================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .cta-section {
    padding: 60px 0;
  }
  
  .cta-wrapper {
    gap: 50px;
    padding: 50px;
    border-radius: 28px;
  }
  
  .cta-content h2 {
    font-size: 2.25rem;
  }
  
  .cta-content p {
    font-size: 1.0625rem;
  }
  
  .cta-image-wrapper {
    width: 380px;
    height: 380px;
  }
  
  .floating-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .cta-stats {
    padding: 14px 28px;
    gap: 16px;
  }
  
  .stat-number {
    font-size: 1.375rem;
  }
}

/* ===================================
   3. MOBILE STYLES (max-width: 768px)
   =================================== */
  .container {
    margin: 0 auto;
  }

@media (max-width: 768px) {
  /* Section Base - Refined Background */
  .cta-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 50%, #f8fafb 100%);
    overflow: hidden; /* Allow stats to extend */
  }
  
  .cta-section::before,
  .cta-section::after {
    width: 80%;
    height: 80%;
    opacity: 0.5; /* Reduce decoration opacity on mobile */
  }
  
  /* Main Wrapper - Mobile Card Design */
  .cta-wrapper {
    flex-direction: column;
    gap: 0; /* Remove gap for integrated design */
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    overflow: visible;
  }
  
  .cta-wrapper:hover {
    transform: none; /* Disable hover lift on mobile */
  }
  
  /* ===================================
     MOBILE IMAGE SECTION - TOP
     =================================== */
  .cta-image {
    order: -1; /* Move image to top */
    width: 100%;
    margin: 0 -20px; /* Full bleed */
    background: linear-gradient(135deg, #e6f7e9 0%, #f0f9ff 100%);
    padding: 40px 20px 60px;
    border-radius: 0 0 40px 40px;
    position: relative;
    box-shadow: 0 10px 30px -10px rgba(26, 137, 23, 0.1);
    display: block;
  }
  
  /* Image Wrapper - Mobile Optimized */
  .cta-image-wrapper {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 50%;
    background: white;
    padding: 20px;
    box-shadow: 
      0 15px 35px -5px rgba(26, 137, 23, 0.15),
      inset 0 2px 4px rgba(255, 255, 255, 0.9);
    position: relative;
    transition: var(--cta-mobile-transition);
    /* Fallback gradient if image fails */
    background-image: linear-gradient(135deg, #f0f9ff 0%, #e6f7e9 100%);
  }
  
  /* Fallback icon display when image fails */
  .cta-image-wrapper.image-failed::before {
    content: '\f07a'; /* Shopping cart icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #1a8917;
    opacity: 0.3;
    z-index: 1;
  }
  
  /* Keep decorative ring but scale down */
  .cta-image-wrapper::before {
    inset: -3px;
    opacity: 0.2;
    animation-duration: 30s; /* Slower rotation on mobile */
  }
  
  .cta-image-wrapper::after {
    inset: 8px;
  }
  
  .cta-image img {
    transform: scale(0.85);
  }
  
  /* Floating Icons - Mobile Positioning */
  .floating-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.125rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    animation-duration: 4s; /* Slower animation for less distraction */
  }
  
  .floating-icon:nth-child(2) {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
  }
  
  .floating-icon:nth-child(3) {
    bottom: 40px;
    right: 20px;
    animation-delay: 1.5s;
  }
  
  .floating-icon:nth-child(4) {
    top: 50%;
    right: 10px;
    animation-delay: 3s;
  }
  
  /* ===================================
     MOBILE CONTENT SECTION
     =================================== */
  .cta-content {
    background: white;
    padding: 40px 24px 32px;
    border-radius: 24px;
    margin: -30px 16px 0; /* Overlap with image section */
    position: relative;
    z-index: 2;
    box-shadow: 
      0 4px 20px -2px rgba(0, 0, 0, 0.08),
      0 2px 8px -2px rgba(0, 0, 0, 0.04);
    text-align: center;
    max-width: 100%;
  }
  
  /* Content Typography - Mobile Optimized */
  .cta-content h2 {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1a8917 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
  }
  
  .cta-content p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 24px;
  }
  
  /* ===================================
     MOBILE CTA BUTTONS
     =================================== */
  .cta-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .cta-btn {
    width: 100%;
    padding: 14px 28px;
    font-size: 0.9375rem;
    justify-content: center;
    border-radius: 24px;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Primary button - Enhanced for mobile */
  .cta-btn.primary {
    background: linear-gradient(135deg, #1a8917 0%, #16a085 100%);
    box-shadow: 
      0 4px 14px 0 rgba(26, 137, 23, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
  }
  
  .cta-btn.primary:active {
    transform: scale(0.98);
    box-shadow: 
      0 2px 8px 0 rgba(26, 137, 23, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  
  /* Secondary button - Mobile style */
  .cta-btn.secondary {
    background: rgba(26, 137, 23, 0.08);
    color: #1a8917;
    border: 1.5px solid rgba(26, 137, 23, 0.2);
  }
  
  .cta-btn.secondary:active {
    transform: scale(0.98);
    background: rgba(26, 137, 23, 0.12);
  }
  
  /* Button icons */
  .cta-btn i {
    font-size: 0.875rem;
  }
  
  /* ===================================
     MOBILE STATS SECTION
     =================================== */
  .cta-stats {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 24px 16px 0;
    background: white;
    padding: 16px 24px;
    border-radius: 20px;
    box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.08),
      0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    justify-content: space-around;
    gap: 0;
  }
  
  .stat-badge {
    flex: 1;
    text-align: center;
    padding: 0 12px;
    position: relative;
  }
  
  /* Dividers between stats */
  .stat-badge:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    width: 1px;
    background: linear-gradient(180deg, transparent, #e5e7eb, transparent);
  }
  
  .stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a8917;
    display: block;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
  }
  
  .stat-label {
    font-size: 0.625rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
  }
  
  /* Subtle animation for stats */
  .cta-stats {
    animation: slideUpFade 0.6s ease 0.3s backwards;
  }
  
  @keyframes slideUpFade {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Reduced float animation on mobile */
  @keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px); /* Reduced movement */
    }
  }
}

/* ===================================
   4. SMALL PHONE STYLES (max-width: 480px)
   =================================== */
@media (max-width: 480px) {
  .cta-section {
    padding: 32px 0;
  }
  
  /* Smaller image section */
  .cta-image {
    padding: 32px 16px 48px;
    margin: 0 -16px;
  }
  
  .cta-image-wrapper {
    width: 240px;
    height: 240px;
    padding: 16px;
  }
  
  /* Smaller floating icons */
  .floating-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    border-radius: 10px;
  }
  
  .floating-icon:nth-child(2) {
    top: 16px;
    left: 16px;
  }
  
  .floating-icon:nth-child(3) {
    bottom: 32px;
    right: 16px;
  }
  
  .floating-icon:nth-child(4) {
    display: none; /* Hide third icon on very small screens */
  }
  
  /* Content adjustments */
  .cta-content {
    padding: 32px 20px 28px;
    margin: -24px 12px 0;
    border-radius: 20px;
  }
  
  .cta-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  .cta-content p {
    font-size: 0.875rem;
    margin-bottom: 20px;
  }
  
  /* Smaller buttons */
  .cta-btn {
    padding: 12px 24px;
    font-size: 0.875rem;
    border-radius: 20px;
  }
  
  /* Compact stats */
  .cta-stats {
    margin: 20px 12px 0;
    padding: 14px 16px;
    gap: 0;
  }
  
  .stat-badge {
    padding: 0 8px;
  }
  
  .stat-number {
    font-size: 1.125rem;
  }
  
  .stat-label {
    font-size: 0.5625rem;
  }
  
  /* Smaller dividers */
  .stat-badge:not(:last-child)::after {
    height: 24px;
  }
}

/* ===================================
   5. VERY SMALL PHONES (max-width: 375px)
   =================================== */
@media (max-width: 375px) {
  /* Ultra compact image */
  .cta-image-wrapper {
    width: 200px;
    height: 200px;
  }
  
  .cta-image img {
    transform: scale(0.8);
  }
  
  /* Floating icons - minimal */
  .floating-icon {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
  
  .floating-icon:nth-child(3) {
    display: none; /* Show only one floating icon */
  }
  
  /* Ultra compact content */
  .cta-content h2 {
    font-size: 1.375rem;
  }
  
  .cta-content p {
    font-size: 0.8125rem;
    line-height: 1.5;
  }
  
  /* Stack stats vertically if needed */
  @media (max-width: 320px) {
    .cta-stats {
      flex-direction: column;
      gap: 12px;
      padding: 16px;
    }
    
    .stat-badge:not(:last-child)::after {
      display: none;
    }
    
    .stat-badge {
      display: flex;
      align-items: center;
      justify-content: space-between;
      text-align: left;
      padding: 0;
    }
    
    .stat-number {
      order: 2;
    }
    
    .stat-label {
      order: 1;
      font-size: 0.75rem;
      text-transform: none;
    }
  }
}

/* ===================================
   6. LANDSCAPE MODE (max-width: 768px)
   =================================== */
@media (max-width: 768px) and (orientation: landscape) {
  .cta-section {
    padding: 32px 0;
  }
  
  /* Side-by-side layout in landscape */
  .cta-wrapper {
    flex-direction: row;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: 24px;
    margin: 0 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }
  
  .cta-image {
    order: 1;
    flex: 0 0 40%;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
  
  .cta-image-wrapper {
    width: 200px;
    height: 200px;
  }
  
  .cta-content {
    flex: 1;
    margin: 0;
    padding: 0 24px 0 0;
    box-shadow: none;
    text-align: left;
  }
  
  .cta-content h2 {
    font-size: 1.5rem;
  }
  
  .cta-content p {
    font-size: 0.875rem;
  }
  
  .cta-buttons {
    flex-direction: row;
  }
  
  .cta-btn {
    padding: 10px 20px;
    font-size: 0.8125rem;
  }
  
  .cta-stats {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
  }
  
  /* Hide floating icons in landscape */
  .floating-icon {
    display: none;
  }
}

/* ===================================
   7. PERFORMANCE OPTIMIZATIONS
   =================================== */
@media (max-width: 768px) {
  /* Reduce animation complexity */
  .cta-section * {
    animation-duration: 0.3s !important;
  }
  
  /* Disable hover effects on touch devices */
  @media (hover: none) {
    .cta-wrapper:hover {
      transform: none;
      box-shadow: none;
    }
    
    .cta-btn:hover {
      transform: none;
    }
    
    .cta-btn:hover::before {
      display: none;
    }
  }
  
  /* Optimize for GPU acceleration */
  .cta-image-wrapper,
  .floating-icon,
  .cta-btn {
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* ===================================
   8. ACCESSIBILITY ENHANCEMENTS
   =================================== */
@media (max-width: 768px) {
  /* Ensure touch targets are 44px minimum */
  .cta-btn {
    min-height: 44px;
  }
  
  /* Focus states */
  .cta-btn:focus-visible {
    outline: 2px solid #1a8917;
    outline-offset: 2px;
  }
  
  /* High contrast mode */
  @media (prefers-contrast: high) {
    .cta-content {
      border: 2px solid currentColor;
    }
    
    .cta-btn {
      border: 2px solid currentColor;
    }
    
    .cta-stats {
      border: 2px solid currentColor;
    }
  }
  
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .floating-icon {
      animation: none;
    }
    
    .cta-image-wrapper::before {
      animation: none;
    }
    
    .cta-stats {
      animation: none;
    }
  }
}

