/* ============================================================
   DIMENSION REALTY SOLUTION - Team Page Styles
   ============================================================ */

/* --- Team Hero --- */
.team-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f1f3d 0%, #1B3A6B 60%, #2a5298 100%);
  overflow: hidden;
}
.team-hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1521737711867-e3b97375f902?w=1600&q=80') center/cover no-repeat;
  opacity: 0.14;
}
.team-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,31,61,0.94) 0%, rgba(27,58,107,0.88) 100%);
}
.team-hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 700px;
  padding: 80px 0 60px;
}
.team-hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  margin: 16px 0 14px;
  line-height: 1.2;
}
.team-hero-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}
.team-hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.team-stat { text-align: center; }
.team-stat span {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.team-stat label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.team-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

/* --- Breadcrumb --- */
.breadcrumb-bar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.breadcrumb-bar .container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--text-gray);
}
.breadcrumb-bar a { color: var(--primary); font-weight: 600; }
.breadcrumb-bar a:hover { text-decoration: underline; }
.breadcrumb-bar i.fa-chevron-right { font-size: 0.65rem; color: var(--text-light); }
.breadcrumb-bar span { color: var(--text-gray); }

/* --- Team Intro --- */
.team-intro { padding-bottom: 20px !important; }

/* --- Featured Member (Broker/Owner) --- */
.featured-member-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
/* Full-panel photo — mirrors the grid card photo zone */
.featured-member-image {
  position: relative;
  background: linear-gradient(160deg, #0f1f3d 0%, #1B3A6B 50%, #2a5298 100%);
  min-height: 420px;
  overflow: hidden;
}
.featured-member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.featured-member-image .member-initials-lg {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  letter-spacing: 4px;
  user-select: none;
}
/* Dark gradient overlay at the bottom of the photo */
.featured-member-image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(10,22,50,0.82) 0%, transparent 100%);
  pointer-events: none;
}
.featured-member-badge {
  position: absolute;
  bottom: 18px;
  left: 20px;
  background: var(--accent);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
/* legacy — kept for fallback but no longer rendered */
.member-photo-wrap { position: relative; }
.member-avatar-lg {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
}
.featured-member-body {
  padding: 40px 44px;
}
.featured-member-body h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}
.member-credentials {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.member-credentials span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--text-gray);
  font-weight: 500;
}
.member-credentials i { color: var(--accent); }
.featured-member-body p {
  color: var(--text-gray);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.93rem;
}
.member-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
}
.specialty-tag {
  background: var(--bg-light);
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.specialty-tag i { color: var(--accent); font-size: 0.7rem; }
.member-contact-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Team Section Label --- */
.team-section-label {
  margin-bottom: 36px;
}
.team-section-label h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Team card ── */
.team-card {
  background: var(--white);
  border-radius: 16px;
  border: none;
  box-shadow: 0 2px 16px rgba(15,30,70,0.08), 0 1px 4px rgba(15,30,70,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(.2,.8,.4,1), box-shadow 0.3s ease;
}
.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(15,30,70,0.16), 0 4px 12px rgba(15,30,70,0.08);
}

/* ── Photo area ── */
.team-card-photo {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(160deg, #0f1f3d 0%, #1B3A6B 60%, #2a5298 100%);
  flex-shrink: 0;
}
.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  display: block;
  transition: transform 0.5s cubic-bezier(.2,.8,.4,1);
}
.team-card:hover .team-card-photo img {
  transform: scale(1.06);
}
.team-card-photo .member-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  letter-spacing: 2px;
  user-select: none;
}

/* Role badge */
.member-role-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Social icons — frosted glass, top-right */
.member-social {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 3;
}
.member-social a {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.92);
  font-size: 0.72rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.member-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ── Card body ── */
.team-card-body {
  padding: 16px 18px 14px;
  flex: 1;
  border-top: 3px solid var(--accent);
}
.team-card-identity {
  margin-bottom: 10px;
}
.team-card-identity .member-role-tag {
  margin-bottom: 6px;
}
.team-card-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.2px;
}
.member-bio {
  font-size: 0.84rem;
  color: var(--text-gray);
  line-height: 1.65;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline specialty pills */
.card-spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(27,58,107,0.07);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  letter-spacing: 0.1px;
}
.card-spec-tag i {
  color: var(--accent);
  font-size: 0.65rem;
}

/* ── Footer ── */
.team-card-footer {
  padding: 12px 18px 14px;
  display: flex;
  gap: 8px;
}
.card-btn {
  flex: 1;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  padding: 9px 12px;
  gap: 6px;
  border-radius: 8px;
}

/* --- Why Our Team --- */
.why-team { background: var(--bg-light); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.why-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.why-card p {
  font-size: 0.85rem;
  color: var(--text-gray);
  line-height: 1.65;
}

/* --- Join CTA --- */
.join-team-cta {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 72px 0;
}
.join-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.join-cta-text h2 {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}
.join-cta-text p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 560px;
}
.join-cta-actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* --- Photo note --- */
.photo-note {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 32px;
  font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .featured-member-card { grid-template-columns: 300px 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .featured-member-card { grid-template-columns: 1fr; }
  .featured-member-image { min-height: 320px; }
  .featured-member-image .member-initials-lg { min-height: 320px; font-size: 3.5rem; }
  .featured-member-body { padding: 28px 24px; }
  .featured-member-body h2 { font-size: 1.5rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .why-grid { grid-template-columns: 1fr; }
  .join-cta-inner { flex-direction: column; text-align: center; }
  .join-cta-actions { justify-content: center; }
  .team-hero-stats { gap: 16px; }
  .team-stat-divider { height: 30px; }
}

@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .team-stat-divider { display: none; }
  .team-hero-stats { gap: 20px; }
  .member-contact-row { flex-direction: column; }
}
