/* ================================================================
   Hanh Cac Thanh - Vestment-tinted Liquid Glass
   ================================================================ */

:root {
  --hct-radius: 18px;
  --hct-radius-sm: 12px;
}

/* Page */
.hct-page {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-5));
}

/* Hero */
.hct-hero {
  position: relative;
  overflow: hidden;
  margin: 10px 16px 16px;
  padding: 34px 18px 26px;
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.34) 100%),
    radial-gradient(circle at 85% 0%, rgba(255, 255, 255, 0.28) 0%, transparent 56%),
    linear-gradient(140deg, var(--color-primary-dark) 0%, var(--color-primary) 62%, rgba(0, 170, 200, 0.62) 100%);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.hct-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 55%);
  pointer-events: none;
}
.hct-hero-cross {
  display: block;
  margin-bottom: 8px;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}
.hct-hero h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  line-height: 1.15;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
}
.hct-hero p {
  margin: 0;
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* Today block */
.hct-today-block {
  margin: 0 16px 16px;
  padding: 14px;
  border-radius: var(--hct-radius);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.hct-today-block h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary-dark);
}
.hct-today-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hct-today-img,
.hct-today-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hct-today-img {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
.hct-today-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(145deg, var(--color-primary-light) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: var(--color-primary);
}
.hct-today-name {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.hct-today-feast {
  margin: 0 0 2px;
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 700;
}
.hct-today-desc {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.hct-today-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-primary-dark);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
}

/* Filter */
.hct-filter-bar {
  margin: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.hct-search-input,
.hct-filter-select {
  width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
}
.hct-search-input {
  padding: 11px 15px;
  font-size: 0.92rem;
}
.hct-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}
.hct-filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hct-filter-select {
  appearance: none;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}
.hct-filter-select option {
  background: var(--surface);
  color: var(--text);
}

/* Section title */
.hct-section-title {
  margin: 4px 16px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
}

/* Grid + cards */
.hct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px;
}
@media (min-width: 480px) {
  .hct-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hct-card {
  border-radius: var(--hct-radius);
  padding: 13px 11px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hct-card:active {
  transform: scale(0.97);
}
.hct-card-img,
.hct-card-placeholder {
  width: 68px;
  height: 68px;
  border-radius: 50%;
}
.hct-card-img {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}
.hct-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  line-height: 1;
  background: linear-gradient(145deg, var(--color-primary-light) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: var(--color-primary-dark);
}
.hct-card-name {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.hct-card-feast {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
}
.hct-card-cat {
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.69rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.72);
  text-align: center;
}
.hct-card.hct-today {
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.66) inset,
    0 0 0 2px rgba(0, 85, 165, 0.2);
}

/* Pagination */
.hct-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 22px 16px 0;
}
.hct-pagination a,
.hct-pagination span {
  min-width: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.hct-pagination .current {
  background-image:
    linear-gradient(140deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.05) 100%),
    linear-gradient(140deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Empty */
.hct-empty {
  margin: 12px 16px 0;
  padding: 28px 18px;
  border-radius: var(--hct-radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  box-shadow: var(--glass-shadow);
  text-align: center;
  color: var(--text-muted);
}
.hct-empty-icon {
  display: block;
  margin-bottom: 10px;
  font-size: 2.3rem;
  color: var(--color-primary);
}

/* Detail page */
.hct-detail-hero {
  position: relative;
  min-height: 248px;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 20px 20px 28px;
}
.hct-detail-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 18, 32, 0.08) 0%, rgba(12, 18, 32, 0.84) 100%),
    radial-gradient(ellipse 120% 80% at 50% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 62%),
    linear-gradient(150deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}
.hct-detail-portrait,
.hct-detail-portrait-placeholder {
  position: relative;
  z-index: 1;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.hct-detail-portrait {
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
}
.hct-detail-portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background: rgba(255, 255, 255, 0.24);
  border: 3px solid rgba(255, 255, 255, 0.6);
  color: #fff;
}
.hct-detail-name {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  font-size: 1.52rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.hct-detail-feast {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.hct-detail-body {
  padding: 0 16px;
}
.hct-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.hct-meta-item,
.hct-section-box {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
}
.hct-meta-item {
  border-radius: var(--hct-radius-sm);
  padding: 10px 12px;
}
.hct-meta-label {
  margin: 0 0 2px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}
.hct-meta-value {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 700;
}

.hct-section-box {
  border-radius: var(--hct-radius);
  padding: 16px;
  margin-bottom: 14px;
}
.hct-section-box h3 {
  margin: 0 0 10px;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-primary-dark);
}
.hct-bio-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}
.hct-bio-text p {
  margin: 0 0 10px;
}
.hct-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 14px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-primary-dark);
}

/* Dark mode fine tuning */
[data-theme="dark"] .hct-hero {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
[data-theme="dark"] .hct-search-input,
[data-theme="dark"] .hct-filter-select,
[data-theme="dark"] .hct-today-block,
[data-theme="dark"] .hct-card,
[data-theme="dark"] .hct-empty,
[data-theme="dark"] .hct-meta-item,
[data-theme="dark"] .hct-section-box,
[data-theme="dark"] .hct-pagination a,
[data-theme="dark"] .hct-pagination span {
  border-color: rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .hct-card-cat,
[data-theme="dark"] .hct-today-more {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Small devices */
@media (max-width: 380px) {
  .hct-hero h1 {
    font-size: 1.6rem;
  }
  .hct-card-name {
    font-size: 0.9rem;
  }
}
