/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

/* Accessibility - Skip Links */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--forest-green);
  color: var(--off-white);
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Enhanced Focus Indicators */
a:focus,
button:focus,
[tabindex]:focus,
.collapsible-header:focus {
  outline: 3px solid var(--soft-green);
  outline-offset: 2px;
}

/* Woodland theme colors */
:root {
  --off-white: #fefefe;
  --forest-green: #2d5016;
  --sage-green: #7a8471;
  --soft-green: #9db396;
  --brown: #8b6914;
  --warm-gray: #6b6b6b;
  --light-gray: #e8e6e1;
  --text-dark: #333;
}

/* Shared font families */
.serif-heading,
.card h3,
.contact-info h3,
.content-section.welcome-section h2,
.about-text .content-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--forest-green);
}

/* Shared hover effects */
.lift-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lift-hover:hover {
  transform: translateY(-2px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
header {
  background-color: var(--off-white);
  border-bottom: 2px solid var(--light-gray);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  text-align: center;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--forest-green);
  text-decoration: none;
  margin-bottom: 1rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--sage-green);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav a:hover,
nav a.active {
  background-color: var(--soft-green);
  color: var(--off-white);
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--soft-green) 0%, var(--sage-green) 100%);
  color: var(--off-white);
  text-align: center;
  padding: 3rem 0;
  margin-bottom: 1rem;
}

/* Hero with background image */
.hero-with-image {
  position: relative;
  color: var(--off-white);
  text-align: center;
  padding: 5rem 0;
  margin: 1rem auto;
  min-height: 50vh;
  display: flex;
  align-items: center;
  width: 90%;
  border-radius: 8px;
  overflow: hidden;
}

.hero-with-image .container {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-with-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-with-image .hero-content {
  background: transparent;
  padding: 3rem;
  border-radius: 8px;
  backdrop-filter: none;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: none;
}

.hero-with-image h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
  color: white;
}

.hero-with-image p {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  color: white;
  font-weight: 500;
}

.hero-with-image p:last-child {
  margin-bottom: 0;
  font-style: italic;
  opacity: 0.95;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: normal;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Main content */
main {
  padding: 1.5rem 0 2rem 0;
  min-height: 60vh;
}

/* Homepage main content specific */
main.homepage {
  padding: 0.5rem 0 3rem 0; /* reduce gap between hero and main content */
}

/* Reduce any default top spacing for the welcome section */
.content-section.welcome-section {
  margin-top: 0;
}

.content-section.welcome-section h2 {
  margin-top: 0;
}

.content-section {
  margin-bottom: 2rem;
}

.content-section h2 {
  color: var(--forest-green);
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 0.5rem;
}

/* Homepage welcome section specific styling */
.content-section.welcome-section {
  margin-bottom: 3rem;
  text-align: center;
}

.content-section.welcome-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--soft-green);
  padding-bottom: 0.75rem;
  display: inline-block;
}

/* Shared content style: left-aligned heading, justified body text */
.content-left {
  text-align: left; /* align heading and contained text to the left */
}

.content-left h2,
.content-left .serif-heading {
  text-align: left;
  display: block;
}

.content-left p {
  text-align: justify;
}

/* Reusable heading style to match card headings: font, size, weight and subtle underline */
.heading-card-style {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--forest-green);
  font-size: 1.5rem; /* matches .card h3 */
  margin-bottom: 1rem;
  display: inline-block;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--light-gray); /* subtle underline */
}

.content-section p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* Homepage welcome section paragraph styling */
.content-section.welcome-section p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--warm-gray);
}

/* Utility: preserve whitespace and newlines in text content */
.preserve {
  white-space: pre-wrap; /* preserves newlines and wraps long lines */
  word-wrap: break-word;
}

.content-section ul {
  padding-left: 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* About page specific text styling */
.about-text .content-section {
  margin-bottom: 0;
}

.about-text .content-section h2 {
  margin-top: 0;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.about-text .content-section p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.about-text .content-section p:last-child {
  margin-bottom: 0;
}

.content-section h3 {
  color: var(--forest-green);
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.content-section h3:first-child {
  margin-top: 0;
}

/* Two column layout for About page */
.two-column-section {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
  margin-top: 1rem;
}

.about-image-container {
  position: sticky;
  top: 2rem;
}

.about-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.about-image:hover {
  box-shadow: 0 8px 35px rgba(0,0,0,0.15);
}

/* Base card styling */
.card-base {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Cards/boxes */
.card {
  padding: 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--soft-green);
}

.card:hover {
  box-shadow: 0 6px 30px rgba(0,0,0,0.12);
}

.card h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--warm-gray);
}

.card ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.card li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.card li:last-child {
  margin-bottom: 0;
}

/* Cards grid layout - Homepage only */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Collapsible cards */
.collapsible-card {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}

.collapsible-header {
  padding: 1.5rem 2rem;
  background: var(--light-gray);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.collapsible-header:hover {
  background: var(--sage-green);
  color: white;
}

.collapsible-header h3 {
  color: var(--forest-green);
  margin: 0;
  font-size: 1.2rem;
}

.collapsible-header:hover h3 {
  color: white;
}

.collapsible-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--forest-green);
  transition: transform 0.3s ease, color 0.3s ease;
}

.collapsible-header:hover .collapsible-toggle {
  color: white;
}

.collapsible-toggle.expanded {
  transform: rotate(45deg);
}

.collapsible-content {
  padding: 0 2rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible-content.expanded {
  max-height: 500px;
  padding: 2rem;
}

/* Contact info */
.contact-info {
  background: linear-gradient(135deg, var(--light-gray) 0%, #f5f4f0 100%);
  padding: 2.5rem;
  border-radius: 12px;
  margin: 2.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e0ddd6;
  text-align: center;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.contact-info p strong {
  color: var(--forest-green);
  font-weight: 600;
}

.contact-info a {
  text-decoration: none;
}s

.contact-info a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--forest-green);
  color: var(--off-white);
  text-decoration: none;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(45, 80, 22, 0.2);
  margin-top: 1rem;
}

.btn:visited {
  color: var(--off-white);
}

.btn-secondary:visited {
  color: var(--off-white);
}

.btn:hover,
.btn-secondary:hover {
  background-color: var(--sage-green);
  transform: translateY(-1px);
}

.btn:hover {
  box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.btn-secondary {
  background-color: var(--soft-green);
  color: var(--off-white);
  box-shadow: 0 2px 10px rgba(157, 179, 150, 0.2);
}

.btn-secondary:hover {
  box-shadow: 0 4px 15px rgba(157, 179, 150, 0.3);
}

/* Footer */
footer {
  background-color: var(--forest-green);
  color: var(--off-white);
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
}

footer p {
  margin: 0.5rem 0;
  opacity: 0.9;
}

/* Error page */
.error-container {
  max-width: 500px;
  margin: 10vh auto;
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.error-container h1 {
  color: var(--forest-green);
  margin-bottom: 1rem;
}

.error-container a {
  color: var(--brown);
  text-decoration: none;
  font-weight: 500;
}

.error-container a:hover {
  text-decoration: underline;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--forest-green);
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Responsive design */
@media (max-width: 1000px) {
  .header-content {
    position: relative;
    padding-right: 3.5rem; /* Add padding to prevent overlap with menu button */
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .logo {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    padding-right: 0; /* Ensure logo doesn't extend into button area */
    max-width: calc(100% - 3.5rem); /* Limit logo width */
    line-height: 1.2; /* Tighter line height for potential wrapping */
  }
  
  nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99;
    padding: 0 1rem;
  }
  
  nav.active {
    display: block;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
  }
  
  nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--light-gray);
  }
  
  nav a:last-child {
    border-bottom: none;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .hero {
    padding: 1.5rem 0;
    margin-bottom: 0.5rem;
  }
  
  .hero-with-image {
    padding: 2.5rem 0;
    min-height: 40vh;
    width: 95%;
    margin: 0.5rem auto;
  }
  
  .hero-with-image .hero-content {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .hero-with-image h1 {
    font-size: 2.2rem;
  }
  
  .hero-with-image p {
    font-size: 1.1rem;
  }
  
  .two-column-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .about-image-container {
    position: static;
    order: -1;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .about-image {
    max-width: 300px;
    width: 90%;
    margin: 0 auto;
    display: block;
  }
  
  .about-text .content-section p {
    text-align: left;
  }
  
  main {
    padding: 1rem 0;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .contact-info {
    padding: 1.5rem;
  }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
  .two-column-section {
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }
  
  .about-text .content-section h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .header-content {
    padding-right: 3rem; /* Slightly less padding on very small screens */
  }
  
  .logo {
    font-size: 1.4rem; /* Even smaller font on very small screens */
    max-width: calc(100% - 3rem);
    word-break: break-word; /* Allow breaking long words if necessary */
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .content-section h2 {
    font-size: 1.8rem;
  }
  
  nav ul {
    gap: 1rem;
  }
}
