/* =========================================================
   COORDINATORS PAGE  — optimised for performance
   ========================================================= */

/* ── Hero heading block ── */
.coord-hero {
  margin: 1rem 0 1.2rem;
  text-align: center;
  position: relative;
  padding: 2rem 1.5rem 1.4rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,164,73,0.16), transparent 65%),
    linear-gradient(180deg, rgba(253,245,225,0.97), rgba(240,225,190,0.93));
  border: 4px double var(--gold);
  overflow: hidden;
  /* single shadow, no animation — removes a paint layer */
  box-shadow: 0 8px 28px rgba(64,35,16,0.2), 0 0 0 2px var(--maroon);
}

.coord-hero-jaali {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='12' stroke='%231a3a6a' stroke-width='1' fill='none'/%3E%3Ccircle cx='15' cy='15' r='5' fill='%231a3a6a'/%3E%3Cline x1='15' y1='0' x2='15' y2='30' stroke='%231a3a6a' stroke-width='0.5'/%3E%3Cline x1='0' y1='15' x2='30' y2='15' stroke='%231a3a6a' stroke-width='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}

.coord-hero-eyebrow {
  color: var(--deep-green);
  font-weight: 600;
  letter-spacing: 2.5px;
  font-size: 0.88rem;
  margin: 0.5rem 0 0.3rem;
}

.coord-hero-h1 {
  font-family: "Marcellus", serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: var(--maroon);
  margin: 0 0 0.35rem;
  text-shadow: 1px 2px 6px rgba(106,16,32,0.2);
  animation: hero-h1-in 1.1s ease-out both;
}

.coord-hero-sub {
  color: var(--saffron);
  font-family: "Marcellus", serif;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  letter-spacing: 0.04em;
}

.coord-hero-arch {
  width: min(340px, 90%);
  margin: 0.7rem auto 0;
  opacity: 0.75;
}
.coord-hero-arch svg { width: 100%; height: auto; }

/* ── 10-card grid ── */
.coord-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 0.6rem;
  /* contain layout reflows to this block */
  contain: layout style;
}

/* ── Individual card ── */
.ccard {
  /* no perspective — removes costly 3D compositing layer */
}

.ccard-frame {
  position: relative;
  background: linear-gradient(165deg, #fdfaf0 0%, #f5e8c8 55%, #ecdbb0 100%);
  border: 2px solid var(--gold-dark);
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  overflow: hidden;
  /* will-change only on transform — promotes to own GPU layer efficiently */
  will-change: transform;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ccard:hover .ccard-frame {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(106,16,32,0.2), 0 0 0 2px var(--gold);
}

/* Dashed inner border — static, no animation (saves repaints) */
.ccard-border-anim {
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(106,16,32,0.28);
  pointer-events: none;
}

/* Corner ornaments — only 2 animated (not 4) to cut paint work */
.ccard-corner {
  position: absolute;
  font-size: 0.65rem;
  color: var(--gold);
  line-height: 1;
}
.ccard-corner--tl { top: 7px;    left: 9px; }
.ccard-corner--tr { top: 7px;   right: 9px; }
.ccard-corner--bl { bottom: 7px; left: 9px; }
.ccard-corner--br { bottom: 7px;right: 9px; }

/* ── Photo ── */
.ccard-photo-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 0.7rem;
}

.ccard-photo {
  display: block;
  width: clamp(100px, 18vw, 130px);
  height: clamp(100px, 18vw, 130px);
  border-radius: 10px;          /* square with soft corners — 1:1 ratio */
  object-fit: cover;
  object-position: center top;  /* face stays in frame for portrait shots */
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 2px var(--maroon), 0 4px 14px rgba(44,16,8,0.22);
  transition: transform 0.3s ease;
}

.ccard:hover .ccard-photo {
  transform: scale(1.06);
}

/* Spinning ring — only visible on hover, paused otherwise → no idle GPU work */
.ccard-photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 14px;          /* matches square photo */
  border: 2px dashed transparent;
  pointer-events: none;
  animation: ring-spin 4s linear infinite paused;
}

.ccard:hover .ccard-photo-ring {
  border-color: var(--gold);
  animation-play-state: running;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

/* Placeholder background when no image is set yet */
.ccard-photo-wrap {
  background: linear-gradient(135deg, #f0deb0, #e8cfa0);
  border-radius: 10px;
}
.ccard-photo[src="PASTE_IMAGE_LINK_HERE"],
.ccard-photo:not([src]) {
  visibility: hidden;
}

/* ── Card body ── */
.ccard-body { position: relative; }

.ccard-name {
  font-family: "Marcellus", serif;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--royal-blue);
  margin: 0 0 0.15rem;
  letter-spacing: 0.03em;
}

.ccard-role {
  color: var(--saffron);
  font-weight: 600;
  font-size: 0.82rem;
  margin: 0 0 0.4rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.ccard-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.35rem auto 0.45rem;
  width: 65%;
}

/* ── WhatsApp button ── */
.ccard-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.32rem 0.75rem;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Hind", sans-serif;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.2s;
  border: 1px solid #1ebe5d;
}

.ccard-wa:hover {
  background: #1aad54;
  transform: scale(1.04);
}

.ccard-wa-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .coord-grid-new {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.8rem;
  }
  .ccard-frame { padding: 1rem 0.65rem 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ccard-frame,
  .ccard-photo-ring,
  .coord-hero-h1 { animation: none !important; }
  .ccard:hover .ccard-frame { transform: none; }
  .ccard:hover .ccard-photo { transform: none; }
}
