/* Particle Background Styling */
.particle-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle-background canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Gradient overlay for text contrast */
.particle-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(30, 30, 47, 0.08) 50%,
    rgba(30, 30, 47, 0.25) 100%
  );
  background-attachment: fixed;
}

/* Ensure main content appears above particle background */
body > *:not(.particle-background):not(.particle-overlay) {
  position: relative;
  z-index: 1;
}

/* Transparent sections so starfield shows everywhere */
section,
.section {
  background-color: transparent !important;
}

/* Competition section readability */
#competition {
  background: rgba(30, 30, 47, 0.6);
}

#competition h2,
#competition p {
  color: #e0e0e0;
}

/* Sticky footer layout */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main.main {
  flex: 1 0 auto;
}

footer.footer {
  flex-shrink: 0;
}

/* Team Section Styling */
.team .member {
  text-align: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team .member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.team .member img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
  min-height: 200px;
  background: rgba(255, 255, 255, 0.1);
}

.team .member img[src=""],
.team .member img:not([src]) {
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  min-height: 200px;
  display: block;
  position: relative;
}

.team .member img[src=""]::after,
.team .member img:not([src])::after {
  content: "Photo Placeholder";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  font-style: italic;
}

.team .member-content {
  padding: 10px 0;
}

.team .member-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #66C5C6;
}

.team .member-content h4:empty::before {
  content: "Name";
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.team .member-content span {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.team .member-content span:empty::before {
  content: "Role";
  color: rgba(255, 255, 255, 0.2);
  font-style: italic;
}

.team .row {
  margin-bottom: 30px;
}

.team .row:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments for team section */
@media (max-width: 991px) {
  .team .member {
    margin-bottom: 30px;
  }
  
  .team .member img {
    min-height: 180px;
  }
}

@media (max-width: 767px) {
  .team .member {
    margin-bottom: 25px;
    padding: 15px;
  }
  
  .team .member img {
    min-height: 150px;
  }
  
  .team .member-content h4 {
    font-size: 16px;
  }
  
  .team .member-content span {
    font-size: 13px;
  }
  
  .team .row {
    margin-bottom: 20px;
  }
}

@media (max-width: 575px) {
  .team .member {
    padding: 12px;
  }
  
  .team .member img {
    min-height: 120px;
  }
  
  .team .col-lg-3 {
    margin-bottom: 20px;
  }
}

/* Alignment improvements for all sections */
.container {
  max-width: 1200px;
}

.row {
  margin-left: -15px;
  margin-right: -15px;
}

.row > * {
  padding-left: 15px;
  padding-right: 15px;
}

/* Better spacing for team section */
.team.section {
  padding: 60px 0;
}

@media (max-width: 767px) {
  .team.section {
    padding: 40px 0;
  }
}

/* Additional responsive improvements for all sections */
@media (max-width: 991px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Better spacing on mobile */
  section.section {
    padding: 40px 0;
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  section.section {
    padding: 30px 0;
  }
}

/* Ensure proper alignment for team rows on all screen sizes */
.team .row.justify-content-center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.team .row.justify-content-center > * {
  flex: 0 0 auto;
}

@media (max-width: 991px) {
  .team .col-lg-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767px) {
  .team .col-lg-3,
  .team .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===============================================
   GLOBAL PARTICLE BACKGROUND + NAV LAYER FIX
   =============================================== */

/* Make the particle background global and fixed */
#particle-background,
.particle-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0 !important;
  pointer-events: none; /* allows clicks to pass through */
}

/* Optional: subtle dark overlay for readability */
.particle-overlay {
  background: rgba(0, 0, 0, 0.4);
}

/* Ensure page content scrolls above particles */
body,
.main,
section {
  position: relative;
  z-index: 1;
}

/* Header + nav always above particles */
#header,
.header,
.navmenu {
  position: relative;
  z-index: 9999;
}

/* Dropdown menus appear on top of everything */
.navmenu .dropdown ul {
  position: absolute;
  z-index: 10000 !important;
}

/* Mobile nav overlay (fullscreen when active) */
.mobile-nav-active .navmenu {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.92) !important;
  overflow-y: auto;
}

/* Keep toggle icon above overlay */
.mobile-nav-toggle {
  position: relative;
  z-index: 100000 !important;
}

/* Dim background slightly when mobile nav open */
.mobile-nav-active::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99998;
  pointer-events: none;
}

/* Responsive hero section adjustments */
@media (max-width: 768px) {
  #hero .container-fluid {
    padding: 80px 20px !important;
    flex-direction: column;
    text-align: center;
  }

  #hero .hero-text h2 {
    font-size: 32px !important;
    margin-bottom: 15px;
    line-height: 1.2;
  }

  #hero .hero-text p {
    font-size: 18px !important;
    line-height: 1.4;
  }
}
