/* --------------------------------------------
   TOP MEMBER BLOCK
--------------------------------------------- */

.site-content section .container {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: 16px;
}

.one-container .general-content .container {
  margin: 2rem auto;
  color: #000;
}

.general-content .container,
.team-grid .container {
  margin: 4rem auto 2rem auto;
  color: #000;
}

.team-top-member .container {
  background: var(--global-color-blue);
}

.top-member-inner {
  display: grid;
  grid-template-columns: 385px 1fr;
  gap: 40px;
  align-items: flex-start;
  padding: 20px;
  background: var(--global-color-blue);
}

.top-member-image img {
  display: block;
}

/* Blue content box */
.top-member-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  color: #fff;
}

.team-top-member blockquote {
  font-size: 2.5rem !important;
  line-height: 1.1;
  margin: 0;
  position: relative;
  border: 0 !important;
  padding: 3rem 11rem 3rem 0px !important;
  color: #fff;
  font-weight: 400;
}

.top-member-quote .quote-icon {
  display: inline-block;
  vertical-align: middle;
  color: #fff;
  font-family: "Times New Roman", serif;
  font-weight: 700;
  font-size: 80px;
  line-height: 1;
  position: absolute;
}

.quote-icon.qi-top {
  top: 0px;
  left: 0;
}

.quote-icon.qi-bottom {
  bottom: -20px;
  right: 20px;
}

.top-member-name {
  font-size: 28px;
  margin: 0;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.top-member-subtitle {
  font-size: 21px;
  margin-bottom: 10px;
}

.top-member-content .open-member-modal {
  background: transparent;
  color: #fff;
  border: none;
  padding: 9px 30px;
  border-radius: 0;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
  border: 1px solid #fff;
}

.top-member-content .open-member-modal:hover {
  background: #fff;
  color: var(--global-color-blue);
}

/* Responsive - collapse to single column */
@media (max-width: 900px) {
  .top-member-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .top-member-content {
    padding: 30px;
  }
  .top-member-image img {
    margin: 0 auto;
  }
}

/* --------------------------------------------
   TEAM GRID SECTION
--------------------------------------------- */

.team-grid {
  padding: 0;
}

.team-grid h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

.team-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 16px; /* keep horizontal gap */
  row-gap: 90px; /* increase vertical gap */
  justify-items: center;
}

/* Team member card */
.team-member {
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #ddd;
  position: relative;
  padding: 18px 18px 30px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: background 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* Image */
.team-member-image {
  position: relative;
  width: 100%;
  height: 400px; /* enforce 334x324 ratio */
  overflow: hidden;
}

.team-member-image img {
  width: 334px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

/* READ BIO overlay */
.team-member button.open-member-modal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.4s ease;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;

  border: none; /* overlay itself has NO border */
}

.team-member button.open-member-modal span {
  border: 1px solid #fff; /* thin white border ONLY around text */
  padding: 10px 20px;
  display: inline-block;
  pointer-events: none;
}

.team-member:hover {
  background-color: var(--global-color-blue);
  border-color: var(--global-color-blue);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.team-member:hover button.open-member-modal {
  opacity: 1;
}

.team-member:hover .team-member-name,
.team-member:hover .team-member-subtitle {
  color: #ffffff;
}

/* Text under card */
.team-member-name {
  font-size: 1.7rem;
  font-weight: 600;
  margin: 15px 0 0px;
  color: var(--global-color-blue);
  line-height: 1;
}

.team-member-subtitle {
  font-size: 1.2rem;
  color: #000;
  margin: 0;
}

/* Modal Wrapper */
.team-modal {
  position: fixed;
  inset: 0;
  display: flex; /* always flex */
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* prevent clicks when hidden */
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.team-modal__content {
  position: relative;
  width: 100%;
  max-width: 700px;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  z-index: 10;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.35s ease;
}

.team-modal.active .team-modal__content {
  transform: translateY(0);
}

.team-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Backdrop */
.team-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Close Button */
.team-modal__close {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  z-index: 20;
}
button.team-modal__close:hover {
  background: transparent;
  /*transform: rotate(45deg); */
}
/* Blue Header */
.team-modal__header {
  background: #0047c6;
  color: #fff;
  padding: 20px 30px;
  text-align: center;
}

.team-modal__header h2 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.team-modal__header h4 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
  opacity: 1;
  color: #fff;
  line-height: 1;
}

/* Bio Content */
.team-modal__body {
  padding: 30px;
  overflow-y: auto;
}

.team-modal__bio {
  font-size: 1.3rem;
  line-height: 1.5;
  color: #000;
}

.team-modal__bio p {
  margin-bottom: 14px;
}

/* Responsive grid */
@media (max-width: 1150px) {
  .team-grid-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .team-grid-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .team-grid-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .team-modal {
    align-items: flex-start;
    padding-top: 40px;
  }

  .team-modal__body {
    padding: 20px;
  }
}

/* high res short laptops  */

@media (min-width: 1280px) and (max-width: 1600px) and (min-resolution: 140dpi) and (min-aspect-ratio: 16/10) {
}

@media (max-width: 768px) {
  .team-top-member blockquote {
    font-size: 1.5rem !important;
    padding: 0px !important;
  }

  .team-top-member blockquote {
    font-size: 1.5rem !important;
    padding: 4rem 0 !important;
  }

  .top-member-inner {
    gap: 0px;
  }

  .team-grid h2 {
    line-height: 1;
  }

  .team-member-image {
    height: auto;
  }

  .team-member-name {
    font-size: 2.7rem;
  }

  .team-member-subtitle {
    font-size: 1.8rem;
    line-height: 2rem;
    padding-top: 20px;
  }

  .team-grid-inner {
    column-gap: 16px;
    row-gap: 30px;
  }

  .page-template-page-team .general-hero {
  }

  /* Gradient overlay */
  .page-template-page-team .general-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 36, 91, 0.55) 0%,
      rgba(0, 36, 91, 0.25) 45%,
      rgba(0, 36, 91, 0.05) 75%,
      rgba(0, 36, 91, 0) 100%
    );
    z-index: 1;
    pointer-events: none;
  }

  /* Content above overlay */
  .general-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
  }

  .general-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 0, 0, 0.4);
  }
  .general-hero {
    position: relative;
  }
}
