/* ==========================================================================
   Genix Team Showcase Widget Styles
   ========================================================================== */

.genix-team-section-wrapper {
  position: relative;
  width: 100%;
  background-color: #F2F2F3;
  overflow: hidden;
  box-sizing: border-box;
}

.genix-team-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px;
  box-sizing: border-box;
}

.genix-team-section--pinned {
  min-height: 100vh;
  padding: 80px 40px;
}

.genix-team-container {
  width: 1200px;
  max-width: 1200px;
  height: 896px; /* 5 rows of 160px + 4 gaps of 24px = 896px */
  position: relative;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Floating / Animating Title Entity (Desktop) */
.genix-team-title-entity {
  position: absolute;
  top: 0;
  left: 0;
  width: 384px;
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 20;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  pointer-events: none;
}

.genix-team-title {
  font-size: clamp(48px, 4.5vw, 68px);
  font-weight: 600;
  line-height: 1.05;
  color: #0A0A0A;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
}

.genix-team-title span {
  display: block;
}

.genix-team-title .genix-title-light {
  font-weight: 500;
  color: #0A0A0A;
}

/* Rows and Grid Positions (Desktop) */
.genix-team-rows-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.genix-team-row {
  position: absolute;
  left: 0;
  width: 100%;
  height: 160px;
}

.genix-team-row--1 { top: 0px; }
.genix-team-row--2 { top: 184px; }
.genix-team-row--3 { top: 368px; }
.genix-team-row--4 { top: 552px; }
.genix-team-row--5 { top: 736px; }

/* Moving Card Groups (Desktop) */
.genix-team-moving-group {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  gap: 24px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/* Group initial offsets in Desktop 3-column grid */
.genix-group-row-1 {
  left: 816px; /* Column 3 */
}

.genix-group-row-2 {
  left: 0px; /* Columns 1 & 2 (Will slide to Col 2 & 3: +408px) */
}

.genix-group-row-3 {
  left: 408px; /* Columns 2 & 3 (Col 1 is open for Title) */
}

.genix-group-row-4 {
  left: 204px; /* Centered in 1200px (Will slide right: +204px) */
}

.genix-group-row-5 {
  left: 0px; /* Columns 1, 2, 3 (Full width - Title stops above) */
}

/* ==========================================================================
   Individual Team Card
   ========================================================================== */
.genix-team-card {
  position: relative;
  width: 384px;
  height: 160px;
  border-radius: 24px;
  overflow: hidden;
  background-color: #D6D6D7;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-right: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;

  /* Pure CSS Grayscale (Normal) -> Colorful (Hover / Active) */
  filter: grayscale(100%);
  opacity: 0.94;
  transition: 
    filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: filter, transform;
  -webkit-tap-highlight-color: transparent;
}

.genix-team-card picture {
  display: contents;
}

/* Hover & Active / Touch states */
.genix-team-card:hover,
.genix-team-card:active {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.genix-team-card__img {
  width: 200px;
  height: 160px;
  object-fit: contain;
  object-position: center bottom;
  margin: 0 auto;
  display: block;
  pointer-events: none;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.genix-team-card:hover .genix-team-card__img,
.genix-team-card:active .genix-team-card__img {
  transform: scale(1.04);
}

/* ==========================================================================
   Member Profile Info Badge
   ========================================================================== */
.genix-team-card__info {
  pointer-events: none;
  z-index: 5;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stacked Layout (Micro-card format) */
.genix-info--stacked {
  position: absolute;
  top: 14px;
  left: 16px;
  max-width: 175px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 11px;
  border-radius: 10px;
  transform: translateY(-6px);
}

/* Inline Layout (Pill format) */
.genix-info--inline {
  position: absolute;
  top: 14px;
  left: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  white-space: nowrap;
  max-width: calc(100% - 140px);
  transform: translateY(-6px);
}

/* Figma Exact: Bottom Gradient Layout (Recommended) */
.genix-info--gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  padding: 24px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  gap: 2px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.75) 55%, rgba(10, 10, 10, 0.95) 100%);
  border-radius: 0 0 24px 24px;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transform: translateY(8px);
}

/* Member Name */
.genix-team-card__name {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #111111;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.genix-info--gradient .genix-team-card__name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: #FEFEFE;
  letter-spacing: -0.01em;
  text-align: center;
}

/* Inline separator dot */
.genix-team-card__dot {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #888888;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Member Role / Title */
.genix-team-card__role {
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  color: #666666;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.genix-info--gradient .genix-team-card__role {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: rgba(254, 254, 254, 0.9);
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: none;
}

/* Card Hover & Active -> Reveal Info Badge */
.genix-team-card:hover .genix-team-card__info,
.genix-team-card:active .genix-team-card__info {
  opacity: 1;
  transform: translateY(0);
}

/* Visibility: On Hover / Tap */
.genix-visibility--hover .genix-info--stacked,
.genix-visibility--hover .genix-info--inline {
  opacity: 0;
  transform: translateY(-6px);
}

.genix-visibility--hover .genix-info--gradient {
  opacity: 0;
  transform: translateY(8px);
}

.genix-visibility--hover .genix-team-card:hover .genix-team-card__info,
.genix-visibility--hover .genix-team-card:active .genix-team-card__info {
  opacity: 1;
  transform: translateY(0);
}

/* Visibility: Always Visible */
.genix-visibility--always .genix-team-card__info {
  opacity: 1;
  transform: translateY(0);
}

/* Legacy Badge (Fallback for backward compatibility) */
.genix-team-card__badge {
  position: absolute;
  top: 14px;
  left: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #0A0A0A;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}

.genix-team-card:hover .genix-team-card__badge,
.genix-team-card:active .genix-team-card__badge {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE: Tablet Scaling (992px to 1240px)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1240px) {
  .genix-team-container {
    transform: scale(0.82);
    transform-origin: top center;
  }
  .genix-team-section {
    min-height: auto;
    padding: 60px 20px;
  }
}

/* ==========================================================================
   RESPONSIVE: Mobile Mode (max-width: 991px)
   Directly Grounded in Figma Node #14987:89359
   Width 390px, Padding 80px 16px, Row Height 80px, Corner Radius 16px
   ========================================================================== */
@media (max-width: 991px) {
  .genix-team-section {
    padding: 80px 16px;
    min-height: auto;
    justify-content: flex-start;
  }

  .genix-team-container {
    width: 100%;
    max-width: 390px;
    height: auto;
    margin: 0 auto;
    transform: none !important;
  }

  /* On mobile, Title sits cleanly at the top */
  .genix-team-title-entity {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 24px;
    transform: none !important;
    pointer-events: auto;
  }

  .genix-team-title {
    font-size: clamp(34px, 8.5vw, 48px);
    line-height: 1.1;
  }

  /* Rows container: vertical stack with 16px gap (Figma itemSpacing: 16) */
  .genix-team-rows-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
  }

  .genix-team-row {
    position: relative;
    top: auto !important;
    left: auto !important;
    width: 100%;
    height: 80px;
  }

  .genix-team-moving-group {
    position: relative;
    left: 0 !important;
    width: 100%;
    height: 100%;
    gap: 16px;
    transform: none !important;
  }

  /* Card dimensions: 80px height, 16px border-radius */
  .genix-team-card {
    height: 80px !important;
    border-radius: 16px !important;
    padding-right: 0 !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  /* Mobile Row 1: 1 Full-width card (358x80) */
  .genix-team-row--1 .genix-team-card {
    width: 100% !important;
  }

  /* Mobile Rows 2, 3, 4: 2 cards side by side (171x80 each, 16px gap) */
  .genix-team-row--2 .genix-team-card,
  .genix-team-row--3 .genix-team-card,
  .genix-team-row--4 .genix-team-card {
    flex: 1;
    width: calc(50% - 8px) !important;
  }

  /* Mobile Row 5: 3 cards side by side (109x80 each, 16px gap) */
  .genix-team-row--5 .genix-team-card {
    flex: 1;
    width: calc(33.333% - 11px) !important;
  }

  .genix-team-card__img {
    width: 100px;
    height: 80px;
    object-position: center bottom;
    margin: 0 auto;
  }

  /* Mobile Info Badge Scaling */
  .genix-team-card__info {
    max-width: 100%;
  }

  .genix-info--stacked,
  .genix-info--inline {
    top: 6px;
    left: 8px;
    max-width: calc(100% - 70px);
  }

  .genix-info--gradient {
    padding: 14px 6px 5px 6px;
    border-radius: 0 0 16px 16px;
    gap: 1px;
  }

  .genix-info--gradient .genix-team-card__name {
    font-size: 11px;
    line-height: 1.2;
  }

  .genix-info--gradient .genix-team-card__role {
    font-size: 8.5px;
    line-height: 1.1;
  }

  .genix-info--stacked {
    padding: 3px 6px;
    border-radius: 6px;
    gap: 1px;
  }

  .genix-info--inline {
    padding: 3px 8px;
    max-width: calc(100% - 60px);
  }

  .genix-info--stacked .genix-team-card__name,
  .genix-info--inline .genix-team-card__name {
    font-size: 9px;
  }

  .genix-info--stacked .genix-team-card__role,
  .genix-info--inline .genix-team-card__role {
    font-size: 7.5px;
    letter-spacing: 0;
  }

  .genix-team-card__dot {
    width: 2.5px;
    height: 2.5px;
  }

  .genix-team-card__badge {
    top: 6px;
    left: 8px;
    font-size: 8.5px;
    padding: 2px 6px;
  }
}
