/* =============================================
   Ekibimiz Sayfası - Modern Showcase Animasyon
   ============================================= */

/* === Banner === */
.team-banner {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-top: var(--header-height, 80px);
}

.team-banner-container {
   width: 100%;
}

.team-banner-image {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}

.team-banner-image img {
 width: auto;
  height: 100%;
  display: block;
}

/* === Content Section === */
.team-content-section {
  padding: 0;
  min-height: 100vh;
  margin-bottom: 5rem;
}

.container {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-height, 80px));
  flex-wrap: wrap;
}

/* === Header === */
.header {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 50px;
  overflow: hidden;
  transition: 0.45s ease 0.05s;
  max-height: 180px;
  padding: 0 20px;
}

.header-title {
  width: 100%;
  font-family: var(--font-family);
  font-size: 36px;
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.header-subtitle {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  font-style: italic;
  color: var( --gray-900);
  line-height: var(--line-height-base);
  max-width: 800px;
  margin: 0 auto;
}

/* === Team Container === */
.team-container {
  padding: 0 30px;
  box-sizing: border-box;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  height: auto;
}

/* === Person Card === */
.person {
  width: calc(33.333% - 14px);
  cursor: pointer;
  overflow: hidden;
  transition: 0.45s;
  position: relative;
  background: rgba(163, 140, 98, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(163, 140, 98, 0.15);
  opacity: 1; /* ✅ Her zaman tam opacity */
}
.person:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(163, 140, 98, 0.3);
  background: rgba(163, 140, 98, 0.8);
  border-color: rgba(163, 140, 98, 0.5);
}

.person-details {
  padding: 20px;
  box-sizing: border-box;
  transition: 0.3s;
  background: transparent;
}

.person-img {
  width: 100%;
  max-height: 450px; /* ✅ Maksimum yükseklik */
  height: auto;
  object-fit: cover;
  display: block;
}

.person-title {
  font-family: var(--font-family);
  color: var(--primary-color);
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.person-desc {
  font-family: var(--font-family);
  color: var(--primary-color);
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: var(--font-weight-medium);
}

.person-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  gap: 20px;
}

.person-list:hover .person {
  opacity: 1;
}

.person:hover {
  opacity: 1 !important;
}

/* === Before/After Effects === */
.person:before {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  background: var(--primary-color) !important;
  content: "";
  height: 0px;
  transition: 0.45s;
  z-index: 1;
  opacity: 1 !important;
}

.person:after {
  content: "\f060";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 28px;
  color: #fff;
  position: absolute;
  width: 90px;
  top: 50%;
  height: 90px;
  transform: translateY(-50%);
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  text-align: center;
  align-items: center;
  justify-content: center;
  left: 5px;
  z-index: 3;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === Selected States === */
.container-selected .header {
  max-height: 0px;
  margin-bottom: 0;
}

.container-selected .person {
  opacity: 0 !important;
  pointer-events: none;
}

.container-selected .person-list .person-selected {
  opacity: 1 !important;
}

.container-selected .person-list .person-selected:before {
  height: 100%;
}

.container-selected .person-list .person-selected .person-details {
  margin-top: -40px;
  opacity: 0;
}

/* === Team Detail === */
.team-detail {
  position: fixed;
  width: calc(100% - 90px);
  left: 80px;
  top: 0;
  height: 100vh;
  color: var(--gray-800);
  transition: 0.15s;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;
  z-index: 9999;
  overflow-y: auto; /* ✅ içerik uzun olursa kaydır */
  -webkit-overflow-scrolling: touch; /* ✅ mobilde yumuşak kaydırma */
}

.team-detail-bio-content p {
  font-family: var(--font-family);
  margin-left: 40px;
  margin-bottom: 15px;
  line-height: 28px;
  font-size: 15px;
  color: var(--gray-700);
}

.team-detail-header {
  margin-left: 40px;
  margin-bottom: 30px;
}

.team-detail-inner {
  min-height: 100%;
  display: flex;
  flex-wrap: wrap;
  background: var(--bg-color);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  border-radius: 0;
  overflow: hidden;
}

.team-detail-left {
  position: relative;
  width: 500px;
  min-height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.team-detail-left:before {
  width: 100%;
  height: 100%;
  content: "";
  background: var(--secondary-color);
  opacity: 0.8;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

.team-detail-photo {
  position: relative;
  text-align: center;
  z-index: 10;
  width: 100%;
  font-size: 0px;
  padding: 40px;
  box-sizing: border-box;
}

.team-detail-photo img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.team-detail-right {
  box-sizing: border-box;
  width: calc(100% - 500px);
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 60px 60px 60px 20px;
  position: relative;
  flex-wrap: wrap;
}

.team-detail-right .person-title {
  font-family: var(--font-family);
  font-size: 28px;
  color: var(--primary-color);
  font-weight: var(--font-weight-bold);
}

.team-detail-right .person-desc {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--secondary-color);
  text-transform: none;
  letter-spacing: 0.5px;
}

/* === Ready State === */
.container-ready .team-detail {
  transition: 0.45s ease 0.3s;
  opacity: 1;
  left: 80px;
  visibility: visible;
}

.container-ready .team-detail img {
  width: 100%;
}

.container-ready .team-container {
  height: 0px;
  overflow: hidden;
}

.container-ready .person-selected {
  left: 0px !important;
  top: 0px !important;
  z-index: 9998;
  height: 100% !important;
  pointer-events: auto;
  border-radius: 0;
  position: fixed !important;
  background: var(--primary-color) !important;
  border: none;
  opacity: 1 !important;
  /* ❌ width: 90px !important; kaldırıldı */
}

.container-ready .person-selected:after {
  opacity: 1;
  visibility: visible;
}

/* === Back Animation === */
.person-back:before {
  height: 0px !important;
}

.person-back .person-details {
  margin-top: 0px !important;
  transition-delay: 0.35s;
  opacity: 1 !important;
}

/* === Social Links === */
.social {
  margin-top: 25px;
  margin-left: 40px;
}

.social a {
  color: var(--primary-color);
  font-size: 22px;
  margin-right: 15px;
  transition: all 0.3s ease;
  display: inline-block;
}

.social a:hover {
  color: var(--secondary-color);
  transform: translateY(-3px);
}

.social a:last-child {
  margin-right: 0;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 1199px) {
  .person {
    width: calc(33.333% - 14px);
  }

  .person-img {
    height: 300px;
  }

  .team-detail-left {
    width: 400px;
    padding: 0 40px;
  }

  .team-detail-right {
    padding: 40px 40px 40px 20px;
    width: calc(100% - 400px);
  }

  .person .person-title {
    font-size: 18px;
  }

  .person-details {
    padding: 16px;
  }
}

@media (max-width: 991px) {
  .header {
    margin-top: 50px;
    margin-bottom: 40px;
  }

  .header-title {
    font-size: 32px;
  }

  .header-subtitle {
    font-size: 15px;
  }

  .person {
    width: calc(50% - 10px);
  }

  .team-detail-left {
    width: 100%;
    padding: 50px;
    min-height: 400px;
  }

  .team-detail-right {
    padding: 30px 50px 50px 50px;
    width: 100%;
  }

  .team-detail-header {
    text-align: center;
    margin-left: 0;
  }

  .team-detail-bio-content p {
    margin-left: 0;
  }

  .social {
    margin-left: 0;
    text-align: center;
  }

  /* .container-ready .person-selected {
    width: 60px !important;
  } */

  .team-detail {
    width: calc(100% - 60px);
    left: 60px;
  }
}

@media (max-width: 767px) {
  .header {
    margin-top: 40px;
    margin-bottom: 30px;
    max-height: 160px;
  }

  .header-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .header-subtitle {
    font-size: 14px;
  }

  .team-container {
    padding: 0 15px;
  }

  .person {
    width: calc(50% - 10px);
  }

  .person-img {
    height: 250px;
  }

  .person-details {
    padding: 12px;
  }

  .person-title {
    font-size: 16px;
  }

  .person-desc {
    font-size: 11px;
  }

  .team-detail-left {
    padding: 30px;
    min-height: 350px;
  }

  .team-detail-right {
    padding: 20px 30px 30px 30px;
  }

  .team-detail-right .person-title {
    font-size: 24px;
  }

  .team-detail-bio-content p {
    font-size: 14px;
    line-height: 26px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 15px;
    margin-top: 30px;
    margin-bottom: 25px;
  }

  .header-title {
    font-size: 24px;
  }

  .header-subtitle {
    font-size: 13px;
  }

  .person {
    width: 100%;
  }

  .person-img {
    height: 300px;
  }

  .team-detail-left {
    padding: 25px;
    min-height: 300px;
  }

  .team-detail-right {
    padding: 20px;
  }

  .team-detail-right .person-title {
    font-size: 22px;
  }

  .team-detail-bio-content p {
    font-size: 13px;
    line-height: 24px;
  }

  .social a {
    font-size: 20px;
  }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .person,
  .person:before,
  .person:after,
  .team-detail,
  .person-details {
    transition: none !important;
  }
}

.person:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 4px;
}

.person:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 4px;
}
