/* Pi Dentist — Cards
   Shared card styles for service, doctor, case, and post cards.
   All values use CSS custom properties from tokens.css */

/* ---------- Card Base ---------- */
.service-card,
.doctor-card,
.case-card,
.post-card {
  background: var(--pi-white);
  border-radius: var(--pi-radius-card);
  overflow: hidden;
  box-shadow: var(--pi-shadow-sm);
  transition: transform var(--pi-transition),
              box-shadow var(--pi-transition);
}

.service-card:hover,
.doctor-card:hover,
.case-card:hover,
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--pi-shadow-md);
}

/* ---------- Card Thumbnail ---------- */
.card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--pi-transition);
}

.service-card:hover .card-thumb img,
.doctor-card:hover .card-thumb img,
.case-card:hover .card-thumb img,
.post-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* ---------- Card Body ---------- */
.card-body {
  padding: 24px;
}

/* ---------- Card Title ---------- */
.card-title {
  font-family: var(--pi-font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--pi-navy);
  line-height: 1.3;
  margin-bottom: 8px;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--pi-transition);
}

.card-title a:hover {
  color: var(--pi-gold);
}

/* ---------- Card Description ---------- */
.card-desc {
  font-size: 15px;
  color: var(--pi-text-soft);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- Card Meta ---------- */
.card-meta {
  font-size: 13px;
  color: var(--pi-text-soft);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-meta-icon {
  flex-shrink: 0;
}

/* ---------- Card Link ---------- */
.card-link {
  font-weight: 600;
  font-size: 15px;
  color: var(--pi-gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--pi-transition);
  text-decoration: none;
  margin-top: 16px;
}

.card-link:hover {
  gap: 10px;
  color: var(--pi-gold-hover);
}

/* ---------- Card Grid Layouts ---------- */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- Doctor Card Variant (portrait thumb) ---------- */
.doctor-card .card-thumb {
  aspect-ratio: 3 / 4;
}

/* ===========================================
   RESPONSIVE — Tablet (max-width: 1199px)
   =========================================== */
@media (max-width: 1199px) {
  .cards-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ===========================================
   RESPONSIVE — Mobile (max-width: 767px)
   =========================================== */
@media (max-width: 767px) {
  .cards-grid-3,
  .cards-grid-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-body {
    padding: 20px;
  }

  .card-title {
    font-size: 18px;
  }

  .card-desc {
    font-size: 14px;
  }
}
