/* ---------- GLOBAL ---------- */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* ---------- HEADER ---------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 20px;
  background-color: rgba(0, 85, 50, 1);
  color: white;
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

header.solid {
  background-color: rgb(0, 85, 50);
}
header.transparent {
  background-color: rgba(0, 85, 50, 0.6);
}
header.hide {
  transform: translateY(-100%);
}

/* Top Row */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.4em;
  margin-top: 12px;
}
.logo img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}
.logo a {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

/* Icon links */
.icon-links {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
}
.icon-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 5px;
  transition: background 0.3s ease, border-radius 0.3s ease;
}
.icon-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}
.icon-links img,
.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Bottom Navigation */
.header-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  height: 70px;
  font-size: 0.95em;
  padding: 0 30px;
  margin-bottom: 8px;
  font-weight: bold;

  overflow-x: auto;       /* enable horizontal scroll */
  overflow-y: hidden;     /* prevent vertical scroll */
  white-space: nowrap;    /* keep items in a single line */
}
.header-bottom::-webkit-scrollbar {
  display: none;          /* hide scrollbar (Webkit browsers) */
}

.header-bottom a {
  flex: 0 0 auto;         /* prevent links from shrinking */
  color: inherit;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.header-bottom a:hover {
  background-color: rgba(0, 120, 70, 0.25);
}

/* ---------- CAROUSEL ---------- */
.carousel {
  margin-top: 110px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.slides {
  display: flex;
  transition: transform 1.2s ease-in-out;
  will-change: transform;
}
.slide {
  min-width: 100%;
  flex-shrink: 0;
  position: relative;
}
.slide img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

/* Overlay text */
.overlay {
  position: absolute;
  top: 10%;
  left: 10%;
  color: white;
  text-shadow: 1px 1px 5px black;
  transition: transform 1.8s ease-in-out;
}
.overlay h2 {
  font-size: 2.5rem;
  margin: 0;
}
.overlay p {
  font-size: 1.2rem;
  margin-top: 0.5em;
}

/* Dots */
.dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  display: flex;
  gap: 12px;
  padding: 10px;
  background-color: grey;
  opacity: 50%;
  border-radius: 20px;
  transform: translateX(-50%);
  z-index: 2;
}
.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(37, 37, 37, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.5s ease, scale 0.5s;
}
.dot.active {
  background-color: white;
  scale: 115%;
}

/* ---------- MAIN ---------- */
main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: auto;
  padding: 20px;
}
main > p:first-of-type {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  border-left: 6px solid rgba(0, 85, 50, 0.8);
  border-radius: 10px;
  background-color: rgba(0, 85, 50, 0.1);
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.24);
}

/* Members */
main .members {
  margin: 0 auto;
  padding: 100px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}
.members .row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.members .row.reverse {
  flex-direction: row-reverse;
}
.members .row img {
  width: 200px;
  height: 240px;
  object-fit: cover;
  border-radius: 20px;
  flex-shrink: 0;
}
.members .row .text {
  flex: 1;
  min-width: 250px;
  text-align: center;
}
.members .row .text h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
}
.members .row .text h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: bold;
  color: #444;
}
.members .row .text p {
  margin: 0;
  line-height: 1.5;
  font-weight: bold;
}
.members .row .text p a {
  color: #444;
}

/* Gallery */
main .gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 100px 10px 10px;
}
main .gallery figure {
  position: relative;
  flex: 1 1 30%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.24);

  /* Square box trick */
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
main .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop inside square */
  border-radius: 10px;
  cursor: pointer;
}
main .gallery figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 10px;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}
main .gallery figure:hover figcaption {
  opacity: 1;
}
/* Ensure previews crop nicely */
main .gallery img {
  width: 100%;
  height: 100%; /* fixed preview height */
  display: block;
  border-radius: 10px;
  object-fit: cover; /* crop images */
  cursor: pointer;   /* show it's clickable */
}

/* Fullscreen popup */
.image-popup {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.image-popup img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* Close button */
.image-popup .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 1001;
}


/* Sponsors */
main .sponsors {
  padding-top: 110px;
}
/* Sponsors Section */
.sponsors {
    text-align: center;
    padding: 3rem 1rem;
}

.sponsors h1 {
    font-size: 2.5rem;
    color: #005a2d;
    margin-bottom: 2rem;
    font-weight: 800;
}

/* Sponsor Logos Grid */
.sponsor-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem auto;
}

.sponsor {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.sponsor img {
    max-width: 150px;
    margin: 0 auto 1rem auto;
    display: block;
}

.sponsor p {
    font-size: 1rem;
    color: #374151;
    line-height: 1.5;
}

/* Sponsorship Advertisement */
.form {
    text-align: center;
    padding: 3rem 1.5rem;
    background: linear-gradient(135deg, #eff6ff, #dbfee9);
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.form h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #005a2d;
    font-weight: 700;
}

.form img {
    max-width: 200px;
    margin: 1rem auto;
    display: block;
}

.form p {
    font-size: 1.1rem;
    margin: 1rem auto;
    color: #374151;
    max-width: 600px;
    line-height: 1.6;
}

.form a {
    display: inline-block;
    margin-top: 1.2rem;
    padding: 0.8rem 1.5rem;
    background: #0e6717;
    color: white;
    font-size: 1rem;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.form a:hover {
    background: #11691c;
    transform: translateY(-2px);
}

/* QR Code Box */
.form .qr-code {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.form .qr-code img {
    max-width: 150px;
    margin-bottom: 0.8rem;
}

.form .qr-code p {
    font-size: 0.9rem;
    color: #4b5563;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .sponsors h1 {
        font-size: 2rem;
    }

    .sponsor img {
        max-width: 120px;
    }

    .form {
        padding: 2rem 1rem;
    }

    .form h2 {
        font-size: 1.5rem;
    }

    .form p {
        font-size: 1rem;
    }

    .form a {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }

    .form .qr-code img {
        max-width: 120px;
    }
}

/* Generic Row */
.row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.row.reverse {
  flex-direction: row-reverse;
}
.row img {
  width: 45%;
  max-width: 350px;
  border-radius: 30px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.24);
}
.row .text {
  flex: 1;
  width: 50%;
  max-width: 600px;
  margin: auto;
  padding: 20px;
  text-align: center;
}
.row h2 {
  margin-bottom: 10px;
  text-align: center;
}

/* ---------- FOOTER ---------- */
footer {
  background-color: rgba(0, 85, 50, 1);
  color: white;
  padding: 20px 40px;
  margin-top: 50px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-center {
  text-align: center;
}
.footer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-nav a {
  color: white;
  text-decoration: none;
}
.footer-nav a:hover {
  text-decoration: underline;
}
.footer-logo {
  width: 160px;
  height: auto;
  filter: brightness(0) invert(1);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .carousel,
  .slide img {
    height: 380px;
  }
  .overlay h2 {
    font-size: 1.8rem;
  }
  .overlay p {
    font-size: 1rem;
  }
  .dots {
    bottom: 10px;
    padding: 6px 10px;
    gap: 8px;
  }

  /* Members */
  main .members {
    gap: 20px;
  }
.members .row {
  gap: 5px;
  text-align: center;
}

.members .row {
  flex-direction: row;
}
.members .row.reverse {
  flex-direction: row-reverse;
}
  .members .row img {
    width: 100px;
    height: 120px;
  }
  .members .row .text {
    min-width: 120px;
  }
  .members .row .text h1 {
    font-size: 1rem;
  }
  .members .row .text h2 {
    font-size: 0.8rem;
  }
  .members .row .text p {
    line-height: 1.4;
  }

  .row {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .row.reverse {
    flex-direction: column;
  }

  .row img {
    width: 80%;
    max-width: 300px;
  }

  .row .text {
    width: 100%;         /* span full width */
    max-width: none;     /* remove desktop constraint */
    margin: 0 auto;      /* center text block */
    padding: 0 10px;     /* small side padding for breathing room */
    text-align: left;
  }

  .row .text h2 {
    font-size: 1.2rem;
  }

  .row .text p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  main > p:first-of-type {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0 auto;       /* ensure intro text is centered */
    max-width: 90%;       /* keeps text from hugging edges */
  }
}


@media (max-width: 480px) {
  .carousel,
  .slide img {
    height: 240px;
  }
  .overlay {
    top: 5%;
    left: 5%;
    right: 5%;
  }
  .overlay h2 {
    font-size: 1.4rem;
  }
  .overlay p {
    font-size: 0.9rem;
  }
  .dot {
    width: 10px;
    height: 10px;
  }

  /* Bottom Navigation */
  .header-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 70px;
    font-size: 0.6em;
    padding: 0 2px;
    margin-bottom: 8px;
    gap: 2px;
}

}

@media (max-width: 600px) {
  .left-logo {
    display: none;
  }
  .right-logo {
    width: 100px;
  }
  .footer-content {
    justify-content: center;
    gap: 20px;
  }
  .footer-center h2 {
    font-size: 1.2rem;
  }
}