@import url('https://fonts.googleapis.com/css2?family=Comic+Neue&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Comic Neue', Comic Sans MS, cursive;
  color: #fff;
}

/* Global link styles */
a {
  text-decoration: none;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff;
}

/* Background */
.background {
  background-image: url('https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: auto; /* Changed from min-height: 100vh to allow natural height */
  min-height: 100vh; /* Minimum to fill viewport */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

/* Content container */
.content {
  display: block;
  max-width: 1000px;
  width: 95%;
  margin: 15px auto 1em;
  text-align: center;
  z-index: 2;
  flex: 1 0 auto; /* Allows content to grow but not shrink */
}

/* Buttons at top */
.buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  flex-wrap: wrap;
  padding: 0.5em;
}

.button {
  display: inline-block;
  margin: 0.5em;
  padding: 0.5em 1em;
  font-size: 1em;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(to right, #2ecc71, #27ae60);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Hover effect for the text inside the button */
.button:hover {
  background: linear-gradient(to right, #27ae60, #219653);
}

.button span {
  transition: font-size 0.2s ease;
}

.button:hover span {
  font-size: 1.1em;
}

/* Default text display: show desktop text, hide mobile text */
.button .desktop-text {
  display: inline;
}

.button .mobile-text {
  display: none;
}

/* Fireside Forum button container */
.fireside-button {
  margin-top: 1em;
  text-align: center;
}

.fireside-button .button {
  width: 300px;
  text-align: center;
}

/* Overlay */
.overlay {
  position: relative;
  padding: 3em;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  max-width: 90%;
  margin: 0.5em auto 0;
  height: 840px;
  overflow: hidden;
}

.overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/guardian/pictures/guardian-placeholder.jpg');
  background-size: 120%;
  background-position: top center;
  background-repeat: no-repeat;
  opacity: 0.8;
  z-index: -1;
  border-radius: 16px;
}

.overlay-content {
  background-color: rgba(0, 0, 0, 0.5);
  height: 720px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  border-radius: 16px;
  overflow-x: hidden;
  padding: 1em;
}

.overlay-content::-webkit-scrollbar {
  width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
  background: transparent;
}

.overlay-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.overlay h1,
.overlay p,
.overlay ul li {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Headings and text */
h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}

p {
  font-size: 1.5em;
  line-height: 1.6;
  margin-bottom: 1em;
}

ul {
  list-style: none;
  font-size: 1.3em;
  margin-bottom: 1em;
  text-align: left;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

ul li {
  margin: 0.5em 0;
  position: relative;
  padding-left: 1.5em;
}

ul li::before {
  content: '🌳';
  position: absolute;
  left: 0;
  color: #2ecc71;
  font-size: 1em;
}

/* Highlight class for "1 Pi = 1 Tree" */
.highlight {
  font-size: 2.2em;
  font-weight: bold;
  color: #2ecc71;
  background-color: transparent;
  padding: 0.4em 0.7em;
  border-radius: 8px;
  display: inline-block;
  margin: 0.5em 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 20px;
  max-width: 1000px;
}

.gallery-item {
  position: relative;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  border: 2px solid #fff;
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item h3 {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 14px;
  margin: 0;
}

/* Thank you message container */
.member-content {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  position: relative;
  width: 100%;
  min-width: 600px;
  min-height: 400px;
  margin: 100px auto 0;
  display: flex;
  justify-content: center;
  border-radius: 16px;
}

.thank-you-overlay {
  position: absolute;
  bottom: 30px;
  left: 5%;
  width: 90%;
  height: 33%;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 1em;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow-y: auto;
}

.thank-you-overlay h1 {
  font-size: 1.5em;
  margin: 0 0 0.5em 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.thank-you-overlay p {
  font-style: italic;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Toggle button + extra links */
.toggle-button-container {
  text-align: center;
  margin: 1em auto;
  max-width: 800px;
  width: 95%;
}

.links-container {
  text-align: center;
  margin: 1em auto;
  max-width: 800px;
  width: 95%;
}

.links-container a {
  color: #fff;
  background-color: #4CAF50;
  padding: 0.5em 1em;
  border-radius: 5px;
  margin: 0 0.5em;
  display: inline-block;
}

.links-container a:hover {
  background-color: #45a049;
  font-size: 1em;
}

/* Project Images */
.project-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin: 2em 0;
}

.project-images img {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Disclaimer */
.disclaimer {
  font-size: 0.8em;
  text-align: center;
  padding: 0.3em 0.5em;
  color: #e0e0e0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  width: 100%;
  background: linear-gradient(to right, rgba(46, 204, 113, 0.5), rgba(39, 174, 96, 0.5));
  position: absolute;
  bottom: 0;
  left: 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1em 0;
  width: 100%;
  position: absolute; /* Positions footer relative to .background */
  bottom: 10px; /* Sets footer 10px above the bottom */
  z-index: 2;
}

.footer a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
  .content {
    margin: 5px auto 1em;
  }

  .overlay {
    padding: 1.5em;
    height: 650px;
    margin: 0.5em auto 0;
  }

  .overlay::before {
    background-position: center center;
  }

  .overlay-content {
    height: 550px;
  }

  .buttons {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.5em;
    top: 5px;
    padding: 0.5em;
  }

  .button {
    font-size: 1em;
    padding: 0.5em 1em;
    line-height: 1;
    margin: 0.4em;
    width: auto;
    text-align: center;
  }

  .button .desktop-text {
    display: none;
  }

  .button .mobile-text {
    display: inline;
  }

  .fireside-button .button {
    width: 250px;
  }

  h1 {
    font-size: 2em;
  }

  p {
    font-size: 1em;
  }

  ul {
    font-size: 1em;
    max-width: 500px;
  }

  ul li {
    padding-left: 1.2em;
  }

  .highlight {
    font-size: 1.5em;
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  }

  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }

  .gallery-item {
    max-width: 350px;
    margin: 0 auto;
  }

  .project-images img {
    max-width: 100%;
  }

  .fireside-button {
    margin-top: 0.5em;
  }

  .disclaimer {
    font-size: 0.7em; /* Slightly larger than 0.5em */
    padding: 0.2em 0.4em;
  }

  .footer {
    padding: 0.5em 0;
    bottom: 10px; /* Keeps 10px above bottom on mobile */
  }
}