/* ============================================ */
/* OUR TEAM PAGE - layout-specific styles         */
/* Loaded only on our-team-page.php template      */
/*                                               */
/* Shared theme classes handle everything else:   */
/* - Hero: pk-co-hero / pk-co-hero-overlay /      */
/*   pk-co-hero-title / pk-hero-crumb / pk-       */
/*   hero-label (homepage.css)                    */
/* - Buttons: pk-hero-btn--primary / --ghost      */
/*   (homepage.css)                               */
/* - Image fallbacks: pk-image-placeholder        */
/*   (homepage.css)                               */
/*                                               */
/* This file only keeps the team-page layout:     */
/* container, editorial card grids, bento tiles    */
/* and the CTA band.                              */
/* ============================================ */

/* ---------- Base ---------- */
.pk-team-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.pk-team-section {
  padding: 5rem 0;
}

@media (max-width: 639px) {
  .pk-team-container { padding: 0 1.25rem; }
  .pk-team-section { padding: 4rem 0; }
}

/* Eyebrow - matches pk-why-eyebrow / pk-skills-eyebrow */
.pk-team-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: #FF8B8B;
  margin-bottom: 1rem;
}
.pk-team-eyebrow--maroon { color: #600000; }
.pk-team-eyebrow--coral { color: #FF8B8B; }

/* H2 shared - matches pk-gallery-title / pk-skills-title scale */
.pk-team-h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #0A0A0A;
  margin: 0 0 1rem;
}
.pk-team-h2 em {
  color: #600000;
  font-style: normal;
  font-weight: 500;
}
.pk-team-h2--light { color: #fff; }
.pk-team-h2--light em { color: #FF8B8B; }

.pk-team-lead {
  font-size: 1rem;
  line-height: 1.65;
  color: #4b5563;
  margin: 0;
  max-width: 640px;
}
.pk-team-lead--dark { color: #9ca3af; }

@media (min-width: 768px) {
  .pk-team-h2 { font-size: 2rem; }
}
@media (min-width: 1024px) {
  .pk-team-h2 { font-size: 2.5rem; }
}
@media (max-width: 639px) {
  .pk-team-h2 { text-align: center; }
  .pk-team-lead { text-align: center; }
}

/* ---------- Buttons ---------- */
/* Hero and CTA buttons reuse the theme pk-hero-btn classes. */
/* Only the light-section outline variant stays page-local.  */
.pk-team-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 11px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.pk-team-btn:hover { transform: translateY(-2px); }

.pk-team-btn--outline-maroon {
  background: transparent;
  color: #600000;
  border: 1.5px solid #600000;
}
.pk-team-btn--outline-maroon:hover {
  background: #600000;
  color: #fff;
}

/* Stacked full-width CTAs on small screens (hero + final CTA).
   Spacing uses margin-top on every child after the first, with
   !important to defeat any override from homepage.css. gap alone
   was being stripped by the theme's .pk-co-hero-ctas rules. */
@media (max-width: 639px) {
  .pk-team-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .pk-team-ctas > * + * {
    margin-top: 0.75rem !important;
  }
  .pk-team-ctas .pk-hero-btn,
  .pk-team-ctas .pk-team-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- SECTION 1: HERO ---------- */
/* Visual treatment (gradient base, image layer, overlay,      */
/* padding, title/desc/buttons) comes from the shared          */
/* pk-co-hero classes in homepage.css. Only the team-specific  */
/* column and the no-image dot-grid texture live here.         */
.pk-team-hero-inner { max-width: 1200px; }

.pk-team-hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
}

/* No hero image uploaded: maroon gradient base (pk-co-hero)
   plus a subtle dot-grid texture - never a plain black hero. */
.pk-team-hero--noimg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
}

@media (max-width: 639px) {
  .pk-team-hero-left { gap: 1rem; }
}

/* The theme hero elements carry their own margins; inside the
   flex column the gap owns the rhythm, so margins are zeroed
   and the CTAs get one extra step of air. */
.pk-team-hero-left .pk-co-hero-title { margin: 0; }
.pk-team-hero-left .pk-co-hero-title em { font-style: normal; }
.pk-team-hero-left .pk-co-hero-desc { margin-bottom: 0; }
.pk-team-hero-left .pk-co-hero-ctas { margin-top: 0.75rem; }

/* ---------- SECTION 2: LEADERSHIP ---------- */
.pk-team-leadership {
  background: #f8f6f5;
}

.pk-team-section-head {
  text-align: left;
  margin-bottom: 3.5rem;
  max-width: 720px;
}
.pk-team-section-head--dark { color: #fff; }
@media (max-width: 639px) {
  .pk-team-section-head { text-align: center; margin-left: auto; margin-right: auto; margin-bottom: 2.5rem; }
}

.pk-team-lead-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
}
@media (max-width: 1023px) {
  .pk-team-lead-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .pk-team-lead-grid { grid-template-columns: 1fr; }
}

/* Editorial card: no chrome, no lift, no shadow. The headshot is
   the visual anchor. Cards show a full-colour photo, name and role only. */
.pk-team-lead-card {
  /* ---- Easy-to-change settings -------------------------------
     --maroon          : ring colour
     --card-size       : OUTER diameter (never changes on hover)
     --ring-width      : maroon ring thickness
     --gap-width       : white ring thickness
     --ring-scale      : how far the white ring/photo grow on hover
     --photo-zoom      : extra image zoom inside the circle
     ----------------------------------------------------------- */
  --maroon: #600000;
  --card-size: 200px;
  --ring-width: 8px;
  --gap-width: 8px;
  /* 184px inner circle x 1.065 = about 196px, which leaves a
     fine 2px maroon line around it on hover. */
  --ring-scale: 1.065;
  --photo-zoom: 1.05;
  --speed: 0.4s;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

/* ---------- Circular profile card ----------
   Three nested circles, from outside in:
   1. .pk-team-lead-photo-wrap  -> maroon ring (padding = thickness)
   2. .pk-team-lead-photo-ring  -> white ring  (padding = thickness)
   3. .pk-team-lead-photo-inner -> photo, clipped to a circle

   Every layer is box-sizing: border-box and fills its parent, so the
   OUTER diameter (--card-size) never changes. On hover the white ring
   is scaled with a transform (not padding), which covers more of the
   maroon ring and lets the photo grow. Transform-only animation keeps
   the hover perfectly smooth because the layout never changes. */

/* Layer 1: thick maroon ring (size never changes) */
.pk-team-lead-photo-wrap {
  box-sizing: border-box;
  width: var(--card-size);
  height: var(--card-size);
  padding: var(--ring-width);
  border-radius: 50%;
  background: var(--maroon);
  flex: 0 0 auto;
  margin-bottom: 1.25rem;
}

/* Layer 2: white ring / gap. It grows with a transform on hover. */
.pk-team-lead-photo-ring {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: var(--gap-width);
  border-radius: 50%;
  background: #ffffff;
  transform: scale(1);
  transform-origin: center;
  transition: transform var(--speed) ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* Layer 3: photo, kept perfectly round by the clipping circle */
.pk-team-lead-photo-inner {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #f8f6f5;
}

.pk-team-lead-photo-inner img.pk-team-lead-photo,
.pk-team-lead-photo-inner .pk-team-lead-avatar,
.pk-team-lead-photo-inner .pk-image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 50%;
}

.pk-team-lead-photo-inner img.pk-team-lead-photo {
  object-fit: cover;
  object-position: center 30%;
  transform: translateZ(0) scale(1);
  transition: transform var(--speed) ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* HOVER: the white ring + photo scale up together, leaving only a fine
   maroon line. The card's outer size and surrounding layout stay fixed. */
.pk-team-lead-card:hover .pk-team-lead-photo-ring {
  transform: scale(var(--ring-scale));
}
.pk-team-lead-card:hover .pk-team-lead-photo {
  transform: translateZ(0) scale(var(--photo-zoom));
}

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  .pk-team-lead-photo-ring,
  .pk-team-lead-photo-inner img.pk-team-lead-photo {
    transition: none;
  }
}

/* Initials fallback (no photo uploaded): maroon gradient circle */
.pk-team-lead-avatar {
  background: linear-gradient(135deg, #600000 0%, #4A0000 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Body sits under the circle with a clean margin, no card padding */
.pk-team-lead-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
}

.pk-team-lead-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--maroon);
  margin: 0;
  line-height: 1.3;
}

.pk-team-lead-title {
  font-size: 0.9375rem;
  color: #0A0A0A;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.4;
}


/* ---------- SECTION 4: VALUES ---------- */
/* Gradient copied from the front page BPO card (.pk-bpo-card
   in homepage.css) so both dark bands share one treatment. */
.pk-team-values {
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 0, 0, 0.45) 0%, transparent 55%),
    linear-gradient(135deg, #0A0A0A 0%, #2A0202 60%, #4A0000 100%);
  color: #fff;
}

.pk-team-values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 639px) {
  .pk-team-values-grid { grid-template-columns: 1fr; }
}

.pk-team-value-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.pk-team-value-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,139,139,0.35);
  background: rgba(255,255,255,0.06);
}

.pk-team-value-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255,139,139,0.12);
  color: #FF8B8B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pk-team-value-title {
  font-size: 1.1875rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.pk-team-value-desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #9ca3af;
  margin: 0;
}

/* ---------- SECTION 5: LIFE ---------- */
.pk-team-life { background: #f8f6f5; }

.pk-team-life-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 1023px) {
  .pk-team-life-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

.pk-team-life-text { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.pk-team-life-text .pk-team-h2 { margin-bottom: 0.5rem; }
.pk-team-life-text .pk-team-lead { margin-bottom: 1.5rem; }

.pk-team-life-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
  aspect-ratio: 3 / 2;
}
/* A little more air between tiles on tablet only */
@media (min-width: 640px) and (max-width: 1023px) {
  .pk-team-life-photos { gap: 1rem; }
}
@media (max-width: 639px) {
  .pk-team-life-photos {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.5rem;
    aspect-ratio: 1 / 1.4;
    height: auto;
  }
}

/* Life text centers on mobile like every other section head */
@media (max-width: 639px) {
  .pk-team-life-text { text-align: center; align-items: center; }
  .pk-team-life-text .pk-team-btn { justify-content: center; }
}

.pk-team-life-tile {
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s ease;
}
.pk-team-life-tile:hover { transform: scale(1.03); }

/* Tile media: ACF uploads render an <img>, defaults render a
   bundled theme photo. A missing default file renders the
   branded pk-image-placeholder gradient - never empty/black. */
.pk-team-life-tile-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pk-team-life-tile .pk-image-placeholder {
  min-height: 0;
  height: 100%;
  width: 100%;
}

/* Desktop bento: tile 1 tall on the left, tiles 4 and 6 wide on
   the lower rows. The six tiles fill the 3x3 grid exactly, so
   every tile keeps a fixed track and nothing spills into an
   implicit row. */
.pk-team-life-tile--1 { grid-row: 1 / span 2; grid-column: 1; }
.pk-team-life-tile--4 { grid-row: 2; grid-column: 2 / span 2; }
.pk-team-life-tile--6 { grid-row: 3; grid-column: 2 / span 2; }

/* Mobile bento: 2 columns x 4 rows. Tile 1 tall left, tiles 2-3
   stacked right, tile 4 full width, tiles 5-6 side by side. */
@media (max-width: 639px) {
  .pk-team-life-tile--1 { grid-row: 1 / span 2; grid-column: 1; }
  .pk-team-life-tile--2 { grid-row: 1; grid-column: 2; }
  .pk-team-life-tile--3 { grid-row: 2; grid-column: 2; }
  .pk-team-life-tile--4 { grid-row: 3; grid-column: 1 / span 2; }
  .pk-team-life-tile--5 { grid-row: 4; grid-column: 1; }
  .pk-team-life-tile--6 { grid-row: 4; grid-column: 2; }
}
/* ---------- SECTION: GLOBAL NETWORK ---------- */
.pk-team-network {
  background: #f8f6f5;
  color: #0A0A0A;
  overflow: hidden;
}

.pk-team-network-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
}
.pk-team-network-head .pk-team-lead {
  margin-left: auto;
  margin-right: auto;
}

/* Map Container */
.pk-team-network-map-wrap {
  max-width: 1000px;
  margin: 2.5rem auto 0;
  position: relative;
}

.pk-team-network-map-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Map Lines */
.pk-team-network-map-wrap svg path {
  stroke: #600000;
  stroke-width: 1.4;
  stroke-opacity: 0.85;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-miterlimit: 1;
  fill: none;
}

/* ---------- MAP MARKERS & BADGES ---------- */
/* The container is 0x0 so it anchors mathematically perfectly to the coordinates */
.pk-map-location {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 5;
}

/* Exact Coordinates */
.pk-map-location--usa { left: 24.56%; top: 25.75%; }
.pk-map-location--pk  { left: 69.88%; top: 31.99%; }
.pk-map-location--uae { left: 64.81%; top: 36.91%; }

/* The Ground Shadow (makes the pin look like it's resting on the map surface) */
.pk-map-location::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: -14px;
  width: 28px;
  height: 10px;
  background: rgba(96, 0, 0, 0.25);
  border-radius: 50%;
  transform: rotate(-15deg);
  filter: blur(3px);
  z-index: 0;
}

/* 3D Google Maps Style Drop Pin */
.pk-map-pin {
  position: absolute;
  bottom: -8px;
  left: -11px;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 2px solid #600000;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  z-index: 3;
  /* 3D Effects: Inner volume + Drop shadow */
  box-shadow: inset -2px -2px 4px rgba(96, 0, 0, 0.15);
  filter: drop-shadow(0px 6px 5px rgba(96, 0, 0, 0.4));
}

/* Inner solid dot */
.pk-map-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #600000;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(45deg); /* Counter-rotate */
}

/* Pulse Ring (nudged slightly below the pin tip) */
.pk-map-pin-ring {
  position: absolute;
  bottom: -34px;
  left: -25px;
  width: 50px;
  height: 50px;
  border: 2px solid #FF8B8B;
  border-radius: 50%;
  animation: pk-pin-ping 2.5s ease-out infinite;
  z-index: 1;
  pointer-events: none;
}
@keyframes pk-pin-ping {
  0% { transform: scale(0.2); opacity: 1; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Badges Base */
.pk-map-badge {
  position: absolute;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.pk-map-badge:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 20;
}

/* Speech Bubble Tails */
.pk-map-badge::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-bottom: 1px solid #ececec;
  border-right: 1px solid #ececec;
  transform: rotate(45deg);
}

/* USA (Center Above) */
.pk-map-location--usa .pk-map-badge {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}
.pk-map-location--usa .pk-map-badge:hover {
  transform: translateX(-50%) translateY(-4px);
}
.pk-map-location--usa .pk-map-badge::after {
  bottom: -4px;
  left: 50%;
  margin-left: -4px;
}

/* Pakistan (Centered Above) */
.pk-map-location--pk .pk-map-badge {
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}
.pk-map-location--pk .pk-map-badge:hover {
  transform: translateX(-50%) translateY(-4px);
}
.pk-map-location--pk .pk-map-badge::after {
  bottom: -4px;
  left: 50%;
  margin-left: -4px;
}

/* UAE (Centered Below) */
.pk-map-location--uae .pk-map-badge {
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
}
.pk-map-location--uae .pk-map-badge:hover {
  transform: translateX(-50%) translateY(4px);
}
.pk-map-location--uae .pk-map-badge::after {
  top: -4px;
  left: 50%;
  margin-left: -4px;
  transform: rotate(225deg); /* Flips the tail to point UP */
}

.pk-map-badge-city {
  font-size: 0.75rem;
  font-weight: 700;
  color: #600000;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pk-map-badge-time {
  font-size: 0.6875rem;
  color: #B23A48;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  font-weight: 700;
  line-height: 1;
}

/* Mobile Adjustments */
@media (max-width: 639px) {
  .pk-map-badge { padding: 4px 10px; }
  .pk-map-badge-city { font-size: 0.625rem; }
  .pk-map-badge-time { font-size: 0.6875rem; }
  
  .pk-map-pin { width: 16px; height: 16px; bottom: -6px; left: -8px; border-width: 1.5px; }
  .pk-map-pin::after { width: 4px; height: 4px; }
  .pk-map-pin-ring { width: 32px; height: 32px; bottom: -22px; left: -16px; }
  .pk-map-location::before { width: 20px; height: 8px; left: -10px; bottom: -4px; }
  
  .pk-map-location--usa .pk-map-badge { bottom: 22px; }
  .pk-map-location--pk .pk-map-badge { bottom: 24px; left: 50%; transform: translateX(-50%); }
  .pk-map-location--uae .pk-map-badge { top: 24px; left: 50%; transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .pk-map-pin-ring { animation: none; display: none; }
}

/* ---------- SECTION 6: CTA ---------- */
.pk-team-cta {
  background: #600000;
  color: #fff;
  padding: 5rem 0;
}
@media (max-width: 639px) {
  .pk-team-cta { padding: 4rem 0; }
}

.pk-team-cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pk-team-cta-title {
  color: #fff;
  margin: 0;
  max-width: 720px;
}
.pk-team-cta-title em { color: #FF8B8B; font-style: normal; }

.pk-team-cta-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0;
}

.pk-team-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 639px) {
  .pk-team-cta-actions {
    gap: 0;
    width: 100%;
  }
}
