/* =========================================
   1. DIALOG CONTAINER (The Frame)
   ========================================= */
dialog.bio-modal[open] {
  margin: auto;
  inset: 0;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 264px;
  max-height: 85vh;
  height: auto;
  overflow-y: auto;
  scroll-behavior: smooth;
}
dialog.bio-modal[open]::-webkit-scrollbar {
  width: 6px;
}
dialog.bio-modal[open]::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
dialog.bio-modal[open]::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* =========================================
   2. RESPONSIVE WIDTHS (Your Breakpoints)
   ========================================= */
@media (min-width: 576px) {
  dialog.bio-modal[open] {
    max-width: 437px;
  }
}
@media (min-width: 768px) {
  dialog.bio-modal[open] {
    max-width: 532px;
  }
}
@media (min-width: 992px) {
  dialog.bio-modal[open] {
    max-width: 608px;
  }
}
@media (min-width: 1200px) {
  dialog.bio-modal[open] {
    max-width: 710px;
  }
}
@media (min-width: 1400px) {
  dialog.bio-modal[open] {
    max-width: 797px;
  }
}
@media (min-width: 1920px) {
  dialog.bio-modal[open] {
    max-width: 966px;
  }
}

/* =========================================
   3. INTERNAL CARD (The Flex Column)
   ========================================= */
.bio-card-inner {
  background: #fff;
  position: relative;
  text-align: center;
  border-radius: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

  /* --- FLEXBOX MAGIC --- */
  display: flex;
  flex-direction: column; /* Stacks items vertically */
  height: 100%; /* Fills the dialog */
  overflow: hidden; /* Contains everything */
}

/* --- THE WAVE HEADER (Fixed) --- */
.bio-wave-bg {
  /* width: 100%; */
  height: 193px;
  flex-shrink: 0;
  background-image: url(/assets/images/about-us/about-us-wave.svg);
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  transform: rotate(96deg) scale(1.5);
  z-index: 0;
  margin-top: -51px;
  margin-right: 23px;
}
@media (min-width: 576px) {
  .bio-wave-bg {
    height: 346px;
    margin-top: -89px;
  }
}
@media (min-width: 768px) {
  .bio-wave-bg {
    height: 384px;
    margin-top: -103px;
  }
}
@media (min-width: 992px) {
  .bio-wave-bg {
    height: 435px;
    margin-top: -118px;
  }
}
@media (min-width: 1200px) {
  .bio-wave-bg {
    height: 509px;
    margin-top: -139px;
  }
}
@media (min-width: 1400px) {
  .bio-wave-bg {
    height: 568px;
    margin-top: -155px;
  }
}
@media (min-width: 1920px) {
  .bio-wave-bg {
    height: 685px;
    margin-top: -188px;
  }
}
/* --- THE PROFILE PIC (Fixed) --- */
.bio-profile-pic {
  margin-top: -116px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  width: 106.514px;
  height: 104.559px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 10;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
@media (min-width: 576px) {
  .bio-profile-pic {
    width: 159.824px;
    height: 156.892px;
    margin-top: -230px;
    margin-bottom: 25px;
  }
}
@media (min-width: 768px) {
  .bio-profile-pic {
    width: 205.395px;
    height: 201.626px;
    margin-top: -265px;
  }
}
@media (min-width: 992px) {
  .bio-profile-pic {
    width: 234.63px;
    height: 230.325px;
    margin-top: -292px;
  }
}
@media (min-width: 1200px) {
  .bio-profile-pic {
    width: 234.63px;
    height: 230.325px;
    margin-top: -343px;
  }
}
@media (min-width: 1400px) {
  .bio-profile-pic {
    width: 322.624px;
    height: 316.704px;
    margin-top: -385px;
  }
}
@media (min-width: 1920px) {
  .bio-profile-pic {
    width: 391px;
    height: 383.826px;
    margin-top: -475px;
  }
}
/* --- THE CONTENT CONTAINER --- */
.bio-content {
  position: relative;
  z-index: 5;
  padding: 0 40px 30px 40px; /* Padding around the text area */

  /* Flex settings to manage the scrolling text */
  display: flex;
  flex-direction: column;
  flex: 1; /* Takes up all remaining space in the card */
  overflow: hidden; /* prevents double scrollbars */
  min-height: 0; /* Critical flexbox fix for scrolling */
}

/* Fixed Name and Title (They won't scroll) */
.bio-content h2,
.bio-content .title {
  flex-shrink: 0;
  margin: 0 0 10px 0;
  color: #2e2e5c;
}

/* --- THE SCROLLABLE BIO TEXT --- */
/* This targets the <p class="bio-text"> you just added */
.bio-content .bio-text {
  overflow-y: auto; /* ENABLE SCROLL HERE */
  padding-right: 10px; /* Make room for scrollbar */
  text-align: left;
  line-height: 1.6;

  /* Smooth scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

/* Close Button */
.close-modal-btn {
  position: absolute;
  top: 8px;
  right: 5px;
  padding: 8px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 20;
  color: #2e2e5c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--Neutral-Indigo-1000);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.close-modal-btn svg {
  width: 19px;
  height: 21px;
  display: block;
}
.close-modal-btn:hover {
  opacity: 0.7;
  transform: scale(1.1);
}
/* =========================================
   4. MEMBER TRIGGER INTERACTION (HOVER)
   ========================================= */
.member-trigger {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.member-trigger:hover {
  transform: translateY(-5px); /* Lift effect */
  filter: brightness(1.05);
}

.member-trigger:active {
  transform: translateY(-2px);
}

/* =========================================
   5. TYPOGRAPHY (Base / Mobile)
   ========================================= */

.bio-content h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.85px;
  color: var(--Neutral-Indigo-1000);
  text-align: center;
  line-height: normal;
  width: 100%;
  max-width: 181px; /* From Figma */
  margin: 0 auto 4px auto; /* Centered, 4px space below */
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .bio-content h2 {
    max-width: 248px;
    font-size: 19.6px;
  }
}
@media (min-width: 1200px) {
  .bio-content h2 {
    max-width: 273px;
    font-size: 22.4px;
  }
}
@media (min-width: 1920px) {
  .bio-content h2 {
    max-width: 500px;
    font-size: 34px;
  }
}
/* The Title */
.bio-content .title {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.7px;
  color: var(--Neutral-Indigo-1000);
  text-align: center;
  line-height: normal;

  /* Layout */
  display: block;
  width: 100%;
  max-width: 181px; /* From Figma */
  margin: 0 auto 20px auto; /* Centered, 20px space below */
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .bio-content .title {
    max-width: 220px;
    font-size: 16.8px;
  }
}
@media (min-width: 1200px) {
  .bio-content .title {
    max-width: 233px;
    font-size: 19.2px;
  }
}
@media (min-width: 1920px) {
  .bio-content .title {
    max-width: 331px;
    font-size: 28px;
  }
}
/* The Bio Text */
.bio-content .bio-text {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.6px;
  color: #000000;
  line-height: normal; /* User specified normal, though 1.4 is usually better for reading */
  text-align: left; /* Bios usually look best left-aligned, but check Figma if centered */

  /* Layout */
  width: 100%;
  /* We don't force width: 220px here because the padding 
     on the parent container already forces it to be that size. */

  overflow-y: auto;
  padding-right: 5px; /* Tiny space for scrollbar */
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .bio-content .bio-text {
    font-size: 14px;
  }
}
@media (min-width: 1200px) {
  .bio-content .bio-text {
    font-size: 16px;
  }
}
@media (min-width: 1920px) {
  .bio-content .bio-text {
    font-size: 20px;
  }
}
