/* TỨ PHỦ — Hầu đồng ritual heritage museum */

.hd-hero {
  position: relative;
  overflow: hidden;
}

.hd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% 18%, rgba(196, 154, 89, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 45% at 92% 78%, rgba(116, 43, 50, 0.22), transparent 52%);
  pointer-events: none;
}

.hd-hero-media {
  position: relative;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(196, 154, 89, 0.4);
}

.hd-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(116, 43, 50, 0.35), transparent 45%),
    linear-gradient(0deg, rgba(25, 15, 18, 0.55), transparent 40%);
  pointer-events: none;
}

.hd-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.85rem 1rem;
  background: linear-gradient(transparent, rgba(25, 15, 18, 0.85));
  font-size: 0.7rem;
  color: #d5ba99;
}

.hd-info-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .hd-info-grid { grid-template-columns: repeat(4, 1fr); }
}

.hd-info-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(98, 68, 60, 0.35);
  background: rgba(255, 255, 255, 0.42);
  padding: 1rem;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s ease;
}

.hd-info-card:hover,
.hd-info-card:focus-visible {
  border-color: #c49a59;
  outline: none;
}

.hd-space-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-space-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .hd-space-grid { grid-template-columns: repeat(3, 1fr); }
}

.hd-space-node {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 1rem;
  text-align: left;
  color: #f4e6d1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hd-space-node:hover,
.hd-space-node:focus-visible,
.hd-space-node.is-active {
  border-color: #c49a59;
  background: rgba(53, 35, 38, 0.95);
  outline: none;
}

.hd-space-icon {
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid rgba(196, 154, 89, 0.4);
  color: #e4c58c;
}

.hd-space-panel {
  display: none;
  margin-top: 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(196, 154, 89, 0.35);
  background: rgba(53, 35, 38, 0.9);
  padding: 1.1rem 1.2rem;
}

.hd-space-panel.is-open {
  display: block;
}

.hd-directory {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .hd-directory {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
}

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

.hd-filter-field + .hd-filter-field {
  margin-top: 0.85rem;
}

.hd-filter-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: #d5ba99;
}

.hd-filter-field input,
.hd-filter-field select {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #62443c;
  background: #352326;
  color: #f4e6d1;
  padding: 0.55rem 0.7rem;
  font-size: 0.875rem;
}

.hd-filter-field input:focus,
.hd-filter-field select:focus {
  outline: none;
  border-color: #c49a59;
}

.texture-paper .hd-filter-field input,
.texture-paper .hd-filter-field select {
  border-color: rgba(98, 68, 60, 0.35);
  background: rgba(255, 255, 255, 0.65);
  color: #33241f;
}

.hd-filter-field select[size] {
  padding: 0.25rem;
}

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

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

.hd-results--list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hd-grid-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
}

.hd-list-item {
  display: grid;
  gap: 0.85rem;
  align-items: start;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 0.85rem;
}

@media (min-width: 640px) {
  .hd-list-item {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }
}

.hd-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  padding: 0.15rem 0.55rem;
  font-size: 0.65rem;
  color: #d5ba99;
}

.hd-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
  visibility: hidden;
}

.hd-filter-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.hd-filter-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 15, 18, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hd-filter-drawer.is-open .hd-filter-drawer-overlay {
  opacity: 1;
}

.hd-filter-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(100%, 360px);
  height: 100%;
  background: #2a1a1c;
  border-left: 1px solid #62443c;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

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

.hd-filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.hd-filter-drawer-foot {
  display: flex;
  gap: 0.5rem;
  border-top: 1px solid #62443c;
  padding: 0.85rem 1rem;
}

.hd-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .hd-gallery { grid-template-columns: repeat(4, 1fr); }
}

.hd-artifact {
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.3);
  background: rgba(255, 255, 255, 0.45);
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.hd-artifact:hover,
.hd-artifact:focus-visible {
  border-color: #c49a59;
  outline: none;
}

.hd-artifact-dark {
  border-color: rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  color: #f4e6d1;
}

.hd-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .hd-timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
  }
}

.hd-timeline-step {
  position: relative;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.85);
  padding: 1rem;
}

.hd-timeline-num {
  display: inline-flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(196, 154, 89, 0.5);
  color: #e4c58c;
  font-size: 0.75rem;
  font-weight: 600;
}

.hd-compare-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hd-compare-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .hd-compare-grid { grid-template-columns: repeat(3, 1fr); }
}

.hd-faq details {
  border-radius: 0.75rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.85);
  padding: 0.15rem 0;
}

.hd-faq details + details {
  margin-top: 0.55rem;
}

.hd-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  font-family: "Noto Serif", Georgia, serif;
  color: #f4e6d1;
}

.hd-faq summary::-webkit-details-marker {
  display: none;
}

.hd-faq summary:focus-visible {
  outline: 2px solid #c49a59;
  outline-offset: 2px;
}

.hd-faq-body {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #d5ba99;
}

.hd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(25, 15, 18, 0.88);
}

.hd-lightbox.is-open {
  display: flex;
}

.hd-lightbox-panel {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  border-radius: 0.85rem;
  border: 1px solid #62443c;
  background: #2a1a1c;
  color: #f4e6d1;
  padding: 1rem;
}

.hd-page-btn {
  display: inline-flex;
  min-width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid #62443c;
  background: #2a1a1c;
  color: #d5ba99;
  font-size: 0.8rem;
}

.hd-page-btn.is-active,
.hd-page-btn:hover:not(:disabled) {
  border-color: #c49a59;
  color: #e4c58c;
}

.hd-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.view-toggle-btn.is-active {
  border-color: #c49a59;
  color: #e4c58c;
  background: rgba(53, 35, 38, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .hd-filter-drawer-overlay,
  .hd-filter-drawer-panel,
  .hd-space-node,
  .hd-artifact {
    transition: none !important;
  }
}
