.domains-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .domains-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .domains-grid {
    grid-template-columns: 1fr;
  }
}


.domain-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background-color: #f8f9fa;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Apply to both Bootstrap Icons (bi) and Font Awesome (fa) */
.domain-item i {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
  line-height: 1;           /* tighten vertical box */
  display: inline-block;    /* makes margin + line-height consistent */
  vertical-align: middle;   /* align baselines similarly */
  color: #0d6efd;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}


.domain-item span {
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.domain-item:hover {
  background-color: #e7f1ff;
  transform: translateY(-2px);
}

.domain-item:hover i {
  opacity: 1;
  color: #0b5ed7;
}

.domain-item {
  text-decoration: none;
  color: inherit;
}

.domain-item:visited {
  color: inherit;
}

.domain-item:hover {
  text-decoration: none;
}

.quarto-page, .container, .main-container {
  max-width: 1200px !important;
  width: 95% !important;
  margin: 0 auto;
}

/* Ensure DataTables cells wrap text */
table.dataTable td {
  white-space: normal !important;
  max-width: 300px;
  word-wrap: break-word;
} 

table.dataTable td:nth-child(0) {
  width: 500px !important;
}

.test-box {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: #fafafa;
}

.test-box summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
}

.test-box[open] {
  background: #ffffff;
  border-color: #b8c7e0;
}

.equipment-image {
  text-align: center;
  margin: 1rem 0;
}

.callout table {
  width: 100%;
}

.callout table th,
.callout table td {
  text-align: center;
  vertical-align: middle;
}

.vision-hero {
  border-left: 5px solid #0d6efd;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.05);
  padding: 1.5rem !important;
}

.vision-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #0d6efd;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.vision-heading i {
  font-size: 1.8rem;
}

.vision-hero p,
.vision-hero {
  line-height: 1.7;
}

@media (max-width: 768px) {
  .vision-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vision-hero-icon {
    margin: 0 auto 0.5rem auto;
  }
}

.resource-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.resource-card {
  display: grid;
  grid-template-columns: 120px 1fr 50px;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: white;
  transition: all 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
}

.resource-icon {
  height: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.resource-content {
  padding: 1.5rem;
}

.resource-content h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.resource-content p {
  margin-bottom: 0;
  color: #495057;
}

.resource-arrow {
  text-align: center;
  font-size: 1.5rem;
  opacity: 0.6;
}

.questionnaire .resource-icon {
  background: #e7f1ff;
  color: #0d6efd;
}

.scales .resource-icon {
  background: #eaf7ed;
  color: #198754;
}

.documentation .resource-icon {
  background: #f1ebff;
  color: #6f42c1;
}

.health .resource-icon {
  background: #fff3e6;
  color: #fd7e14;
}

.biomarkers .resource-icon {
  background: #fad5ff;
  color: #8b0000b6;
}

@media (max-width: 768px) {
  .resource-card {
    grid-template-columns: 1fr;
  }

  .resource-icon {
    min-height: 80px;
  }

  .resource-arrow {
    display: none;
  }
}

.assessment-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.mode-card {
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mode-card:hover {
  transform: translateY(-3px);
  text-decoration: none;
  color: inherit;
}

.mode-icon {
  width: 130px;
  height: 130px;
  margin: 0 auto 1.25rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.mode-accent {
  width: 48px;
  height: 6px;
  border-radius: 999px;
  margin: 0 auto 1.25rem auto;
}

.mode-card h3 {
  line-height: 1.25;
  min-height: 4.8rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  margin-bottom: 1rem;
}

.mode-card p {
  color: #495057;
  line-height: 1.55;
  flex-grow: 1;
  min-height: 7rem;
}

.mode-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid currentColor;
}

.mode-card.capi {
  color: #0d6efd;
}

.mode-card.capi .mode-icon {
  background: #e7f1ff;
}

.mode-card.capi .mode-accent {
  background: #0d6efd;
}

.mode-card.scq {
  color: #198754;
}

.mode-card.scq .mode-icon {
  background: #eaf7ed;
}

.mode-card.scq .mode-accent {
  background: #198754;
}

.mode-card.nurse {
  color: #fd7e14;
}

.mode-card.nurse .mode-icon {
  background: #fff3e6;
}

.mode-card.nurse .mode-accent {
  background: #fd7e14;
}

.mode-card p {
  color: #495057;
}

.eol {
  color: #6f42c1;
}

.eol .mode-icon {
  background: #f1ebff;
}

.eol .mode-accent {
  background: #6f42c1;
}

.harmonisation-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.04);
}

.harmonisation-note-icon {
  color: #0d6efd;
  font-size: 2rem;
  flex: 0 0 auto;
}

.harmonisation-note p {
  margin-bottom: 0;
  color: #495057;
}

@media (max-width: 900px) {
  .assessment-modes {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}