/* ---------- Layout & sizing ---------- */
.team-section { padding: 10px 0 80px; background: transparent; }
.team-container { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* Grid / levels */
:root { --card-gap: 32px; --cards-per-row: 3; }
.level-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--card-gap);
  justify-content: center;
  align-items: flex-start;
}
.level-grid .team-member {
  flex: 0 0 calc( (100% - (var(--cards-per-row) - 1)*var(--card-gap)) / var(--cards-per-row) );
  max-width: calc( (100% - (var(--cards-per-row) - 1)*var(--card-gap)) / var(--cards-per-row) );
  box-sizing: border-box;
}

/* card visuals */
.team-member {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transition: transform .36s cubic-bezier(.2,.9,.3,1), box-shadow .36s ease;
  position: relative;
  min-height: 360px;
  display:flex;
  flex-direction:column;
  cursor: default;
}
.team-member:hover { transform: translateY(-10px); box-shadow: 0 24px 48px rgba(0,0,0,0.12); }

/* badge */
.serial-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg,#c8141f,#008b45);
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  z-index:10;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* image area */
.member-image {
    height: 300px;
    overflow:hidden;
    background: linear-gradient(135deg,#f8f9fa,#eef4ef);
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
}
.member-image img { width:100%; height:100%; object-fit:cover; display:block; transition: transform .45s ease; }
.team-member:hover .member-image img { transform: scale(1.06); }

/* overlay for social icons */
.image-overlay {
  position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:center;
  padding: 18px; background: linear-gradient(0deg, rgba(0,0,0,0.32), rgba(0,0,0,0));
  opacity:0; transition: opacity .28s ease;
}
.team-member:hover .image-overlay { opacity:1; }
.social-links { display:flex; gap:12px; }
.social-link { width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,0.95); display:inline-flex; align-items:center; justify-content:center; text-decoration:none; color:#333; font-weight:600; transition: all .22s ease; }
.social-link:hover { transform:scale(1.06); background:#fff; color:#c8141f }

/* member info */
.member-info { padding: 18px 16px 22px; display:flex; flex-direction:column; gap:8px; flex:1; align-items:center; justify-content:flex-start; }
.member-name { font-size: 1.05rem; font-weight:700; color:#222; text-align:center; line-height:1.15; }
.member-designation {
    color: #008B45;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(0, 139, 69, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 139, 69, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
}

.team-member:hover .member-designation {
    background: rgba(200, 20, 31, 0.1);
    color: #C8141F;
    border-color: rgba(200, 20, 31, 0.2);
}

/* responsive adjustments */
@media (max-width:1100px) { :root{--cards-per-row:2;} .member-image { height:220px; } }
@media (max-width:680px) { :root{--cards-per-row:1; --card-gap:20px;} .member-image{height:260px;} }

/* entrance helper */
.team-member { opacity: 0; transform: translateY(18px); transition: transform .65s cubic-bezier(.18,.9,.3,1), opacity .6s ease; }

/* ---------- Lightbox (BIGGER + controls + gradient backdrop + animation) ---------- */
.album-lightbox {
  position: fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: linear-gradient(135deg,#c8141f,#008b45);
  z-index:99999; padding: 18px;
  backdrop-filter: blur(10px);
}
.album-lightbox[aria-hidden="false"]{ display:flex; animation: lbFade .28s ease both; }

@keyframes lbFade {
  from { opacity: 0; transform: scale(.997); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-viewport {
  width: 95vw;
  max-width: 1200px;
  max-height: 92vh;
  background: transparent;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:12px;
  border-radius: 10px;
}

/* image container: center & make it large */
.lb-figure { position: relative; width: 100%; display:flex; align-items:center; justify-content:center; padding: 8px; }
.lb-img {
  max-width: 78%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0,0,0,0.6);
  transition: transform .36s ease;
  cursor: zoom-in;
  background: #fff;
  padding: 6px;
}

/* zoomed state (scale) */
.lb-img.zoomed { transform: scale(1.6); cursor: zoom-out; }

/* controls row */
.lb-controls {
  width: 100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  color:#fff;
  padding: 0 10px;
}
.lb-left { display:flex; gap:8px; align-items:center; }
.lb-right { display:flex; gap:8px; align-items:center; }

/* buttons */
.lb-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight:600;
}
.lb-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.24); }

/* open-original (white button) */
.lb-open {
  background: #fff;
  color: #0b2b1a;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight:700;
}
.lb-open:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

/* close button circle */
.lb-close {
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  width:42px; height:42px; border:none; cursor:pointer; font-size:20px;
  display:flex; align-items:center; justify-content:center;
}

/* caption block under image with nice typography */
.lb-caption {
  color: #fff;
  font-weight:700;
  font-size:16px;
  text-align:center;
  margin-top:6px;
}

/* smaller descriptor (designation) under caption */
.lb-subcaption {
  color: rgba(255,255,255,0.78);
  font-weight:600;
  font-size:13px;
  margin-top:6px;
  text-align:center;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  .team-member, .lb-img, .album-lightbox { transition: none !important; animation: none !important; }
}

.team-level {
    margin: 60px 0;
    padding-top: 20px;
    position: relative;
}
.team-level::after {
    content: "";
    display: block;
    width: 60%;
    max-width: 400px;
    height: 2px;
    margin: 40px auto 0;
    background: linear-gradient(90deg, transparent, #C8141F, #008B45, transparent);
    border-radius: 2px;
    opacity: 0.5;
}

/* Entrance Animations */
.team-member {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.team-member.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Particles Background */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, #C8141F, #008B45);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) { top: 20%; left: 10%; width: 8px; height: 8px; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; width: 12px; height: 12px; animation-delay: 1s; }
.particle:nth-child(3) { top: 40%; left: 30%; width: 6px; height: 6px; animation-delay: 2s; }
.particle:nth-child(4) { top: 80%; left: 60%; width: 10px; height: 10px; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}
@media (max-width: 768px) {
    .section_padding {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .section_padding {
        padding: 10px 0;
    }
}
