/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
  }
  
  /* Header */
  .gallery-header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .gallery-header h1 {
    font-size: 2rem;
    color: #007e7e;
  }
  
  /* Award group sections */
  .award-group {
    margin-bottom: 50px;
  }
  
  .award-group h2 {
    font-size: 1.5rem;
    color: #007bff;
    margin-bottom: 15px;
  }
  
  /* Gallery grid */
  /* Default: Desktop */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 per row */
  gap: 15px;
}

/* Tablet */
@media (max-width: 991px) {
  .gallery-container {
    grid-template-columns: repeat(3, 1fr); /* 3 per row */
  }
}

/* Small phones */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
    gap: 10px;
  }

  .gallery-item img {
    max-height: 120px; /* slightly smaller for phones */
  }

  .gallery-item p {
    font-size: 0.7rem;
  }
}

  
  /* Gallery item */
  .gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
  }
  
  .gallery-item:hover {
    transform: scale(1.05);
  }
  
  .gallery-item img {
    width: 100%;
    height: auto;         /* keeps natural ratio */
    max-height: 150px;    /* makes them micro-sized */
    object-fit: contain;  /* show entire image without cropping */
    background: #f9f9f9;  /* adds padding-like background if image doesn’t fill box */
    border-bottom: 2px solid #007bff;
    padding: 5px;
  }
  
  .gallery-item p {
    font-size: 0.8rem;
    padding: 5px;
    color: #333;
  }
  /* Year index layout */
/* Desktop */
.year-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 year cards per row */
  gap: 20px;
  margin-top: 40px;
}

/* Tablet */
@media (max-width: 991px) {
  .year-container {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }
}

/* Phones */
@media (max-width: 768px) {
  .year-container {
    grid-template-columns: 1fr; /* stack vertically */
    gap: 15px;
  }
}

  
  .year-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.3s;
  }
  
  .year-card a {
    text-decoration: none;
    color: inherit;
    display: block;
  }
  
  .year-card h2 {
    font-size: 2rem;
    color: #007e7e;
    margin-bottom: 10px;
  }
  
  .year-card p {
    font-size: 0.9rem;
    color: #555;
  }
  
  .year-card:hover {
    transform: scale(1.05);
    background: #f0f9ff;

  }
  .hero {
    margin-top: 60px;              /* match navbar height */
    min-height: calc(100vh - 60px); /* full screen but flexible */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    animation: bgChange 15s infinite alternate ease-in-out;
  }
  
  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 1;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 0 20px;
    max-width: 900px;   /* prevents overly wide text */
  }
  
  .hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* responsive size */
    margin-bottom: 15px;
    line-height: 1.2;
    word-break: break-word; /* prevents overflow */
  }
  
  .hero-content p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.4;
  }
  
  @media (max-width: 991px) {
    .hero {
      min-height: 50vh;  /* tablet */
    }
  }
  
  @media (max-width: 768px) {
    .hero {
      min-height: 60vh;   /* phones */
      background-attachment: scroll;
      padding: 40px 15px; /* breathing room */
    }
  }
  
  
  

/* Background animation */
@keyframes bgChange {
    0% { background-image: url('pic.JPG'); }
    50% { background-image: url('Initiativelogo.png'); }
    100% { background-image: url('pic.JPG'); }
}

/* Text fade-in / slide effect */
@keyframes textMove {
    from { opacity: 0; transform: translateY(-60%); }
    to { opacity: 1; transform: translateY(-50%); }
}

section {
  padding: 40px 20px;
  background: white;
  margin: 20px auto;
  max-width: 1100px;
  border-radius: 8px;
  animation: fadeInUp 1s ease-in-out;
}

/* --------------------- */
/* 3. HEADER & NAV */
/* --------------------- */
.headermenu {
  background: #000;
  color: #fff;
  width: 100%;
}
/* Base nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000;
  padding: 10px;
  flex-wrap: wrap;
  position: relative;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

nav ul li a {
  padding: 8px 12px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

nav ul li a:hover {
  background: #fff;
  color: #0d5353;
}

/* Mobile toggle button */
.menu-toggle {
  display: none;
  font-size: 28px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* User submenu */
.sub-menu-wrap {
  position: absolute;
  top: 100%;
  right: 10px;
  width: 300px;
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  transition: max-height 0.5s;
  z-index: 10;
}

.sub-menu-wrap.open-menu {
  max-height: 500px;
}

.sub-menu {
  padding: 15px;
}

.sub-menu-link {
  display: block;
  margin: 10px 0;
  color: #333;
  text-decoration: none;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 10px;
}

.user-pic {
  width: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 20px;
  border: 2px solid blue;
}


/* Hamburger button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
}

.menu-toggle span {
  display: block;
  height: 4px;
  background: white;
  border-radius: 2px;
  transition: all 0.4s ease;
}

/* When active: transform into X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(9px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-9px);
}

/* Show toggle only on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
}

h1 {
  font-size: 2.2em;
  color: #cc6600;
  text-align: center;
  font-family: "Emblema One", sans-serif;
  line-height: 1.6em;
}

h2 {
  font-size: 1.5em;
  font-weight: normal;
  color: #cc6600;
  text-decoration: underline;
}

footer {
  background-color: black;
  color: #cc6600;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  font-size: 90%;
}


.bio-header {
  background: #007e7e;
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.bio-container {
  display: flex;
  justify-content: center;
  padding: 30px 15px;
}

.bio-card {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  max-width: 900px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.bio-image {
  flex: 1 1 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bio-image img {
  width: 250px;        /* medium size */
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.bio-info {
  flex: 2 1 500px;
}

.bio-info h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #007bff;
}

.bio-info h3 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 15px;
}

.bio-info p {
  line-height: 1.6;
  margin-bottom: 15px;
}
@media (max-width: 768px) {
  .user-pic {
    display: block !important;
    width: 50px !important;
    height: auto !important;
  }
}  
/* ---------------- MOBILE FIXES ---------------- */

/* 1. NAVIGATION - stack neatly on portrait */
@media (max-width: 768px) {
  nav {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  nav ul {
    flex-direction: column;
    background: #000;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;   /* hide by default */
    padding: 10px 0;
    text-align: center;
    z-index: 15;
  }

  nav ul.open {
    display: flex; /* show when toggled */
  }

  nav ul li {
    margin: 8px 0;
  }

  nav ul li a {
    display: block;
    width: 100%;
  }
}

/* 2. HERO TEXT - keep it centered and not cut off */
@media (max-width: 768px) {
  .hero {
    height: auto; /* allow height to grow with text */
    padding: 50px 15px;
  }

  .hero-content h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .hero-content p {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
  }
}

/* 3. GALLERY HEADER - consistent centered system */
.gallery-header {
  text-align: center;
  padding: 20px 10px;
}

.gallery-header h1 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  margin-bottom: 10px;
  color: #007e7e;
}

.gallery-header p {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: #444;
}

/* 4. YEAR CARDS - make sure they center */
@media (max-width: 768px) {
  .year-card {
    padding: 20px;
    margin: 0 auto;
    width: 90%;
  }
}

/* Mobile menu toggle button */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* Show mobile toggle on small screens */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav ul {
    position: absolute;
    top: 60px; /* directly below navbar */
    left: 0;
    width: 100%;
    background: #000;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  nav ul.open {
    max-height: 400px; /* enough space to show menu */
  }

  nav ul li {
    margin: 15px 0;
  }
}

/* Default navbar */
.headermenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #000;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 15px 20px;
}

/* Navbar when scrolled */
.headermenu.shrink {
  padding: 5px 15px;
  background: #111; /* slightly darker on scroll */
}

/* Logo default */
.logo {
  height: 60px;
  width: auto;
  transition: all 0.3s ease;
}

/* Logo when scrolled */
.headermenu.shrink .logo {
  height: 40px;
}


/* Default nav links */
nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  font-size: 16px;
  transition: all 0.3s ease;
}

/* Links shrink on scroll */
.headermenu.shrink nav ul li a {
  font-size: 14px;
  padding: 6px 10px;
}
