/* ============================================================
   JIMCH — Components: cards, badges, avatars, hero, filters
   ============================================================ */

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
  background-image: linear-gradient(160deg, rgba(6, 35, 26, 0.93) 0%, rgba(11, 77, 60, 0.88) 45%, rgba(16, 99, 80, 0.84) 100%), url("../assets/images/hospital-building.jpeg");
  background-size: cover;
  background-position: center 65%;
  padding: calc(var(--header-h) + 64px) 0 72px;
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.22), transparent 70%);
}

.page-hero::after {
  content: "";
  position: absolute;
  bottom: -140px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 156, 129, 0.35), transparent 70%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  color: var(--gold-300);
}

.page-hero .eyebrow::before {
  background: var(--grad-gold);
}

.page-hero h1 {
  color: var(--white);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin-top: 14px;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}

.breadcrumb a:hover { color: var(--gold-300); }

@media (max-width: 640px) {
  .page-hero { padding: calc(var(--header-h-mobile) + 40px) 0 48px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  background-image: linear-gradient(160deg, rgba(6, 35, 26, 0.92) 0%, rgba(11, 77, 60, 0.86) 45%, rgba(16, 99, 80, 0.8) 100%), url("../assets/images/hospital-building.jpeg");
  background-size: cover;
  background-position: center 65%;
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 60px) 0 0;
  color: var(--white);
}

.hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-decor span {
  position: absolute;
  border-radius: 50%;
}

.hero-decor span:nth-child(1) {
  width: 460px; height: 460px;
  top: -180px; right: -140px;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.22), transparent 70%);
}

.hero-decor span:nth-child(2) {
  width: 320px; height: 320px;
  bottom: -160px; left: -100px;
  background: radial-gradient(circle, rgba(31, 156, 129, 0.4), transparent 70%);
}

.hero-decor span:nth-child(3) {
  width: 2px; height: 2px;
  box-shadow: 0 0 0 1px rgba(212,160,23,.5);
  top: 30%; left: 8%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 60px;
}

.hero-copy .eyebrow { color: var(--gold-300); }
.hero-copy .eyebrow::before { background: var(--grad-gold); }

.hero-copy h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero-copy h1 em {
  font-style: normal;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge-ring {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-badge-core {
  width: 68%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: var(--grad-gold);
  box-shadow: 0 0 80px rgba(212,160,23,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--emerald-900);
  text-align: center;
  gap: 4px;
}

.hero-badge-core strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
}

.hero-badge-core span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-float-card {
  position: absolute;
  background: var(--white);
  color: var(--ink-900);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-float-card.card-1 { top: 6%; left: -6%; }
.hero-float-card.card-2 { bottom: 10%; right: -8%; }

.hero-float-card svg { color: var(--emerald-700); flex-shrink: 0; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-bottom: 40px; }
  .hero-visual { max-width: 300px; margin: 0 auto; }
  .hero-float-card { display: none; }
}

@media (max-width: 640px) {
  .hero { padding-top: calc(var(--header-h-mobile) + 28px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Stat strip ---------- */
.stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-item {
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item:last-child { border-right: none; }

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--gold-300);
}

.stat-item span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

@media (max-width: 640px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 20px 10px; border-bottom: 1px solid rgba(255,255,255,0.12); }
}

/* ---------- Cards grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border: 1px solid rgba(11, 77, 60, 0.06);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Department card */
.dept-card {
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  height: 100%;
}

.dept-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--emerald-100);
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.dept-card:hover .dept-icon {
  background: var(--grad-emerald);
  color: var(--gold-300);
}

.dept-card h3 { font-size: 1.15rem; }

.dept-card p {
  font-size: 0.88rem;
  flex-grow: 1;
}

.dept-card .card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dept-card .card-link svg {
  transition: transform 0.3s var(--ease);
}

.dept-card:hover .card-link svg {
  transform: translateX(4px);
}

/* Service card */
.service-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card p { font-size: 0.88rem; }

/* Highlight flash for anchor arrival */
.highlight-flash {
  animation: flashGlow 1.8s var(--ease);
}

@keyframes flashGlow {
  0% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.7); }
  30% { box-shadow: 0 0 0 8px rgba(212, 160, 23, 0.25); }
  100% { box-shadow: var(--shadow-sm); }
}

/* Doctor card */
.doctor-card {
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  background: var(--grad-emerald);
  margin-bottom: 4px;
}

.avatar.avatar-placeholder {
  background: var(--emerald-100);
  color: var(--emerald-600);
}

.avatar.avatar-placeholder svg {
  width: 38px;
  height: 38px;
}

.doctor-card h3 { font-size: 1rem; }

.doctor-card .designation {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.doctor-card .dept-tag {
  font-size: 0.82rem;
  color: var(--ink-600);
  background: var(--emerald-50);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.doctor-card .qualification {
  font-size: 0.8rem;
  color: var(--ink-400);
}

.doctor-card.is-placeholder {
  border-style: dashed;
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

/* Management card */
.mgmt-card {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mgmt-card .avatar {
  width: 96px;
  height: 96px;
  font-size: 1.6rem;
}

.mgmt-card h3 { font-size: 1.05rem; }

.mgmt-card .role {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-700);
}

.mgmt-office-label {
  display: inline-block;
  margin: 0 auto 28px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 8px 18px;
  border-radius: var(--radius-full);
}

.mgmt-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.mgmt-grid .mgmt-card {
  flex: 0 1 260px;
}

.mgmt-group {
  margin-bottom: 64px;
}

.mgmt-group:last-child { margin-bottom: 0; }

.mgmt-group-head {
  text-align: center;
  margin-bottom: 32px;
}

/* Event card */
.event-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--grad-emerald);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 22px 22px 0;
  align-self: flex-start;
}

.event-date-badge strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
}

.event-date-badge span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-card .event-body {
  padding: 16px 22px 24px;
}

.event-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.event-card p { font-size: 0.9rem; }

.event-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

/* ---------- Filter bar (Find a Doctor) ---------- */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  position: relative;
  z-index: 2;
  margin-top: -48px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-group select {
  appearance: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 40px 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--emerald-100);
  background: var(--cream-50) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" stroke="%230b4d3c" stroke-width="1.6" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 16px center;
  color: var(--ink-900);
  min-height: 48px;
  transition: border-color 0.25s;
}

.field-group select:focus {
  outline: none;
  border-color: var(--emerald-600);
}

.filter-bar .btn {
  min-height: 48px;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 40px 0 24px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-meta strong { color: var(--emerald-800); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-400);
}

@media (max-width: 760px) {
  .filter-bar {
    grid-template-columns: 1fr;
    margin-top: -32px;
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-md);
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  padding: 16px;
}

.gallery-item .icon {
  width: 40px;
  height: 40px;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Contact / map ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item .contact-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--emerald-100);
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p, .contact-item a { font-size: 0.92rem; }
.contact-item a:hover { color: var(--emerald-700); }

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
  min-height: 380px;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Badges ---------- */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--grad-gold);
  color: var(--emerald-900);
  font-size: 0.72rem;
  font-weight: 800;
}
