/*-----------------------------------------------------------
   Africa Climate Finance - Team & Profile Pages
   Design system for Our Team + profile pages
-----------------------------------------------------------*/

/* Variables (extend design system) */
.team-page,
.profile-page {
  --team-green: #40865b;
  --team-green-dark: #2d5a3d;
  --team-container: min(1100px, 95vw);
  --team-gap: clamp(20px, 2.5vw, 32px);
  --team-radius: 14px;
  --team-radius-sm: 10px;
  --team-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --team-shadow-hover: 0 8px 28px rgba(64,134,91,0.12);
}

/* Compact breadcrumb/hero for team + profile pages */
.team-page .breadcrumb-wrap.ds-hero-override,
.profile-page .breadcrumb-wrap.ds-hero-override {
  padding: clamp(32px, 4vh, 56px) 0 !important;
  min-height: auto !important;
  max-height: none !important;
}
.team-page .breadcrumb-title h2,
.profile-page .breadcrumb-title h2 {
  font-size: clamp(24px, 3vw, 36px) !important;
}

/* ========== Our Team page ========== */
.team-page .team-wrap {
  padding-top: clamp(40px, 4vw, 64px);
  padding-bottom: clamp(48px, 5vw, 80px);
}

.team-page .team-section-header {
  text-align: center;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.team-page .team-section-header .team-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--team-green);
  margin-bottom: 0.5rem;
  display: block;
}
.team-page .team-section-header h2 {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 600;
  color: #1a2e22;
  margin-bottom: 0.5rem;
}
.team-page .team-section-header p {
  font-size: 1rem;
  color: #5c6f65;
  max-width: 42ch;
  margin: 0 auto;
  line-height: 1.6;
}

.team-page .team-subsection-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--team-green-dark);
  text-align: center;
  margin-bottom: clamp(20px, 2vw, 28px);
}

/* Team grid - responsive columns */
.team-page .team-grid-modern {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--team-gap);
  max-width: var(--team-container);
  margin: 0 auto;
}
@media (min-width: 768px) {
  .team-page .team-grid-modern { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .team-page .team-grid-modern.team-grid-three { grid-template-columns: repeat(3, 1fr); }
}

/* Team card - consistent height, uniform styling */
.team-page .team-card-modern {
  background: #fff;
  border-radius: var(--team-radius);
  overflow: hidden;
  box-shadow: var(--team-shadow);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.team-page .team-card-modern:hover {
  box-shadow: var(--team-shadow-hover);
  transform: translateY(-2px);
}
.team-page .team-card-modern:focus-within {
  outline: 2px solid var(--team-green);
  outline-offset: 2px;
}

/* Image container - 4:5 aspect ratio, object-fit cover */
.team-page .team-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f0f3f1;
}
.team-page .team-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.team-page .team-card-media .team-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--team-green) 0%, var(--team-green-dark) 100%);
  color: #fff;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Card body */
.team-page .team-card-body {
  padding: clamp(16px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.team-page .team-card-body h3 {
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.team-page .team-card-body h3 a {
  color: #1a2e22;
  text-decoration: none;
}
.team-page .team-card-body h3 a:hover {
  color: var(--team-green);
}
.team-page .team-card-body .team-role {
  font-size: 0.85rem;
  color: var(--team-green);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.team-page .team-card-body .team-excerpt {
  font-size: 0.9rem;
  color: #5c6f65;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}
/* Executive Leadership only: clamp excerpt (they have View Profile for full bio) */
.team-page .team-exec-grid .team-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Team grid: show full description (no profile pages) */
.team-page .team-grid-modern .team-excerpt {
  display: block;
}
.team-page .team-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.team-page .team-card-actions .social-profile {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 8px;
}
.team-page .team-card-actions .social-profile li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(64,134,91,0.1);
  color: var(--team-green);
  transition: background 0.2s, color 0.2s;
}
.team-page .team-card-actions .social-profile li a:hover,
.team-page .team-card-actions .social-profile li a:focus {
  background: var(--team-green);
  color: #fff;
}
.team-page .team-card-actions .social-profile li a:focus {
  outline: 2px solid var(--team-green);
  outline-offset: 2px;
}
.team-page .team-card-actions .btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--team-green);
  background: transparent;
  border: 1px solid var(--team-green);
  border-radius: var(--team-radius-sm);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  margin-left: auto;
}
.team-page .team-card-actions .btn-profile:hover,
.team-page .team-card-actions .btn-profile:focus {
  background: var(--team-green);
  color: #fff;
}
.team-page .team-card-actions .btn-profile:focus {
  outline: 2px solid var(--team-green);
  outline-offset: 2px;
}

/* Executive row - larger cards, 2 cols */
.team-page .team-exec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--team-gap);
  max-width: var(--team-container);
  margin: 0 auto clamp(48px, 5vw, 64px);
}
@media (min-width: 768px) {
  .team-page .team-exec-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Our Team in the Field - Coming soon callout */
.team-page .team-field-coming {
  max-width: 520px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(135deg, rgba(64,134,91,0.06) 0%, rgba(45,90,61,0.04) 100%);
  border: 1px dashed rgba(64,134,91,0.3);
  border-radius: var(--team-radius);
  text-align: center;
}
.team-page .team-field-coming h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--team-green-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.team-page .team-field-coming h4 i {
  font-size: 1.2rem;
  color: var(--team-green);
}
.team-page .team-field-coming p {
  font-size: 0.9rem;
  color: #5c6f65;
  margin: 0;
}

/* ========== Profile pages (Kenneth, Karen) ========== */
.profile-page .profile-section {
  padding-top: clamp(40px, 4vw, 56px);
  padding-bottom: clamp(48px, 5vw, 72px);
}

.profile-page .profile-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
  max-width: var(--team-container);
  margin: 0 auto  clamp(40px, 4vw, 56px);
  align-items: start;
}
@media (min-width: 768px) {
  .profile-page .profile-header { grid-template-columns: 280px 1fr; }
}
@media (min-width: 1024px) {
  .profile-page .profile-header { grid-template-columns: 320px 1fr; gap: 48px; }
}

.profile-page .profile-photo-wrap {
  position: relative;
}
.profile-page .profile-photo-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--team-radius);
  display: block;
  box-shadow: var(--team-shadow);
}
.profile-page .profile-photo-wrap .team-avatar-fallback {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--team-green) 0%, var(--team-green-dark) 100%);
  color: #fff;
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--team-radius);
}

.profile-page .profile-info h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #1a2e22;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.profile-page .profile-info .profile-role {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--team-green);
  margin-bottom: 1rem;
}
.profile-page .profile-info .profile-summary {
  font-size: 1rem;
  color: #5c6f65;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 48ch;
}
.profile-page .profile-contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.profile-page .profile-contact-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: var(--team-green);
  border-radius: var(--team-radius-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.profile-page .profile-contact-buttons a:hover,
.profile-page .profile-contact-buttons a:focus {
  background: var(--team-green-dark);
}
.profile-page .profile-contact-buttons a:focus {
  outline: 2px solid var(--team-green);
  outline-offset: 2px;
}
.profile-page .profile-contact-buttons a.btn-outline {
  background: transparent;
  color: var(--team-green);
  border: 1px solid var(--team-green);
}
.profile-page .profile-contact-buttons a.btn-outline:hover,
.profile-page .profile-contact-buttons a.btn-outline:focus {
  background: rgba(64,134,91,0.08);
}

.profile-page .profile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #5c6f65;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.profile-page .profile-back:hover,
.profile-page .profile-back:focus {
  color: var(--team-green);
}
.profile-page .profile-back:focus {
  outline: 2px solid var(--team-green);
  outline-offset: 2px;
}

/* Profile content - sections as cards */
.profile-page .profile-content {
  max-width: var(--team-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 32px);
}
@media (min-width: 1024px) {
  .profile-page .profile-content { grid-template-columns: 1fr 320px; }
}

.profile-page .profile-main {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 32px);
}

.profile-page .profile-card {
  background: #fff;
  border-radius: var(--team-radius);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--team-shadow);
  border: 1px solid rgba(0,0,0,0.04);
}
.profile-page .profile-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a2e22;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(64,134,91,0.2);
}
.profile-page .profile-card p {
  font-size: 1rem;
  line-height: 1.65;
  color: #3d4f45;
  margin-bottom: 1rem;
}
.profile-page .profile-card p:last-child {
  margin-bottom: 0;
}
.profile-page .profile-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-page .profile-card ul li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #3d4f45;
}
.profile-page .profile-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--team-green);
  border-radius: 50%;
}
.profile-page .profile-card strong {
  color: #1a2e22;
}

/* Sidebar - sticky contact card (desktop) */
.profile-page .profile-sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .profile-page .profile-sidebar {
    display: block;
    position: sticky;
    top: 120px;
  }
  .profile-page .profile-sidebar .profile-quick-card {
    background: #fff;
    border-radius: var(--team-radius);
    padding: 24px;
    box-shadow: var(--team-shadow);
    border: 1px solid rgba(0,0,0,0.04);
  }
  .profile-page .profile-sidebar .profile-quick-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2e22;
    margin-bottom: 1rem;
  }
  .profile-page .profile-sidebar .profile-quick-card a {
    display: block;
    font-size: 0.95rem;
    color: var(--team-green);
    text-decoration: none;
    margin-bottom: 0.5rem;
  }
  .profile-page .profile-sidebar .profile-quick-card a:hover {
    text-decoration: underline;
  }
  .profile-page .profile-sidebar .btn-back-bottom {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--team-green);
    background: transparent;
    border: 1px solid var(--team-green);
    border-radius: var(--team-radius-sm);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }
  .profile-page .profile-sidebar .btn-back-bottom:hover {
    background: var(--team-green);
    color: #fff;
  }
}
@media (max-width: 1023px) {
  .profile-page .profile-back-bottom {
    margin-top: 2rem;
    text-align: center;
  }
  .profile-page .profile-back-bottom .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--team-green);
    background: transparent;
    border: 1px solid var(--team-green);
    border-radius: var(--team-radius-sm);
    text-decoration: none;
  }
  .profile-page .profile-back-bottom .btn-outline:hover {
    background: var(--team-green);
    color: #fff;
  }
}
