/* ============================================================
   CIRRUS LAKE SOLUTIONS — Card components
   Service card and leader card. These card patterns are reused
   across multiple pages, so they live in the components layer.
   Loaded on: home, services hub, services detail (related),
   industries, about.
   ============================================================ */

/* ===== SERVICE CARD (.svc-card) ===== */
.svc-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.svc-card-bar {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gray-100); }
.svc-card:hover .svc-card-bar { transform: scaleX(1); }
.svc-icon {
  width: 50px; height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,48,73,0.08), rgba(80,200,120,0.1));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}
.svc-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.svc-card p  { font-size: 0.875rem; color: var(--gray-500); line-height: 1.72; }

/* ===== LEADER CARD (.leader-card) — used on home and about ===== */
.leader-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 42px 36px 36px;
  text-align: center;
  background: var(--gray-50);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  /* Flex layout so the optional .leader-badge anchors to the bottom
     of the card via margin-top:auto. Cards still stretch to equal
     heights via grid; this ensures the bio fills the visual space
     and the badge (when present) sits at the bottom edge. */
  display: flex;
  flex-direction: column;
}
.leader-card-bar {
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.leader-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gray-100); }
.leader-photo {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 22px;
  border: 3px solid white;
  box-shadow: 0 8px 28px rgba(0,48,73,0.22);
  display: block;
}
.leader-name { font-size: 1.22rem; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.leader-role {
  font-size: 0.75rem; font-weight: 700;
  color: var(--primary-500);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 22px;
}
.leader-sep {
  width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 0 auto 20px;
  border-radius: 2px;
}
.leader-desc { font-size: 0.875rem; color: var(--gray-500); line-height: 1.72; }
.leader-badge {
  display: flex;
  justify-content: center;
  /* Anchor the badge to the bottom of the card so cards with and
     without a badge balance visually when grid stretches them. */
  margin-top: auto;
  padding-top: 22px;
  transition: opacity 0.2s;
}
.leader-badge:hover {
  opacity: 0.8;
}
.leader-badge-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

/* ===== SHARED LAYOUTS ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Cards stretch to equal heights (grid default). The .leader-card's
     flex-column layout with margin-top:auto on .leader-badge anchors
     the badge to the bottom of Tony's card; Ashley's card has matching
     height with extra whitespace below her bio. Symmetry is preferred
     over content-sizing here. */
  gap: 36px;
  max-width: 840px;
  margin: 0 auto;
}

/* ===== RESPONSIVE — CARD GRIDS ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .leaders-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
