/*
 * Farmers' Out Grower Foundation Limited (FOF)
 * Custom Main Stylesheet - Natural Tones Theme
 * Brand Colors:
 *   - Primary: Deep Green (#2E7D32)
 *   - Secondary: Light Green (#66BB6A)
 *   - Accent: Golden Yellow (#F9A825)
 *   - Natural Border: Soft Sage (#E0E7D8)
 *   - Natural Dark: Forest Green (#1B3E1E)
 *   - Light BG: Warm Off-White (#F8FAF5)
 *   - Text Dark: #333333
 */

/* Google Fonts Import - Incorporating Playfair Display */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
  --primary: #2E7D32;
  --primary-rgb: 46, 125, 50;
  --secondary: #66BB6A;
  --accent: #F9A825;
  --accent-rgb: 249, 168, 37;
  --natural-border: #E0E7D8;
  --natural-dark: #1B3E1E;
  --bg-light: #F8FAF5;
  --text-dark: #333333;
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

/* Map outfit/serif to Playfair Display */
.font-outfit, .font-serif, h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #c3d2b7;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Base resets & Smooth Scroll */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--text-dark);
}

body {
  overflow-x: hidden;
  background-color: var(--bg-light);
}

/* Apply Soft Borders */
.border-gray-100, .border-gray-150, .border-gray-200, .border-gray-300, .border-slate-100, .border-slate-200 {
  border-color: var(--natural-border) !important;
}

/* Sticky Header Custom Styling */
.sticky-header {
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--natural-border);
}
.sticky-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--natural-border);
}

/* Hero Slider Styles with Gold Dot Accent Pattern */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 85vh;
  min-height: 500px;
}

.hero-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--accent) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  opacity: 0.12;
  mix-blend-mode: overlay;
  z-index: 10;
  pointer-events: none;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.1);
  transition: transform 6s ease-out;
}

.slide.active .slide-bg {
  transform: scale(1);
}

/* Custom Forest Green Banner overrides for other pages */
section.bg-gradient-to-br.from-primary, 
section.bg-gradient-to-br[class*="from-primary"],
section.bg-primary[class*="to-green-"] {
  background-color: var(--natural-dark) !important;
  background-image: none !important;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--natural-border);
}

section.bg-gradient-to-br.from-primary::after,
section.bg-gradient-to-br[class*="from-primary"]::after,
section.bg-primary[class*="to-green-"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--accent) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  opacity: 0.28;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

/* Text slide animation */
.slide-content h1, .slide-content p, .slide-content .cta-group {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide.active .slide-content h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.slide.active .slide-content p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.6s;
}

.slide.active .slide-content .cta-group {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.8s;
}

/* Partner Carousel Auto-scroll CSS */
@keyframes slide-track {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-250px * 6)); }
}
.partner-track {
  display: flex;
  width: calc(250px * 12);
  animation: slide-track 30s linear infinite;
}
.partner-track:hover {
  animation-play-state: paused;
}

/* Custom Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Elements */
.float-whatsapp {
  position: fixed;
  bottom: 85px;
  right: 25px;
  z-index: 50;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.float-whatsapp:hover {
  transform: translateY(-5px) scale(1.05);
}

.scroll-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

/* Timeline Custom Design */
.timeline-item {
  position: relative;
  border-left: 3px solid var(--secondary);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: -9px;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--accent);
  border: 3px solid white;
}

/* Lightbox Styling */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content {
  transform: scale(1);
}

/* Interactive Accordion Panel */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Grid & Card Hover Effects */
.card-hover, .rounded-3xl, .rounded-2xl {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(46, 125, 50, 0.05);
  border-color: var(--secondary) !important;
}

/* Special Stat Italic Design */
.stat-counter, .stat-counter + span, [class*="stat-counter"] {
  font-style: italic !important;
  font-weight: 700 !important;
}

/* Newsletter success dynamic visual */
.newsletter-toast {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 100;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.newsletter-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Pulse animation for CTA button */
@keyframes cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(46, 125, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}
.pulse-btn {
  animation: cta-pulse 2s infinite;
}
