/* ══ EKİP BÖLÜMÜ ══ */
.team-section {
  padding: 140px 5vw;
  background: var(--surface);
  position: relative;
  border-bottom: 1px solid var(--border);
}
.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 5.5vw, 6.5rem);
  font-weight: 300;
  line-height: .9;
  margin-bottom: 80px;
  text-align: center;
  color: var(--text);
}
.sec-title em {
  color: var(--teal);
  font-style: italic;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  height: 62vh;
}
.team-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: none; /* pointer yerine none yaptık */
    transition: all .6s cubic-bezier(.19,1,.22,1);
  filter: saturate(.6) brightness(.88);
}
.team-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.team-item:hover {
  transform: translateY(-18px) scale(1.03);
  filter: saturate(1) brightness(1.05);
  z-index: 2;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--teal);
}
.team-item:hover img {
  transform: scale(1.05);
}
.team-item-name {
  position: absolute;
  bottom: 28px;
  left: 28px;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: #fff;
  z-index: 2;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ══ EKİP POP-UP OVERLAY STİLLERİ ══ */
#team-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247, 245, 240, 0.98);
  z-index: 99999; /* Diğer tüm elementlerin üstünde olması için yükseltildi */
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(.19,1,.22,1);
}
#team-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Kapatma Düyməsi */
#to-close {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none; /* pointer yerine none yaptık */
    z-index: 100000;
  transition: all 0.3s ease;
  padding: 0;
}
#to-close:hover {
  background: var(--text);
  transform: rotate(90deg);
}
#to-close svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
  pointer-events: none; /* Tıklama algısını bozmaması için */
  transition: stroke 0.3s;
}
#to-close:hover svg {
  stroke: #ffffff !important;
}

.to-left {
  width: 44%;
  height: 100vh;
  position: relative;
  padding: 4vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.to-left img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.to-right {
  width: 56%;
  padding: 0 7vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#to-role {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  letter-spacing: .4em;
  color: var(--teal);
  margin-bottom: 22px;
  display: block;
  font-weight: 700;
  text-transform: uppercase;
}
#to-name {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  line-height: 1.05;
  margin-bottom: 36px;
  color: var(--text);
  font-weight: 300;
}
#to-desc {
  font-size: 1.1rem;
  line-height: 1.95;
  color: var(--muted);
  max-width: 520px;
  font-weight: 300;
}

/* ══ MOBİL REZPONSİVLİK ══ */
@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
    gap: 16px;
  }
  #team-overlay {
    flex-direction: column;
    overflow-y: auto;
  }
  .to-left {
    width: 100%;
    height: auto;
    padding: 8vw 8vw 4vw;
  }
  .to-left img {
    max-height: 45vh;
  }
  .to-right {
    width: 100%;
    padding: 4vw 8vw 8vw;
    text-align: center;
    align-items: center;
  }
  #to-name {
    font-size: 2.8rem;
    margin-bottom: 20px;
  }
  #to-close {
    top: 20px;
    right: 20px;
  }
}
@media (max-width: 576px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}
/* KÜÇÜK MOBİL TEAM */
@media (max-width: 400px) {
  .team-item { height: 220px; }
  .team-section h2 { font-size: clamp(1.4rem, 6vw, 2rem); padding: 0 5vw; }
  #to-name { font-size: 2rem; }
}

/* TOUCH: team-item touch support */
@media (hover: none) {
  .team-item .team-item-name { opacity: 1; transform: translateY(0); }
}
