/* --------------------------------------------
   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: #fff;
}

.top-member-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: stretch;
  padding: 15px;
  background: #fff;
  border: 1px solid #ddd;
}

.team-top-member.has-two .top-member-inner {
  grid-template-columns: 1fr 1fr;
}

.top-member-card {
  display: flex;
  gap: 40px;
  align-items: stretch;
  min-width: 0;
}

.top-member-image {
  flex: 0 0 385px;
  max-width: 385px;
}

.top-member-image img {
  display: block;
  width: auto;
  height: 100%;
}

.team-top-member.has-two .top-member-card {
  gap: 24px;
}

.team-top-member.has-two .top-member-image {
  flex: 0 0 250px;
  max-width: 250px;
}

.team-top-member.has-two .top-member-card + .top-member-card {
  border-inline-start: 1px solid rgba(255, 255, 255, 0.3);
  padding-inline-start: 40px;
}

/* Blue content box */
.top-member-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #000;
  flex: 1 1 auto;
  min-width: 0;
}

.top-member-bottom-content {
  margin-top: auto;
}

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

.team-top-member.has-two blockquote {
  font-size: 1.4rem !important;
  padding-block: 2.25rem 0 !important; padding-inline: 0 1.5rem !important;
  max-width: 75%;
  font-style: normal;
  margin-bottom: 30px;
}

.top-member-quote .quote-icon {
  display: inline-block;
  vertical-align: middle;
  color: #000;
  font-family: "Oxanium", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 55px;
  line-height: 1;
  position: absolute;
}

.quote-icon.qi-top {
  top: 0px;
  inset-inline-start: 0;
}

.quote-icon.qi-bottom {
  bottom: -20px;
  inset-inline-end: 20px;
}

.top-member-name {
  font-size: 36px;
  margin: 0;
  font-weight: 700;
  color: #000;
  line-height: 1;
}

.top-member-subtitle {
  font-size: 21px;
  margin-bottom: 10px;
  color: #1c48f0;
  font-weight: 500;
  line-height: 1.3em;
}

.top-member-content .open-member-modal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 1.1rem 1.25rem 0.9rem;
  background: var(--global-color-blue);
  color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 0;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2rem;
  font-size: 1.3rem;
  margin-top: 20px;
  font-family: Rajdhani, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
  width: fit-content;
}

.top-member-content .open-member-modal::after {
  content: "";
  width: 18px;
  height: 18px;
  display: inline-block;
  background: url(../images/chevron-right.svg) center center / contain no-repeat;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.top-member-content .open-member-modal:hover {
  background: #003f7d;
  color: #fff;
}

.top-member-content .open-member-modal:hover::after {
  transform: translateX(2px);
}
:where([dir="rtl"]) .top-member-content .open-member-modal::after {
  transform: scaleX(-1);
}
:where([dir="rtl"]) .top-member-content .open-member-modal:hover::after {
  transform: translateX(-2px) scaleX(-1);
}

h3.product-category-title-inner {
  color: var(--global-color-blue);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1em;
}

/* Responsive - collapse to single column */
@media (max-width: 900px) {
  .top-member-inner,
  .team-top-member.has-two .top-member-inner {
    grid-template-columns: 1fr;
  }
  .top-member-card {
    flex-direction: column;
    text-align: start;
  }
  .top-member-image,
  .team-top-member.has-two .top-member-image {
    flex: 0 0 auto;
    max-width: 100%;
  }
  .team-top-member.has-two .top-member-card + .top-member-card {
    border-inline-start: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-inline-start: 0;
    padding-top: 24px;
    margin-top: 24px;
  }
  .top-member-content {
    padding: 0;
  }
  .top-member-image img {
    margin: 0;
    max-width: 100%;
    width: auto;
    height: auto;
  }
  .team-top-member.has-two blockquote {
    font-size: 1.4rem !important;
    padding-block: 2.25rem 0 !important; padding-inline: 0 1.5rem !important;
    max-width: 100%;
    font-style: normal;
    margin-bottom: 30px;
    text-align: start;
  }
  .top-member-bottom-content {
    text-align: start;
  }
}

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

.team-grid {
  padding: 0;
}

.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;
  height: 100%;
}

/* 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,
.team-member--highlighted {
  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,
.team-member--highlighted .team-member-name,
.team-member--highlighted .team-member-subtitle {
  color: #ffffff;
}

/* Text under card */
.team-member-name {
  font-size: 2rem;
  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;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.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);
}

/* Right-anchored panel */
.team-modal__content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 40%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 10;
}
:where([dir="rtl"]) .team-modal__content {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

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

/* Blue Header with image */
.team-modal__header {
  background: #0047c6;
  color: #fff;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.team-modal__header-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  overflow: hidden;
}

.team-modal__header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.team-modal__header-text {
  flex: 1;
  min-width: 0;
}

.team-modal__header h2 {
  margin: 0 0 5px;
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}

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

/* Quote section */
.team-modal__quote {
  padding: 24px 28px;
  background: #fff;
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 700;
  color: #000;
  line-height: 1.5;
  flex-shrink: 0;
}

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

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

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

.team-modal__bio h3 {
  color: var(--global-color-blue);
  font-weight: 700;
}

/* Footer close button */
.team-modal__footer {
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.team-modal__close-bio {
  background: #0047c6;
  color: #fff;
  border: none;
  padding: 0.75rem 1.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: Rajdhani, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.2s ease;
}

.team-modal__close-bio:hover {
  background: #003f7d;
}

/* 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__content {
    width: 100%;
    max-width: 100%;
  }

  .team-modal__header {
    padding: 16px;
    gap: 12px;
  }

  .team-modal__header-img {
    width: 60px;
    height: 60px;
  }

  .team-modal__header h2 {
    font-size: 1.8rem;
  }

  .team-modal__header h4 {
    font-size: 1.2rem;
  }

  .team-modal__body {
    padding: 16px;
  }

  .team-modal__footer {
    padding: 12px 16px;
  }
}

/* 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: 1rem 0 2rem 0 !important;
    color: #fff;
    font-weight: 700;
  }

  .top-member-inner {
    gap: 0px;
    background: #1C48F0;
    color: #fff;
  }

  .top-member-inner * {
    color: #fff;
  }

  .top-member-bottom-content {
    order: -1;
    margin-top: 0;
  }

  .top-member-quote {
    order: 0;
    font-weight: 500 !important;
  }

  .top-member-content .open-member-modal {
    order: 1;
    margin-top: auto;
  }

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

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

  .team-member-name {
    font-size: 22px;
    line-height: 1.25;
  }

  .team-member-subtitle {
    font-size: 16px;
    line-height: 1.35;
    padding-top: 8px;
  }

  .top-member-name {
    font-size: 28px;
    line-height: 1.25;
  }

  .top-member-subtitle {
    font-size: 18px;
    line-height: 1.35;
  }

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

  /* 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 {
    position: relative;
  }
}
