/**
 * Kodimy Team Members Stylesheet
 * Responsive at 375px, 768px, 1024px, 1440px
 * Supports archive-team_member.php and single-team_member.php
 *
 * @package Astra Kodimy
 * @since 1.0.0
 */

/* ==========================================================================
   RESET & FULL-WIDTH CONTAINER OVERRIDES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body, html {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

#primary,
.kodimy-team-archive,
.kodimy-single-team,
.site-main {
  overflow-x: hidden;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

.kodimy-team-archive,
.kodimy-single-team {
  color: var(--kodimy-text-soft);
  background-color: var(--kodimy-bg);
}

/* ==========================================================================
   1. TEAM ARCHIVE HERO & GRID
   ========================================================================== */
.team-hero-section {
  background: radial-gradient(circle at 50% 0%, rgba(60, 238, 191, 0.14) 0%, rgba(20, 206, 202, 0.06) 40%, transparent 70%);
  padding: 40px 0 80px;
  border-bottom: 1px solid var(--kodimy-border);
}

.team-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.team-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--kodimy-ink);
  margin-top: 14px;
  margin-bottom: 20px;
  word-wrap: break-word;
}

.team-hero-intro {
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  line-height: 1.68;
  color: var(--kodimy-text-soft);
  margin: 0 auto;
  max-width: 760px;
}

.team-grid-section {
  padding: 80px 0;
  background: var(--kodimy-bg-secondary);
}

.team-archive-grid,
.kodimy-team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.kodimy-team-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kodimy-team-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kodimy-team-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card {
  background: #FFFFFF;
  border: 1px solid var(--kodimy-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--kodimy-shadow-sm);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.team-card:hover {
  border-color: var(--kodimy-teal);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(20, 206, 202, 0.14);
}

.team-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #0A0A0A;
  position: relative;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.team-card-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #1a2332 0%, #0A0A0A 100%);
  color: var(--kodimy-teal);
}

.team-card:hover .team-card-photo img {
  transform: scale(1.05);
}

.team-card-body {
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.team-role-badge {
  display: inline-block;
  font-family: var(--kodimy-font-headings);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0E7490;
  background: rgba(20, 206, 202, 0.1);
  border: 1px solid rgba(20, 206, 202, 0.25);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.team-card-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--kodimy-ink);
  margin: 0 0 14px 0;
  line-height: 1.3;
}

.team-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--kodimy-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-card-link-text {
  font-family: var(--kodimy-font-headings);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--kodimy-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.team-card:hover .team-card-link-text {
  color: var(--kodimy-teal);
}

.team-card-link-text svg {
  transition: transform 0.2s ease;
}

.team-card:hover .team-card-link-text svg {
  transform: translateX(4px);
}

/* ==========================================================================
   2. SINGLE TEAM MEMBER PROFILE
   ========================================================================== */
.single-team-section {
  padding: 60px 0 90px;
  background: var(--kodimy-bg-secondary);
}

.single-team-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: start;
}

/* Sidebar Profile Card */
.team-profile-sidebar {
  background: #FFFFFF;
  border: 1px solid var(--kodimy-border);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--kodimy-shadow-sm);
  position: sticky;
  top: 100px;
  text-align: center;
}

.profile-avatar-wrap {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 24px;
  border: 4px solid #FFFFFF;
  box-shadow: 0 12px 32px rgba(20, 206, 202, 0.2);
  background: #0A0A0A;
}

.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--kodimy-ink);
  margin: 0 0 8px;
  line-height: 1.2;
}

.profile-role-badge {
  display: inline-block;
  font-family: var(--kodimy-font-headings);
  font-size: 0.82rem;
  font-weight: 700;
  color: #0E7490;
  background: rgba(20, 206, 202, 0.12);
  border: 1px solid rgba(20, 206, 202, 0.3);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.profile-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 50px;
  background: var(--kodimy-ink);
  color: #FFFFFF;
  font-family: var(--kodimy-font-headings);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.profile-email-btn:hover {
  background: var(--kodimy-teal);
  color: #0A0A0A;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 206, 202, 0.25);
}

.profile-social-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--kodimy-border);
}

.profile-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  background: var(--kodimy-bg-secondary);
  border: 1px solid var(--kodimy-border);
  font-family: var(--kodimy-font-headings);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kodimy-ink);
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-social-pill:hover {
  border-color: var(--kodimy-teal);
  color: var(--kodimy-teal);
  transform: translateY(-2px);
}

/* Main Profile Content */
.team-profile-main {
  background: #FFFFFF;
  border: 1px solid var(--kodimy-border);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: var(--kodimy-shadow-sm);
}

.profile-section-heading {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--kodimy-ink);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.profile-bio-text {
  font-size: 1.06rem;
  line-height: 1.8;
  color: #2D3748;
  margin-bottom: 36px;
  white-space: pre-line;
}

.profile-specialties-block {
  padding-top: 32px;
  border-top: 1px solid var(--kodimy-border);
}

.profile-specialties-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.profile-specialty-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background: var(--kodimy-bg-secondary);
  border: 1.5px solid var(--kodimy-border);
  font-family: var(--kodimy-font-headings);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--kodimy-ink);
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-specialty-tag:hover {
  border-color: var(--kodimy-teal);
  color: var(--kodimy-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 206, 202, 0.14);
}

/* ==========================================================================
   3. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .team-archive-grid,
  .kodimy-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .single-team-grid {
    grid-template-columns: 320px 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .team-hero-section,
  .team-grid-section,
  .single-team-section {
    padding: 48px 0;
  }

  .team-archive-grid,
  .kodimy-team-grid {
    grid-template-columns: 1fr !important;
  }

  .single-team-grid {
    grid-template-columns: 1fr;
  }

  .team-profile-sidebar {
    position: static;
    padding: 28px 20px;
  }

  .team-profile-main {
    padding: 32px 24px;
  }
}
