.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dept-section.hidden {
  display: none !important;
}

:root {
  /* ===== Colors ===== */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-bg: #eff6ff;

  --accent: #06b6d4;

  --text-dark: #0f172a;
  --text-body: #475569;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --card-bg: #ffffff;
  --page-bg: #f8fafc;

  /* ===== UI ===== */
  --radius-card: 1rem;
  --transition: 0.26s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-card:
    0 2px 16px rgba(15, 23, 42, 0.06),
    0 1px 4px rgba(15, 23, 42, 0.04);

  --shadow-hover:
    0 12px 40px rgba(37, 99, 235, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06);

  /* ===== Fonts ===== */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* =========================
   GLOBAL TYPOGRAPHY
========================= */

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

.hero-highlight {
  color: #f59e0b; /* orange */
  font-weight: 500;
}

/* =========================
   HERO
========================= */

.team-hero {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 60px;
  text-align: center;
}

.team-hero .section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.team-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 14px;
}

.team-hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.team-hero p {
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--text-body);
}

/* =========================
   STATS
========================= */

.team-stats-wrap {
  background: var(--page-bg);
  padding: 36px 24px 0;
}

.stats-inner {
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 8px 32px rgba(30, 58, 138, 0.25);
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 26px 16px;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item .num {
  font-size: 1.7rem;
  font-weight: 800;
}

.stat-item .lbl {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* =========================
   MAIN SECTION
========================= */

.team-section {
  background: var(--page-bg);
  padding: 40px 24px 80px;
}

.team-container {
  max-width: 1160px;
  margin: 0 auto;
}

/* =========================
   FILTER
========================= */

.filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 52px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  position: relative;
}

.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: 0.4s ease;
  z-index: 0;
}

.filter-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37,99,235,0.35);
}

/* =========================
   DEPARTMENTS
========================= */

.dept-section {
  max-width: 1160px;
  margin: 0 auto 64px;
}

.dept-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dept-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.dept-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 50px;
  background: var(--primary-bg);
  color: var(--primary);
}

.dept-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 10px 0 28px;
  position: relative;
}

.dept-rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* =========================
   TEAM GRID
========================= */

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.team-card {
  width: 260px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

 .team-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    #2563eb,
    #f59e0b,
    #2563eb
  );
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

 .team-card:hover::before {
  transform: scaleX(1);
  animation: gradientMove 1.2s linear infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
/* =========================
   AVATAR
========================= */

.avatar-wrap {
  width: 106px;
  height: 106px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #bfdbfe, #e0f2fe);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px #dbeafe;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* =========================
   TEXT
========================= */

.team-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 9px;
}

.role-badge {
  display: inline-block;
  padding: 4px 15px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.team-card p {
  font-size: 0.83rem;
  line-height: 1.68;
  color: var(--text-body);
  font-family: var(--font-body);
}

/* =========================
   SOCIALS
========================= */

.social-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.social-links a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {
  .team-card {
    width: calc(50% - 12px);
  }

  .stats-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  .team-card {
    width: 100%;
  }
}