/* ============================================================
   SPARK LOOM — Team Page Styles
   ============================================================ */


/* ── Department Nav Tabs ──────────────────────────────────── */
.team-dept-nav {
  background: #ffffff;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 72px;
  z-index: 100;
}

.team-dept-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.team-dept-tabs::-webkit-scrollbar { display: none; }

.team-dept-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #718096;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.team-dept-tab:hover {
  color: #1B3264;
}

.team-dept-tab.active {
  color: #1B3264;
  border-bottom-color: #3CB54A;
}

.team-dept-tab-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-dept-tab-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}


/* ── Department Sections ──────────────────────────────────── */
.team-dept-section {
  padding: 72px 0;
  scroll-margin-top: 136px; /* navbar 72px + dept tab bar ~58px + 6px breathing room */
}


/* ── Department Header ────────────────────────────────────── */
.team-dept-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 56px;
}

.team-dept-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 4px;
}
.team-dept-icon.navy { background: linear-gradient(135deg, #1B3264, #2a4a8a); }
.team-dept-icon.green { background: linear-gradient(135deg, #3CB54A, #2d9139); }
.team-dept-icon.ai   { background: linear-gradient(135deg, #6C3FD4, #8B5CF6); }

.team-dept-icon svg {
  width: 30px;
  height: 30px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-dept-header h2 {
  margin: 8px 0 14px;
}

.team-dept-desc {
  font-size: 1rem;
  color: #000000;
  max-width: 680px;
  line-height: 1.8;
  margin: 0;
}


/* ── Sub-team Grid ────────────────────────────────────────── */
.team-subteams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}


/* ── Sub-team Card ────────────────────────────────────────── */
.team-subteam-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.bg-alt .team-subteam-card {
  background: #ffffff;
}

.team-subteam-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1B3264, #3CB54A);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.38s ease;
}

.team-subteam-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(27,50,100,0.12);
  border-color: transparent;
}
.team-subteam-card:hover::before { transform: scaleX(1); }

.team-subteam-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
}
.team-subteam-icon.navy  { background: rgba(27,50,100,0.09); }
.team-subteam-icon.green { background: rgba(60,181,74,0.10); }
.team-subteam-icon.ai    { background: rgba(108,63,212,0.09); }

.team-subteam-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.team-subteam-icon.navy svg  { stroke: #1B3264; }
.team-subteam-icon.green svg { stroke: #3CB54A; }
.team-subteam-icon.ai svg    { stroke: #6C3FD4; }

.team-subteam-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1B3264;
  margin-bottom: 10px;
}

.team-subteam-card > p {
  font-size: 0.88rem;
  color: #000000;
  line-height: 1.75;
  margin-bottom: 20px;
}

.team-resp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #E2E8F0;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-resp-list li {
  font-size: 0.82rem;
  color: #000000;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.team-resp-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3CB54A;
}


/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  /* Force 2-col layout to avoid orphaned cards in a 3-col row */
  .team-subteams-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .team-dept-header {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .team-dept-icon { width: 52px; height: 52px; }
}

@media (max-width: 768px) {
  .team-dept-section { padding: 48px 0; }
  .team-dept-header  { margin-bottom: 36px; }
  .team-dept-tab     { padding: 14px 18px; font-size: 0.85rem; }

  .team-dept-nav {
    position: relative;
  }
  .team-dept-nav::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 56px;
    background: linear-gradient(to right, transparent, #ffffff);
    pointer-events: none;
    z-index: 1;
  }
}

@media (max-width: 600px) {
  .team-subteams-grid {
    grid-template-columns: 1fr;
  }
  .team-subteam-card { padding: 28px 22px; }
}
