body {
  padding-top: 56px;
}

.left-aligned {
  margin-left: auto;
}

.bg-dark {
  background-color: #343a40 !important;
}

.bg-hero {
  background-color: #E5D5C8;
}

/* CALLOUT */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e9ecef;
  border-left-width: 0.25rem;
  border-radius: 0.25rem;
}
.bd-callout h4 { margin-bottom: 0.25rem; }
.bd-callout p:last-child { margin-bottom: 0; }
.bd-callout code { border-radius: 0.25rem; }
.bd-callout + .bd-callout { margin-top: -0.25rem; }
.bd-callout-info { border-left-color: #5bc0de; }
.bd-callout-warning { border-left-color: #f0ad4e; }
.bd-callout-danger { border-left-color: #d9534f; }

/* Footer links */
footer a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}
footer a:hover {
  color: white;
  text-decoration: underline;
}

/* --- General Site Layout & Style --- */
body {
  background-color: #3b4a3f; /* Match Figma background */
  font-family: 'Helvetica Neue', sans-serif;
  color: #1e4d2b;
}

/* Text & Image pairs (legacy) */
.text {
  flex: 1;
  font-weight: bold;
  font-size: 1.2em;
  padding: 10px;
}
.image {
  flex: 1;
  padding: 10px;
  text-align: center;
}
.image img {
  max-width: 100%;
  height: auto;
}

/* Centered utility */
.centered {
  text-align: center;
  margin-top: 40px;
}

.description-link {
  font-size: 1.1em;
  color: #ffe0cc;
  text-decoration: none;
  font-weight: bold;
}
.description-link:hover { text-decoration: underline; }

/* Optional: Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: none; }
}

/* top of page button */
#topBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 99; /* Make sure it does not overlap */
  border: none;
  outline: none;
  background-color:#3B4A3F; 
  color:#E5D5C8; 
  font-weight: 800;
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px; 
  margin-top: 24px;
  border-radius: 10px;
  font-size: 18px;
}

#topBtn:hover {
  background-color: rgba(229, 213, 200, 0.1);
}

/* Team section */
.team-container {
  background-color: #003b36; /* dark green */
  padding: 50px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}
.our-team {
  background-color: #ffe0cc; /* light peach */
  border-radius: 20px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
  padding: 20px;
  max-width: 280px;
  text-align: center;
  color: black;
  transition: transform 0.3s ease;
}
.our-team:hover { transform: scale(1.03); }
.team-image img { width: 100%; border-radius: 20px; }
.team-info .title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 10px 0 5px;
}
.team-info .post { font-size: 1rem; color: #333; }
.social-icons { margin-top: 10px; }
.social-icon img {
  width: 24px;
  margin: 0 5px;
  transition: transform 0.2s;
}
.social-icon img:hover { transform: scale(1.2); }

/* Flip cards */
.member-card {
  width: 180px;
  height: 260px;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background-color: #fff7f0;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.card-content {
  position: absolute;
  width: 100%;
  height: 200%;
  top: 0;
  left: 0;
  transition: transform 0.5s ease;
}
.card-front,
.card-back {
  width: 100%;
  height: 50%;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.card-front img {
  width: 100%;
  border-radius: 8px;
}
.card-front strong { margin-top: 10px; color: #1e4b26; }
.card-front .role { font-size: 13px; color: #555; }
.card-back {
  background-color: #ffffff;
  text-align: center;
  font-size: 14px;
  color: #fff7f0;
}
.card-active .card-content { transform: translateY(-50%); }

/* Navbar */
.custom-navbar {
  background-color: #2f4f4f;
}
.bg-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* LinkedIn icon override */
.linkedin-link {
  margin-top: 8px;
  display: inline-block;
}
.linkedin-icon {
  width: 50px !important;
  height: 50px !important;
  margin-top: 8px;
  display: block;
  object-fit: contain;
}

/* Sponsor grid (footer) */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}
@media (max-width: 768px) {
  .sponsor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sponsor-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: transform .15s ease, background .2s ease, filter .2s ease;
}
.sponsor-grid a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.12);
}
.sponsor-grid img {
  max-width: 150px;
  max-height: 48px;
  width: auto;
  height: auto;
  filter: brightness(0) invert(1);
}
.sponsor-grid a:hover img { filter: none; }
.visually-hidden {
  position:absolute !important; height:1px; width:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); white-space:nowrap;
}

/* --- HOMEPAGE FIXES (scoped to #home) --- */
#home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
#home .row {
  display: grid !important;
  grid-template-columns: minmax(360px,1fr) minmax(360px,1fr);
  gap: 32px;
  align-items: center;
  justify-content: center;
  margin: 32px auto 0;
  width: 100%;
  max-width: 1160px;
}
@media (max-width: 860px){
  #home .row { grid-template-columns: 1fr; }
}
#home .bigtext,
#home .how,
#home .goal,
#home .video,
#home .links {
  max-width: 1160px;
  margin: 32px auto 0;
}
#home .video .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
}
#home .video iframe,
#home .video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

/* Read-more pattern */
.readmore-card { position: relative; }
.readmore-content {
  overflow: hidden;
  transition: max-height .35s ease;
}

/* soft fade at the bottom when collapsed */
.readmore-fade {
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  bottom: 56px; /* space for button */
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(229,213,200,0),
    rgba(229,213,200,1)
  );
}
/* use your CSS variables if available */
:root {
  --card: #E5D5C8
}
.readmore-fade.use-var {
  background: linear-gradient(
    to bottom,
    color(from var(--card) srgb r g b / 0),
    var(--card)
  );
}
.readmore-hidden { display: none !important; }


/* Make the stakeholder card form a stacking context */
.stakeholder {
  position: relative;
  z-index: 1;
}

/* The collapsible area must be an opaque, clipping box */
.stakeholder .readmore-card {
  background: var(--card, #E5D5C8);   /* same cream as the card */
  border-radius: 14px;
  overflow: hidden;                   /* <-- clips hidden text */
  padding: 0 22px 16px;               /* optional: match your inner spacing */
}

/* Belt-and-suspenders: also clip the inner content */
.stakeholder .readmore-content {
  position: relative;
  overflow: hidden;
  transition: max-height .35s ease;
}

/* Fade must blend with the same background as above */
.stakeholder .readmore-fade {
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  bottom: 56px;                       /* room for button */
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(229,213,200,0),
    var(--card, #E5D5C8)
  );
}

/* --- Read-more inside .stakeholder: blend with parent gradient --- */
.stakeholder .readmore-card{
  background: transparent;   /* remove inner cream box */
  padding: 0;                /* let .stakeholder-content handle spacing */
  position: relative;
}

.stakeholder .readmore-content{
  overflow: hidden;          /* this does the clipping */
  transition: max-height .35s ease;
}

/* fade from transparent -> very slight opaque to avoid hard edge */
.stakeholder .readmore-fade{
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  bottom: 56px;              /* room for the button */
  pointer-events: none;

  /* blend with the parent's gradient; do NOT use a solid color */
  background: linear-gradient(
    to bottom,
    rgba(237,226,215,0),     /* top color of your card gradient, transparent */
    rgba(229,213,200,0.96)   /* bottom color of your card gradient, ~opaque */
  );

  /* match the card bottom corners so the fade doesn't look like a strip */
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

/* optional: keep the button from hugging the rounded edge */
.stakeholder .readmore-card .mt-3{
  padding: 0 22px 12px;
}

/* Back-to-top button (shared) */
.back-to-top{
  display:none;                     /* shown via JS past ~300px scroll */
  position:fixed; right:16px; bottom:16px; z-index:1000;
  padding:12px 14px; border-radius:999px; border:0; cursor:pointer;
  font-weight:700;
  /* Uses your palette, with fallbacks in case vars aren't defined on a page */
  background: linear-gradient(
    135deg,
    var(--j-copper, #c5925f),
    var(--j-plum, #754f72)
  );
  color:#fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.30);
  transition: filter .2s ease, transform .2s ease;
}
.back-to-top:hover{ filter: brightness(1.05); transform: translateY(-1px); }
.back-to-top:focus-visible{
  outline: 3px solid #fff; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.30);
}
/* Optional: honor reduced motion */
@media (prefers-reduced-motion: reduce){
  .back-to-top{ transition:none; }
}

