/* Herbal Garden Custom Styles */

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

/* Smooth transitions */
* {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, transform, box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Enhanced gradient backgrounds */
.gradient-hero {
  background: linear-gradient(135deg, 
    #f0fdf4 0%, 
    #dcfce7 25%, 
    #bbf7d0 50%, 
    #86efac 75%, 
    #4ade80 100%);
  position: relative;
  overflow: hidden;
}

.gradient-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 10%, rgba(16, 163, 74, 0.1) 0%, transparent 50%);
  animation: herbFloat 20s ease-in-out infinite;
}

@keyframes herbFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(1deg); }
  66% { transform: translateY(5px) rotate(-1deg); }
}

.gradient-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

/* Vibrant herb-themed gradients */
.herb-card-basil {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 4px solid #22c55e;
}

.herb-card-lavender {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-left: 4px solid #a855f7;
}

.herb-card-rosemary {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border-left: 4px solid #14b8a6;
}

.herb-card-mint {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #10b981;
}

.herb-card-chamomile {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #f59e0b;
}

/* Hover animations */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #16a34a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #16a34a;
}

.notification.error {
  background-color: #dc2626;
}

/* Custom form styles */
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Product card styles */
.product-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.product-card:hover {
  border-color: #16a34a;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Herb card styles */
.herb-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.herb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Enhanced button styles */
.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #15803d 100%);
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
  transform: perspective(1000px) rotateX(0deg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
  transform: translateY(-2px) perspective(1000px) rotateX(5deg);
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #16a34a;
  color: #16a34a;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #22c55e;
  color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

/* Floating action elements */
.floating-element {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.floating-element:nth-child(2) {
  animation-delay: -2s;
}

.floating-element:nth-child(3) {
  animation-delay: -4s;
}

/* Herb image containers */
.herb-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.herb-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(16, 163, 74, 0.8) 0%, 
    rgba(34, 197, 94, 0.6) 50%, 
    rgba(74, 222, 128, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.herb-image-container:hover .herb-image-overlay {
  opacity: 1;
}

/* Enhanced mobile-first responsive design */
@media (max-width: 640px) {
  .gradient-hero {
    padding: 40px 16px;
    min-height: 90vh;
  }
  
  .hero-title {
    font-size: 2.25rem !important;
    line-height: 1.1;
    margin-bottom: 1.5rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-description {
    font-size: 0.95rem !important;
    line-height: 1.5;
    margin-bottom: 2rem !important;
  }
  
  .mobile-stack {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .mobile-full-width {
    width: 100%;
  }
  
  .mobile-text-center {
    text-align: center;
  }

  /* Mobile-optimized buttons */
  .btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 1rem;
    min-height: 48px; /* Touch target size */
  }

  /* Mobile navigation */
  nav {
    transition: transform 0.3s ease;
  }

  /* Card spacing for mobile */
  .product-card, .herb-card {
    margin-bottom: 1.5rem;
  }

  /* Hero visual grid */
  .grid.grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .herb-image-container {
    height: 120px;
    margin-top: 0 !important;
  }

  /* Newsletter form mobile */
  #newsletter-form {
    padding: 1.5rem;
  }

  #newsletter-form input {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 48px;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .herb-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .mobile-padding {
    padding: 1rem;
  }

  /* Better mobile section spacing */
  section, .py-16, .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Mobile typography */
  h1 { font-size: 2rem; line-height: 1.2; }
  h2 { font-size: 1.75rem; line-height: 1.3; }
  h3 { font-size: 1.5rem; line-height: 1.4; }

  /* Mobile grid improvements */
  .grid.lg\\:grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid.md\\:grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .grid.lg\\:grid-cols-2 {
    gap: 2rem;
  }
}

/* Smooth animations */
.animate-fadeInUp {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pull-to-refresh indicator */
.pull-to-refresh-active::before {
  content: '↓ Pull to refresh';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #16a34a;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1000;
}

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
  button, a, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Larger touch areas for cards */
  .product-card, .herb-card {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(34, 197, 94, 0.1);
  }

  /* iOS scroll bounce fix */
  body {
    -webkit-overflow-scrolling: touch;
  }

  /* Hide horizontal scrollbar on mobile */
  body {
    overflow-x: hidden;
  }
}

/* Focus improvements for accessibility */
@media (max-width: 768px) {
  *:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
  }

  /* Improve form focus visibility */
  input:focus, textarea:focus, select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  }
}

/* Typography */
.heading-gradient {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile menu animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-animate {
  animation: slideDown 0.3s ease-out;
}

/* Course progress bar */
.progress-bar {
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  height: 100%;
  transition: width 0.3s ease;
}

/* Price display */
.price-display {
  font-family: 'Georgia', serif;
  font-weight: 700;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Custom focus styles */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}