.team-page {
  padding: 120px 0 60px;
  position: relative;
  z-index: 1;
}

.team-page-title {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.team-page-title-ar {
  display: block;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  color: white;
  line-height: 1.2;
}

.team-page-title-en {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(20px, 4vw, 40px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.1);
  letter-spacing: 10px;
  text-transform: lowercase;
  pointer-events: none;
}

.team-page-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 60px;
}

.comm-section {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 20px 20px;
  margin-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(26, 18, 64, 0.3);
}

.dark-border {
  border-color: rgba(255, 255, 255, 0.1);
}

.cyan-border {
  border-color: var(--cyan);
}

.comm-tag {
  position: absolute;
  top: -15px;
  right: 30px;
  padding: 6px 24px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2;
  white-space: nowrap;
}

.purple-tag {
  background: #251850;
  color: white;
}

.cyan-tag {
  background: var(--cyan);
  color: #080014;
  font-weight: 800;
}

.leaders-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  max-width: 520px;
  margin: 30px auto;
}

.comm-leader {
  margin-bottom: 10px;
  margin-top: 4px;
}

.comm-grid {
  display: grid;
  gap: 15px;
  margin-top: 10px;
}

.comm-grid.cols-1 { grid-template-columns: 1fr; }
.comm-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.comm-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.comm-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.comm-grid + .comm-grid {
  margin-top: 10px;
}

.card-flip {
  position: relative;
  height: 120px;
  cursor: pointer;
  perspective: 1000px;
  outline: none;
  transition: transform 0.3s ease;
}

.card-flip:hover {
  transform: translateY(-5px);
}

.card-flip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 12px;
}

.card-flip .card-front,
.card-flip .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flip .card-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card-flip .card-back {
  z-index: 1;
  transform: rotateY(180deg);
}

.card-flip.flipped .card-front {
  transform: rotateY(180deg);
}

.card-flip.flipped .card-back {
  transform: rotateY(0deg);
  z-index: 3;
}

.card-purple {
  background: linear-gradient(145deg, #251850, #1a1240);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.card-teal {
  background: linear-gradient(145deg, #1a6b63, #0f5550);
  border: 1px solid rgba(0, 229, 192, 0.3);
}

.card-back.card-purple-back {
  background: linear-gradient(145deg, #1a1040, #130c30);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.card-back.card-teal-back {
  background: linear-gradient(145deg, #0d3b38, #0a2e2c);
  border: 1px solid rgba(0, 229, 192, 0.2);
}

.card-front h3 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
  color: white;
  line-height: 1.3;
}

.card-front p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 5px 0 0;
}

.leader-card {
  padding: 16px 12px;
}

.leader-card.card-teal {
  border: 2px solid rgba(0, 229, 192, 0.4);
}

.leader-card.card-purple {
  border: 2px solid rgba(124, 58, 237, 0.4);
}

.card-back {
  gap: 4px;
}

.card-back h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-back p {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 2px 0;
}

.card-back .card-photo-frame {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-back .card-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.card-back.leader-back {
  display: grid;
  grid-template-columns: 1fr 70px;
  grid-template-rows: auto auto;
  gap: 2px 14px;
  align-items: center;
  padding: 16px;
  overflow: hidden;
}

.card-back.leader-back .card-photo-lg {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 70px;
  height: 70px;
}

.card-photo-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.card-back.leader-back h3 {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
  font-size: 0.85rem;
  padding: 0;
  margin: 0;
  align-self: end;
}

.card-back.leader-back .card-back-footer {
  grid-column: 1;
  grid-row: 2;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: start;
}

.card-back-footer span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.card-initials {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  background: rgba(26, 18, 64, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.purple-init {
  background: linear-gradient(135deg, #4a2280, #2d1b69);
  border: 2px solid rgba(124, 58, 237, 0.35);
}

.teal-init {
  background: linear-gradient(135deg, #1a5c55, #134e4a);
  border: 2px solid rgba(0, 229, 192, 0.35);
}

.card-back .card-linkedin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.5);
  transition: background 0.2s;
  flex-shrink: 0;
}

.card-back .card-linkedin:hover {
  background: rgba(124, 58, 237, 0.7);
}

.card-back .card-linkedin svg {
  width: 13px;
  height: 13px;
  fill: #c4b5fd;
}

.card-back .card-linkedin-lg {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.5);
}

.card-back .card-linkedin-lg:hover {
  background: rgba(124, 58, 237, 0.7);
}

.card-back .card-linkedin-lg svg {
  width: 16px;
  height: 16px;
  fill: #c4b5fd;
}

.card-back.card-img-back {
  padding: 0;
  border: none;
  overflow: hidden;
  background: #0d1f1d;
  position: relative;
  align-items: flex-start;
}

.card-img-back img {
  width: auto;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.card-img-back.card-img-back-wide img {
  height: 100%;
  width: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.card-linkedin-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.6);
  z-index: 5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-linkedin-overlay:hover {
  background: rgba(124, 58, 237, 0.8);
}

.card-linkedin-overlay svg {
  width: 14px;
  height: 14px;
  fill: #c4b5fd;
}

.card-linkedin-overlay:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.leaders-row{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 700px;
  margin: 30px auto;
  justify-content: center;
}
.leader-card{
  padding: 30px 20px;
  height: 140px;
  border-radius: 16px;
}
@media (max-width: 768px) {
  .team-page {
    padding: 100px 0 40px;
  }

  .comm-section {
    padding: 30px 12px 16px;
  }

  .comm-grid.cols-4,
  .comm-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaders-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .comm-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .comm-section {
    padding: 26px 10px 14px;
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-flip .card-front,
  .card-flip .card-back {
    transition: none;
  }

  .card-flip {
    transition: none;
  }
}
