/* 
 * Mindfully Rooted Yoga - Main Stylesheet
 * 
 * This file contains global styles for the Mindfully Rooted Yoga website.
 * Component-specific styles are included inline or in their respective files.
 */

:root {
  /* Color Variables */
  --earth-green: #4A7043;
  --earth-brown: #8B6F47;
  --earth-tan: #F5F5DC;
  --earth-light: #FAF9F6;
  --earth-dark: #5C4033;
  
  /* Font Variables */
  --font-sans: 'Raleway', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  /* Spacing Variables */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

/* Custom theme utility classes to match HTML usage */
.bg-earth-green { background-color: var(--earth-green) !important; }
.bg-earth-brown { background-color: var(--earth-brown) !important; }
.text-earth-brown { color: var(--earth-brown) !important; }
.text-earth-dark { color: var(--earth-dark) !important; }
.text-earth-light { color: var(--earth-light) !important; }

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--earth-dark);
  background-color: var(--earth-tan);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.3;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--earth-green);
  color: var(--earth-light);
}

.btn-secondary {
  background-color: var(--earth-brown);
  color: var(--earth-light);
}

.btn-outline {
  border: 2px solid currentColor;
  background-color: transparent;
}

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

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

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.fade-in {
  animation: fadeIn 1s ease-out;
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }

  #mobile-menu {
    position: fixed; /* Changed from absolute to fixed */
    top: 4rem; /* Adjust this value to match the height of your sticky navbar */
    left: 0;
    right: 0;
    z-index: 40; /* Ensure it's below the navbar (z-50) but above other content */
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Print Styles */
@media print {
  body {
    background-color: white;
    color: black;
  }
  
  .no-print {
    display: none;
  }
}

/* Animated underline for navigation links */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--earth-light);
    transition: width 0.3s ease-in-out;
}
.nav-link:hover::after {
    width: 100%;
}

/* Testimonial Card Styles */
.testimonial-card {
    display: block;
    min-height: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Ensure testimonials grid is responsive */
#testimonials-grid {
    grid-auto-rows: 1fr;
}

@media (max-width: 768px) {
    #testimonials-grid {
        gap: 1rem;
    }
    
    .testimonial-card {
        min-height: 200px;
    }
}

/* Navigation Component Styles */
.navbar {
  background-color: var(--earth-green);
  color: var(--earth-light);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-weight: bold;
}

.nav-logo a {
  color: inherit;
  text-decoration: none;
}

.logo {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.nav-menu li {
  margin: 0;
}

.nav-link {
  color: var(--earth-light);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--earth-light);
}

.nav-link.active {
  background-color: var(--earth-brown);
  color: var(--earth-light);
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
  
  .nav-toggle {
    display: none;
  }
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  width: 30px;
  height: 21px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--earth-light);
  margin: 3px 0;
  transition: 0.3s;
}

.nav-toggle.is-active .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-6px, 6px);
}

.nav-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .bar:nth-child(3) {
  transform: rotate(45deg) translate(-6px, -6px);
}

/* Mobile Navigation Menu */
.nav-menu-mobile {
  display: none;
  background-color: var(--earth-green);
  padding: 1rem;
  list-style: none;
  margin: 0;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-menu-mobile.active {
  display: flex;
}

.nav-menu-mobile .nav-link {
  display: block;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu-mobile .nav-link:last-child {
  border-bottom: none;
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .nav-menu {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
}