/* =========================================================
   TỨ PHỦ — Historical heritage directory (UI-45)
   ========================================================= */

.hh-intro {
  padding: 1rem 0 1.25rem;
}

.hh-intro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hh-intro-stat {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 10px;
  background: rgba(42, 26, 28, 0.85);
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  color: #d5ba99;
}

.hh-intro-stat strong {
  display: block;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: #e4c58c;
}

.hh-search-wrap {
  position: relative;
  margin-top: 1rem;
  max-width: 42rem;
}

.hh-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(196, 154, 89, 0.45);
  border-radius: 12px;
  background: #2a1a1c;
  padding: 0.35rem 0.55rem 0.35rem 0.85rem;
}

.hh-search-input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #f4e6d1;
  font-size: 0.95rem;
  padding: 0.65rem 0;
  outline: none;
}

.hh-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 10px;
  background: #2a1a1c;
  overflow: hidden;
}

.hh-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f4e6d1;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

.hh-suggest-item:hover,
.hh-suggest-item:focus {
  background: rgba(53, 35, 38, 0.9);
}

.hh-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.75rem 0 0.25rem;
  scrollbar-width: thin;
}

.hh-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 999px;
  background: transparent;
  color: #d5ba99;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.hh-chip.is-active,
.hh-chip:hover {
  border-color: #c49a59;
  color: #190f12;
  background: #c49a59;
}

.hh-chip span {
  opacity: 0.8;
  margin-left: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.hh-featured {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (min-width: 900px) {
  .hh-featured {
    grid-template-columns: 1.4fr 1fr;
  }
}

.hh-featured-side {
  display: grid;
  gap: 0.75rem;
}

.hh-layout {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 1100px) {
  body[data-hh-view="split"] .hh-layout,
  body[data-hh-view="grid"] .hh-layout,
  body[data-hh-view="list"] .hh-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body[data-hh-view="split"] .hh-map-shell {
    grid-column: 1 / -1;
  }

  body[data-hh-view="map"] .hh-layout {
    grid-template-columns: 1fr;
  }

  body[data-hh-view="map"] .hh-sidebar,
  body[data-hh-view="map"] .hh-results-pane {
    display: none;
  }
}

.hh-sidebar {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 12px;
  background: rgba(42, 26, 28, 0.85);
  padding: 1rem;
}

.hh-filter-label {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c49a59;
}

.hh-filter-stack {
  display: grid;
  gap: 0.25rem;
  max-height: 180px;
  overflow: auto;
}

.hh-filter-check {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #f4e6d1;
}

.hh-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.hh-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.hh-select {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 8px;
  background: #2a1a1c;
  color: #f4e6d1;
  font-size: 0.8rem;
  padding: 0.4rem 0.55rem;
}

.hh-view-btn {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 8px;
  background: transparent;
  color: #d5ba99;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.hh-view-btn.is-active {
  border-color: #c49a59;
  color: #e4c58c;
}

.hh-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.hh-active-chip {
  border: 1px solid rgba(196, 154, 89, 0.45);
  border-radius: 999px;
  background: rgba(53, 35, 38, 0.65);
  color: #f4e6d1;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
}

.hh-results--grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hh-results--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .hh-results--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hh-card,
.hh-explore-card,
.hh-collection-card {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 12px;
  background: rgba(42, 26, 28, 0.9);
  overflow: hidden;
  text-align: left;
  color: inherit;
  width: 100%;
  cursor: pointer;
  transition: border-color 160ms ease;
}

.hh-card:hover,
.hh-explore-card:hover,
.hh-collection-card:hover {
  border-color: #c49a59;
}

.hh-card-media img,
.hh-list-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #352326;
}

.hh-card-body {
  padding: 0.85rem 1rem 1rem;
}

.hh-card-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c49a59;
}

.hh-card-title {
  margin: 0.35rem 0 0;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 1.05rem;
  color: #f4e6d1;
}

.hh-card-meta,
.hh-card-figs,
.hh-card-rel,
.hh-card-summary {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #d5ba99;
}

.hh-card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hh-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.hh-results--list {
  display: grid;
  gap: 0.65rem;
}

.hh-list-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 12px;
  padding: 0.65rem;
  background: rgba(42, 26, 28, 0.85);
}

.hh-list-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
}

.hh-list-body h3 {
  margin: 0;
  font-family: "Noto Serif", Georgia, serif;
  color: #f4e6d1;
}

.hh-map-shell {
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 12px;
  overflow: hidden;
  background: #2a1a1c;
}

.hh-map {
  height: min(62vh, 520px);
  min-height: 280px;
  background: #1f1416;
}

.hh-map-fallback {
  display: grid;
  place-content: center;
  gap: 0.75rem;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  color: #d5ba99;
}

.hh-map-note {
  margin: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  color: #d5ba99;
  border-top: 1px solid rgba(98, 68, 60, 0.45);
}

.hh-marker {
  background: transparent;
  border: 0;
}

.hh-marker-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #f4e6d1;
  background: #742b32;
  box-shadow: 0 0 0 2px rgba(25, 15, 18, 0.45);
}

.hh-marker--temple .hh-marker-dot { background: #742b32; }
.hh-marker--citadel .hh-marker-dot { background: #62443c; }
.hh-marker--museum .hh-marker-dot { background: #c49a59; }
.hh-marker--memorial .hh-marker-dot { background: #913c43; }
.hh-marker--archaeology .hh-marker-dot { background: #8a6a3d; }
.hh-marker--battlefield .hh-marker-dot { background: #4a2f28; }
.hh-marker--pin .hh-marker-dot { background: #352326; }

.hh-explore-grid,
.hh-collections {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

@media (min-width: 700px) {
  .hh-explore-grid,
  .hh-collections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .hh-explore-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hh-collections {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hh-explore-card,
.hh-collection-card {
  padding: 1rem;
}

.hh-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.hh-mobile-bar {
  display: flex;
  gap: 0.5rem;
  position: sticky;
  bottom: 0.75rem;
  z-index: 25;
  margin-top: 1rem;
}

@media (min-width: 1100px) {
  .hh-mobile-bar {
    display: none;
  }
}

.hh-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.hh-drawer.is-open {
  pointer-events: auto;
}

.hh-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(100%, 420px);
  background: #2a1a1c;
  border-left: 1px solid rgba(98, 68, 60, 0.55);
  transform: translateX(100%);
  transition: transform 180ms ease;
  overflow: auto;
}

.hh-drawer.is-open .hh-drawer-panel {
  transform: translateX(0);
}

@media (max-width: 699px) {
  .hh-drawer-panel {
    top: auto;
    bottom: 0;
    height: min(78vh, 640px);
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(98, 68, 60, 0.55);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .hh-drawer.is-open .hh-drawer-panel {
    transform: translateY(0);
  }
}

.hh-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(98, 68, 60, 0.45);
}

.hh-drawer-body {
  padding: 1rem;
}

.hh-qv-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: #f4e6d1;
}

.hh-relation-diagram {
  border: 1px dashed rgba(196, 154, 89, 0.4);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.78rem;
  color: #d5ba99;
}

.hh-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(25, 15, 18, 0.72);
  display: none;
}

.hh-mobile-drawer.is-open {
  display: block;
}

.hh-mobile-drawer-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  overflow: auto;
  background: #2a1a1c;
  border-radius: 16px 16px 0 0;
  padding: 1rem;
}

.hh-mobile-drawer-foot {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .hh-card,
  .hh-drawer-panel {
    transition: none;
  }
}
