/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap");

/* CSS Variables for Light and Dark Mode */
:root {
  /* Updated primary colors to #87A031 and accent to #F89D2A */
  --primary-color: #87a031;
  --primary-dark: #6d8228;
  --secondary-color: #f5f5f0;
  --accent-color: #f89d2a;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9f5;
  --border-color: #e5e5e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] {
  /* Updated dark mode colors to match new scheme */
  --primary-color: #87a031;
  --primary-dark: #a3bd43;
  --secondary-color: #1f2937;
  --accent-color: #f89d2a;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --border-color: #374151;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utility Classes */
.py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Navigation */
/* Only apply transparent/blur effect if specifically requested (e.g. on landing page) */
.landing-navbar {
  background-color: transparent;
  transition: background-color 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
  background-color: rgba(17, 24, 39, 0.95) !important;
}

[data-bs-theme="light"] .navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

/* Light mode: Text should be white on hero (default navbar-dark), but dark on white scrolled bg */
[data-bs-theme="light"] .navbar.scrolled .navbar-nav .nav-link {
  color: var(--text-primary);
}

[data-bs-theme="light"] .navbar.scrolled .navbar-brand {
  color: var(--text-primary);
}

[data-bs-theme="light"] .navbar.scrolled .btn-theme-toggle {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.btn-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: rotate(180deg);
}

[data-bs-theme="light"] .btn-theme-toggle {
  background-color: var(--secondary-color);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  background-image: url("/placeholder.svg?height=1080&width=1920");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Updated gradient to use new brand colors */
  background: linear-gradient(135deg, rgba(135, 160, 49, 0.75), rgba(109, 130, 40, 0.85));
}

[data-bs-theme="dark"] .hero-overlay {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.85), rgba(30, 41, 59, 0.9));
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
  line-height: 1.6;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: white;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background-color: white;
  color: var(--primary-color);
  border-color: white;
  transform: translateY(-2px);
}

.btn-light {
  background-color: white;
  color: var(--primary-dark);
  font-weight: 600;
  border-radius: 50px;
  border: none;
  transition: all 0.3s ease;
}

.btn-light:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Activity Cards */
.activity-card {
  padding: 2rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.activity-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px var(--shadow);
  border-color: var(--primary-color);
}

.activity-card-cta {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
}

[data-bs-theme="dark"] .activity-card-cta {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-dark));
}

.activity-card-cta:hover {
  transform: translateY(-8px) scale(1.02);
}

.activity-card-cta .text-muted {
  color: rgba(255, 255, 255, 0.9) !important;
}

.activity-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease;
}

.activity-card:hover .activity-icon {
  transform: scale(1.1) rotate(5deg);
}

.activity-card-cta .activity-icon {
  background: rgba(255, 255, 255, 0.2);
}

/* Features Section */
.bg-secondary {
  background-color: var(--bg-secondary) !important;
}

.feature-image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow);
}

.feature-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  align-items: start;
}

.feature-item-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

/* Stats Section */
.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, white, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-weight: 500;
  opacity: 0.95;
}

/* Community Section */
.community-icon {
  width: 48px;
  height: 48px;
  background-color: var(--secondary-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.community-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  position: relative;
}

.grid-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow);
}

.grid-image-1 {
  transform: translateY(2rem);
}

.grid-image-2 {
  transform: translateY(-2rem);
}

/* CTA Section */
.cta-section {
  position: relative;
  background-image: url("/placeholder.svg?height=800&width=1920");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Updated gradient to use new brand colors */
  background: linear-gradient(135deg, rgba(135, 160, 49, 0.9), rgba(109, 130, 40, 0.95));
}

[data-bs-theme="dark"] .cta-overlay {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(30, 41, 59, 0.95));
}

/* Footer */
.bg-dark {
  background-color: #0f172a !important;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  color: white;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .py-6 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .community-image-grid {
    grid-template-columns: 1fr;
  }

  .grid-image-1,
  .grid-image-2 {
    transform: translateY(0);
  }
}

@media (max-width: 576px) {
  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
  }

  .display-1 {
    font-size: 2.5rem;
  }

  .display-3 {
    font-size: 2rem;
  }

  .display-4 {
    font-size: 1.75rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Text Selection */
::selection {
  background-color: var(--primary-color);
  color: white;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 100px); /* Adjust for navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    
    /* Hero Background */
    background-image: url('../img/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    
    /* Glassmorphism */
    background-color: rgba(255, 255, 255, 0.85); /* Light mode glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .auth-card {
    background-color: rgba(17, 24, 39, 0.8); /* Dark mode glass */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px var(--shadow);
}

.auth-card-body {
    padding: 3rem;
}

.auth-logo {
    width: 200px;
    height: 200px;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form inputs in auth card */
.auth-card .form-control,
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
    display: block;
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    /* Ensure Bootstrap defaults don't override if class is missing */
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.auth-card .form-control:focus,
.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="email"]:focus {
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(135, 160, 49, 0.1);
    outline: 0;
}

/* Dark mode overrides for specific elements not covered by vars */
[data-bs-theme="dark"] .auth-card .text-muted {
    color: var(--text-secondary) !important;
}
