/**
 * Farm Homepage Styles
 * Modern scroll-snap parallax design for farm landing page
 */

/* Reset and base styles */
.farm-homepage {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Scroll snap container */
.farm-homepage {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}

/* Section base styles */
.hero-section,
.enterprise-section,
.contact-section,
.no-enterprises-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.hero-section[style*="background-image"] {
  background-blend-mode: overlay;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px 20px;
  animation: fadeInUp 1s ease-out;
}

.farm-logo {
  max-width: 200px;
  max-height: 200px;
  margin-bottom: 30px;
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeIn 1.5s ease-out;
}

.farm-name {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -1px;
}

.farm-tagline {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  margin: 0;
  opacity: 0.95;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  cursor: pointer;
  color: white;
  text-align: center;
  animation: bounce 2s infinite;
  transition: opacity 0.3s;
}

.hero-scroll-indicator:hover {
  opacity: 0.7;
}

.hero-scroll-indicator span {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.scroll-arrow {
  font-size: 24px;
  animation: arrowBounce 2s infinite;
}

/* ============================================================================
   Enterprise Sections
   ============================================================================ */

.enterprises-container {
  width: 100%;
}

.enterprise-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.enterprise-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Icon Mode - Clean gradient background with large emoji */
.enterprise-section.enterprise-icon {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
}

.enterprise-section.enterprise-icon .enterprise-content {
  text-align: center;
}

.enterprise-section.enterprise-icon .enterprise-name {
  color: #2c3e50;
}

.enterprise-section.enterprise-icon .enterprise-description {
  color: #555;
}

/* Hero Mode - Full background image with overlay */
.enterprise-section.enterprise-hero {
  color: white;
  background-blend-mode: overlay;
}

.enterprise-section.enterprise-hero .enterprise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
  z-index: 1;
}

.enterprise-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 40px;
  text-align: center;
}

.enterprise-icon {
  font-size: clamp(3rem, 10vw, 6rem);
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.enterprise-name {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.enterprise-description {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  line-height: 1.6;
  margin: 0 0 30px 0;
  opacity: 0.95;
}

.enterprise-link {
  display: inline-block;
  padding: 15px 40px;
  background: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.enterprise-link:hover {
  background: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.link-arrow {
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.enterprise-link:hover .link-arrow {
  transform: translateX(5px);
}

/* ============================================================================
   No Enterprises Section
   ============================================================================ */

.no-enterprises-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
}

.no-enterprises-content {
  text-align: center;
  max-width: 600px;
  padding: 40px 20px;
}

.no-enterprises-content h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #666;
  margin: 0 0 20px 0;
}

.no-enterprises-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #888;
}

/* ============================================================================
   Contact Section
   ============================================================================ */

.contact-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
}

.contact-content {
  max-width: 800px;
  padding: 40px 20px;
  text-align: center;
}

.contact-content h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 40px 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 18px;
}

.contact-icon {
  font-size: 24px;
}

.contact-item a {
  color: #4CAF50;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-item a:hover {
  color: #66bb6a;
  text-decoration: underline;
}

.contact-item p {
  margin: 0;
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.social-link {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.farm-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  opacity: 0.8;
}

.admin-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.admin-links a {
  color: #ffd54f;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.admin-links a:hover {
  color: #ffeb3b;
  text-decoration: underline;
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
  .hero-section,
  .enterprise-section,
  .contact-section,
  .no-enterprises-section {
    scroll-snap-align: start;
    background-attachment: scroll; /* Disable parallax on mobile for performance */
  }

  .enterprise-content,
  .contact-content {
    padding: 20px;
  }

  .contact-info {
    gap: 15px;
  }

  .social-links {
    flex-direction: column;
    gap: 10px;
  }

  .admin-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .farm-homepage {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-section,
  .enterprise-section,
  .contact-section,
  .no-enterprises-section {
    background-attachment: scroll;
  }
}
