﻿/* ===== Parallax Effect for Hero Background ===== */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-bg-elements {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Enable smooth parallax scrolling */
.hero-bg-elements.parallax-active {
  transform: translateY(var(--parallax-offset, 0));
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-elements {
    transition: none;
    transform: none !important;
  }
}

.dict-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

.dict-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.quiz-section {
  display: flex;
  flex-direction: column;
  background: var(--section-bg);
  color: var(--text-color);
}

.dict-card h3 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--heading-color);
  transition: color 0.3s ease;
}

.dict-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 10px 0 0;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.category-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 15px;
  margin-top: 10px;
  opacity: 0.8;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.scroll-to-bottom.clicked {
  animation: none;
  transform: scale(0.9);
}

/* ===== Scroll to Bottom Button ===== */
.scroll-to-bottom {
  position: fixed;
  bottom: 90px;
  /* Above back-to-top */
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #38ef7d, #11998e);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: all 0.4s ease;
  animation: floatBtn 2s infinite;
}

.scroll-to-bottom:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #11998e, #38ef7d);
}

/* Floating animation */
@keyframes floatBtn {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ===== DAILY QUOTE SECTION ===== */
.daily-quote-section {
  padding: 60px 20px;
  background: var(--bg-color);
  position: relative;
  overflow: hidden;
}

.quote-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-color);
}

.quote-icon {
  font-size: 2rem;
  color: var(--btn-primary-bg);
  opacity: 0.7;
}

.quote-right {
  order: 3;
}

.quote-content {
  flex: 1;
  max-width: 600px;
}

.quote-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0 0 15px 0;
  font-style: italic;
  position: relative;
}

.quote-author {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .quote-container {
    flex-direction: column;
    gap: 15px;
  }

  .quote-icon {
    font-size: 1.5rem;
  }

  .quote-text {
    font-size: 1.2rem;
  }

  .quote-author {
    font-size: 0.9rem;
  }
}

/* ===== TESTIMONIAL FADE-IN ANIMATION ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-fade-in.animate {
  animation: fadeInUp 0.8s ease forwards;
}
/* ===========================================
   HERO TEXT COLOR FIXES FOR LIGHT THEME
   =========================================== */

/* Fix for hero subtitle text in light theme */
.hero-subtitle {
  color: #333333 !important;
  opacity: 0.9 !important;
}

/* Fix for search placeholder text in light theme */
.form-input::placeholder {
  color: #666666 !important;
}

/* Fix for hero features text - URGENT FIX */
.hero-feature span {
  color: #1b5e20 !important;
  font-weight: 600 !important;
}

/* Add background to hero features in light theme */
body:not([data-theme='dark']) .hero-feature {
  background: rgba(46, 125, 50, 0.1) !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(46, 125, 50, 0.2) !important;
}

/* Fix for live clock text in light theme */
body:not([data-theme='dark']) .live-clock {
  color: #222222 !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

/* Fix for hero badge text in light theme */
body:not([data-theme='dark']) .hero-badge {
  color: #1b5e20 !important;
  background: rgba(46, 125, 50, 0.1) !important;
  border: 1px solid rgba(46, 125, 50, 0.2) !important;
}

/* Keep page view counter white text on colored background */
.page-view-counter {
  color: white !important;
  background: #00bcd4 !important;
}

/* Fix for search help text */
#search-help {
  color: #555555 !important;
}

/* Fix for button descriptions */
#get-started-desc,
#learn-more-desc {
  color: #444444 !important;
}

/* Force ALL text in hero section to be dark in light theme */
body:not([data-theme='dark']) .hero-content {
  --text-primary: #111111 !important;
  --text-secondary: #333333 !important;
}

/* Override any white text in hero content */
body:not([data-theme='dark']) .hero-content p,
body:not([data-theme='dark']) .hero-content span:not(.gradient-text),
body:not([data-theme='dark']) .hero-content div:not(.btn) {
  color: #333333 !important;
}

/* Fix gradient text for light theme */
body:not([data-theme='dark']) .gradient-text {
  color: whitesmoke !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  background: none !important;
  -webkit-text-fill-color: whitesmoke !important;
}

/* Add subtle text shadow for better contrast */
body:not([data-theme='dark']) .hero-subtitle {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) !important;
}

/* Fix for hero features specifically - this should work */
.hero-features {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-feature i {
  color: var(--primary-color) !important;
}

/* Emergency override - force dark text for light theme */
:root:not([data-theme='dark']) .hero-content * {
  color: #222222 !important;
}

/* Specific fix for the text that says 'Animal Rescue', 'Plant Trees', 'Reduce Waste' */
:root:not([data-theme='dark']) .hero-feature span {
  color: #1b5e20 !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;
}

/* Button Hover Effects */
.btn,
button,
.search-btn,
.theme-toggle {
  min-height: 44px;
  min-width: 44px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
}

.btn-secondary:hover {
  background: #4CAF50 !important;
  color: white !important;
  transform: translateY(-2px) !important;
}

.search-btn:hover {
  background: #45a049 !important;
  transform: scale(1.05) !important;
}

.theme-toggle:hover {
  transform: rotate(180deg) scale(1.1) !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Focus States */
.btn:focus,
button:focus {
  outline: 3px solid #4CAF50 !important;
  outline-offset: 2px !important;
}

