:root {
  --crotchet-primary: #0f766e;
  --crotchet-primary-rgb: 15, 118, 110;
  --crotchet-accent: #14b8a6;
  --crotchet-dark: #102a43;
  --crotchet-soft: #f8fafc;
  --crotchet-muted: #64748b;
  --crotchet-border: #e5e7eb;
  --crotchet-cream: #f7f3ee;

  /* Replace this with your Unsplash image path, e.g. ../img/orchestra-hero.jpg */
  --hero-image: url('../img/hero.jpg');
}

html { scroll-behavior: smooth; }
body {
  color: var(--crotchet-dark);
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  border-top: 4px solid var(--crotchet-primary);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--crotchet-primary);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
}
.brand-text {
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--crotchet-dark);
}

.navbar .nav-link {
  font-weight: 650;
  color: var(--crotchet-dark);
}
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--crotchet-primary);
}
.dropdown-menu {
  border: 0;
  border-top: 3px solid var(--crotchet-primary);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
  border-radius: 0 0 12px 12px;
}
.dropdown-item:active,
.dropdown-item:hover {
  background: rgba(var(--crotchet-primary-rgb), .08);
  color: var(--crotchet-primary);
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--hero-image);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transform: scale(1.03);
}
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg,
      rgba(2, 6, 23, .92) 0%,
      rgba(2, 6, 23, .88) 47%,
      rgba(2, 6, 23, .38) 47.2%,
      rgba(2, 6, 23, .18) 100%);
}
.min-vh-hero { min-height: 680px; }
.hero-content { z-index: 1; }
.hero-search-panel { max-width: 620px; padding: 4rem 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .77rem;
  font-weight: 800;
}
.text-crotchet { color: var(--crotchet-primary); }
.search-card {
  background: rgba(255, 255, 255, .96);
  color: var(--crotchet-dark);
  padding: 1.25rem;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}
.btn-crotchet {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--crotchet-primary);
  --bs-btn-border-color: var(--crotchet-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b5f59;
  --bs-btn-hover-border-color: #0b5f59;
}
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  font-size: .94rem;
  color: var(--crotchet-muted);
}
.quick-links a { color: var(--crotchet-primary); font-weight: 700; text-decoration: none; }
.quick-links a:hover { text-decoration: underline; }

.section-pad { padding: 5rem 0; }
.bg-soft { background: var(--crotchet-soft); }
.section-title { font-weight: 850; letter-spacing: -.03em; }
.section-intro { color: var(--crotchet-muted); max-width: 760px; }
.feature-box {
  position: relative;
  display: block;
  padding: 1.4rem;
  border: 1px solid var(--crotchet-border);
  border-radius: 18px;
  background: #fff;
  color: var(--crotchet-dark);
  text-decoration: none;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 68px;
  height: 68px;
  border-top: 4px solid var(--crotchet-primary);
  border-left: 4px solid var(--crotchet-primary);
  border-radius: 18px 0 0 0;
}
.feature-box:hover,
.feature-box:focus {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .10);
}
.feature-icon {
  position: relative;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--crotchet-primary-rgb), .10);
  color: var(--crotchet-primary);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.feature-box h3 { font-size: 1.15rem; font-weight: 800; }
.feature-box p { color: var(--crotchet-muted); margin: 0; }

.image-card {
  min-height: 360px;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}
.placeholder-image {
  background:
    linear-gradient(135deg, rgba(var(--crotchet-primary-rgb), .85), rgba(16, 42, 67, .9)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.10) 0 1px, transparent 1px 16px);
}
.feature-panel {
  position: relative;
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid var(--crotchet-border);
}
.feature-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 110px;
  height: 110px;
  border-top: 5px solid var(--crotchet-primary);
  border-left: 5px solid var(--crotchet-primary);
  border-radius: 24px 0 0 0;
  pointer-events: none;
}
.mini-stat {
  padding: 1rem;
  border-radius: 14px;
  background: var(--crotchet-soft);
}
.mini-stat strong { display: block; font-size: 1.1rem; }
.mini-stat span { color: var(--crotchet-muted); }

.newsletter-section { padding: 5rem 0; background: var(--crotchet-cream); }
.newsletter-box {
  border-radius: 24px;
  background: var(--crotchet-primary);
  color: #fff;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(var(--crotchet-primary-rgb), .22);
}
.newsletter-box .form-control { border: 0; }

.site-footer {
  padding: 4rem 0 2rem;
  background: #0f172a;
  color: #cbd5e1;
}
.site-footer h2 { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer hr { border-color: rgba(255,255,255,.14); }

@media (max-width: 991.98px) {
  .site-header { position: static; }
  .hero-section::after {
    background: linear-gradient(180deg, rgba(2,6,23,.90), rgba(2,6,23,.62));
  }
  .min-vh-hero { min-height: auto; }
  .hero-search-panel { padding: 5rem 0; }
}

@media (max-width: 575.98px) {
  .hero-search-panel { padding: 3.5rem 0; }
  .search-card { padding: 1rem; }
  .input-group-lg { flex-wrap: wrap; }
  .input-group-lg .input-group-text { display: none; }
  .input-group-lg .form-control,
  .input-group-lg .btn { width: 100%; border-radius: .75rem !important; }
  .input-group-lg .btn { margin-top: .65rem; }
  .section-pad, .newsletter-section { padding: 3.5rem 0; }
}

/* Easy colour switch:
   To try burgundy/plum, replace the root colour values with:
   --crotchet-primary: #5b1f3a;
   --crotchet-primary-rgb: 91, 31, 58;
   --crotchet-accent: #b4537a;
*/

/* Search/results page */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--hero-image);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  transform: scale(1.03);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(2,6,23,.88), rgba(2,6,23,.55));
}
.compact-hero { padding: 5rem 0; }
.quick-search-card,
.filter-panel,
.sidebar-box {
  background: #fff;
  border: 1px solid var(--crotchet-border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 12px 36px rgba(15,23,42,.06);
}
.quick-search-card { color: var(--crotchet-dark); }
.filter-panel label { font-weight: 700; color: var(--crotchet-dark); }
.result-count { color: var(--crotchet-muted); }
.orchestra-card {
  position: relative;
  border: 1px solid var(--crotchet-border);
  border-radius: 18px;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 12px 36px rgba(15,23,42,.06);
}
.orchestra-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 72px;
  height: 72px;
  border-top: 4px solid var(--crotchet-primary);
  border-left: 4px solid var(--crotchet-primary);
  border-radius: 18px 0 0 0;
  pointer-events: none;
}
.result-card { padding-top: 3.1rem; }
.type-ribbon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(var(--crotchet-primary-rgb), .10);
  color: var(--crotchet-primary);
  font-weight: 800;
  font-size: .86rem;
  z-index: 1;
}
.type-icon { font-size: 1rem; }
.result-image {
  min-height: 160px;
  border-radius: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.placeholder-image-small {
  background:
    linear-gradient(135deg, rgba(var(--crotchet-primary-rgb), .88), rgba(16,42,67,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.13) 0 1px, transparent 1px 14px);
}
.placeholder-image-small.alt {
  background:
    linear-gradient(135deg, rgba(91,31,58,.88), rgba(16,42,67,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.13) 0 1px, transparent 1px 14px);
}
.placeholder-image-small.strings {
  background:
    linear-gradient(135deg, rgba(120,53,15,.84), rgba(16,42,67,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.13) 0 1px, transparent 1px 14px);
}
.badge-crotchet {
  background: rgba(var(--crotchet-primary-rgb), .10);
  color: var(--crotchet-primary);
}
.result-title a { color: var(--crotchet-dark); text-decoration: none; }
.result-title a:hover { color: var(--crotchet-primary); text-decoration: underline; }
.result-meta { margin: 0 0 1rem; }
.result-meta div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; margin-bottom: .35rem; }
.result-meta dt { color: var(--crotchet-muted); font-weight: 800; }
.result-meta dd { margin: 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.sidebar-stack { display: grid; gap: 1rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li + li { border-top: 1px solid var(--crotchet-border); }
.link-list a {
  display: flex;
  gap: .55rem;
  align-items: center;
  padding: .7rem 0;
  text-decoration: none;
  color: var(--crotchet-dark);
  font-weight: 700;
}
.link-list a:hover { color: var(--crotchet-primary); }
.btn-outline-crotchet {
  --bs-btn-color: var(--crotchet-primary);
  --bs-btn-border-color: var(--crotchet-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--crotchet-primary);
  --bs-btn-hover-border-color: var(--crotchet-primary);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud a {
  border: 1px solid var(--crotchet-border);
  border-radius: 999px;
  padding: .35rem .7rem;
  color: var(--crotchet-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
}
.tag-cloud a:hover { border-color: var(--crotchet-primary); color: var(--crotchet-primary); }
@media (max-width: 767.98px) {
  .compact-hero { padding: 3.25rem 0; }
  .result-meta div { grid-template-columns: 1fr; gap: 0; }
  .result-card { padding-top: 4rem; }
}

/* Search pagination */
.pagination-crotchet .page-link {
  border-color: rgba(15, 118, 110, 0.18);
  color: var(--crotchet-primary);
  font-weight: 700;
}

.pagination-crotchet .page-link:hover,
.pagination-crotchet .page-link:focus {
  color: #fff;
  background: var(--crotchet-primary);
  border-color: var(--crotchet-primary);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, 0.18);
}

.pagination-crotchet .page-item.active .page-link {
  color: #fff;
  background: var(--crotchet-primary);
  border-color: var(--crotchet-primary);
}

.pagination-crotchet .page-item.disabled .page-link {
  color: #94a3b8;
  background: #fff;
  border-color: #e5e7eb;
}

/* Orchestra detail page */
.detail-hero .detail-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 999px;
  padding: .45rem .75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.detail-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--crotchet-border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.detail-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 82px;
  height: 82px;
  border-top: 4px solid var(--crotchet-primary);
  border-left: 4px solid var(--crotchet-primary);
  border-radius: 18px 0 0 0;
  pointer-events: none;
}

/* Detail page: keep the orchestra-type ribbon clear of the heading */
.detail-card > .type-ribbon + h2 {
  padding-top: 2.45rem;
}

.detail-meta {
  margin-top: 2.25rem;
}
.prose-text {
  color: #334155;
  line-height: 1.75;
}
.venue-box {
  border: 1px solid var(--crotchet-border);
  border-radius: 14px;
  padding: 1rem;
  background: #f8fafc;
}
.venue-box + .venue-box {
  margin-top: .9rem;
}
.detail-sidebar {
  top: 1rem;
}
.contact-card {
  border-top: 1px solid var(--crotchet-border);
  padding: .9rem 0;
}
.contact-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.contact-card:last-child {
  padding-bottom: 0;
}
.detail-list {
  list-style: none;
  padding: 0;
}
.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-top: 1px solid var(--crotchet-border);
}
.detail-list li:first-child {
  border-top: 0;
  padding-top: 0;
}
.detail-list span {
  color: var(--crotchet-muted);
  font-weight: 800;
}
.detail-list strong {
  text-align: right;
}
.mini-orchestra-card {
  display: block;
  height: 100%;
  border: 1px solid var(--crotchet-border);
  border-radius: 16px;
  padding: 1.1rem;
  background: #fff;
  text-decoration: none;
  color: var(--crotchet-dark);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}
.mini-orchestra-card:hover {
  border-color: rgba(var(--crotchet-primary-rgb), .45);
  transform: translateY(-2px);
}
.mini-orchestra-card span,
.mini-orchestra-card em {
  display: block;
  color: var(--crotchet-muted);
  font-style: normal;
  font-size: .9rem;
}
.mini-orchestra-card strong {
  display: block;
  margin: .35rem 0;
  font-size: 1.05rem;
}
/* Search results: give the orchestra type badge more breathing room above the image --- THIS DID NOT seem to do the trick! */
.result-card .type-badge,
.orchestra-result-card .type-badge,
.result-card .orchestra-type-badge,
.orchestra-result-card .orchestra-type-badge {
  margin-bottom: 1.25rem;
}
/* Search results: push image/placeholder down below the orchestra type badge */
.orchestra-card .result-image,
.orchestra-card .orchestra-image,
.orchestra-card .image-placeholder,
.orchestra-result .result-image,
.orchestra-result .orchestra-image,
.orchestra-result .image-placeholder {
  margin-top: 1.75rem;
}
/* Homepage orchestra type boxes */
.type-feature-box h3 {
  min-height: 2.4rem;
}

.type-feature-box p {
  margin-bottom: 0;
}
/* Detail page: make space for the absolutely positioned orchestra type ribbon */
.detail-card {
  padding-top: 4.25rem;
}
.filter-clear-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--crotchet-primary);
  text-decoration: none;
}

.filter-clear-link:hover,
.filter-clear-link:focus {
  color: var(--crotchet-dark);
  text-decoration: underline;
}
@media (max-width: 991.98px) {
  .detail-sidebar {
    position: static !important;
  }
  /* Search results: active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.active-filters-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--crotchet-dark);
  margin-right: 0.25rem;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.08);
  color: var(--crotchet-dark);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
}

.active-filter-chip strong {
  color: var(--crotchet-primary);
}
/* Search results: no-results state */
.no-results-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.no-results-icon {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--crotchet-primary);
  font-size: 1.35rem;
}

@media (max-width: 575.98px) {
  .no-results-card {
    display: block;
  }

  .no-results-icon {
    margin-bottom: 1rem;
  }
}
/* Detail page: rehearsal / venue information */
.rehearsal-card {
  padding-top: 1.5rem;
}

.rehearsal-info-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(15, 118, 110, 0.045);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 1rem;
  padding: 1rem;
}

.rehearsal-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--crotchet-primary);
  font-size: 1.15rem;
}

.rehearsal-info-block h3 {
  color: var(--crotchet-dark);
}

@media (max-width: 575.98px) {
  .rehearsal-info-block {
    display: block;
  }

  .rehearsal-info-icon {
    margin-bottom: 0.75rem;
  }
}
/* Detail page: split rehearsal times / venue text */
.rehearsal-split-text > div + div {
  margin-top: 0.35rem;
}
/* Admin tables */
.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--crotchet-muted);
  border-top: 0;
}

.admin-table td {
  vertical-align: middle;
}
/* Admin edit form */
.admin-edit-form .form-label {
  font-weight: 700;
  color: var(--crotchet-dark);
}

.admin-edit-form textarea {
  min-height: 7rem;
}
/* Admin notes icon */
.admin-note-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--crotchet-primary);
  cursor: help;
}

.admin-note-icon:hover {
  background: rgba(15, 118, 110, 0.16);
}
/* Admin link icon */
.admin-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--crotchet-primary);
  text-decoration: none;
}

.admin-link-icon:hover,
.admin-link-icon:focus {
  background: rgba(15, 118, 110, 0.16);
  color: var(--crotchet-dark);
}
/* Admin duplicate finder */
.duplicate-group {
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}

.duplicate-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 118, 110, 0.06);
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
}
/* Admin link checker */
.admin-url-cell {
  max-width: 420px;
  word-break: break-word;
}

.admin-final-url {
  display: block;
  max-width: 360px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Composer admin */
.composer-searchterms {
  max-width: 520px;
  color: var(--crotchet-muted);
}

/* Admin summary tiles */
.summary-tile {
  background: #fff;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.summary-tile-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--crotchet-primary);
  margin-bottom: 0.25rem;
}

.summary-tile-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--crotchet-dark);
}

/* Admin action button groups */
.admin-page-actions .btn {
  white-space: nowrap;
}

.result-name-history {
  border-left: 3px solid rgba(159, 122, 234, 0.35);
  padding-left: 0.75rem;
  margin-bottom: 0.75rem;
  color: #6c757d;
  font-size: 0.92rem;
}

.result-name-history-item + .result-name-history-item {
  margin-top: 0.15rem;
}

.result-name-history-label {
  font-weight: 600;
  color: #5f6470;
}

.result-name-history-name {
  font-style: italic;
}

}
