:root {
  --primary: #1f5f8b;
  --primary-dark: #173b57;
  --background: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f1f4f7;
  --text: #17212b;
  --muted: #65717d;
  --border: #dde3ea;
  --shadow: 0 10px 28px rgba(23, 33, 43, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: white;
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -0.04em;
}

.brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav a {
  padding: 9px 12px;
  border-radius: 999px;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.intro {
  max-width: 1520px;
  margin: 0 auto;
  padding: 34px 28px 18px;
}

.eyebrow,
.section-kicker {
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 10px;
}

.intro h1 {
  max-width: 920px;
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.intro p {
  margin-top: 16px;
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.controls-wrap {
  max-width: 1520px;
  margin: 0 auto;
  padding: 18px 28px 18px;
}

.controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  box-shadow: var(--shadow);
}

.search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 15px;
  outline: none;
  background: white;
}

.search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 95, 139, 0.11);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.filter-button {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 11px 13px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.filter-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.filter-button.active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.gallery-section {
  max-width: 1520px;
  margin: 0 auto;
  padding: 14px 28px 74px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 30px;
  letter-spacing: -0.055em;
}

.result-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #b8c7d4;
  box-shadow: 0 18px 42px rgba(23, 33, 43, 0.11);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e9eef3;
  overflow: hidden;
}

.thumb-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 95, 139, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 139, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.thumb-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.medical-icon {
  width: 74px;
  height: 74px;
  border: 10px solid rgba(31, 95, 139, 0.16);
  border-top-color: rgba(31, 95, 139, 0.58);
  border-radius: 50%;
  position: relative;
}

.medical-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -20%;
  width: 2px;
  height: 140%;
  background: rgba(31, 95, 139, 0.38);
  transform: rotate(35deg);
}

.badge-row {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);
  border: 1px solid rgba(221, 227, 234, 0.8);
}

.play-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(23, 59, 87, 0.92);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 160ms ease;
}

.card:hover .play-pill {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.card-description {
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
  min-height: 60px;
}

.meta {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #74808b;
  font-size: 12px;
  gap: 10px;
}

.meta strong {
  color: var(--primary);
}

.empty-state {
  display: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  text-align: center;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  background: white;
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }

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

@media (max-width: 600px) {
  .topbar-inner,
  .intro,
  .controls-wrap,
  .gallery-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .intro h1 {
    font-size: 40px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
