/* Modern homepage styles */
body {
  margin: 0;
  padding: 0;
  padding-top: 76px; /* Account for fixed navbar */
  background-color: #f8f9fa;
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  text-align: center;
  scroll-snap-type: y mandatory;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: scroll;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.container {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  padding: 40px;
  margin-top: 20px;
  margin-bottom: 40px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

h1 {
  color: #212529;
  text-align: center;
  margin-bottom: 30px;
  font-size: 3rem;
  font-weight: bold;
}

.intro-text {
  text-align: center;
  font-size: 1.2rem;
  color: #495057;
  margin-bottom: 40px;
  line-height: 1.6;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.story-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.story-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: inherit;
}

.story-image {
  height: 200px;
  overflow: hidden;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
  transform: scale(1.1);
}

.story-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.story-content h3 {
  color: #212529;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.3;
}

.story-content p {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.read-more {
  color: #dc3545;
  font-weight: 600;
  font-size: 1rem;
  margin-top: auto;
  transition: color 0.3s ease;
}

.story-card:hover .read-more {
  color: #c82333;
}


/* Responsive design for homepage */
@media (max-width: 768px) {
  .container {
    margin: 20px 10px;
    padding: 20px;
  }

  h1 {
    font-size: 2.5rem;
  }

  .intro-text {
    font-size: 1.1rem;
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .story-content {
    padding: 20px;
  }

  .story-content h3 {
    font-size: 1.3rem;
  }
}

/* Scrollytelling elements for individual story pages */
#scrollytelling-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  padding-top: 56px; /* height of Bootstrap navbar */
}

#image-container {
  position: relative;
  z-index: 1;
  margin-top: 56px;  /* height of Bootstrap navbar */
}

#text-container {
  position: relative;
  width: 50%;
  margin: 0 auto;
  padding: 50px 0;
  color: white;
  font-size: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.text-step {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 40px;
  border-radius: 10px;
  margin-bottom: 100vh; /* Space between steps */
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Fade in when visible */
.text-step.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade out when scrolled past */
.text-step:not(.visible) {
  opacity: 0;
  transform: translateY(50px);
}

.scrolly-section {
  scroll-snap-align: start;
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  color: white;
  justify-content: center;
}

.scrolly-section video, .scrolly-section img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.scrolly-text {
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5); /*  text box colour */
  padding: 2rem;
  border-radius: 1rem;
  max-width: 700px;
}

.scrolly-instructions {
  position: absolute;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5); /*  text box colour */
  padding: 1rem;
  border-radius: 1rem;
  max-width: 700px;
  bottom: 10px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 0;
}


/* accordion headers */
.accordion-header {
  background-color: #343a40;
  color: white;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

