/* GENERAL */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #a8eeff;
  overflow: hidden;
}

main {
  scroll-snap-type: none;
}

section {
  height: 100vh;
  height: 100dvh; /* Use dynamic viewport height on supported browsers */
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  text-align: center;
}

/* HERO */
.hero {
  height: 100vh;
  height: 100dvh; /* Use dynamic viewport height on supported browsers */
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 8vh; /* Reduced from 10vh for better mobile balance */
}

/* TYPOGRAPHY */
.site-title {
  font-size: 100px;
  color: #2f582f;
  margin: 20px 0 10px;
  font-weight: bold;
}

.subtitle {
  font-size: 40px;
  color: #2f582f;
  margin: 0 0 20px;
  font-weight: bold;
}

.subtitle-2 {
  font-size: 24px;
  color: #2f582f;
  margin: 0 0 50px;
  font-weight: normal;
  line-height: 1.4;
  max-width: 80vw;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

/* NAVIGATION */
.navbar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 6vh;
}

.navbar a {
  text-decoration: none;
  color: #004080;
  font-size: 24px;
  padding: 10px;
  transition: font-weight 0.2s ease, text-decoration 0.2s;
}

.navbar a:hover {
  font-weight: 900;
  text-decoration: underline;
}

/* CTA BUTTONS CONTAINER */
.cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: clamp(80px, 12vh, 150px);
}

/* UNIFIED BUTTON STYLING */
.btn-primary {
  background-color: #0078d4;
  color: white;
  padding: 20px 40px;
  border-radius: 10px;
  font-size: 32px;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: bold;
  width: 260px;
  text-align: center;
  box-sizing: border-box;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

/* Responsive button sizing */
@media screen and (max-width: 768px) {
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .btn-primary {
    padding: 18px 35px;
    font-size: 28px;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .btn-primary {
    padding: 16px 30px;
    font-size: 24px;
  }
}

/* STORIES SECTION */
.story-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 40px 0;
  max-width: 800px;
}

.story-button {
  background: white;
  border: 3px solid #2f582f;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  min-height: 200px;
}

.story-button:hover {
  background-color: #f0f8f0;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(47, 88, 47, 0.2);
}

.story-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2f582f;
}

.story-button span {
  font-size: 18px;
  font-weight: bold;
  color: #2f582f;
  text-align: center;
}

/* Story Display */
.story-display {
  max-width: 1200px;
  margin: 0 auto;
}

.back-to-stories {
  background-color: #2f582f;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 30px;
  transition: background-color 0.3s ease;
}

.back-to-stories:hover {
  background-color: #1e3a1e;
}

.story-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.story-text {
  font-size: 18px;
  line-height: 1.6;
  color: #333;
}

.story-text h2 {
  color: #2f582f;
  font-size: 28px;
  margin-bottom: 20px;
}

.story-text p {
  margin-bottom: 15px;
}

.story-large-image {
  width: 100%;
  max-width: min(300px, 40vw);
  border-radius: 12px;
  border: 3px solid #2f582f;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Stories */
@media screen and (max-width: 768px) {
  .story-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .story-button {
    padding: 15px;
    min-height: 150px;
  }
  
  .story-thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .story-button span {
    font-size: 16px;
  }
  
  .story-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .story-image {
    text-align: center;
  }
  
  .story-large-image {
    max-width: 250px;
  }
}

@media screen and (max-width: 480px) {
  .story-buttons {
    grid-template-columns: 1fr;
  }
  
  .story-text {
    font-size: 16px;
  }
  
  .story-text h2 {
    font-size: 24px;
  }
}

/* GRASSHOPPER - Base positioning */
.hopper {
  position: fixed;
  bottom: 160px;
  left: 12vw;
  height: 150px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}

/* UNIFIED ANIMATION - Works on all screen sizes */
.hopper.hopper-desktop,
.hopper.hopper-tablet,
.hopper.hopper-mobile {
  animation: hopperUnified 6s ease-in-out infinite;
}

@keyframes hopperUnified {
   0%   { left: 12vw; top: calc(100vh - 160px); /* On grass */ }
   25%  { left: 12vw; top: calc(100vh - 160px); /* Stay on grass */ }
   33%  { left: var(--title-left, 35vw); top: var(--title-top, 20vh); /* Hop to title */ }
   50%  { left: var(--title-left, 35vw); top: var(--title-top, 20vh); /* Stay on title */ }
   58%  { left: var(--button-left, 32vw); top: var(--button-top, 45vh); /* Hop to button */ }
   75%  { left: var(--button-left, 32vw); top: var(--button-top, 45vh); /* Stay on button */ }
   83%  { left: 12vw; top: calc(100vh - 160px); /* Return to grass */ }
   100% { left: 12vw; top: calc(100vh - 160px); /* Stay on grass */ }
}

@keyframes hopperMobile {
   0%   { left: 8vw; top: 90vh; /* On grass */ }
   25%  { left: 8vw; top: 90vh; /* Stay on grass */ }
   33%  { left: var(--title-left, 35vw); top: var(--title-top, 20vh); /* Hop to title */ }
   50%  { left: var(--title-left, 35vw); top: var(--title-top, 20vh); /* Stay on title */ }
   58%  { left: var(--button-left, 32vw); top: var(--button-top, 45vh); /* Hop to button */ }
   75%  { left: var(--button-left, 32vw); top: var(--button-top, 45vh); /* Stay on button */ }
   83%  { left: 8vw; top: 90vh; /* Return to grass */ }
   100% { left: 8vw; top: 90vh; /* Stay on grass */ }
}

/* SKY + CLOUDS */
.sky {
  background-color: #a8eeff;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  z-index: -3;
  overflow: hidden;
}

/* GRASS */
.grass {
  background: url('images/grass.png') repeat-x bottom;
  background-size: contain;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: -2;
}

/* TABLET AND SMALLER RESPONSIVE DESIGN */
@media screen and (max-width: 1024px) {
  .site-title {
    font-size: clamp(60px, 12vw, 120px);
    max-width: 85vw;
    margin: 20px auto 10px;
  }

  .subtitle {
    font-size: clamp(18px, 4vw, 36px);
    max-width: 85vw;
    margin: 0 auto 20px;
  }
  
  .subtitle-2 {
    font-size: clamp(16px, 3.5vw, 24px);
    max-width: 85vw;
    margin: 0 auto 40px;
  }

  .cta-button {
    font-size: clamp(20px, 4vw, 32px);
    padding: 16px 32px;
  }

  .navbar a {
    font-size: clamp(16px, 3vw, 24px);
    padding: 8px 12px;
  }

  .ladder {
    display: none;
  }

  .hopper {
    left: 12vw;
    height: 100px;
  }
}

/* MOBILE RESPONSIVE DESIGN */
@media screen and (max-width: 768px) {
  .navbar {
    display: none;
  }

  .hero-content {
    padding-bottom: 3vh;
    min-height: calc(100vh - 120px);
    justify-content: center;
  }


  
  @supports (height: 100dvh) {
    .hero-content {
      min-height: auto;
    }
  }

  .mobilebars {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    z-index: 10;
  }

  .mobilebars .bar {
    width: 28px;
    height: 4px;
    background-color: #004080;
    margin: 6px 0;
    border-radius: 4px;
  }

  .hopper.hopper-mobile {
    left: 8vw;
    height: 80px;
    bottom: auto;
    top: 90vh;
    animation: hopperMobile 6s ease-in-out infinite !important;
  }
  
  .site-title {
    font-size: clamp(48px, 15vw, 100px);
    max-width: 85vw;
    margin: 20px auto 10px;
  }
  
  .subtitle {
    font-size: clamp(16px, 6vw, 36px);
    max-width: 85vw;
    margin: 0 auto 4vh;
  }
  
  .subtitle-2 {
    font-size: clamp(14px, 3vw, 20px);
    max-width: 85vw;
    margin-bottom: 35px;
  }
  
  .cta-button {
    font-size: clamp(18px, 3.5vw, 28px);
    padding: 14px 28px;
  }
}

/* Hide the hamburger on large screens */
@media screen and (min-width: 769px) {
  .mobilebars {
    display: none;
  }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
}

.mobile-menu {
  background-color: white;
  width: 80%;
  max-width: 300px;
  height: 100%;
  padding: 0;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #2f582f;
  color: white;
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.close-mobile-menu {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
}

.mobile-nav {
  padding: 20px 0;
}

.mobile-nav a {
  display: block;
  padding: 15px 20px;
  color: #2f582f;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.mobile-nav a:hover {
  background-color: #f8f9fa;
}

/* CONTENT SECTIONS */
.content-section {
  height: 100vh;
  padding: 0;
  background-color: white;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 40px;
  line-height: 1.6;
  color: #333;
  max-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.section-content h1 {
  color: #2f582f;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

.section-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: justify;
}

.section-content ul {
  margin: 20px 0;
  padding-left: 30px;
}

.section-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.story-highlights {
  display: flex;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.highlight-box {
  flex: 1;
  min-width: 300px;
  background-color: #0078d4;
  color: white;
  padding: 25px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.2);
}

.highlight-box p {
  margin: 0;
  text-align: left;
  font-size: 1rem;
}

.back-to-top {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 24px;
  background-color: #0078d4;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-to-top:hover {
  background-color: #106ebe;
  transform: translateY(-2px);
}

.team-photo {
  text-align: center;
  margin: 40px 0;
}

.founder-photo {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.founder-photo:hover {
  transform: scale(1.02);
}

/* What We Do Section */
.what-intro {
  text-align: center;
  margin: 30px 0 40px;
}

.what-header {
  background-color: white;
  border: 3px solid #2f582f;
  padding: 30px;
  border-radius: 8px;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.formula-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.formula-term {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.term-title {
  color: #2f582f;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

.term-subtitle {
  color: #2f582f;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

.formula-plus {
  color: #2f582f;
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0 10px;
}

.formula-divider {
  height: 3px;
  background-color: #2f582f;
  margin: 15px 0;
  border-radius: 2px;
}

.formula-goal {
  color: #2f582f;
  font-size: 1rem;
  margin: 0;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
}

.expandable-section {
  margin: 30px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.expand-header {
  background-color: #f8f9fa;
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: background-color 0.2s ease;
}

.expand-header:hover {
  background-color: #e9ecef;
}

.expand-arrow {
  font-size: 1.2rem;
  color: #0078d4;
  transition: transform 0.3s ease;
}

.expand-header.active .expand-arrow {
  transform: rotate(180deg);
}

.expand-header h3 {
  margin: 0;
  color: #2f582f;
  font-size: 1.3rem;
}

.expand-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.expand-content.active {
  padding: 20px;
  max-height: 2000px;
}

.image-grid {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.grid-image {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.curriculum-image {
  text-align: center;
  margin: 30px 0;
}

.curriculum-diagram {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.example-images {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.example-image {
  flex: 1;
  min-width: 150px;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Goals Section */
.goals-section {
  margin: 30px 0;
}

.goals-subtitle {
  color: #2f582f;
  font-size: 1.3rem;
  margin: 0 0 20px 0;
  font-weight: bold;
}

.goals-list {
  margin: 0;
  padding-left: 25px;
}

.goals-list li {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.4;
}

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

/* Mobile responsiveness for content sections */
@media screen and (max-width: 768px) {
  .section-content {
    padding: 0 20px;
  }
  
  .section-content h1 {
    font-size: 2rem;
  }
  
  .story-highlights {
    flex-direction: column;
    gap: 15px;
  }
  
  .highlight-box {
    min-width: auto;
  }
  
  /* What We Do mobile styles */
  .what-header {
    padding: 20px 15px;
    margin: 0 10px;
  }
  
  .formula-equation {
    gap: 15px;
  }
  
  .term-title,
  .term-subtitle {
    font-size: 1.4rem;
  }
  
  .formula-plus {
    font-size: 2rem;
    margin: 0 5px;
  }
  
  .formula-goal {
    font-size: 0.9rem;
  }
  
  .expand-header {
    padding: 15px;
  }
  
  .expand-header h3 {
    font-size: 1.1rem;
  }
  
  .expand-content.active {
    padding: 15px;
  }
  
  .image-grid {
    flex-direction: column;
    align-items: center;
  }
  
  .grid-image {
    min-width: 200px;
    max-width: 300px;
  }
  
  .example-images {
    flex-direction: column;
    align-items: center;
  }
  
  .example-image {
    min-width: 120px;
    max-width: 250px;
  }
  
  /* Goals mobile styles */
  .goals-section {
    margin: 20px 0;
  }
  
  .goals-subtitle {
    font-size: 1.1rem;
  }
  
  .goals-list li {
    font-size: 1rem;
  }
}
