/* assets/css/pages/team.css */
/* Team Page Specific Styles (page-only). Uses existing vars/typography from main.css */

.team-hero {
  position: relative;
  min-height: 360px; /* ✅ smaller hero */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.team-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--olive-leaf-4); /* ✅ root primary backdrop behind image */
}

.team-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-hero-backdrop {
  position: absolute;
  inset: 0;
  background: var(--olive-leaf-4);
  opacity: 0.72;
}

.team-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: var(--white);
}

.team-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 10px;
}

.team-hero-subtitle {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.95;
}

/* Team Work */
.teamwork {
  background: var(--white);
  padding: var(--section-spacing-desktop) 0;
}

.teamwork-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.teamwork-tag {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--golden-bronze);
  color: var(--golden-bronze);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.teamwork-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  color: var(--olive-leaf);
  margin-bottom: 14px;
}

.teamwork-text {
  color: var(--olive-leaf-2);
  line-height: 1.75;
  font-size: 16px;
  margin-bottom: 22px;
}

/* Buttons (page-only, consistent style) */
.teamwork-actions,
.team-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: var(--button-radius);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  line-height: 1;
}

.btn:focus-visible {
  outline: 3px solid rgba(213, 166, 66, 0.45);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--golden-bronze);
  color: var(--white);
  border-color: var(--golden-bronze);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--olive-leaf);
  border-color: var(--olive-leaf);
}

.btn-outline:hover {
  border-color: var(--golden-bronze);
  color: var(--golden-bronze);
  transform: translateY(-2px);
}

.btn-on-dark {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-on-dark:hover {
  border-color: var(--golden-bronze);
  color: var(--golden-bronze);
}

/* Team blocks */
.team-block {
  background: #f9f9f9;
  padding: var(--section-spacing-desktop) 0;
}

.team-block:nth-of-type(even) {
  background: var(--white);
}

.team-block-head {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 26px;
}

.team-block-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  color: var(--olive-leaf);
  margin: 0;
}

/* Grid: 5 per row desktop, 1 mobile */
.team-grid--five {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* Card */
.team-card {
  background: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: var(--transition-smooth);
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

/* ✅ Image box: square & responsive */
.team-card-media {
  width: 100%;
  aspect-ratio: 1 / 1;        /* ✅ 1x1 on mobile AND desktop */
  background: #f2f2f2;        /* letterbox background if needed */
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* ✅ Image: full visible (no crop) */
.team-card-media img {
  width: 100%;
  height: 100%;              /* ✅ fixed */
  object-fit: contain;       /* ✅ full image visible */
  object-position: center top; /* ✅ face upar ho to help */
  display: block;
}

.team-card-body {
  padding: 14px 14px 12px;
}

.team-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.team-card-name {
  font-family: var(--font-heading); /* Primary font */
  font-size: 1.05rem;
  color: var(--olive-leaf);
  margin: 0 0 6px;
  font-weight: 700; /* requested bold */
}

.team-card-role {
  margin: 0;
  color: var(--olive-leaf-2); /* Secondary lighter */
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.team-card-toggle {
  border: 1px solid rgba(213, 166, 66, 0.45);
  background: rgba(213, 166, 66, 0.06);
  color: var(--golden-bronze);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.team-card-toggle:hover {
  background: rgba(213, 166, 66, 0.12);
  transform: translateY(-1px);
}

.team-card-toggle:focus-visible {
  outline: 3px solid rgba(213, 166, 66, 0.45);
  outline-offset: 3px;
}

.team-card-icon {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 18px;
  line-height: 1;
  transform: rotate(0deg);
}

.team-card.is-open .team-card-icon {
  transform: rotate(180deg); /* ⬇️⬆️ rotation */
}

/* Expandable bio */
.team-card-bio {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.team-card-bio p {
  margin: 10px 0 0;
  color: var(--olive-leaf-2);
  font-size: 13px;
  line-height: 1.7;
}

/* Testimonials + Clients */
.section-head {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 28px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  color: var(--olive-leaf);
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--olive-leaf-2);
  font-size: 15px;
  line-height: 1.7;
}

.team-testimonials {
  background: #f9f9f9;
  padding: var(--section-spacing-desktop) 0;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 26px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.testimonial-quote {
  margin: 0 0 18px;
  color: var(--olive-leaf-2);
  line-height: 1.75;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name {
  font-weight: 700;
  color: var(--olive-leaf);
}

.author-role {
  font-size: 13px;
  color: var(--olive-leaf-2);
}

.team-clients {
  background: var(--white);
  padding: var(--section-spacing-desktop) 0;
}

.clients-slider {
  overflow: hidden;
  position: relative;
}

.clients-track {
  display: flex;
  gap: 54px;
  align-items: center;
  animation: teamScroll 28s linear infinite;
}

.client-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  min-width: 170px;
}

.client-logo img {
  max-height: 56px;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.75);
  transition: var(--transition-smooth);
}

.clients-slider:hover .client-logo img {
  filter: grayscale(0%) opacity(1);
}

@keyframes teamScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* CTA image strip */
.team-cta {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-cta-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--olive-leaf-4);
}

.team-cta-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-cta-overlay {
  position: absolute;
  inset: 0;
  background: var(--olive-leaf-4);
  opacity: 0.62;
}

.team-cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  width: 100%;
}

.team-cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 12px;
}

.team-cta-text {
  max-width: 720px;
  margin: 0 auto 22px;
  line-height: 1.75;
  opacity: 0.95;
}

/* Responsive */
@media (max-width: 1200px) {
  .team-grid--five { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 991px) {
  .teamwork,
  .team-block,
  .team-testimonials,
  .team-clients {
    padding: var(--section-spacing-tablet) 0;
  }

  .team-grid--five { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .team-hero { min-height: 260px; }

  .teamwork,
  .team-block,
  .team-testimonials,
  .team-clients {
    padding: var(--section-spacing-mobile) 0;
  }

  .team-grid--five { grid-template-columns: 1fr; } /* ✅ 1 in mobile */
  .testimonial-grid { grid-template-columns: 1fr; }

  .btn { width: 100%; }
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  .team-card,
  .team-card-bio,
  .team-card-icon,
  .btn,
  .clients-track {
    transition: none !important;
    animation: none !important;
  }
}

/* Screen-reader helper (in case not present globally) */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
