/* ============================= MEMBER CARDS ============================= */
.members-page h2 {
  border-bottom: none !important;
  color: white !important;
  text-align: left;
}
.page-wrapper {
	padding: 0em;
}
.main-content {
	padding: 0.5rem 0rem;
}
.justify-content-center {
	display: contents;
}
.container.members {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
.container.members .col-lg-4 {
	padding: .2em;
}
figure.effect {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3; 
  margin: 0 auto 1rem;
border-radius: 1.5rem;
  overflow: hidden;
}
.primary-img, .secondary-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
  transition: opacity 0.4s ease;
}
.primary-img { z-index: 2; opacity: 1; }
.secondary-img { z-index: 1; opacity: 0; }
.member-card:hover .primary-img { opacity: 0; }
.member-card:hover .secondary-img { opacity: 1 !important; }

.member-card {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
  padding: 0.25rem;
  border-radius: 0.1rem;
  margin-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  background-color: #0f0f0f;
  border-radius:1.8em;
}
.member-card figcaption {
  position: relative;
  z-index: 3;        
  margin-top: 0;
  padding: .5rem;
  background-color: rgb(15, 15, 15);
  border-radius: 1.5rem;
  min-height: unset;
  color: white;
}
.pronouns {
	font-style: italic;
	font-size: 1rem;
	color: #ffffff;
	padding-left: 0.5rem;
	position: absolute;
  right: 14px;
  top: -10px;
}
 
.roles {
	display: flex;
	gap: .5em;
	justify-content: center;
	margin-top: .5em;
}
.study_program {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 3rem;
	text-align: center;
	font-size: 0.9rem;
	padding: 0 0.5rem;
	color: #ffffff;
	align-content: stretch;
}

.members-name {
text-align: center;
  font-size: 1.5rem;
}

.role-badges {
  display: flex;
  flex-wrap: nowrap;     
  gap: 0.4rem;          
  overflow-x: auto;      
}

.role-badge {
  flex: 0 0 auto;       
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 1rem;
  background-color: #00d9ffff;
  color: #000;
  white-space: nowrap;   
}

figcaption .interview {
  max-height: 0px; 
  opacity: 0;
  overflow-y: auto;
  transition: max-height 0.5s ease, opacity 0.4s ease;
  padding: 0.5rem;
  padding-top: 1rem;
  border-radius: .5rem;
  scrollbar-width: thin;
  scrollbar-color: #00ff39 transparent;
}

.interview p {  margin-bottom: .2rem;}
.member-card.active figcaption .interview {
  max-height: 500px;
  opacity: 1;
}
.arrow-down {
  width: 0; 
  height: 0; 
  margin: 12px auto 0 auto; 
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid white; 
  cursor: pointer;
  transition: transform 0.3s ease;
}
.member-card.active figcaption .arrow-down {
  transform: rotate(180deg);
}
.members-page h3 {
  color: #ff009d;
  font-size: 1.5rem;
  font-weight: 700;
}
.members-page {
  position: relative;
  min-height: 100%;
}


#alberti-card{
  order:1 !important;
}
#mascher-card{
  order:2 !important;
}
#fanzmann-card{
  order:3 !important;
}
/* ============================= GROUP PHOTO ============================= */
.group-photo-container {
  position: relative;
  display: inline-block; 
  border-radius: 1.5rem;
overflow: hidden;
}
.group-photo {
  display: block;
  width: 100%; 
  height: auto;
border-radius: 1.5rem;
}
.face-hotspot {
  position: absolute;
  cursor: pointer;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s ease;
}
.face-hotspot:hover {
  border: 30px white;
}
.name-popup {
  position: absolute;
  bottom: 120%; 
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 5px 10px;
border-radius: 1.5rem;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  user-select: none;
  z-index: 25;
}
.face-hotspot:hover .name-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.members-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.15;  
  pointer-events: none;
  z-index: 0;
}

/* ============================= Get to know us picture ============================= */
.reveal-container {
  position: relative;
  width: 100%;
  max-width: 1200px; 
  margin: auto;
  aspect-ratio: 15/10;
  overflow: hidden;
  cursor: pointer;
  background-color: #ff009d; 
}

.lab-image {
  width: 100%;
  height: 100%;
  position: absolute;
  transform: scale(1.15);
  top: 0;
  left: 0;
   object-fit: contain;
}

.base {
  position: relative;
  z-index: 1;
}
.top-image {
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
  mask-image: radial-gradient(circle 100px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 100px at var(--x, 50%) var(--y, 50%), black 99%, transparent 100%);
}
.reveal-all .top-image {
  mask-image: none;
  -webkit-mask-image: none;
  opacity: 1;
   border-radius: 5rem;
}
.reveal-wrapper {
  text-align: center;
  margin-top: 1rem;
   border-radius: 5rem;
}
#reveal-all {
  padding: 0.5rem 1.2rem;
  background-color: #ff009d;
  color: white;
  border: none;
  border-radius: 5rem;
  cursor: pointer;
}
/*==================== Reveal ==============*/

.reveal-container {
  width: 100%;
  height: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
}
/* ============================= GALLERY ============================= */
.gallery-container {
  --grid-row: 8px;  
  --gap-size: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: var(--gap-size);
  grid-auto-rows: var(--grid-row);       
  max-width: 1000px;
  margin: 1rem auto;
  padding: 0.5rem;
  box-sizing: border-box;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0d0d0d;
  display: block;
  --rotdeg: 0deg;
  transform-origin: center center;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms;
}

.gallery-item.rotated {
  transform: rotate(var(--rotdeg));
}

.gallery-item:hover,
.gallery-item.is-active {
  transform: rotate(0deg) scale(1.03);
  z-index: 20; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.gallery-item img.gallery-image {
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}

.gallery-item img.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-item:hover img.gallery-image,
.gallery-item.is-active img.gallery-image {
  transform: scale(1.06);
}

.caption-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
  color: #fff;
  font-size: 0.9rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.gallery-item:hover .caption-overlay,
.gallery-item.is-active .caption-overlay {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.caption-overlay .caption-text {
  display: inline-block;
  max-width: 95%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}
.gallery-modal.is-open { display: flex; }

.gallery-modal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal img {
  max-width: 100%;
  max-height: calc(90vh - 4rem);
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.gallery-modal .modal-caption {
  margin-top: 0.6rem;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  padding: 0 0.5rem;
}

.gallery-modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: none;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
